From 8b727e32e4a5eac95e7fb8a67fe5f5d4dc587224 Mon Sep 17 00:00:00 2001 From: MacondoExpress Date: Thu, 5 Dec 2024 16:41:35 +0000 Subject: [PATCH 1/7] WIP, add initial implementation for generic relationship filters, null logic missing --- .../model-adapters/ListFiltersAdapter.ts | 126 -- .../model-adapters/RelationshipAdapter.ts | 11 - .../RelationshipDeclarationAdapter.ts | 12 - .../RelationshipDeclarationOperations.ts | 10 +- .../model-adapters/RelationshipOperations.ts | 8 + .../schema/generation/augment-where-input.ts | 276 +++- .../src/schema/generation/where-input.ts | 23 +- .../where/utils/parse-filter-property.ts | 28 +- .../queryAST/ast/filters/ConnectionFilter.ts | 2 +- .../translate/queryAST/ast/filters/Filter.ts | 7 +- .../ast/filters/RelationshipFilter.ts | 50 +- .../AuthRelationshipFilter.ts | 8 +- .../queryAST/factory/AuthFilterFactory.ts | 22 +- .../queryAST/factory/FilterFactory.ts | 128 +- .../factory/parsers/parse-where-field.ts | 38 +- .../graphql/tests/schema/aggregations.test.ts | 32 + .../tests/schema/array-methods.test.ts | 64 + .../tests/schema/authorization.test.ts | 64 + .../graphql/tests/schema/comments.test.ts | 96 ++ .../tests/schema/connections/enums.test.ts | 64 + .../schema/connections/interfaces.test.ts | 176 +++ .../tests/schema/connections/sort.test.ts | 64 + .../tests/schema/connections/unions.test.ts | 100 ++ .../tests/schema/directive-preserve.test.ts | 448 ++++++ .../tests/schema/directives/alias.test.ts | 32 + .../schema/directives/filterable.test.ts | 900 +++++++++++- .../schema/directives/populatedBy.test.ts | 64 + .../directives/relationship-aggregate.test.ts | 192 +++ .../relationship-nested-operations.test.ts | 1088 +++++++++++++++ .../relationship-properties.test.ts | 192 +++ .../schema/directives/relationship.test.ts | 64 + .../schema/directives/selectable.test.ts | 192 +++ .../tests/schema/directives/settable.test.ts | 704 ++++++++++ .../graphql/tests/schema/federation.test.ts | 96 ++ .../graphql/tests/schema/inheritance.test.ts | 64 + .../schema/interface-relationships.test.ts | 1220 ++++++++++++++++- .../graphql/tests/schema/interfaces.test.ts | 128 ++ .../graphql/tests/schema/issues/1182.test.ts | 32 + .../graphql/tests/schema/issues/1614.test.ts | 32 + .../graphql/tests/schema/issues/162.test.ts | 80 ++ .../graphql/tests/schema/issues/2187.test.ts | 64 + .../graphql/tests/schema/issues/2377.test.ts | 32 + .../graphql/tests/schema/issues/2993.test.ts | 32 + .../graphql/tests/schema/issues/3428.test.ts | 64 + .../graphql/tests/schema/issues/3541.test.ts | 64 + .../graphql/tests/schema/issues/3698.test.ts | 64 + .../graphql/tests/schema/issues/3817.test.ts | 32 + .../graphql/tests/schema/issues/4511.test.ts | 176 +++ .../graphql/tests/schema/issues/4615.test.ts | 128 ++ .../graphql/tests/schema/issues/872.test.ts | 64 + .../tests/schema/lowercase-type-names.test.ts | 64 + packages/graphql/tests/schema/math.test.ts | 192 +++ .../schema/nested-aggregation-on-type.test.ts | 32 + .../schema/pluralize-consistency.test.ts | 40 + .../tests/schema/query-direction.test.ts | 64 + .../remove-deprecated/array-methods.test.ts | 64 + .../schema/remove-deprecated/comments.test.ts | 96 ++ .../tests/schema/string-comparators.test.ts | 64 + .../tests/schema/subscriptions.test.ts | 384 ++++++ .../union-interface-relationship.test.ts | 160 +++ packages/graphql/tests/schema/unions.test.ts | 32 + .../tests/tck/advanced-filtering.test.ts | 75 +- .../advanced-filtering-deprecated.test.ts | 24 - packages/graphql/tests/tck/null.test.ts | 22 + 64 files changed, 8550 insertions(+), 420 deletions(-) delete mode 100644 packages/graphql/src/schema-model/attribute/model-adapters/ListFiltersAdapter.ts diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/ListFiltersAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/ListFiltersAdapter.ts deleted file mode 100644 index eb223d8b29..0000000000 --- a/packages/graphql/src/schema-model/attribute/model-adapters/ListFiltersAdapter.ts +++ /dev/null @@ -1,126 +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 pluralize from "pluralize"; -import type { RelationshipAdapter } from "../../relationship/model-adapters/RelationshipAdapter"; -import type { RelationshipDeclarationAdapter } from "../../relationship/model-adapters/RelationshipDeclarationAdapter"; - -export class ListFiltersAdapter { - readonly relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter; - - constructor(relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter) { - 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 1a7f421488..80b03d1eaa 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipAdapter.ts @@ -23,7 +23,6 @@ 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 { ListFiltersAdapter } from "../../attribute/model-adapters/ListFiltersAdapter"; import type { Entity } from "../../entity/Entity"; import type { EntityAdapter } from "../../entity/EntityAdapter"; import { ConcreteEntityAdapter } from "../../entity/model-adapters/ConcreteEntityAdapter"; @@ -35,7 +34,6 @@ import type { NestedOperation, QueryDirection, Relationship, RelationshipDirecti import { RelationshipOperations } from "./RelationshipOperations"; export class RelationshipAdapter { - private _listFiltersModel: ListFiltersAdapter | undefined; public readonly name: string; public readonly type: string; public readonly attributes: Map = new Map(); @@ -116,15 +114,6 @@ export class RelationshipAdapter { } return this._operations; } - public 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) { diff --git a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipDeclarationAdapter.ts b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipDeclarationAdapter.ts index 17cc658a10..71c76b6bf8 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipDeclarationAdapter.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipDeclarationAdapter.ts @@ -21,7 +21,6 @@ import { RelationshipNestedOperationsOption } from "../../../constants"; import type { Annotations } from "../../annotation/Annotation"; import type { Argument } from "../../argument/Argument"; import type { AttributeAdapter } from "../../attribute/model-adapters/AttributeAdapter"; -import { ListFiltersAdapter } from "../../attribute/model-adapters/ListFiltersAdapter"; import type { Entity } from "../../entity/Entity"; import type { EntityAdapter } from "../../entity/EntityAdapter"; import { ConcreteEntityAdapter } from "../../entity/model-adapters/ConcreteEntityAdapter"; @@ -35,7 +34,6 @@ import { RelationshipAdapter } from "./RelationshipAdapter"; import { RelationshipDeclarationOperations } from "./RelationshipDeclarationOperations"; export class RelationshipDeclarationAdapter { - private _listFiltersModel: ListFiltersAdapter | undefined; public readonly name: string; public readonly source: EntityAdapter; private rawEntity: Entity; @@ -91,16 +89,6 @@ export class RelationshipDeclarationAdapter { this.firstDeclaredInTypeName = firstDeclaredInTypeName; } - public get listFiltersModel(): ListFiltersAdapter | undefined { - if (!this._listFiltersModel) { - if (!this.isList) { - return; - } - this._listFiltersModel = new ListFiltersAdapter(this); - } - return this._listFiltersModel; - } - public get operations(): RelationshipDeclarationOperations { if (!this._operations) { return new RelationshipDeclarationOperations(this); diff --git a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipDeclarationOperations.ts b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipDeclarationOperations.ts index 4b07e57c9e..fd24577f9a 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipDeclarationOperations.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipDeclarationOperations.ts @@ -17,8 +17,8 @@ * limitations under the License. */ -import type { RelationshipDeclarationAdapter } from "./RelationshipDeclarationAdapter"; import { RelationshipBaseOperations } from "./RelationshipBaseOperations"; +import type { RelationshipDeclarationAdapter } from "./RelationshipDeclarationAdapter"; export class RelationshipDeclarationOperations extends RelationshipBaseOperations { constructor(relationshipDeclaration: RelationshipDeclarationAdapter) { @@ -36,4 +36,12 @@ export class RelationshipDeclarationOperations extends RelationshipBaseOperation public get relationshipPropertiesFieldTypename(): string { return `${this.relationshipFieldTypename}Properties`; } + + public get relationshipFiltersTypeName(): string { + return `${this.prefixForTypename}RelationshipFilters`; + } + + public get connectionFiltersTypeName(): string { + return `${this.prefixForTypename}ConnectionFilters`; + } } 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 649363bb83..0316eacd18 100644 --- a/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts +++ b/packages/graphql/src/schema-model/relationship/model-adapters/RelationshipOperations.ts @@ -54,4 +54,12 @@ export class RelationshipOperations extends RelationshipBaseOperations { + itc.addFields(relationshipFiltersFields); + }); + + whereInput.addFields({ + [relationshipAdapter.name]: { + type: relationshipAdapter.operations.relationshipFiltersTypeName, + }, + }); -export function augmentWhereInputTypeWithRelationshipFields( - relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter, - deprecatedDirectives: Directive[] -): InputTypeComposerFieldConfigMapDefinition { - const filters = relationshipAdapter.listFiltersModel?.filters; - return augmentRelationshipWhereInputType({ - whereType: relationshipAdapter.target.operations.whereInputTypeName, - fieldName: relationshipAdapter.name, - filters, - relationshipAdapter, + // Connection filters + const connectionFiltersFields = fieldConfigsToFieldConfigMap({ deprecatedDirectives, + fields: getRelationshipConnectionFilters(relationshipAdapter), + }); + + composer.getOrCreateITC(relationshipAdapter.operations.connectionFiltersTypeName, (itc) => { + itc.addFields(connectionFiltersFields); + }); + + whereInput.addFields({ + [relationshipAdapter.operations.connectionFieldName]: { + type: relationshipAdapter.operations.connectionFiltersTypeName, + }, }); -} -export function augmentWhereInputTypeWithConnectionFields( - relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter, - deprecatedDirectives: Directive[] -): InputTypeComposerFieldConfigMapDefinition { - const filters = relationshipAdapter.listFiltersModel?.connectionFilters; - return augmentRelationshipWhereInputType({ - whereType: relationshipAdapter.operations.getConnectionWhereTypename(), - fieldName: relationshipAdapter.operations.connectionFieldName, - filters, - relationshipAdapter, + // Add relationship legacy filter fields + const legacyRelationship = fieldConfigsToFieldConfigMap({ deprecatedDirectives, + fields: getRelationshipFiltersLegacy(relationshipAdapter), }); + whereInput.addFields(legacyRelationship); + + // Add connection legacy filter fields + const legacyConnection = fieldConfigsToFieldConfigMap({ + deprecatedDirectives, + fields: getRelationshipConnectionFiltersLegacy(relationshipAdapter), + }); + whereInput.addFields(legacyConnection); +} + +function getRelationshipFilters( + relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter +): FieldConfig[] { + return [ + { + name: "all", + typeName: relationshipAdapter.target.operations.whereInputTypeName, + description: `Return ${pluralize( + relationshipAdapter.source.name + )} where all of the related ${pluralize(relationshipAdapter.target.name)} match this filter`, + }, + + { + name: "none", + typeName: relationshipAdapter.target.operations.whereInputTypeName, + description: `Return ${pluralize( + relationshipAdapter.source.name + )} where none of the related ${pluralize(relationshipAdapter.target.name)} match this filter`, + }, + + { + name: "single", + typeName: relationshipAdapter.target.operations.whereInputTypeName, + description: `Return ${pluralize( + relationshipAdapter.source.name + )} where one of the related ${pluralize(relationshipAdapter.target.name)} match this filter`, + }, + + { + name: "some", + typeName: relationshipAdapter.target.operations.whereInputTypeName, + description: `Return ${pluralize( + relationshipAdapter.source.name + )} where some of the related ${pluralize(relationshipAdapter.target.name)} match this filter`, + }, + ]; +} + +function getRelationshipConnectionFilters( + relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter +): FieldConfig[] { + return [ + { + name: "all", + typeName: relationshipAdapter.operations.getConnectionWhereTypename(), + description: `Return ${pluralize(relationshipAdapter.source.name)} where all of the related ${pluralize( + relationshipAdapter.operations.connectionFieldTypename + )} match this filter`, + }, + { + name: "none", + typeName: relationshipAdapter.operations.getConnectionWhereTypename(), + description: `Return ${pluralize(relationshipAdapter.source.name)} where none of the related ${pluralize( + relationshipAdapter.operations.connectionFieldTypename + )} match this filter`, + }, + { + name: "single", + typeName: relationshipAdapter.operations.getConnectionWhereTypename(), + description: `Return ${pluralize(relationshipAdapter.source.name)} where one of the related ${pluralize( + relationshipAdapter.operations.connectionFieldTypename + )} match this filter`, + }, + { + name: "some", + typeName: relationshipAdapter.operations.getConnectionWhereTypename(), + description: `Return ${pluralize(relationshipAdapter.source.name)} where some of the related ${pluralize( + relationshipAdapter.operations.connectionFieldTypename + )} match this filter`, + }, + ]; +} + +function getRelationshipFiltersLegacy( + relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter +): FieldConfig[] { + return [ + { + name: `${relationshipAdapter.name}_ALL`, + typeName: relationshipAdapter.target.operations.whereInputTypeName, + description: `Return ${pluralize( + relationshipAdapter.source.name + )} where all of the related ${pluralize(relationshipAdapter.target.name)} match this filter`, + }, + { + name: `${relationshipAdapter.name}_NONE`, + typeName: relationshipAdapter.target.operations.whereInputTypeName, + description: `Return ${pluralize( + relationshipAdapter.source.name + )} where none of the related ${pluralize(relationshipAdapter.target.name)} match this filter`, + }, + { + name: `${relationshipAdapter.name}_SINGLE`, + typeName: relationshipAdapter.target.operations.whereInputTypeName, + description: `Return ${pluralize( + relationshipAdapter.source.name + )} where one of the related ${pluralize(relationshipAdapter.target.name)} match this filter`, + }, + { + name: `${relationshipAdapter.name}_SOME`, + typeName: relationshipAdapter.target.operations.whereInputTypeName, + description: `Return ${pluralize( + relationshipAdapter.source.name + )} where some of the related ${pluralize(relationshipAdapter.target.name)} match this filter`, + }, + ]; +} + +function getRelationshipConnectionFiltersLegacy( + relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter +): FieldConfig[] { + return [ + { + name: `${relationshipAdapter.operations.connectionFieldName}_ALL`, + typeName: relationshipAdapter.operations.getConnectionWhereTypename(), + description: `Return ${pluralize(relationshipAdapter.source.name)} where all of the related ${pluralize( + relationshipAdapter.operations.connectionFieldTypename + )} match this filter`, + }, + { + name: `${relationshipAdapter.operations.connectionFieldName}_NONE`, + typeName: relationshipAdapter.operations.getConnectionWhereTypename(), + description: `Return ${pluralize(relationshipAdapter.source.name)} where none of the related ${pluralize( + relationshipAdapter.operations.connectionFieldTypename + )} match this filter`, + }, + { + name: `${relationshipAdapter.operations.connectionFieldName}_SINGLE`, + typeName: relationshipAdapter.operations.getConnectionWhereTypename(), + description: `Return ${pluralize(relationshipAdapter.source.name)} where one of the related ${pluralize( + relationshipAdapter.operations.connectionFieldTypename + )} match this filter`, + }, + { + name: `${relationshipAdapter.operations.connectionFieldName}_SOME`, + typeName: relationshipAdapter.operations.getConnectionWhereTypename(), + description: `Return ${pluralize(relationshipAdapter.source.name)} where some of the related ${pluralize( + relationshipAdapter.operations.connectionFieldTypename + )} match this filter`, + }, + ]; } diff --git a/packages/graphql/src/schema/generation/where-input.ts b/packages/graphql/src/schema/generation/where-input.ts index ceef2d3b6e..84a49b0150 100644 --- a/packages/graphql/src/schema/generation/where-input.ts +++ b/packages/graphql/src/schema/generation/where-input.ts @@ -29,15 +29,13 @@ import type { EntityAdapter } from "../../schema-model/entity/EntityAdapter"; 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 { RelationshipDeclarationAdapter } from "../../schema-model/relationship/model-adapters/RelationshipDeclarationAdapter"; +import { isUnionEntity } from "../../translate/queryAST/utils/is-union-entity"; import type { Neo4jFeaturesSettings } from "../../types"; import { getWhereFieldsForAttributes } from "../get-where-fields"; import { withAggregateInputType } from "./aggregate-types"; -import { - augmentWhereInputTypeWithConnectionFields, - augmentWhereInputTypeWithRelationshipFields, -} from "./augment-where-input"; +import { augmentWhereInputWithRelationshipFilters } from "./augment-where-input"; function isEmptyObject(obj: Record): boolean { return !Object.keys(obj).length; @@ -97,6 +95,7 @@ export function withWhereInputType({ features, ignoreCypherFieldFilters, }); + if (returnUndefinedIfEmpty && isEmptyObject(whereFields)) { return undefined; } @@ -106,18 +105,16 @@ export function withWhereInputType({ fields: whereFields, }); - const allowNesting = - alwaysAllowNesting || - entityAdapter instanceof ConcreteEntityAdapter || - entityAdapter instanceof RelationshipAdapter || - entityAdapter instanceof InterfaceEntityAdapter; + const allowNesting = alwaysAllowNesting || !isUnionEntity(entityAdapter); if (allowNesting) { addLogicalOperatorsToWhereInputType(whereInputType); } + if (entityAdapter instanceof ConcreteEntityAdapter && entityAdapter.isGlobalNode()) { whereInputType.addFields({ id: GraphQLID }); } + if (entityAdapter instanceof InterfaceEntityAdapter) { const enumValues = Object.fromEntries( entityAdapter.concreteEntities.map((concreteEntity) => [ @@ -179,11 +176,7 @@ export function withSourceWhereInputType({ const relationshipTarget = relationshipAdapter.target; const relationshipSource = relationshipAdapter.source; const whereInput = composer.getITC(relationshipSource.operations.whereInputTypeName); - const fields = augmentWhereInputTypeWithRelationshipFields(relationshipAdapter, deprecatedDirectives); - whereInput.addFields(fields); - - const connectionFields = augmentWhereInputTypeWithConnectionFields(relationshipAdapter, deprecatedDirectives); - whereInput.addFields(connectionFields); + augmentWhereInputWithRelationshipFilters({ whereInput, relationshipAdapter, deprecatedDirectives, composer }); // TODO: Current unions are not supported as relationship targets beyond the above fields if (relationshipTarget instanceof UnionEntityAdapter) { diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/utils/parse-filter-property.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/utils/parse-filter-property.ts index 81b0dacad0..05a68f095c 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/utils/parse-filter-property.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/utils/parse-filter-property.ts @@ -21,31 +21,31 @@ import { parseWhereField } from "../../../../../translate/queryAST/factory/parse export function parseFilterProperty(key: string): { fieldName: string; operator: string | undefined } { // eslint-disable-next-line prefer-const - let { fieldName, operator, isNot } = parseWhereField(key); + let { fieldName, operator } = parseWhereField(key); // These conversions are only temporary necessary until the the _NOT operator exists, after that we can just return the output of parseWhereField if (operator === "EQ") { operator = undefined; } - if (isNot) { - if (operator && isOperatorIsANegateSupportedOperator(operator)) { - operator = `NOT_${operator}`; - } else { - operator = "NOT"; - } - } + // if (isNot) { + // if (operator && isOperatorIsANegateSupportedOperator(operator)) { + // operator = `NOT_${operator}`; + // } else { + // operator = "NOT"; + // } + // } return { fieldName, operator }; } // These are the operator that have a negate version as _NOT_CONTAINS, _NOT_STARTS_WITH etc... . -type NegateSupportedOperator = "CONTAINS" | "STARTS_WITH" | "ENDS_WITH" | "IN" | "INCLUDES"; +//type NegateSupportedOperator = "CONTAINS" | "STARTS_WITH" | "ENDS_WITH" | "IN" | "INCLUDES"; /** * isOperatorIsANegateSupportedOperator returns true if the operator is one of these that have the negate version * the following is temporary required until the `_NOT` operator is removed. **/ -function isOperatorIsANegateSupportedOperator(operator: string): operator is NegateSupportedOperator { - return (["CONTAINS", "STARTS_WITH", "ENDS_WITH", "IN", "INCLUDES"] as const).includes( - operator as NegateSupportedOperator - ); -} +// function isOperatorIsANegateSupportedOperator(operator: string): operator is NegateSupportedOperator { +// return (["CONTAINS", "STARTS_WITH", "ENDS_WITH", "IN", "INCLUDES"] as const).includes( +// operator as NegateSupportedOperator +// ); +// } diff --git a/packages/graphql/src/translate/queryAST/ast/filters/ConnectionFilter.ts b/packages/graphql/src/translate/queryAST/ast/filters/ConnectionFilter.ts index 1e1aa53656..187c07ff7f 100644 --- a/packages/graphql/src/translate/queryAST/ast/filters/ConnectionFilter.ts +++ b/packages/graphql/src/translate/queryAST/ast/filters/ConnectionFilter.ts @@ -54,7 +54,7 @@ export class ConnectionFilter extends Filter { }) { super(); this.relationship = relationship; - this.isNot = isNot; + this.isNot = operator === "NONE"; this.operator = operator || "SOME"; this.target = target; } diff --git a/packages/graphql/src/translate/queryAST/ast/filters/Filter.ts b/packages/graphql/src/translate/queryAST/ast/filters/Filter.ts index 201a5b2316..06c1c75851 100644 --- a/packages/graphql/src/translate/queryAST/ast/filters/Filter.ts +++ b/packages/graphql/src/translate/queryAST/ast/filters/Filter.ts @@ -42,7 +42,12 @@ export type FilterOperator = export type LogicalOperators = "NOT" | "AND" | "OR" | "XOR"; -const RELATIONSHIP_OPERATORS = ["ALL", "NONE", "SINGLE", "SOME"] as const; +const LEGACY_RELATIONSHIP_OPERATORS = ["ALL", "NONE", "SINGLE", "SOME"] as const; +const RELATIONSHIP_OPERATORS = ["all", "none", "single", "some"] as const; + +export function isLegacyRelationshipOperator(operator: string): operator is RelationshipWhereOperator { + return LEGACY_RELATIONSHIP_OPERATORS.includes(operator as any); +} export function isRelationshipOperator(operator: string): operator is RelationshipWhereOperator { return RELATIONSHIP_OPERATORS.includes(operator as any); diff --git a/packages/graphql/src/translate/queryAST/ast/filters/RelationshipFilter.ts b/packages/graphql/src/translate/queryAST/ast/filters/RelationshipFilter.ts index 80a769b248..7c205be053 100644 --- a/packages/graphql/src/translate/queryAST/ast/filters/RelationshipFilter.ts +++ b/packages/graphql/src/translate/queryAST/ast/filters/RelationshipFilter.ts @@ -73,7 +73,7 @@ export class RelationshipFilter extends Filter { } public print(): string { - return `${super.print()} [${this.relationship.name}] <${this.isNot ? "NOT " : ""}${this.operator}>`; + return `${super.print()} [${this.relationship.name}] <${this.operator}>`; } @Memoize() @@ -97,7 +97,9 @@ export class RelationshipFilter extends Filter { throw new Error("No parent node found!"); } const selection = f.getSelection(context); - if (selection.length === 0) return undefined; + if (selection.length === 0) { + return; + } const pattern = new Cypher.Pattern(context.source) .related({ @@ -189,8 +191,8 @@ export class RelationshipFilter extends Filter { // NOTE: NONE is SOME + isNot // TODO: move to wrapInNullIfNeeded in getPredicate - const comparator = this.isNot ? Cypher.false : Cypher.true; - this.subqueryPredicate = Cypher.eq(returnVar, comparator); + // const comparator = this.isNot ? Cypher.false : Cypher.true; + this.subqueryPredicate = Cypher.eq(returnVar, Cypher.true); const withAfterSubqueries = new Cypher.With("*"); @@ -313,11 +315,11 @@ export class RelationshipFilter extends Filter { if (this.shouldCreateOptionalMatch()) { const predicates = this.targetNodeFilters.map((c) => c.getPredicate(nestedContext)); const innerPredicate = Cypher.and(...predicates); - if (this.isNot) { - return Cypher.and(Cypher.eq(this.countVariable, new Cypher.Literal(0)), innerPredicate); - } else { - return Cypher.and(Cypher.neq(this.countVariable, new Cypher.Literal(0)), innerPredicate); - } + // if (this.isNot) { + // return Cypher.and(Cypher.eq(this.countVariable, new Cypher.Literal(0)), innerPredicate); + // } else { + return Cypher.and(Cypher.neq(this.countVariable, new Cypher.Literal(0)), innerPredicate); + // } } const pattern = new Cypher.Pattern(nestedContext.source as Cypher.Node) @@ -330,9 +332,7 @@ export class RelationshipFilter extends Filter { }); const predicate = this.createRelationshipOperation(pattern, nestedContext); - if (predicate) { - return this.wrapInNotIfNeeded(predicate); - } + return predicate; } protected getSingleRelationshipOperation({ @@ -392,18 +392,26 @@ export class RelationshipFilter extends Filter { innerPredicate, }); } - return new Cypher.Exists(match.where(innerPredicate)); - } - return new Cypher.Exists(match); + const exists = new Cypher.Exists(match.where(innerPredicate)); + if (this.operator === "NONE") { + return Cypher.not(exists); + } + return exists; + } + const exists = new Cypher.Exists(match); + if (this.operator === "NONE") { + return Cypher.not(exists); + } + return exists; } } } - protected wrapInNotIfNeeded(predicate: Cypher.Predicate): Cypher.Predicate { - if (this.isNot) { - return Cypher.not(predicate); - } - return predicate; - } + // protected wrapInNotIfNeeded(predicate: Cypher.Predicate): Cypher.Predicate { + // if (this.isNot) { + // return Cypher.not(predicate); + // } + // return predicate; + // } } diff --git a/packages/graphql/src/translate/queryAST/ast/filters/authorization-filters/AuthRelationshipFilter.ts b/packages/graphql/src/translate/queryAST/ast/filters/authorization-filters/AuthRelationshipFilter.ts index 0c0f06b2ee..777354b404 100644 --- a/packages/graphql/src/translate/queryAST/ast/filters/authorization-filters/AuthRelationshipFilter.ts +++ b/packages/graphql/src/translate/queryAST/ast/filters/authorization-filters/AuthRelationshipFilter.ts @@ -44,9 +44,7 @@ export class AuthRelationshipFilter extends RelationshipFilter { const predicate = this.createRelationshipOperation(pattern, nestedContext); - if (!predicate) return undefined; - - return this.wrapInNotIfNeeded(predicate); + return predicate; } protected createRelationshipOperation( @@ -55,7 +53,9 @@ export class AuthRelationshipFilter extends RelationshipFilter { ): Cypher.Predicate | undefined { const predicates = this.targetNodeFilters.map((c) => c.getPredicate(queryASTContext)); const innerPredicate = Cypher.and(...predicates); - if (!innerPredicate) return undefined; + if (!innerPredicate) { + return; + } const useExist = queryASTContext.neo4jGraphQLContext.neo4jDatabaseInfo?.gte("5.0"); switch (this.operator) { case "ALL": { diff --git a/packages/graphql/src/translate/queryAST/factory/AuthFilterFactory.ts b/packages/graphql/src/translate/queryAST/factory/AuthFilterFactory.ts index c365aed93b..9454f01df7 100644 --- a/packages/graphql/src/translate/queryAST/factory/AuthFilterFactory.ts +++ b/packages/graphql/src/translate/queryAST/factory/AuthFilterFactory.ts @@ -30,7 +30,7 @@ import { asArray } from "../../../utils/utils"; import { isLogicalOperator } from "../../utils/logical-operators"; import type { ConnectionFilter } from "../ast/filters/ConnectionFilter"; import type { Filter, FilterOperator, RelationshipWhereOperator } from "../ast/filters/Filter"; -import { isRelationshipOperator } from "../ast/filters/Filter"; +import { isLegacyRelationshipOperator } from "../ast/filters/Filter"; import { LogicalFilter } from "../ast/filters/LogicalFilter"; import type { RelationshipFilter } from "../ast/filters/RelationshipFilter"; import { AuthConnectionFilter } from "../ast/filters/authorization-filters/AuthConnectionFilter"; @@ -101,7 +101,7 @@ export class AuthFilterFactory extends FilterFactory { filters: nestedFilters, }); } - const { fieldName, operator, isNot } = parseWhereField(key); + const { fieldName, operator } = parseWhereField(key); if (!fieldName) { throw new Error(`Failed to find field name in filter: ${key}`); } @@ -123,7 +123,7 @@ export class AuthFilterFactory extends FilterFactory { operator: operator || "EQ", JWTClaim: target, comparisonValue: value, - isNot, + isNot: false, }); }); } @@ -132,14 +132,14 @@ export class AuthFilterFactory extends FilterFactory { attribute, comparisonValue, operator, - isNot, + // isNot, attachedTo, relationship, }: { attribute: AttributeAdapter; comparisonValue: unknown; operator: FilterOperator | undefined; - isNot: boolean; + // isNot: boolean; attachedTo?: "node" | "relationship"; relationship?: RelationshipAdapter; }): Filter { @@ -160,7 +160,7 @@ export class AuthFilterFactory extends FilterFactory { if (attribute.annotations.cypher?.targetEntity) { const entityAdapter = getEntityAdapter(attribute.annotations.cypher.targetEntity); - if (operator && !isRelationshipOperator(operator)) { + if (operator && !isLegacyRelationshipOperator(operator)) { throw new Error(`Invalid operator ${operator} for relationship`); } @@ -171,7 +171,7 @@ export class AuthFilterFactory extends FilterFactory { selection, target: entityAdapter, filterOps: { - isNot, + //isNot, operator, }, attribute, @@ -205,7 +205,7 @@ export class AuthFilterFactory extends FilterFactory { attribute, relationship, comparisonValue: new Cypher.Param(comparisonValue), - isNot, + isNot: false, operator: filterOperator, attachedTo, }); @@ -216,7 +216,7 @@ export class AuthFilterFactory extends FilterFactory { attribute, relationship, comparisonValue: comparisonValue, - isNot, + isNot: false, operator: filterOperator, attachedTo, }); @@ -226,7 +226,7 @@ export class AuthFilterFactory extends FilterFactory { attribute, relationship, comparisonValue: comparisonValue, - isNot, + isNot: false, operator: filterOperator, attachedTo, }); @@ -235,7 +235,7 @@ export class AuthFilterFactory extends FilterFactory { attribute, relationship, comparisonValue: new Cypher.Param(comparisonValue), - isNot, + isNot: false, operator: filterOperator, attachedTo, }); diff --git a/packages/graphql/src/translate/queryAST/factory/FilterFactory.ts b/packages/graphql/src/translate/queryAST/factory/FilterFactory.ts index 2ad85e79a9..3d7e05b937 100644 --- a/packages/graphql/src/translate/queryAST/factory/FilterFactory.ts +++ b/packages/graphql/src/translate/queryAST/factory/FilterFactory.ts @@ -31,7 +31,7 @@ import { isLogicalOperator } from "../../utils/logical-operators"; import { ConnectionFilter } from "../ast/filters/ConnectionFilter"; import { CypherOneToOneRelationshipFilter } from "../ast/filters/CypherOneToOneRelationshipFilter"; import type { Filter, FilterOperator, RelationshipWhereOperator } from "../ast/filters/Filter"; -import { isRelationshipOperator } from "../ast/filters/Filter"; +import { isLegacyRelationshipOperator } from "../ast/filters/Filter"; import { LogicalFilter } from "../ast/filters/LogicalFilter"; import { RelationshipFilter } from "../ast/filters/RelationshipFilter"; import { AggregationDurationFilter } from "../ast/filters/aggregation/AggregationDurationPropertyFilter"; @@ -71,7 +71,10 @@ export class FilterFactory { private createConnectionFilter( relationship: RelationshipAdapter, where: ConnectionWhereArg, - filterOps: { isNot: boolean; operator: RelationshipWhereOperator | undefined } + filterOps: { + //isNot: boolean; + operator: RelationshipWhereOperator | undefined; + } ): Filter[] { if ( isInterfaceEntity(relationship.target) && @@ -80,7 +83,7 @@ export class FilterFactory { const connectionFilter = this.createConnectionFilterTreeNode({ relationship: relationship, target: relationship.target, - isNot: filterOps.isNot, + isNot: false, operator: filterOps.operator, }); const filters = this.createConnectionPredicates({ rel: relationship, entity: relationship.target, where }); @@ -99,7 +102,7 @@ export class FilterFactory { const connectionFilter = this.createConnectionFilterTreeNode({ relationship: relationship, target: concreteEntity, - isNot: filterOps.isNot, + isNot: false, operator: filterOps.operator, }); @@ -172,12 +175,12 @@ export class FilterFactory { attribute, comparisonValue, operator, - isNot, + // isNot, }: { attribute: AttributeAdapter; comparisonValue: GraphQLWhereArg; operator: FilterOperator | undefined; - isNot: boolean; + // isNot: boolean; }): Filter | Filter[] { const filterOperator = operator || "EQ"; @@ -190,7 +193,7 @@ export class FilterFactory { if (attribute.annotations.cypher?.targetEntity) { const entityAdapter = getEntityAdapter(attribute.annotations.cypher.targetEntity); - if (operator && !isRelationshipOperator(operator)) { + if (operator && !isLegacyRelationshipOperator(operator)) { throw new Error(`Invalid operator ${operator} for relationship`); } @@ -199,7 +202,7 @@ export class FilterFactory { selection, target: entityAdapter, filterOps: { - isNot, + // isNot, operator, }, attribute, @@ -221,14 +224,14 @@ export class FilterFactory { relationship, comparisonValue, operator, - isNot, + // isNot, attachedTo, }: { attribute: AttributeAdapter; relationship?: RelationshipAdapter; comparisonValue: GraphQLWhereArg; operator: FilterOperator | undefined; - isNot: boolean; + //isNot: boolean; attachedTo?: "node" | "relationship"; }): Filter | Filter[] { const filterOperator = operator || "EQ"; @@ -238,7 +241,7 @@ export class FilterFactory { attribute, comparisonValue, operator, - isNot, + // isNot, }); } @@ -246,7 +249,7 @@ export class FilterFactory { return new DurationFilter({ attribute, comparisonValue, - isNot, + isNot: false, operator: filterOperator, attachedTo, }); @@ -255,7 +258,7 @@ export class FilterFactory { return new PointFilter({ attribute, comparisonValue, - isNot, + isNot: false, operator: filterOperator, attachedTo, }); @@ -265,7 +268,7 @@ export class FilterFactory { attribute, relationship, comparisonValue, - isNot, + isNot: false, operator: filterOperator, attachedTo, }); @@ -274,7 +277,10 @@ export class FilterFactory { private createRelationshipFilter( relationship: RelationshipAdapter, where: GraphQLWhereArg, - filterOps: { isNot: boolean; operator: RelationshipWhereOperator | undefined } + filterOps: { + //isNot: boolean; + operator: RelationshipWhereOperator | undefined; + } ): Filter[] { /** * The logic below can be confusing, but it's to handle the following cases: @@ -286,7 +292,7 @@ export class FilterFactory { return []; } // this is because if isNull is true we want to wrap the Exist subclause in a NOT, but if isNull is true and isNot is true they negate each other - const isNot = isNull ? !filterOps.isNot : filterOps.isNot; + // const isNot = isNull ? !filterOps.isNot : filterOps.isNot; const filteredEntities = getConcreteEntities(relationship.target, where); const relationshipFilters: RelationshipFilter[] = []; @@ -294,7 +300,7 @@ export class FilterFactory { const relationshipFilter = this.createRelationshipFilterTreeNode({ relationship, target: concreteEntity, - isNot, + isNot: false, operator: filterOps.operator || "SOME", }); @@ -320,7 +326,10 @@ export class FilterFactory { selection: CustomCypherSelection; target: EntityAdapter; where: GraphQLWhereArg; - filterOps: { isNot: boolean; operator: RelationshipWhereOperator | undefined }; + filterOps: { + //isNot: boolean; + operator: RelationshipWhereOperator | undefined; + }; attribute: AttributeAdapter; }): Filter[] { /** @@ -339,7 +348,7 @@ export class FilterFactory { const returnVariable = new Cypher.Node(); const cypherOneToOneRelationshipFilter = this.createCypherOneToOneRelationshipFilterTreeNode({ selection, - isNot: filterOps.isNot, + isNot: false, isNull, operator: filterOps.operator || "SOME", attribute, @@ -445,7 +454,7 @@ export class FilterFactory { filters: nestedFilters, }); } - const { fieldName, operator, isNot, isConnection, isAggregate } = parseWhereField(key); + const { fieldName, operator, isConnection, isAggregate } = parseWhereField(key); if (isConcreteEntity(entity)) { const relationship = entity.findRelationship(fieldName); @@ -454,7 +463,7 @@ export class FilterFactory { relationship, value, operator, - isNot, + // isNot, isConnection, isAggregate, }); @@ -472,7 +481,7 @@ export class FilterFactory { relationship, value, operator, - isNot, + // isNot, isConnection, isAggregate, }); @@ -489,7 +498,12 @@ export class FilterFactory { if (!isInterfaceEntity(entity) && !attribute) { if (fieldName === "id" && entity.globalIdField) { - return this.createRelayIdPropertyFilter(entity, isNot, operator, value); + return this.createRelayIdPropertyFilter( + entity, + //isNot, + operator, + value + ); } } if (!attribute) { @@ -504,12 +518,13 @@ export class FilterFactory { return this.createPropertyFilter({ attribute, comparisonValue: value, - isNot, + // isNot, operator, relationship, }); } - + // TODO: we keep call this Generic filters but maybe we should rename it to something more meaningful + // Proposal: TypeSpecificFilters private parseGenericFilters( entity: ConcreteEntityAdapter | RelationshipAdapter | InterfaceEntityAdapter, fieldName: string, @@ -520,7 +535,8 @@ export class FilterFactory { }); return this.wrapMultipleFiltersInLogical(genericFilters); } - + // TODO: we keep call this Generic filters but maybe we should rename it to something more meaningful + // Proposal: TypeSpecificFilters private parseGenericFilter( entity: ConcreteEntityAdapter | RelationshipAdapter | InterfaceEntityAdapter, fieldName: string, @@ -550,7 +566,7 @@ export class FilterFactory { throw new Error("Transpilation error: Expected concrete entity"); } if (fieldName === "id" && entity.globalIdField) { - return this.createRelayIdPropertyFilter(entity, false, operator, value); + return this.createRelayIdPropertyFilter(entity, operator, value); } throw new Error(`Attribute ${fieldName} not found`); } @@ -558,7 +574,7 @@ export class FilterFactory { const filters = this.createPropertyFilter({ attribute, comparisonValue: value, - isNot: false, + // isNot: false, operator, attachedTo, }); @@ -595,35 +611,67 @@ export class FilterFactory { } } + private convertRelationshipOperatorToLegacyOperator(operator: string): RelationshipWhereOperator { + switch (operator) { + case "some": + return "SOME"; + case "all": + return "ALL"; + case "single": + return "SINGLE"; + case "none": + return "NONE"; + } + throw new Error(`Invalid operator ${operator}`); + } + private createRelatedNodeFilters({ relationship, value, operator, - isNot, + // isNot, isConnection, isAggregate, }: { relationship: RelationshipAdapter; - value: any; + value: Record; operator: FilterOperator | undefined; - isNot: boolean; + // isNot: boolean; isConnection: boolean; isAggregate: boolean; }): Filter | Filter[] { if (isAggregate) { return this.createAggregationFilter(relationship, value as AggregateWhereInput); } - if (operator && !isRelationshipOperator(operator)) { + if (!operator) { + const objectEntries = Object.entries(value); + + if (objectEntries.length !== 1) { + throw new Error("Expected one quantifier in a relationship predicate"); + } + const [genericOperator, genericValue] = objectEntries[0] as [string, any]; + const legacyOperator = this.convertRelationshipOperatorToLegacyOperator(genericOperator); + return this.createRelatedNodeFilters({ + relationship, + value: genericValue, + operator: legacyOperator, + // isNot, + isConnection, + isAggregate, + }); + } + + if (operator && !isLegacyRelationshipOperator(operator)) { throw new Error(`Invalid operator ${operator} for relationship`); } if (isConnection) { return this.createConnectionFilter(relationship, value as ConnectionWhereArg, { - isNot, + // isNot, operator, }); } return this.createRelationshipFilter(relationship, value as GraphQLWhereArg, { - isNot, + //isNot, operator, }); } @@ -645,7 +693,7 @@ export class FilterFactory { private createRelayIdPropertyFilter( entity: ConcreteEntityAdapter, - isNot: boolean, + // isNot: boolean, operator: FilterOperator | undefined, value: string ): Filter | Filter[] { @@ -671,7 +719,7 @@ export class FilterFactory { return this.createPropertyFilter({ attribute: idAttribute, comparisonValue: id as unknown as GraphQLWhereArg, - isNot, + //isNot, operator, }); } @@ -687,7 +735,7 @@ export class FilterFactory { filters: nestedFilters, }); } - const { fieldName, operator, isNot } = parseWhereField(key); + const { fieldName, operator } = parseWhereField(key); const attribute = relationship.findAttribute(fieldName); if (!attribute) { @@ -703,7 +751,7 @@ export class FilterFactory { return this.createPropertyFilter({ attribute, comparisonValue: value, - isNot, + // isNot, operator, attachedTo: "relationship", }); @@ -729,13 +777,13 @@ export class FilterFactory { }); return [logicalFilter]; } - const { fieldName, operator, isNot } = parseWhereField(key); + const { fieldName, operator } = parseWhereField(key); const filterOperator = operator ?? "EQ"; if (fieldName === "count") { const countFilter = new CountFilter({ operator: filterOperator, - isNot, + isNot: false, comparisonValue: value, }); return [countFilter]; diff --git a/packages/graphql/src/translate/queryAST/factory/parsers/parse-where-field.ts b/packages/graphql/src/translate/queryAST/factory/parsers/parse-where-field.ts index e65b9fa932..d6fa8b2fcd 100644 --- a/packages/graphql/src/translate/queryAST/factory/parsers/parse-where-field.ts +++ b/packages/graphql/src/translate/queryAST/factory/parsers/parse-where-field.ts @@ -24,7 +24,7 @@ export type WhereRegexGroups = { isAggregate: boolean; operator: FilterOperator | undefined; prefix?: string; - isNot: boolean; + // isNot: boolean; isConnection: boolean; }; @@ -43,29 +43,29 @@ export function parseWhereField(field: string): WhereRegexGroups { isConnection?: string; }; - let isNot = false; - let operator = undefined as FilterOperator | undefined; - - if (matchGroups.operator) { - const notSplit = matchGroups.operator.split("NOT_"); - if (notSplit.length === 2) { - isNot = true; - operator = notSplit[1] as FilterOperator; - } else if (matchGroups.operator === "NOT" || matchGroups.operator === "NONE") { - isNot = true; - if (matchGroups.operator === "NONE") { - operator = notSplit[0] as FilterOperator; - } - } else { - operator = notSplit[0] as FilterOperator; - } - } + //let isNot = false; + const operator = match?.groups?.operator as FilterOperator | undefined; + + // if (matchGroups.operator) { + // const notSplit = matchGroups.operator.split("NOT_"); + // if (notSplit.length === 2) { + // isNot = true; + // operator = notSplit[1] as FilterOperator; + // } else if (matchGroups.operator === "NOT" || matchGroups.operator === "NONE") { + // isNot = true; + // if (matchGroups.operator === "NONE") { + // operator = notSplit[0] as FilterOperator; + // } + // } else { + // operator = notSplit[0] as FilterOperator; + // } + // } return { fieldName: matchGroups.fieldName, isAggregate: Boolean(matchGroups.isAggregate), operator, - isNot, + // isNot, prefix: matchGroups.prefix, isConnection: Boolean(matchGroups.isConnection), }; diff --git a/packages/graphql/tests/schema/aggregations.test.ts b/packages/graphql/tests/schema/aggregations.test.ts index 9fc9d2ff6e..ace14e2149 100644 --- a/packages/graphql/tests/schema/aggregations.test.ts +++ b/packages/graphql/tests/schema/aggregations.test.ts @@ -1041,6 +1041,25 @@ describe("Aggregations", () => { totalCount: Int! } + input PostLikesConnectionFilters { + \\"\\"\\" + Return Posts where all of the related PostLikesConnections match this filter + \\"\\"\\" + all: PostLikesConnectionWhere + \\"\\"\\" + Return Posts where none of the related PostLikesConnections match this filter + \\"\\"\\" + none: PostLikesConnectionWhere + \\"\\"\\" + Return Posts where one of the related PostLikesConnections match this filter + \\"\\"\\" + single: PostLikesConnectionWhere + \\"\\"\\" + Return Posts where some of the related PostLikesConnections match this filter + \\"\\"\\" + some: PostLikesConnectionWhere + } + input PostLikesConnectionSort { edge: LikesSort node: UserSort @@ -1224,6 +1243,17 @@ describe("Aggregations", () => { properties: Likes! } + input PostLikesRelationshipFilters { + \\"\\"\\"Return Posts where all of the related Users match this filter\\"\\"\\" + all: UserWhere + \\"\\"\\"Return Posts where none of the related Users match this filter\\"\\"\\" + none: UserWhere + \\"\\"\\"Return Posts where one of the related Users match this filter\\"\\"\\" + single: UserWhere + \\"\\"\\"Return Posts where some of the related Users match this filter\\"\\"\\" + some: UserWhere + } + input PostLikesUpdateConnectionInput { edge: LikesUpdateInput node: UserUpdateInput @@ -1286,7 +1316,9 @@ describe("Aggregations", () => { AND: [PostWhere!] NOT: PostWhere OR: [PostWhere!] + likes: PostLikesRelationshipFilters likesAggregate: PostLikesAggregateInput + likesConnection: PostLikesConnectionFilters \\"\\"\\" Return Posts where all of the related PostLikesConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/array-methods.test.ts b/packages/graphql/tests/schema/array-methods.test.ts index 722d6162bb..8a1189bac1 100644 --- a/packages/graphql/tests/schema/array-methods.test.ts +++ b/packages/graphql/tests/schema/array-methods.test.ts @@ -113,6 +113,25 @@ describe("Arrays Methods", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { edge: ActedInSort node: MovieSort @@ -188,6 +207,17 @@ describe("Arrays Methods", () => { properties: ActedIn! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorActedInUpdateConnectionInput { edge: ActedInUpdateInput node: MovieUpdateInput @@ -259,7 +289,9 @@ describe("Arrays Methods", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -408,6 +440,25 @@ describe("Arrays Methods", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { edge: ActedInSort node: ActorSort @@ -468,6 +519,17 @@ describe("Arrays Methods", () => { properties: ActedIn! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { edge: ActedInUpdateInput node: ActorUpdateInput @@ -541,7 +603,9 @@ describe("Arrays Methods", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/authorization.test.ts b/packages/graphql/tests/schema/authorization.test.ts index a0f7ec2a46..3208b93b03 100644 --- a/packages/graphql/tests/schema/authorization.test.ts +++ b/packages/graphql/tests/schema/authorization.test.ts @@ -146,6 +146,25 @@ describe("Authorization", () => { totalCount: Int! } + input PostAuthorConnectionFilters { + \\"\\"\\" + Return Posts where all of the related PostAuthorConnections match this filter + \\"\\"\\" + all: PostAuthorConnectionWhere + \\"\\"\\" + Return Posts where none of the related PostAuthorConnections match this filter + \\"\\"\\" + none: PostAuthorConnectionWhere + \\"\\"\\" + Return Posts where one of the related PostAuthorConnections match this filter + \\"\\"\\" + single: PostAuthorConnectionWhere + \\"\\"\\" + Return Posts where some of the related PostAuthorConnections match this filter + \\"\\"\\" + some: PostAuthorConnectionWhere + } + input PostAuthorConnectionSort { node: UserSort } @@ -212,6 +231,17 @@ describe("Authorization", () => { node: User! } + input PostAuthorRelationshipFilters { + \\"\\"\\"Return Posts where all of the related Users match this filter\\"\\"\\" + all: UserWhere + \\"\\"\\"Return Posts where none of the related Users match this filter\\"\\"\\" + none: UserWhere + \\"\\"\\"Return Posts where one of the related Users match this filter\\"\\"\\" + single: UserWhere + \\"\\"\\"Return Posts where some of the related Users match this filter\\"\\"\\" + some: UserWhere + } + input PostAuthorUpdateConnectionInput { node: UserUpdateInput } @@ -268,7 +298,9 @@ describe("Authorization", () => { AND: [PostWhere!] NOT: PostWhere OR: [PostWhere!] + author: PostAuthorRelationshipFilters authorAggregate: PostAuthorAggregateInput + authorConnection: PostAuthorConnectionFilters \\"\\"\\" Return Posts where all of the related PostAuthorConnections match this filter \\"\\"\\" @@ -433,6 +465,25 @@ describe("Authorization", () => { totalCount: Int! } + input UserPostsConnectionFilters { + \\"\\"\\" + Return Users where all of the related UserPostsConnections match this filter + \\"\\"\\" + all: UserPostsConnectionWhere + \\"\\"\\" + Return Users where none of the related UserPostsConnections match this filter + \\"\\"\\" + none: UserPostsConnectionWhere + \\"\\"\\" + Return Users where one of the related UserPostsConnections match this filter + \\"\\"\\" + single: UserPostsConnectionWhere + \\"\\"\\" + Return Users where some of the related UserPostsConnections match this filter + \\"\\"\\" + some: UserPostsConnectionWhere + } + input UserPostsConnectionSort { node: UserSort } @@ -499,6 +550,17 @@ describe("Authorization", () => { node: User! } + input UserPostsRelationshipFilters { + \\"\\"\\"Return Users where all of the related Users match this filter\\"\\"\\" + all: UserWhere + \\"\\"\\"Return Users where none of the related Users match this filter\\"\\"\\" + none: UserWhere + \\"\\"\\"Return Users where one of the related Users match this filter\\"\\"\\" + single: UserWhere + \\"\\"\\"Return Users where some of the related Users match this filter\\"\\"\\" + some: UserWhere + } + input UserPostsUpdateConnectionInput { node: UserUpdateInput } @@ -552,7 +614,9 @@ describe("Authorization", () => { name_EQ: String name_IN: [String!] name_STARTS_WITH: String + posts: UserPostsRelationshipFilters postsAggregate: UserPostsAggregateInput + postsConnection: UserPostsConnectionFilters \\"\\"\\" Return Users where all of the related UserPostsConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/comments.test.ts b/packages/graphql/tests/schema/comments.test.ts index 043536f2c0..c7c7e3fb3c 100644 --- a/packages/graphql/tests/schema/comments.test.ts +++ b/packages/graphql/tests/schema/comments.test.ts @@ -473,6 +473,25 @@ describe("Comments", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: ActorSort } @@ -527,6 +546,17 @@ describe("Comments", () => { node: Actor! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -575,7 +605,9 @@ describe("Comments", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -817,6 +849,25 @@ describe("Comments", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { edge: ActedInSort node: ProductionSort @@ -875,6 +926,17 @@ describe("Comments", () => { properties: ActedIn! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ActorActedInUpdateConnectionInput { edge: ActedInUpdateInput node: ProductionUpdateInput @@ -938,7 +1000,9 @@ describe("Comments", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -1462,6 +1526,25 @@ describe("Comments", () => { totalCount: Int! } + input MovieSearchConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieSearchConnections match this filter + \\"\\"\\" + all: MovieSearchConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieSearchConnections match this filter + \\"\\"\\" + none: MovieSearchConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieSearchConnections match this filter + \\"\\"\\" + single: MovieSearchConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieSearchConnections match this filter + \\"\\"\\" + some: MovieSearchConnectionWhere + } + input MovieSearchConnectionWhere { Genre: MovieSearchGenreConnectionWhere Movie: MovieSearchMovieConnectionWhere @@ -1572,6 +1655,17 @@ describe("Comments", () => { node: Search! } + input MovieSearchRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Searches match this filter\\"\\"\\" + all: SearchWhere + \\"\\"\\"Return Movies where none of the related Searches match this filter\\"\\"\\" + none: SearchWhere + \\"\\"\\"Return Movies where one of the related Searches match this filter\\"\\"\\" + single: SearchWhere + \\"\\"\\"Return Movies where some of the related Searches match this filter\\"\\"\\" + some: SearchWhere + } + input MovieSearchUpdateInput { Genre: [MovieSearchGenreUpdateFieldInput!] Movie: [MovieSearchMovieUpdateFieldInput!] @@ -1599,6 +1693,8 @@ describe("Comments", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID + search: MovieSearchRelationshipFilters + searchConnection: MovieSearchConnectionFilters \\"\\"\\" Return Movies where all of the related MovieSearchConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/connections/enums.test.ts b/packages/graphql/tests/schema/connections/enums.test.ts index d1b1a4a79f..671d3cc7de 100644 --- a/packages/graphql/tests/schema/connections/enums.test.ts +++ b/packages/graphql/tests/schema/connections/enums.test.ts @@ -154,6 +154,25 @@ describe("Enums", () => { totalCount: Int! } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + all: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + none: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + single: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + some: ActorMoviesConnectionWhere + } + input ActorMoviesConnectionSort { edge: ActedInSort node: MovieSort @@ -214,6 +233,17 @@ describe("Enums", () => { properties: ActedIn! } + input ActorMoviesRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorMoviesUpdateConnectionInput { edge: ActedInUpdateInput node: MovieUpdateInput @@ -244,7 +274,9 @@ describe("Enums", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: ActorMoviesRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" @@ -349,6 +381,25 @@ describe("Enums", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { edge: ActedInSort node: ActorSort @@ -409,6 +460,17 @@ describe("Enums", () => { properties: ActedIn! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { edge: ActedInUpdateInput node: ActorUpdateInput @@ -470,7 +532,9 @@ describe("Enums", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/connections/interfaces.test.ts b/packages/graphql/tests/schema/connections/interfaces.test.ts index ba1c58929d..d94ab0e386 100644 --- a/packages/graphql/tests/schema/connections/interfaces.test.ts +++ b/packages/graphql/tests/schema/connections/interfaces.test.ts @@ -148,6 +148,25 @@ describe("Connection with interfaces", () => { totalCount: Int! } + input CreatureMoviesConnectionFilters { + \\"\\"\\" + Return Creatures where all of the related CreatureMoviesConnections match this filter + \\"\\"\\" + all: CreatureMoviesConnectionWhere + \\"\\"\\" + Return Creatures where none of the related CreatureMoviesConnections match this filter + \\"\\"\\" + none: CreatureMoviesConnectionWhere + \\"\\"\\" + Return Creatures where one of the related CreatureMoviesConnections match this filter + \\"\\"\\" + single: CreatureMoviesConnectionWhere + \\"\\"\\" + Return Creatures where some of the related CreatureMoviesConnections match this filter + \\"\\"\\" + some: CreatureMoviesConnectionWhere + } + input CreatureMoviesConnectionSort { node: ProductionSort } @@ -194,6 +213,25 @@ describe("Connection with interfaces", () => { node: Production! } + input CreatureMoviesRelationshipFilters { + \\"\\"\\" + Return Creatures where all of the related Productions match this filter + \\"\\"\\" + all: ProductionWhere + \\"\\"\\" + Return Creatures where none of the related Productions match this filter + \\"\\"\\" + none: ProductionWhere + \\"\\"\\" + Return Creatures where one of the related Productions match this filter + \\"\\"\\" + single: ProductionWhere + \\"\\"\\" + Return Creatures where some of the related Productions match this filter + \\"\\"\\" + some: ProductionWhere + } + input CreatureMoviesUpdateConnectionInput { node: ProductionUpdateInput } @@ -229,7 +267,9 @@ describe("Connection with interfaces", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID + movies: CreatureMoviesRelationshipFilters moviesAggregate: CreatureMoviesAggregateInput + moviesConnection: CreatureMoviesConnectionFilters \\"\\"\\" Return Creatures where all of the related CreatureMoviesConnections match this filter \\"\\"\\" @@ -365,6 +405,25 @@ describe("Connection with interfaces", () => { where: CreatureConnectWhere } + input MovieDirectorConnectionFilters { + \\"\\"\\" + Return Movies where all of the related ProductionDirectorConnections match this filter + \\"\\"\\" + all: ProductionDirectorConnectionWhere + \\"\\"\\" + Return Movies where none of the related ProductionDirectorConnections match this filter + \\"\\"\\" + none: ProductionDirectorConnectionWhere + \\"\\"\\" + Return Movies where one of the related ProductionDirectorConnections match this filter + \\"\\"\\" + single: ProductionDirectorConnectionWhere + \\"\\"\\" + Return Movies where some of the related ProductionDirectorConnections match this filter + \\"\\"\\" + some: ProductionDirectorConnectionWhere + } + input MovieDirectorCreateFieldInput { node: CreatureCreateInput! } @@ -400,6 +459,17 @@ describe("Connection with interfaces", () => { id_MIN_LTE: ID } + input MovieDirectorRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Creatures match this filter\\"\\"\\" + all: CreatureWhere + \\"\\"\\"Return Movies where none of the related Creatures match this filter\\"\\"\\" + none: CreatureWhere + \\"\\"\\"Return Movies where one of the related Creatures match this filter\\"\\"\\" + single: CreatureWhere + \\"\\"\\"Return Movies where some of the related Creatures match this filter\\"\\"\\" + some: CreatureWhere + } + input MovieDirectorUpdateConnectionInput { node: CreatureUpdateInput } @@ -436,7 +506,9 @@ describe("Connection with interfaces", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + director: MovieDirectorRelationshipFilters directorAggregate: MovieDirectorAggregateInput + directorConnection: MovieDirectorConnectionFilters \\"\\"\\" Return Movies where all of the related ProductionDirectorConnections match this filter \\"\\"\\" @@ -550,6 +622,25 @@ describe("Connection with interfaces", () => { where: ProductionConnectWhere } + input PersonMoviesConnectionFilters { + \\"\\"\\" + Return People where all of the related CreatureMoviesConnections match this filter + \\"\\"\\" + all: CreatureMoviesConnectionWhere + \\"\\"\\" + Return People where none of the related CreatureMoviesConnections match this filter + \\"\\"\\" + none: CreatureMoviesConnectionWhere + \\"\\"\\" + Return People where one of the related CreatureMoviesConnections match this filter + \\"\\"\\" + single: CreatureMoviesConnectionWhere + \\"\\"\\" + Return People where some of the related CreatureMoviesConnections match this filter + \\"\\"\\" + some: CreatureMoviesConnectionWhere + } + input PersonMoviesCreateFieldInput { node: ProductionCreateInput! } @@ -585,6 +676,17 @@ describe("Connection with interfaces", () => { id_MIN_LTE: ID } + input PersonMoviesRelationshipFilters { + \\"\\"\\"Return People where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return People where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return People where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return People where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input PersonMoviesUpdateConnectionInput { node: ProductionUpdateInput } @@ -629,7 +731,9 @@ describe("Connection with interfaces", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID + movies: PersonMoviesRelationshipFilters moviesAggregate: PersonMoviesAggregateInput + moviesConnection: PersonMoviesConnectionFilters \\"\\"\\" Return People where all of the related CreatureMoviesConnections match this filter \\"\\"\\" @@ -707,6 +811,25 @@ describe("Connection with interfaces", () => { totalCount: Int! } + input ProductionDirectorConnectionFilters { + \\"\\"\\" + Return Productions where all of the related ProductionDirectorConnections match this filter + \\"\\"\\" + all: ProductionDirectorConnectionWhere + \\"\\"\\" + Return Productions where none of the related ProductionDirectorConnections match this filter + \\"\\"\\" + none: ProductionDirectorConnectionWhere + \\"\\"\\" + Return Productions where one of the related ProductionDirectorConnections match this filter + \\"\\"\\" + single: ProductionDirectorConnectionWhere + \\"\\"\\" + Return Productions where some of the related ProductionDirectorConnections match this filter + \\"\\"\\" + some: ProductionDirectorConnectionWhere + } + input ProductionDirectorConnectionSort { node: CreatureSort } @@ -753,6 +876,25 @@ describe("Connection with interfaces", () => { node: Creature! } + input ProductionDirectorRelationshipFilters { + \\"\\"\\" + Return Productions where all of the related Creatures match this filter + \\"\\"\\" + all: CreatureWhere + \\"\\"\\" + Return Productions where none of the related Creatures match this filter + \\"\\"\\" + none: CreatureWhere + \\"\\"\\" + Return Productions where one of the related Creatures match this filter + \\"\\"\\" + single: CreatureWhere + \\"\\"\\" + Return Productions where some of the related Creatures match this filter + \\"\\"\\" + some: CreatureWhere + } + input ProductionDirectorUpdateConnectionInput { node: CreatureUpdateInput } @@ -796,7 +938,9 @@ describe("Connection with interfaces", () => { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] + director: ProductionDirectorRelationshipFilters directorAggregate: ProductionDirectorAggregateInput + directorConnection: ProductionDirectorConnectionFilters \\"\\"\\" Return Productions where all of the related ProductionDirectorConnections match this filter \\"\\"\\" @@ -921,6 +1065,25 @@ describe("Connection with interfaces", () => { where: CreatureConnectWhere } + input SeriesDirectorConnectionFilters { + \\"\\"\\" + Return Series where all of the related ProductionDirectorConnections match this filter + \\"\\"\\" + all: ProductionDirectorConnectionWhere + \\"\\"\\" + Return Series where none of the related ProductionDirectorConnections match this filter + \\"\\"\\" + none: ProductionDirectorConnectionWhere + \\"\\"\\" + Return Series where one of the related ProductionDirectorConnections match this filter + \\"\\"\\" + single: ProductionDirectorConnectionWhere + \\"\\"\\" + Return Series where some of the related ProductionDirectorConnections match this filter + \\"\\"\\" + some: ProductionDirectorConnectionWhere + } + input SeriesDirectorCreateFieldInput { node: CreatureCreateInput! } @@ -956,6 +1119,17 @@ describe("Connection with interfaces", () => { id_MIN_LTE: ID } + input SeriesDirectorRelationshipFilters { + \\"\\"\\"Return Series where all of the related Creatures match this filter\\"\\"\\" + all: CreatureWhere + \\"\\"\\"Return Series where none of the related Creatures match this filter\\"\\"\\" + none: CreatureWhere + \\"\\"\\"Return Series where one of the related Creatures match this filter\\"\\"\\" + single: CreatureWhere + \\"\\"\\"Return Series where some of the related Creatures match this filter\\"\\"\\" + some: CreatureWhere + } + input SeriesDirectorUpdateConnectionInput { node: CreatureUpdateInput } @@ -996,7 +1170,9 @@ describe("Connection with interfaces", () => { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] + director: SeriesDirectorRelationshipFilters directorAggregate: SeriesDirectorAggregateInput + directorConnection: SeriesDirectorConnectionFilters \\"\\"\\" Return Series where all of the related ProductionDirectorConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/connections/sort.test.ts b/packages/graphql/tests/schema/connections/sort.test.ts index a47656b871..ce86ef1fe6 100644 --- a/packages/graphql/tests/schema/connections/sort.test.ts +++ b/packages/graphql/tests/schema/connections/sort.test.ts @@ -142,6 +142,25 @@ describe("Sort", () => { totalCount: Int! } + input Node1RelatedToConnectionFilters { + \\"\\"\\" + Return Node1s where all of the related Node1RelatedToConnections match this filter + \\"\\"\\" + all: Node1RelatedToConnectionWhere + \\"\\"\\" + Return Node1s where none of the related Node1RelatedToConnections match this filter + \\"\\"\\" + none: Node1RelatedToConnectionWhere + \\"\\"\\" + Return Node1s where one of the related Node1RelatedToConnections match this filter + \\"\\"\\" + single: Node1RelatedToConnectionWhere + \\"\\"\\" + Return Node1s where some of the related Node1RelatedToConnections match this filter + \\"\\"\\" + some: Node1RelatedToConnectionWhere + } + input Node1RelatedToConnectionWhere { AND: [Node1RelatedToConnectionWhere!] NOT: Node1RelatedToConnectionWhere @@ -173,6 +192,17 @@ describe("Sort", () => { node: Node2! } + input Node1RelatedToRelationshipFilters { + \\"\\"\\"Return Node1s where all of the related Node2s match this filter\\"\\"\\" + all: Node2Where + \\"\\"\\"Return Node1s where none of the related Node2s match this filter\\"\\"\\" + none: Node2Where + \\"\\"\\"Return Node1s where one of the related Node2s match this filter\\"\\"\\" + single: Node2Where + \\"\\"\\"Return Node1s where some of the related Node2s match this filter\\"\\"\\" + some: Node2Where + } + input Node1RelatedToUpdateConnectionInput { node: Node2UpdateInput } @@ -208,7 +238,9 @@ describe("Sort", () => { property_EQ: String property_IN: [String!] property_STARTS_WITH: String + relatedTo: Node1RelatedToRelationshipFilters relatedToAggregate: Node1RelatedToAggregateInput + relatedToConnection: Node1RelatedToConnectionFilters \\"\\"\\" Return Node1s where all of the related Node1RelatedToConnections match this filter \\"\\"\\" @@ -308,6 +340,25 @@ describe("Sort", () => { totalCount: Int! } + input Node2RelatedToConnectionFilters { + \\"\\"\\" + Return Node2s where all of the related Node2RelatedToConnections match this filter + \\"\\"\\" + all: Node2RelatedToConnectionWhere + \\"\\"\\" + Return Node2s where none of the related Node2RelatedToConnections match this filter + \\"\\"\\" + none: Node2RelatedToConnectionWhere + \\"\\"\\" + Return Node2s where one of the related Node2RelatedToConnections match this filter + \\"\\"\\" + single: Node2RelatedToConnectionWhere + \\"\\"\\" + Return Node2s where some of the related Node2RelatedToConnections match this filter + \\"\\"\\" + some: Node2RelatedToConnectionWhere + } + input Node2RelatedToConnectionSort { node: Node1Sort } @@ -364,6 +415,17 @@ describe("Sort", () => { node: Node1! } + input Node2RelatedToRelationshipFilters { + \\"\\"\\"Return Node2s where all of the related Node1s match this filter\\"\\"\\" + all: Node1Where + \\"\\"\\"Return Node2s where none of the related Node1s match this filter\\"\\"\\" + none: Node1Where + \\"\\"\\"Return Node2s where one of the related Node1s match this filter\\"\\"\\" + single: Node1Where + \\"\\"\\"Return Node2s where some of the related Node1s match this filter\\"\\"\\" + some: Node1Where + } + input Node2RelatedToUpdateConnectionInput { node: Node1UpdateInput } @@ -385,7 +447,9 @@ describe("Sort", () => { AND: [Node2Where!] NOT: Node2Where OR: [Node2Where!] + relatedTo: Node2RelatedToRelationshipFilters relatedToAggregate: Node2RelatedToAggregateInput + relatedToConnection: Node2RelatedToConnectionFilters \\"\\"\\" Return Node2s where all of the related Node2RelatedToConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/connections/unions.test.ts b/packages/graphql/tests/schema/connections/unions.test.ts index d0356fc544..db1cd29009 100644 --- a/packages/graphql/tests/schema/connections/unions.test.ts +++ b/packages/graphql/tests/schema/connections/unions.test.ts @@ -151,6 +151,25 @@ describe("Unions", () => { totalCount: Int! } + input AuthorPublicationsConnectionFilters { + \\"\\"\\" + Return Authors where all of the related AuthorPublicationsConnections match this filter + \\"\\"\\" + all: AuthorPublicationsConnectionWhere + \\"\\"\\" + Return Authors where none of the related AuthorPublicationsConnections match this filter + \\"\\"\\" + none: AuthorPublicationsConnectionWhere + \\"\\"\\" + Return Authors where one of the related AuthorPublicationsConnections match this filter + \\"\\"\\" + single: AuthorPublicationsConnectionWhere + \\"\\"\\" + Return Authors where some of the related AuthorPublicationsConnections match this filter + \\"\\"\\" + some: AuthorPublicationsConnectionWhere + } + input AuthorPublicationsConnectionSort { edge: WroteSort } @@ -229,6 +248,21 @@ describe("Unions", () => { properties: Wrote! } + input AuthorPublicationsRelationshipFilters { + \\"\\"\\"Return Authors where all of the related Publications match this filter\\"\\"\\" + all: PublicationWhere + \\"\\"\\" + Return Authors where none of the related Publications match this filter + \\"\\"\\" + none: PublicationWhere + \\"\\"\\"Return Authors where one of the related Publications match this filter\\"\\"\\" + single: PublicationWhere + \\"\\"\\" + Return Authors where some of the related Publications match this filter + \\"\\"\\" + some: PublicationWhere + } + input AuthorPublicationsUpdateInput { Book: [AuthorPublicationsBookUpdateFieldInput!] Journal: [AuthorPublicationsJournalUpdateFieldInput!] @@ -256,6 +290,8 @@ describe("Unions", () => { name_EQ: String name_IN: [String!] name_STARTS_WITH: String + publications: AuthorPublicationsRelationshipFilters + publicationsConnection: AuthorPublicationsConnectionFilters \\"\\"\\" Return Authors where all of the related AuthorPublicationsConnections match this filter \\"\\"\\" @@ -343,6 +379,25 @@ describe("Unions", () => { totalCount: Int! } + input BookAuthorConnectionFilters { + \\"\\"\\" + Return Books where all of the related BookAuthorConnections match this filter + \\"\\"\\" + all: BookAuthorConnectionWhere + \\"\\"\\" + Return Books where none of the related BookAuthorConnections match this filter + \\"\\"\\" + none: BookAuthorConnectionWhere + \\"\\"\\" + Return Books where one of the related BookAuthorConnections match this filter + \\"\\"\\" + single: BookAuthorConnectionWhere + \\"\\"\\" + Return Books where some of the related BookAuthorConnections match this filter + \\"\\"\\" + some: BookAuthorConnectionWhere + } + input BookAuthorConnectionSort { edge: WroteSort node: AuthorSort @@ -403,6 +458,17 @@ describe("Unions", () => { properties: Wrote! } + input BookAuthorRelationshipFilters { + \\"\\"\\"Return Books where all of the related Authors match this filter\\"\\"\\" + all: AuthorWhere + \\"\\"\\"Return Books where none of the related Authors match this filter\\"\\"\\" + none: AuthorWhere + \\"\\"\\"Return Books where one of the related Authors match this filter\\"\\"\\" + single: AuthorWhere + \\"\\"\\"Return Books where some of the related Authors match this filter\\"\\"\\" + some: AuthorWhere + } + input BookAuthorUpdateConnectionInput { edge: WroteUpdateInput node: AuthorUpdateInput @@ -459,7 +525,9 @@ describe("Unions", () => { AND: [BookWhere!] NOT: BookWhere OR: [BookWhere!] + author: BookAuthorRelationshipFilters authorAggregate: BookAuthorAggregateInput + authorConnection: BookAuthorConnectionFilters \\"\\"\\" Return Books where all of the related BookAuthorConnections match this filter \\"\\"\\" @@ -597,6 +665,25 @@ describe("Unions", () => { totalCount: Int! } + input JournalAuthorConnectionFilters { + \\"\\"\\" + Return Journals where all of the related JournalAuthorConnections match this filter + \\"\\"\\" + all: JournalAuthorConnectionWhere + \\"\\"\\" + Return Journals where none of the related JournalAuthorConnections match this filter + \\"\\"\\" + none: JournalAuthorConnectionWhere + \\"\\"\\" + Return Journals where one of the related JournalAuthorConnections match this filter + \\"\\"\\" + single: JournalAuthorConnectionWhere + \\"\\"\\" + Return Journals where some of the related JournalAuthorConnections match this filter + \\"\\"\\" + some: JournalAuthorConnectionWhere + } + input JournalAuthorConnectionSort { edge: WroteSort node: AuthorSort @@ -657,6 +744,17 @@ describe("Unions", () => { properties: Wrote! } + input JournalAuthorRelationshipFilters { + \\"\\"\\"Return Journals where all of the related Authors match this filter\\"\\"\\" + all: AuthorWhere + \\"\\"\\"Return Journals where none of the related Authors match this filter\\"\\"\\" + none: AuthorWhere + \\"\\"\\"Return Journals where one of the related Authors match this filter\\"\\"\\" + single: AuthorWhere + \\"\\"\\"Return Journals where some of the related Authors match this filter\\"\\"\\" + some: AuthorWhere + } + input JournalAuthorUpdateConnectionInput { edge: WroteUpdateInput node: AuthorUpdateInput @@ -713,7 +811,9 @@ describe("Unions", () => { AND: [JournalWhere!] NOT: JournalWhere OR: [JournalWhere!] + author: JournalAuthorRelationshipFilters authorAggregate: JournalAuthorAggregateInput + authorConnection: JournalAuthorConnectionFilters \\"\\"\\" Return Journals where all of the related JournalAuthorConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/directive-preserve.test.ts b/packages/graphql/tests/schema/directive-preserve.test.ts index a08d8c5b71..0e593f784b 100644 --- a/packages/graphql/tests/schema/directive-preserve.test.ts +++ b/packages/graphql/tests/schema/directive-preserve.test.ts @@ -316,6 +316,25 @@ describe("Directive-preserve", () => { totalCount: Int! } + input GenreMoviesConnectionFilters { + \\"\\"\\" + Return Genres where all of the related GenreMoviesConnections match this filter + \\"\\"\\" + all: GenreMoviesConnectionWhere + \\"\\"\\" + Return Genres where none of the related GenreMoviesConnections match this filter + \\"\\"\\" + none: GenreMoviesConnectionWhere + \\"\\"\\" + Return Genres where one of the related GenreMoviesConnections match this filter + \\"\\"\\" + single: GenreMoviesConnectionWhere + \\"\\"\\" + Return Genres where some of the related GenreMoviesConnections match this filter + \\"\\"\\" + some: GenreMoviesConnectionWhere + } + input GenreMoviesConnectionSort { node: MovieSort } @@ -412,6 +431,17 @@ describe("Directive-preserve", () => { node: Movie! } + input GenreMoviesRelationshipFilters { + \\"\\"\\"Return Genres where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Genres where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Genres where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Genres where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input GenreMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -441,7 +471,9 @@ describe("Directive-preserve", () => { AND: [GenreWhere!] NOT: GenreWhere OR: [GenreWhere!] + movies: GenreMoviesRelationshipFilters moviesAggregate: GenreMoviesAggregateInput + moviesConnection: GenreMoviesConnectionFilters \\"\\"\\" Return Genres where all of the related GenreMoviesConnections match this filter \\"\\"\\" @@ -573,6 +605,25 @@ describe("Directive-preserve", () => { totalCount: Int! } + input MovieGenresConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieGenresConnections match this filter + \\"\\"\\" + all: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Movies where none of the related MovieGenresConnections match this filter + \\"\\"\\" + none: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Movies where one of the related MovieGenresConnections match this filter + \\"\\"\\" + single: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Movies where some of the related MovieGenresConnections match this filter + \\"\\"\\" + some: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use\\") + } + input MovieGenresConnectionSort { node: GenreSort } @@ -629,6 +680,17 @@ describe("Directive-preserve", () => { node: Genre! } + input MovieGenresRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" + all: GenreWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" + none: GenreWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" + single: GenreWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" + some: GenreWhere @deprecated(reason: \\"Do not use\\") + } + input MovieGenresUpdateConnectionInput { node: GenreUpdateInput } @@ -668,7 +730,9 @@ describe("Directive-preserve", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + genres: MovieGenresRelationshipFilters genresAggregate: MovieGenresAggregateInput @deprecated(reason: \\"Do not use\\") + genresConnection: MovieGenresConnectionFilters \\"\\"\\" Return Movies where all of the related MovieGenresConnections match this filter \\"\\"\\" @@ -931,6 +995,25 @@ describe("Directive-preserve", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { edge: ActedInSort node: ProductionSort @@ -991,6 +1074,17 @@ describe("Directive-preserve", () => { properties: ActedIn! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ActorActedInUpdateConnectionInput { edge: ActedInUpdateInput node: ProductionUpdateInput @@ -1066,7 +1160,9 @@ describe("Directive-preserve", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -1194,6 +1290,25 @@ describe("Directive-preserve", () => { where: ActorConnectWhere } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + all: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Movies where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + none: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Movies where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + single: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Movies where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + some: ProductionActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + } + input MovieActorsCreateFieldInput { edge: ActedInCreateInput! node: ActorCreateInput! @@ -1225,6 +1340,17 @@ describe("Directive-preserve", () => { name_SHORTEST_LENGTH_LTE: Int } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere @deprecated(reason: \\"Do not use\\") + } + input MovieActorsUpdateConnectionInput { edge: ActedInUpdateInput node: ActorUpdateInput @@ -1280,7 +1406,9 @@ describe("Directive-preserve", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput @deprecated(reason: \\"Do not use\\") + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related ProductionActorsConnections match this filter \\"\\"\\" @@ -1377,6 +1505,25 @@ describe("Directive-preserve", () => { totalCount: Int! } + input ProductionActorsConnectionFilters { + \\"\\"\\" + Return Productions where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + all: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + none: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + single: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + some: ProductionActorsConnectionWhere + } + input ProductionActorsConnectionSort { edge: ProductionActorsEdgeSort node: ActorSort @@ -1477,6 +1624,17 @@ describe("Directive-preserve", () => { properties: ProductionActorsRelationshipProperties! } + input ProductionActorsRelationshipFilters { + \\"\\"\\"Return Productions where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Productions where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Productions where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Productions where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + union ProductionActorsRelationshipProperties = ActedIn input ProductionActorsUpdateConnectionInput { @@ -1545,7 +1703,9 @@ describe("Directive-preserve", () => { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] + actors: ProductionActorsRelationshipFilters actorsAggregate: ProductionActorsAggregateInput + actorsConnection: ProductionActorsConnectionFilters \\"\\"\\" Return Productions where all of the related ProductionActorsConnections match this filter \\"\\"\\" @@ -1641,6 +1801,25 @@ describe("Directive-preserve", () => { where: ActorConnectWhere } + input SeriesActorsConnectionFilters { + \\"\\"\\" + Return Series where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + all: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + none: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + single: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + some: ProductionActorsConnectionWhere + } + input SeriesActorsCreateFieldInput { edge: ActedInCreateInput! node: ActorCreateInput! @@ -1672,6 +1851,17 @@ describe("Directive-preserve", () => { name_SHORTEST_LENGTH_LTE: Int } + input SeriesActorsRelationshipFilters { + \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input SeriesActorsUpdateConnectionInput { edge: ActedInUpdateInput node: ActorUpdateInput @@ -1733,7 +1923,9 @@ describe("Directive-preserve", () => { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] + actors: SeriesActorsRelationshipFilters actorsAggregate: SeriesActorsAggregateInput + actorsConnection: SeriesActorsConnectionFilters \\"\\"\\" Return Series where all of the related ProductionActorsConnections match this filter \\"\\"\\" @@ -1962,6 +2154,25 @@ describe("Directive-preserve", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { edge: ActedInSort node: ProductionSort @@ -2020,6 +2231,17 @@ describe("Directive-preserve", () => { properties: ActedIn! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ActorActedInUpdateConnectionInput { edge: ActedInUpdateInput node: ProductionUpdateInput @@ -2095,7 +2317,9 @@ describe("Directive-preserve", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -2229,6 +2453,25 @@ describe("Directive-preserve", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere @deprecated(reason: \\"Do not use\\") + } + input MovieActorsConnectionSort { edge: ActedInSort node: ActorSort @@ -2289,6 +2532,17 @@ describe("Directive-preserve", () => { properties: ActedIn! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere @deprecated(reason: \\"Do not use\\") + } + input MovieActorsUpdateConnectionInput { edge: ActedInUpdateInput node: ActorUpdateInput @@ -2344,7 +2598,9 @@ describe("Directive-preserve", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput @deprecated(reason: \\"Do not use\\") + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -2531,6 +2787,25 @@ describe("Directive-preserve", () => { totalCount: Int! } + input SeriesActorsConnectionFilters { + \\"\\"\\" + Return Series where all of the related SeriesActorsConnections match this filter + \\"\\"\\" + all: SeriesActorsConnectionWhere + \\"\\"\\" + Return Series where none of the related SeriesActorsConnections match this filter + \\"\\"\\" + none: SeriesActorsConnectionWhere + \\"\\"\\" + Return Series where one of the related SeriesActorsConnections match this filter + \\"\\"\\" + single: SeriesActorsConnectionWhere + \\"\\"\\" + Return Series where some of the related SeriesActorsConnections match this filter + \\"\\"\\" + some: SeriesActorsConnectionWhere + } + input SeriesActorsConnectionSort { edge: ActedInSort node: ActorSort @@ -2591,6 +2866,17 @@ describe("Directive-preserve", () => { properties: ActedIn! } + input SeriesActorsRelationshipFilters { + \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input SeriesActorsUpdateConnectionInput { edge: ActedInUpdateInput node: ActorUpdateInput @@ -2652,7 +2938,9 @@ describe("Directive-preserve", () => { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] + actors: SeriesActorsRelationshipFilters actorsAggregate: SeriesActorsAggregateInput + actorsConnection: SeriesActorsConnectionFilters \\"\\"\\" Return Series where all of the related SeriesActorsConnections match this filter \\"\\"\\" @@ -2869,6 +3157,25 @@ describe("Directive-preserve", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { edge: ActedInSort node: ProductionSort @@ -2927,6 +3234,17 @@ describe("Directive-preserve", () => { properties: ActedIn! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ActorActedInUpdateConnectionInput { edge: ActedInUpdateInput node: ProductionUpdateInput @@ -3002,7 +3320,9 @@ describe("Directive-preserve", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -3136,6 +3456,25 @@ describe("Directive-preserve", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { edge: ActedInSort node: ActorSort @@ -3196,6 +3535,17 @@ describe("Directive-preserve", () => { properties: ActedIn! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { edge: ActedInUpdateInput node: ActorUpdateInput @@ -3251,7 +3601,9 @@ describe("Directive-preserve", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -3438,6 +3790,25 @@ describe("Directive-preserve", () => { totalCount: Int! } + input SeriesActorsConnectionFilters { + \\"\\"\\" + Return Series where all of the related SeriesActorsConnections match this filter + \\"\\"\\" + all: SeriesActorsConnectionWhere + \\"\\"\\" + Return Series where none of the related SeriesActorsConnections match this filter + \\"\\"\\" + none: SeriesActorsConnectionWhere + \\"\\"\\" + Return Series where one of the related SeriesActorsConnections match this filter + \\"\\"\\" + single: SeriesActorsConnectionWhere + \\"\\"\\" + Return Series where some of the related SeriesActorsConnections match this filter + \\"\\"\\" + some: SeriesActorsConnectionWhere + } + input SeriesActorsConnectionSort { edge: ActedInSort node: ActorSort @@ -3498,6 +3869,17 @@ describe("Directive-preserve", () => { properties: ActedIn! } + input SeriesActorsRelationshipFilters { + \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input SeriesActorsUpdateConnectionInput { edge: ActedInUpdateInput node: ActorUpdateInput @@ -3559,7 +3941,9 @@ describe("Directive-preserve", () => { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] + actors: SeriesActorsRelationshipFilters actorsAggregate: SeriesActorsAggregateInput + actorsConnection: SeriesActorsConnectionFilters \\"\\"\\" Return Series where all of the related SeriesActorsConnections match this filter \\"\\"\\" @@ -3752,6 +4136,25 @@ describe("Directive-preserve", () => { totalCount: Int! } + input BlogPostsConnectionFilters { + \\"\\"\\" + Return Blogs where all of the related BlogPostsConnections match this filter + \\"\\"\\" + all: BlogPostsConnectionWhere + \\"\\"\\" + Return Blogs where none of the related BlogPostsConnections match this filter + \\"\\"\\" + none: BlogPostsConnectionWhere + \\"\\"\\" + Return Blogs where one of the related BlogPostsConnections match this filter + \\"\\"\\" + single: BlogPostsConnectionWhere + \\"\\"\\" + Return Blogs where some of the related BlogPostsConnections match this filter + \\"\\"\\" + some: BlogPostsConnectionWhere + } + input BlogPostsConnectionSort { node: PostSort } @@ -3806,6 +4209,17 @@ describe("Directive-preserve", () => { node: Post! } + input BlogPostsRelationshipFilters { + \\"\\"\\"Return Blogs where all of the related Posts match this filter\\"\\"\\" + all: PostWhere + \\"\\"\\"Return Blogs where none of the related Posts match this filter\\"\\"\\" + none: PostWhere + \\"\\"\\"Return Blogs where one of the related Posts match this filter\\"\\"\\" + single: PostWhere + \\"\\"\\"Return Blogs where some of the related Posts match this filter\\"\\"\\" + some: PostWhere + } + input BlogPostsUpdateConnectionInput { node: PostUpdateInput } @@ -3835,7 +4249,9 @@ describe("Directive-preserve", () => { AND: [BlogWhere!] NOT: BlogWhere OR: [BlogWhere!] + posts: BlogPostsRelationshipFilters postsAggregate: BlogPostsAggregateInput + postsConnection: BlogPostsConnectionFilters \\"\\"\\" Return Blogs where all of the related BlogPostsConnections match this filter \\"\\"\\" @@ -4109,6 +4525,25 @@ describe("Directive-preserve", () => { totalCount: Int! } + input UserContentConnectionFilters { + \\"\\"\\" + Return Users where all of the related UserContentConnections match this filter + \\"\\"\\" + all: UserContentConnectionWhere @deprecated(reason: \\"Do not use user.content\\") + \\"\\"\\" + Return Users where none of the related UserContentConnections match this filter + \\"\\"\\" + none: UserContentConnectionWhere @deprecated(reason: \\"Do not use user.content\\") + \\"\\"\\" + Return Users where one of the related UserContentConnections match this filter + \\"\\"\\" + single: UserContentConnectionWhere @deprecated(reason: \\"Do not use user.content\\") + \\"\\"\\" + Return Users where some of the related UserContentConnections match this filter + \\"\\"\\" + some: UserContentConnectionWhere @deprecated(reason: \\"Do not use user.content\\") + } + input UserContentConnectionWhere { Blog: UserContentBlogConnectionWhere Post: UserContentPostConnectionWhere @@ -4170,6 +4605,17 @@ describe("Directive-preserve", () => { node: Content! } + input UserContentRelationshipFilters { + \\"\\"\\"Return Users where all of the related Contents match this filter\\"\\"\\" + all: ContentWhere @deprecated(reason: \\"Do not use user.content\\") + \\"\\"\\"Return Users where none of the related Contents match this filter\\"\\"\\" + none: ContentWhere @deprecated(reason: \\"Do not use user.content\\") + \\"\\"\\"Return Users where one of the related Contents match this filter\\"\\"\\" + single: ContentWhere @deprecated(reason: \\"Do not use user.content\\") + \\"\\"\\"Return Users where some of the related Contents match this filter\\"\\"\\" + some: ContentWhere @deprecated(reason: \\"Do not use user.content\\") + } + input UserContentUpdateInput { Blog: [UserContentBlogUpdateFieldInput!] @deprecated(reason: \\"Do not use user.content\\") Post: [UserContentPostUpdateFieldInput!] @deprecated(reason: \\"Do not use user.content\\") @@ -4205,6 +4651,8 @@ describe("Directive-preserve", () => { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] + content: UserContentRelationshipFilters + contentConnection: UserContentConnectionFilters \\"\\"\\" Return Users where all of the related UserContentConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/directives/alias.test.ts b/packages/graphql/tests/schema/directives/alias.test.ts index 834b16505a..384772800f 100644 --- a/packages/graphql/tests/schema/directives/alias.test.ts +++ b/packages/graphql/tests/schema/directives/alias.test.ts @@ -82,6 +82,25 @@ describe("Alias", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { edge: ActorActedInPropsSort node: MovieSort @@ -246,6 +265,17 @@ describe("Alias", () => { properties: ActorActedInProps! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorActedInUpdateConnectionInput { edge: ActorActedInPropsUpdateInput node: MovieUpdateInput @@ -315,7 +345,9 @@ describe("Alias", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/directives/filterable.test.ts b/packages/graphql/tests/schema/directives/filterable.test.ts index 88bde55901..bc2e700243 100644 --- a/packages/graphql/tests/schema/directives/filterable.test.ts +++ b/packages/graphql/tests/schema/directives/filterable.test.ts @@ -982,6 +982,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + all: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + none: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + single: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + some: ActorMoviesConnectionWhere + } + input ActorMoviesConnectionSort { node: MovieSort } @@ -1017,6 +1036,17 @@ describe("@filterable directive", () => { node: Movie! } + input ActorMoviesRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -1073,7 +1103,9 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: ActorMoviesRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" @@ -1192,6 +1224,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: ActorSort } @@ -1263,6 +1314,17 @@ describe("@filterable directive", () => { node: Actor! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -1358,7 +1420,9 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -1599,6 +1663,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + all: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + none: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + single: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + some: ActorMoviesConnectionWhere + } + input ActorMoviesConnectionSort { node: MovieSort } @@ -1655,6 +1738,17 @@ describe("@filterable directive", () => { node: Movie! } + input ActorMoviesRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -1711,7 +1805,9 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: ActorMoviesRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" @@ -1830,6 +1926,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: ActorSort } @@ -1901,6 +2016,17 @@ describe("@filterable directive", () => { node: Actor! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -1996,7 +2122,9 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -2237,6 +2365,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + all: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + none: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + single: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + some: ActorMoviesConnectionWhere + } + input ActorMoviesConnectionSort { node: MovieSort } @@ -2293,6 +2440,17 @@ describe("@filterable directive", () => { node: Movie! } + input ActorMoviesRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -2349,7 +2507,9 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: ActorMoviesRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" @@ -2468,6 +2628,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: ActorSort } @@ -2539,6 +2718,17 @@ describe("@filterable directive", () => { node: Actor! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -2622,7 +2812,9 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -2860,6 +3052,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + all: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + none: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + single: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + some: ActorMoviesConnectionWhere + } + input ActorMoviesConnectionSort { node: MovieSort } @@ -2916,6 +3127,17 @@ describe("@filterable directive", () => { node: Movie! } + input ActorMoviesRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -2972,7 +3194,9 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: ActorMoviesRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" @@ -3079,6 +3303,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: ActorSort } @@ -3114,6 +3357,17 @@ describe("@filterable directive", () => { node: Actor! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -3209,6 +3463,8 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -3451,6 +3707,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + all: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + none: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + single: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + some: ActorMoviesConnectionWhere + } + input ActorMoviesConnectionSort { node: MovieSort } @@ -3507,6 +3782,17 @@ describe("@filterable directive", () => { node: Movie! } + input ActorMoviesRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -3563,7 +3849,9 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: ActorMoviesRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" @@ -3682,6 +3970,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: ActorSort } @@ -3753,6 +4060,17 @@ describe("@filterable directive", () => { node: Actor! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -3848,7 +4166,9 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -4091,6 +4411,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + all: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + none: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + single: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + some: ActorMoviesConnectionWhere + } + input ActorMoviesConnectionSort { node: MovieSort } @@ -4147,6 +4486,17 @@ describe("@filterable directive", () => { node: Movie! } + input ActorMoviesRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -4203,7 +4553,9 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: ActorMoviesRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" @@ -4707,6 +5059,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + all: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + none: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + single: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + some: ActorMoviesConnectionWhere + } + input ActorMoviesConnectionSort { node: MovieSort } @@ -4763,6 +5134,17 @@ describe("@filterable directive", () => { node: Movie! } + input ActorMoviesRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -4819,7 +5201,9 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: ActorMoviesRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" @@ -4926,6 +5310,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: ActorSort } @@ -4961,8 +5364,19 @@ describe("@filterable directive", () => { node: Actor! } - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + + input MovieActorsUpdateConnectionInput { + node: ActorUpdateInput } input MovieActorsUpdateFieldInput { @@ -5056,6 +5470,8 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -5291,6 +5707,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + all: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + none: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + single: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + some: ActorMoviesConnectionWhere + } + input ActorMoviesConnectionSort { node: MovieSort } @@ -5347,6 +5782,17 @@ describe("@filterable directive", () => { node: Movie! } + input ActorMoviesRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -5403,7 +5849,9 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: ActorMoviesRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" @@ -5499,6 +5947,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -5532,6 +5999,17 @@ describe("@filterable directive", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateConnectionInput { node: PersonUpdateInput } @@ -5636,6 +6114,8 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -5930,6 +6410,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + all: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + none: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + single: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + some: ActorMoviesConnectionWhere + } + input ActorMoviesConnectionSort { node: MovieSort } @@ -5986,6 +6485,17 @@ describe("@filterable directive", () => { node: Movie! } + input ActorMoviesRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -6042,7 +6552,9 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: ActorMoviesRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" @@ -6150,6 +6662,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -6204,6 +6735,17 @@ describe("@filterable directive", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateConnectionInput { node: PersonUpdateInput } @@ -6308,7 +6850,9 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -6603,6 +7147,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + all: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + none: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + single: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + some: ActorMoviesConnectionWhere + } + input ActorMoviesConnectionSort { node: MovieSort } @@ -6659,6 +7222,17 @@ describe("@filterable directive", () => { node: Movie! } + input ActorMoviesRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -6715,7 +7289,9 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: ActorMoviesRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" @@ -6811,6 +7387,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -6844,6 +7439,17 @@ describe("@filterable directive", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateConnectionInput { node: PersonUpdateInput } @@ -6948,6 +7554,8 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -7258,6 +7866,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + all: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + none: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + single: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + some: ActorMoviesConnectionWhere + } + input ActorMoviesConnectionSort { node: MovieSort } @@ -7314,6 +7941,17 @@ describe("@filterable directive", () => { node: Movie! } + input ActorMoviesRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -7370,7 +8008,9 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: ActorMoviesRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" @@ -7505,6 +8145,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input AppearanceMoviesConnectionFilters { + \\"\\"\\" + Return Appearances where all of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + all: AppearanceMoviesConnectionWhere + \\"\\"\\" + Return Appearances where none of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + none: AppearanceMoviesConnectionWhere + \\"\\"\\" + Return Appearances where one of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + single: AppearanceMoviesConnectionWhere + \\"\\"\\" + Return Appearances where some of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + some: AppearanceMoviesConnectionWhere + } + input AppearanceMoviesConnectionSort { node: MovieSort } @@ -7561,6 +8220,17 @@ describe("@filterable directive", () => { node: Movie! } + input AppearanceMoviesRelationshipFilters { + \\"\\"\\"Return Appearances where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Appearances where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Appearances where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Appearances where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input AppearanceMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -7617,7 +8287,9 @@ describe("@filterable directive", () => { AND: [AppearanceWhere!] NOT: AppearanceWhere OR: [AppearanceWhere!] + movies: AppearanceMoviesRelationshipFilters moviesAggregate: AppearanceMoviesAggregateInput + moviesConnection: AppearanceMoviesConnectionFilters \\"\\"\\" Return Appearances where all of the related AppearanceMoviesConnections match this filter \\"\\"\\" @@ -7806,6 +8478,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionWhere { Actor: MovieActorsActorConnectionWhere Appearance: MovieActorsAppearanceConnectionWhere @@ -7831,6 +8522,17 @@ describe("@filterable directive", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateInput { Actor: [MovieActorsActorUpdateFieldInput!] Appearance: [MovieActorsAppearanceUpdateFieldInput!] @@ -7918,6 +8620,8 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -8191,6 +8895,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + all: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + none: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + single: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + some: ActorMoviesConnectionWhere + } + input ActorMoviesConnectionSort { node: MovieSort } @@ -8247,6 +8970,17 @@ describe("@filterable directive", () => { node: Movie! } + input ActorMoviesRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -8303,7 +9037,9 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: ActorMoviesRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" @@ -8438,6 +9174,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input AppearanceMoviesConnectionFilters { + \\"\\"\\" + Return Appearances where all of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + all: AppearanceMoviesConnectionWhere + \\"\\"\\" + Return Appearances where none of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + none: AppearanceMoviesConnectionWhere + \\"\\"\\" + Return Appearances where one of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + single: AppearanceMoviesConnectionWhere + \\"\\"\\" + Return Appearances where some of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + some: AppearanceMoviesConnectionWhere + } + input AppearanceMoviesConnectionSort { node: MovieSort } @@ -8494,6 +9249,17 @@ describe("@filterable directive", () => { node: Movie! } + input AppearanceMoviesRelationshipFilters { + \\"\\"\\"Return Appearances where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Appearances where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Appearances where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Appearances where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input AppearanceMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -8550,7 +9316,9 @@ describe("@filterable directive", () => { AND: [AppearanceWhere!] NOT: AppearanceWhere OR: [AppearanceWhere!] + movies: AppearanceMoviesRelationshipFilters moviesAggregate: AppearanceMoviesAggregateInput + moviesConnection: AppearanceMoviesConnectionFilters \\"\\"\\" Return Appearances where all of the related AppearanceMoviesConnections match this filter \\"\\"\\" @@ -8739,6 +9507,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionWhere { Actor: MovieActorsActorConnectionWhere Appearance: MovieActorsAppearanceConnectionWhere @@ -8764,6 +9551,17 @@ describe("@filterable directive", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateInput { Actor: [MovieActorsActorUpdateFieldInput!] Appearance: [MovieActorsAppearanceUpdateFieldInput!] @@ -8851,6 +9649,8 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -9124,6 +9924,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + all: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + none: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + single: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + some: ActorMoviesConnectionWhere + } + input ActorMoviesConnectionSort { node: MovieSort } @@ -9180,6 +9999,17 @@ describe("@filterable directive", () => { node: Movie! } + input ActorMoviesRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -9236,7 +10066,9 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: ActorMoviesRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" @@ -9371,6 +10203,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input AppearanceMoviesConnectionFilters { + \\"\\"\\" + Return Appearances where all of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + all: AppearanceMoviesConnectionWhere + \\"\\"\\" + Return Appearances where none of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + none: AppearanceMoviesConnectionWhere + \\"\\"\\" + Return Appearances where one of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + single: AppearanceMoviesConnectionWhere + \\"\\"\\" + Return Appearances where some of the related AppearanceMoviesConnections match this filter + \\"\\"\\" + some: AppearanceMoviesConnectionWhere + } + input AppearanceMoviesConnectionSort { node: MovieSort } @@ -9427,6 +10278,17 @@ describe("@filterable directive", () => { node: Movie! } + input AppearanceMoviesRelationshipFilters { + \\"\\"\\"Return Appearances where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Appearances where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Appearances where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Appearances where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input AppearanceMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -9483,7 +10345,9 @@ describe("@filterable directive", () => { AND: [AppearanceWhere!] NOT: AppearanceWhere OR: [AppearanceWhere!] + movies: AppearanceMoviesRelationshipFilters moviesAggregate: AppearanceMoviesAggregateInput + moviesConnection: AppearanceMoviesConnectionFilters \\"\\"\\" Return Appearances where all of the related AppearanceMoviesConnections match this filter \\"\\"\\" @@ -9672,6 +10536,25 @@ describe("@filterable directive", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionWhere { Actor: MovieActorsActorConnectionWhere Appearance: MovieActorsAppearanceConnectionWhere @@ -9697,6 +10580,17 @@ describe("@filterable directive", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateInput { Actor: [MovieActorsActorUpdateFieldInput!] Appearance: [MovieActorsAppearanceUpdateFieldInput!] @@ -9784,6 +10678,8 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/directives/populatedBy.test.ts b/packages/graphql/tests/schema/directives/populatedBy.test.ts index e5f26871fd..de1dc4573a 100644 --- a/packages/graphql/tests/schema/directives/populatedBy.test.ts +++ b/packages/graphql/tests/schema/directives/populatedBy.test.ts @@ -902,6 +902,25 @@ describe("@populatedBy tests", () => { totalCount: Int! } + input MovieGenresConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieGenresConnections match this filter + \\"\\"\\" + all: MovieGenresConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieGenresConnections match this filter + \\"\\"\\" + none: MovieGenresConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieGenresConnections match this filter + \\"\\"\\" + single: MovieGenresConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieGenresConnections match this filter + \\"\\"\\" + some: MovieGenresConnectionWhere + } + input MovieGenresConnectionSort { edge: RelPropertiesSort node: GenreSort @@ -955,6 +974,17 @@ describe("@populatedBy tests", () => { properties: RelProperties! } + input MovieGenresRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" + all: GenreWhere + \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" + none: GenreWhere + \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" + single: GenreWhere + \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" + some: GenreWhere + } + input MovieGenresUpdateConnectionInput { edge: RelPropertiesUpdateInput node: GenreUpdateInput @@ -985,7 +1015,9 @@ describe("@populatedBy tests", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + genres: MovieGenresRelationshipFilters genresAggregate: MovieGenresAggregateInput + genresConnection: MovieGenresConnectionFilters \\"\\"\\" Return Movies where all of the related MovieGenresConnections match this filter \\"\\"\\" @@ -1442,6 +1474,25 @@ describe("@populatedBy tests", () => { totalCount: Int! } + input MovieGenresConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieGenresConnections match this filter + \\"\\"\\" + all: MovieGenresConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieGenresConnections match this filter + \\"\\"\\" + none: MovieGenresConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieGenresConnections match this filter + \\"\\"\\" + single: MovieGenresConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieGenresConnections match this filter + \\"\\"\\" + some: MovieGenresConnectionWhere + } + input MovieGenresConnectionSort { edge: RelPropertiesSort node: GenreSort @@ -1495,6 +1546,17 @@ describe("@populatedBy tests", () => { properties: RelProperties! } + input MovieGenresRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" + all: GenreWhere + \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" + none: GenreWhere + \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" + single: GenreWhere + \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" + some: GenreWhere + } + input MovieGenresUpdateConnectionInput { edge: RelPropertiesUpdateInput node: GenreUpdateInput @@ -1525,7 +1587,9 @@ describe("@populatedBy tests", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + genres: MovieGenresRelationshipFilters genresAggregate: MovieGenresAggregateInput + genresConnection: MovieGenresConnectionFilters \\"\\"\\" Return Movies where all of the related MovieGenresConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts index 8969207747..8528749944 100644 --- a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts @@ -343,6 +343,25 @@ describe("@relationship directive, aggregate argument", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: ActorSort } @@ -412,6 +431,17 @@ describe("@relationship directive, aggregate argument", () => { node: Actor! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -460,7 +490,9 @@ describe("@relationship directive, aggregate argument", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -723,6 +755,25 @@ describe("@relationship directive, aggregate argument", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: ActorSort } @@ -792,6 +843,17 @@ describe("@relationship directive, aggregate argument", () => { node: Actor! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -840,7 +902,9 @@ describe("@relationship directive, aggregate argument", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -1094,6 +1158,25 @@ describe("@relationship directive, aggregate argument", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -1163,6 +1246,17 @@ describe("@relationship directive, aggregate argument", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateConnectionInput { node: PersonUpdateInput } @@ -1211,7 +1305,9 @@ describe("@relationship directive, aggregate argument", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -1533,6 +1629,25 @@ describe("@relationship directive, aggregate argument", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -1602,6 +1717,17 @@ describe("@relationship directive, aggregate argument", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateConnectionInput { node: PersonUpdateInput } @@ -1660,7 +1786,9 @@ describe("@relationship directive, aggregate argument", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -2026,6 +2154,25 @@ describe("@relationship directive, aggregate argument", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionWhere { Actor: MovieActorsActorConnectionWhere Person: MovieActorsPersonConnectionWhere @@ -2087,6 +2234,17 @@ describe("@relationship directive, aggregate argument", () => { node: CastMember! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related CastMembers match this filter\\"\\"\\" + all: CastMemberWhere + \\"\\"\\"Return Movies where none of the related CastMembers match this filter\\"\\"\\" + none: CastMemberWhere + \\"\\"\\"Return Movies where one of the related CastMembers match this filter\\"\\"\\" + single: CastMemberWhere + \\"\\"\\"Return Movies where some of the related CastMembers match this filter\\"\\"\\" + some: CastMemberWhere + } + input MovieActorsUpdateInput { Actor: [MovieActorsActorUpdateFieldInput!] Person: [MovieActorsPersonUpdateFieldInput!] @@ -2127,6 +2285,8 @@ describe("@relationship directive, aggregate argument", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -2483,6 +2643,25 @@ describe("@relationship directive, aggregate argument", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionWhere { Actor: MovieActorsActorConnectionWhere Person: MovieActorsPersonConnectionWhere @@ -2544,6 +2723,17 @@ describe("@relationship directive, aggregate argument", () => { node: CastMember! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related CastMembers match this filter\\"\\"\\" + all: CastMemberWhere + \\"\\"\\"Return Movies where none of the related CastMembers match this filter\\"\\"\\" + none: CastMemberWhere + \\"\\"\\"Return Movies where one of the related CastMembers match this filter\\"\\"\\" + single: CastMemberWhere + \\"\\"\\"Return Movies where some of the related CastMembers match this filter\\"\\"\\" + some: CastMemberWhere + } + input MovieActorsUpdateInput { Actor: [MovieActorsActorUpdateFieldInput!] Person: [MovieActorsPersonUpdateFieldInput!] @@ -2584,6 +2774,8 @@ describe("@relationship directive, aggregate argument", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" 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 42336b66c2..c862ca4ada 100644 --- a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts @@ -120,6 +120,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -157,6 +176,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @@ -195,7 +225,9 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -446,6 +478,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -491,6 +542,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateFieldInput { create: [MovieActorsCreateFieldInput!] where: MovieActorsConnectionWhere @@ -536,7 +598,9 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -791,6 +855,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -832,6 +915,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateFieldInput { connect: [MovieActorsConnectFieldInput!] where: MovieActorsConnectionWhere @@ -877,7 +971,9 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -1132,6 +1228,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -1169,6 +1284,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateConnectionInput { node: PersonUpdateInput } @@ -1217,7 +1343,9 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -1468,6 +1596,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -1509,6 +1656,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateFieldInput { delete: [MovieActorsDeleteFieldInput!] where: MovieActorsConnectionWhere @@ -1557,7 +1715,9 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -1808,6 +1968,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -1849,6 +2028,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateFieldInput { disconnect: [MovieActorsDisconnectFieldInput!] where: MovieActorsConnectionWhere @@ -1893,7 +2083,9 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -2145,6 +2337,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -2182,6 +2393,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @@ -2220,7 +2442,9 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -2473,6 +2697,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -2520,6 +2763,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @@ -2559,7 +2813,9 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -2827,6 +3083,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -2881,6 +3156,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateConnectionInput { node: PersonUpdateInput } @@ -2949,6 +3235,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieProducersConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieProducersConnections match this filter + \\"\\"\\" + all: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieProducersConnections match this filter + \\"\\"\\" + none: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieProducersConnections match this filter + \\"\\"\\" + single: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieProducersConnections match this filter + \\"\\"\\" + some: MovieProducersConnectionWhere + } + input MovieProducersConnectionSort { node: PersonSort } @@ -2990,6 +3295,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieProducersRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieProducersUpdateFieldInput { disconnect: [MovieProducersDisconnectFieldInput!] where: MovieProducersConnectionWhere @@ -3012,7 +3328,9 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -3043,7 +3361,9 @@ describe("Relationship nested operations", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID + producers: MovieProducersRelationshipFilters producersAggregate: MovieProducersAggregateInput + producersConnection: MovieProducersConnectionFilters \\"\\"\\" Return Movies where all of the related MovieProducersConnections match this filter \\"\\"\\" @@ -3296,6 +3616,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -3341,6 +3680,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateFieldInput { create: [MovieActorsCreateFieldInput!] where: MovieActorsConnectionWhere @@ -3397,6 +3747,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieProducersConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieProducersConnections match this filter + \\"\\"\\" + all: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieProducersConnections match this filter + \\"\\"\\" + none: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieProducersConnections match this filter + \\"\\"\\" + single: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieProducersConnections match this filter + \\"\\"\\" + some: MovieProducersConnectionWhere + } + input MovieProducersConnectionSort { node: PersonSort } @@ -3438,6 +3807,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieProducersRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieProducersUpdateFieldInput { disconnect: [MovieProducersDisconnectFieldInput!] where: MovieProducersConnectionWhere @@ -3460,7 +3840,9 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -3491,7 +3873,9 @@ describe("Relationship nested operations", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID + producers: MovieProducersRelationshipFilters producersAggregate: MovieProducersAggregateInput + producersConnection: MovieProducersConnectionFilters \\"\\"\\" Return Movies where all of the related MovieProducersConnections match this filter \\"\\"\\" @@ -3741,6 +4125,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionWhere { PersonOne: MovieActorsPersonOneConnectionWhere PersonTwo: MovieActorsPersonTwoConnectionWhere @@ -3765,6 +4168,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @@ -3794,6 +4208,8 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -4108,6 +4524,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionWhere { PersonOne: MovieActorsPersonOneConnectionWhere PersonTwo: MovieActorsPersonTwoConnectionWhere @@ -4163,6 +4598,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateInput { PersonOne: [MovieActorsPersonOneUpdateFieldInput!] PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] @@ -4199,6 +4645,8 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -4513,6 +4961,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionWhere { PersonOne: MovieActorsPersonOneConnectionWhere PersonTwo: MovieActorsPersonTwoConnectionWhere @@ -4568,6 +5035,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateInput { PersonOne: [MovieActorsPersonOneUpdateFieldInput!] PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] @@ -4604,6 +5082,8 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -4926,6 +5406,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionWhere { PersonOne: MovieActorsPersonOneConnectionWhere PersonTwo: MovieActorsPersonTwoConnectionWhere @@ -4968,6 +5467,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateInput { PersonOne: [MovieActorsPersonOneUpdateFieldInput!] PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] @@ -5003,6 +5513,8 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -5317,6 +5829,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionWhere { PersonOne: MovieActorsPersonOneConnectionWhere PersonTwo: MovieActorsPersonTwoConnectionWhere @@ -5364,6 +5895,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateInput { PersonOne: [MovieActorsPersonOneUpdateFieldInput!] PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] @@ -5403,6 +5945,8 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -5717,6 +6261,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionWhere { PersonOne: MovieActorsPersonOneConnectionWhere PersonTwo: MovieActorsPersonTwoConnectionWhere @@ -5759,6 +6322,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateInput { PersonOne: [MovieActorsPersonOneUpdateFieldInput!] PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] @@ -5794,6 +6368,8 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -6109,6 +6685,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionWhere { PersonOne: MovieActorsPersonOneConnectionWhere PersonTwo: MovieActorsPersonTwoConnectionWhere @@ -6133,6 +6728,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @@ -6162,6 +6768,8 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -6479,6 +7087,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionWhere { PersonOne: MovieActorsPersonOneConnectionWhere PersonTwo: MovieActorsPersonTwoConnectionWhere @@ -6503,6 +7130,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @@ -6532,6 +7170,8 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -6867,6 +7507,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionWhere { PersonOne: MovieActorsPersonOneConnectionWhere PersonTwo: MovieActorsPersonTwoConnectionWhere @@ -6969,6 +7628,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateInput { PersonOne: [MovieActorsPersonOneUpdateFieldInput!] PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] @@ -6999,6 +7669,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieProducersConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieProducersConnections match this filter + \\"\\"\\" + all: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieProducersConnections match this filter + \\"\\"\\" + none: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieProducersConnections match this filter + \\"\\"\\" + single: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieProducersConnections match this filter + \\"\\"\\" + some: MovieProducersConnectionWhere + } + input MovieProducersConnectionWhere { PersonOne: MovieProducersPersonOneConnectionWhere PersonTwo: MovieProducersPersonTwoConnectionWhere @@ -7041,6 +7730,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieProducersRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieProducersUpdateInput { PersonOne: [MovieProducersPersonOneUpdateFieldInput!] PersonTwo: [MovieProducersPersonTwoUpdateFieldInput!] @@ -7063,6 +7763,8 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -7093,6 +7795,8 @@ describe("Relationship nested operations", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID + producers: MovieProducersRelationshipFilters + producersConnection: MovieProducersConnectionFilters \\"\\"\\" Return Movies where all of the related MovieProducersConnections match this filter \\"\\"\\" @@ -7412,6 +8116,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionWhere { PersonOne: MovieActorsPersonOneConnectionWhere PersonTwo: MovieActorsPersonTwoConnectionWhere @@ -7467,6 +8190,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateInput { PersonOne: [MovieActorsPersonOneUpdateFieldInput!] PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] @@ -7493,6 +8227,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieProducersConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieProducersConnections match this filter + \\"\\"\\" + all: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieProducersConnections match this filter + \\"\\"\\" + none: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieProducersConnections match this filter + \\"\\"\\" + single: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieProducersConnections match this filter + \\"\\"\\" + some: MovieProducersConnectionWhere + } + input MovieProducersConnectionWhere { PersonOne: MovieProducersPersonOneConnectionWhere PersonTwo: MovieProducersPersonTwoConnectionWhere @@ -7535,6 +8288,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieProducersRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieProducersUpdateInput { PersonOne: [MovieProducersPersonOneUpdateFieldInput!] PersonTwo: [MovieProducersPersonTwoUpdateFieldInput!] @@ -7557,6 +8321,8 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -7587,6 +8353,8 @@ describe("Relationship nested operations", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID + producers: MovieProducersRelationshipFilters + producersConnection: MovieProducersConnectionFilters \\"\\"\\" Return Movies where all of the related MovieProducersConnections match this filter \\"\\"\\" @@ -7924,6 +8692,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -7961,6 +8748,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @@ -7999,7 +8797,9 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -8384,6 +9184,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -8429,6 +9248,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateFieldInput { create: [MovieActorsCreateFieldInput!] where: MovieActorsConnectionWhere @@ -8474,7 +9304,9 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -8868,6 +9700,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -8909,6 +9760,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateFieldInput { connect: [MovieActorsConnectFieldInput!] where: MovieActorsConnectionWhere @@ -8954,7 +9816,9 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -9343,6 +10207,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -9380,6 +10263,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateConnectionInput { node: PersonUpdateInput } @@ -9428,7 +10322,9 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -9817,6 +10713,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -9858,6 +10773,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateFieldInput { delete: [MovieActorsDeleteFieldInput!] where: MovieActorsConnectionWhere @@ -9906,7 +10832,9 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -10291,6 +11219,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -10332,6 +11279,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateFieldInput { disconnect: [MovieActorsDisconnectFieldInput!] where: MovieActorsConnectionWhere @@ -10376,7 +11334,9 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -10769,6 +11729,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -10823,6 +11802,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateConnectionInput { node: PersonUpdateInput } @@ -10891,6 +11881,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieProducersConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieProducersConnections match this filter + \\"\\"\\" + all: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieProducersConnections match this filter + \\"\\"\\" + none: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieProducersConnections match this filter + \\"\\"\\" + single: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieProducersConnections match this filter + \\"\\"\\" + some: MovieProducersConnectionWhere + } + input MovieProducersConnectionSort { node: PersonSort } @@ -10932,6 +11941,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieProducersRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieProducersUpdateFieldInput { disconnect: [MovieProducersDisconnectFieldInput!] where: MovieProducersConnectionWhere @@ -10954,7 +11974,9 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -10985,7 +12007,9 @@ describe("Relationship nested operations", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID + producers: MovieProducersRelationshipFilters producersAggregate: MovieProducersAggregateInput + producersConnection: MovieProducersConnectionFilters \\"\\"\\" Return Movies where all of the related MovieProducersConnections match this filter \\"\\"\\" @@ -11382,6 +12406,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -11431,6 +12474,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateFieldInput { create: [MovieActorsCreateFieldInput!] delete: [MovieActorsDeleteFieldInput!] @@ -11492,6 +12546,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieProducersConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieProducersConnections match this filter + \\"\\"\\" + all: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieProducersConnections match this filter + \\"\\"\\" + none: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieProducersConnections match this filter + \\"\\"\\" + single: MovieProducersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieProducersConnections match this filter + \\"\\"\\" + some: MovieProducersConnectionWhere + } + input MovieProducersConnectionSort { node: PersonSort } @@ -11533,6 +12606,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieProducersRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieProducersUpdateFieldInput { disconnect: [MovieProducersDisconnectFieldInput!] where: MovieProducersConnectionWhere @@ -11555,7 +12639,9 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -11586,7 +12672,9 @@ describe("Relationship nested operations", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID + producers: MovieProducersRelationshipFilters producersAggregate: MovieProducersAggregateInput + producersConnection: MovieProducersConnectionFilters \\"\\"\\" Return Movies where all of the related MovieProducersConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/directives/relationship-properties.test.ts b/packages/graphql/tests/schema/directives/relationship-properties.test.ts index 3dd41d297e..3d4c65aac0 100644 --- a/packages/graphql/tests/schema/directives/relationship-properties.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-properties.test.ts @@ -206,6 +206,25 @@ describe("Relationship-properties", () => { totalCount: Int! } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + all: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + none: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + single: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + some: ActorMoviesConnectionWhere + } + input ActorMoviesConnectionSort { edge: ActedInSort node: MovieSort @@ -266,6 +285,17 @@ describe("Relationship-properties", () => { properties: ActedIn! } + input ActorMoviesRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorMoviesUpdateConnectionInput { edge: ActedInUpdateInput node: MovieUpdateInput @@ -296,7 +326,9 @@ describe("Relationship-properties", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: ActorMoviesRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" @@ -442,6 +474,25 @@ describe("Relationship-properties", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { edge: ActedInSort node: ActorSort @@ -502,6 +553,17 @@ describe("Relationship-properties", () => { properties: ActedIn! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { edge: ActedInUpdateInput node: ActorUpdateInput @@ -563,7 +625,9 @@ describe("Relationship-properties", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -882,6 +946,25 @@ describe("Relationship-properties", () => { totalCount: Int! } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + all: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + none: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + single: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + some: ActorMoviesConnectionWhere + } + input ActorMoviesConnectionSort { edge: ActedInSort node: MovieSort @@ -942,6 +1025,17 @@ describe("Relationship-properties", () => { properties: ActedIn! } + input ActorMoviesRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorMoviesUpdateConnectionInput { edge: ActedInUpdateInput node: MovieUpdateInput @@ -972,7 +1066,9 @@ describe("Relationship-properties", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: ActorMoviesRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" @@ -1139,6 +1235,25 @@ describe("Relationship-properties", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { edge: ActedInSort node: ActorSort @@ -1199,6 +1314,17 @@ describe("Relationship-properties", () => { properties: ActedIn! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { edge: ActedInUpdateInput node: ActorUpdateInput @@ -1260,7 +1386,9 @@ describe("Relationship-properties", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -1537,6 +1665,25 @@ describe("Relationship-properties", () => { totalCount: Int! } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + all: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + none: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + single: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + some: ActorMoviesConnectionWhere + } + input ActorMoviesConnectionSort { edge: ActedInSort node: MovieSort @@ -1596,6 +1743,17 @@ describe("Relationship-properties", () => { properties: ActedIn! } + input ActorMoviesRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -1625,7 +1783,9 @@ describe("Relationship-properties", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: ActorMoviesRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" @@ -1773,6 +1933,25 @@ describe("Relationship-properties", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { edge: ActedInSort node: ActorSort @@ -1832,6 +2011,17 @@ describe("Relationship-properties", () => { properties: ActedIn! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -1892,7 +2082,9 @@ describe("Relationship-properties", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/directives/relationship.test.ts b/packages/graphql/tests/schema/directives/relationship.test.ts index adfea36097..a1f6d10900 100644 --- a/packages/graphql/tests/schema/directives/relationship.test.ts +++ b/packages/graphql/tests/schema/directives/relationship.test.ts @@ -114,6 +114,25 @@ describe("Relationship", () => { totalCount: Int! } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + all: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + none: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + single: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + some: ActorMoviesConnectionWhere + } + input ActorMoviesConnectionSort { node: MovieSort } @@ -165,6 +184,17 @@ describe("Relationship", () => { node: Movie! } + input ActorMoviesRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -194,7 +224,9 @@ describe("Relationship", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: ActorMoviesRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" @@ -317,6 +349,25 @@ describe("Relationship", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: ActorSort } @@ -373,6 +424,17 @@ describe("Relationship", () => { node: Actor! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -433,7 +495,9 @@ describe("Relationship", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/directives/selectable.test.ts b/packages/graphql/tests/schema/directives/selectable.test.ts index 62ce8672f6..c80179388d 100644 --- a/packages/graphql/tests/schema/directives/selectable.test.ts +++ b/packages/graphql/tests/schema/directives/selectable.test.ts @@ -751,6 +751,25 @@ describe("@selectable", () => { where: MovieConnectWhere } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionWhere { AND: [ActorActedInConnectionWhere!] NOT: ActorActedInConnectionWhere @@ -811,6 +830,17 @@ describe("@selectable", () => { title_SHORTEST_LENGTH_LTE: Int } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorActedInUpdateConnectionInput { node: MovieUpdateInput } @@ -869,7 +899,9 @@ describe("@selectable", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -1121,6 +1153,25 @@ describe("@selectable", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { node: MovieSort } @@ -1190,6 +1241,17 @@ describe("@selectable", () => { node: Movie! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorActedInUpdateConnectionInput { node: MovieUpdateInput } @@ -1248,7 +1310,9 @@ describe("@selectable", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -1485,6 +1549,25 @@ describe("@selectable", () => { name: String! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionWhere { Movie: ActorActedInMovieConnectionWhere Series: ActorActedInSeriesConnectionWhere @@ -1541,6 +1624,17 @@ describe("@selectable", () => { where: ActorActedInMovieConnectionWhere } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ActorActedInSeriesConnectFieldInput { where: SeriesConnectWhere } @@ -1622,6 +1716,8 @@ describe("@selectable", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -1949,6 +2045,25 @@ describe("@selectable", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionWhere { Movie: ActorActedInMovieConnectionWhere Series: ActorActedInSeriesConnectionWhere @@ -2010,6 +2125,17 @@ describe("@selectable", () => { node: Production! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ActorActedInSeriesConnectFieldInput { where: SeriesConnectWhere } @@ -2091,6 +2217,8 @@ describe("@selectable", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -2433,6 +2561,25 @@ describe("@selectable", () => { where: ProductionConnectWhere } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionWhere { AND: [ActorActedInConnectionWhere!] NOT: ActorActedInConnectionWhere @@ -2493,6 +2640,17 @@ describe("@selectable", () => { title_SHORTEST_LENGTH_LTE: Int } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ActorActedInUpdateConnectionInput { node: ProductionUpdateInput } @@ -2551,7 +2709,9 @@ describe("@selectable", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -2954,6 +3114,25 @@ describe("@selectable", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { node: ProductionSort } @@ -3023,6 +3202,17 @@ describe("@selectable", () => { node: Production! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ActorActedInUpdateConnectionInput { node: ProductionUpdateInput } @@ -3081,7 +3271,9 @@ describe("@selectable", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/directives/settable.test.ts b/packages/graphql/tests/schema/directives/settable.test.ts index 57e4daf39e..9233f039f4 100644 --- a/packages/graphql/tests/schema/directives/settable.test.ts +++ b/packages/graphql/tests/schema/directives/settable.test.ts @@ -603,6 +603,25 @@ describe("@settable", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { node: MovieSort } @@ -667,6 +686,17 @@ describe("@settable", () => { node: Movie! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorActedInUpdateConnectionInput { node: MovieUpdateInput } @@ -724,7 +754,9 @@ describe("@settable", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -977,6 +1009,25 @@ describe("@settable", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { node: MovieSort } @@ -1042,6 +1093,17 @@ describe("@settable", () => { node: Movie! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -1086,7 +1148,9 @@ describe("@settable", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -1339,6 +1403,25 @@ describe("@settable", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { node: MovieSort } @@ -1410,6 +1493,17 @@ describe("@settable", () => { node: Movie! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -1466,7 +1560,9 @@ describe("@settable", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -1571,6 +1667,25 @@ describe("@settable", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: ActorSort } @@ -1627,6 +1742,17 @@ describe("@settable", () => { node: Actor! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -1691,7 +1817,9 @@ describe("@settable", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -1862,6 +1990,25 @@ describe("@settable", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { node: MovieSort } @@ -1928,6 +2075,17 @@ describe("@settable", () => { node: Movie! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorActedInUpdateConnectionInput { node: MovieUpdateInput } @@ -1997,7 +2155,9 @@ describe("@settable", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -2102,6 +2262,25 @@ describe("@settable", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: ActorSort } @@ -2158,6 +2337,17 @@ describe("@settable", () => { node: Actor! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -2222,7 +2412,9 @@ describe("@settable", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -2384,6 +2576,25 @@ describe("@settable", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionWhere { Movie: ActorActedInMovieConnectionWhere Series: ActorActedInSeriesConnectionWhere @@ -2435,6 +2646,17 @@ describe("@settable", () => { node: Production! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ActorActedInSeriesConnectFieldInput { where: SeriesConnectWhere } @@ -2510,6 +2732,8 @@ describe("@settable", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -2838,6 +3062,25 @@ describe("@settable", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionWhere { Movie: ActorActedInMovieConnectionWhere Series: ActorActedInSeriesConnectionWhere @@ -2882,6 +3125,17 @@ describe("@settable", () => { node: Production! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ActorActedInSeriesConnectFieldInput { where: SeriesConnectWhere } @@ -2940,6 +3194,8 @@ describe("@settable", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -3272,6 +3528,25 @@ describe("@settable", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionWhere { Movie: ActorActedInMovieConnectionWhere Series: ActorActedInSeriesConnectionWhere @@ -3328,6 +3603,17 @@ describe("@settable", () => { node: Production! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ActorActedInSeriesConnectFieldInput { where: SeriesConnectWhere } @@ -3402,6 +3688,8 @@ describe("@settable", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -3511,6 +3799,25 @@ describe("@settable", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: ActorSort } @@ -3567,6 +3874,17 @@ describe("@settable", () => { node: Actor! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -3631,7 +3949,9 @@ describe("@settable", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -3877,6 +4197,25 @@ describe("@settable", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionWhere { Movie: ActorActedInMovieConnectionWhere Series: ActorActedInSeriesConnectionWhere @@ -3936,6 +4275,17 @@ describe("@settable", () => { node: Production! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ActorActedInSeriesConnectFieldInput { where: SeriesConnectWhere } @@ -4023,6 +4373,8 @@ describe("@settable", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -4132,6 +4484,25 @@ describe("@settable", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: ActorSort } @@ -4188,6 +4559,17 @@ describe("@settable", () => { node: Actor! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -4252,7 +4634,9 @@ describe("@settable", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -4516,6 +4900,25 @@ describe("@settable", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { node: ProductionSort } @@ -4580,6 +4983,17 @@ describe("@settable", () => { node: Production! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ActorActedInUpdateConnectionInput { node: ProductionUpdateInput } @@ -4637,7 +5051,9 @@ describe("@settable", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -5041,6 +5457,25 @@ describe("@settable", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { node: ProductionSort } @@ -5106,6 +5541,17 @@ describe("@settable", () => { node: Production! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -5150,7 +5596,9 @@ describe("@settable", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -5551,6 +5999,25 @@ describe("@settable", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { node: ProductionSort } @@ -5622,6 +6089,17 @@ describe("@settable", () => { node: Production! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -5678,7 +6156,9 @@ describe("@settable", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -5782,6 +6262,25 @@ describe("@settable", () => { where: ActorConnectWhere } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + all: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + none: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + single: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + some: ProductionActorsConnectionWhere + } + input MovieActorsCreateFieldInput { node: ActorCreateInput! } @@ -5812,6 +6311,17 @@ describe("@settable", () => { name_SHORTEST_LENGTH_LTE: Int } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -5864,7 +6374,9 @@ describe("@settable", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related ProductionActorsConnections match this filter \\"\\"\\" @@ -5959,6 +6471,25 @@ describe("@settable", () => { totalCount: Int! } + input ProductionActorsConnectionFilters { + \\"\\"\\" + Return Productions where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + all: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + none: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + single: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + some: ProductionActorsConnectionWhere + } + input ProductionActorsConnectionSort { node: ActorSort } @@ -6006,6 +6537,17 @@ describe("@settable", () => { node: Actor! } + input ProductionActorsRelationshipFilters { + \\"\\"\\"Return Productions where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Productions where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Productions where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Productions where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + type ProductionAggregateSelection { count: Int! description: StringAggregateSelection! @@ -6055,7 +6597,9 @@ describe("@settable", () => { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] + actors: ProductionActorsRelationshipFilters actorsAggregate: ProductionActorsAggregateInput + actorsConnection: ProductionActorsConnectionFilters \\"\\"\\" Return Productions where all of the related ProductionActorsConnections match this filter \\"\\"\\" @@ -6150,6 +6694,25 @@ describe("@settable", () => { where: ActorConnectWhere } + input SeriesActorsConnectionFilters { + \\"\\"\\" + Return Series where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + all: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + none: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + single: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + some: ProductionActorsConnectionWhere + } + input SeriesActorsCreateFieldInput { node: ActorCreateInput! } @@ -6180,6 +6743,17 @@ describe("@settable", () => { name_SHORTEST_LENGTH_LTE: Int } + input SeriesActorsRelationshipFilters { + \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input SeriesActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -6238,7 +6812,9 @@ describe("@settable", () => { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] + actors: SeriesActorsRelationshipFilters actorsAggregate: SeriesActorsAggregateInput + actorsConnection: SeriesActorsConnectionFilters \\"\\"\\" Return Series where all of the related ProductionActorsConnections match this filter \\"\\"\\" @@ -6394,6 +6970,25 @@ describe("@settable", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { node: ProductionSort } @@ -6460,6 +7055,17 @@ describe("@settable", () => { node: Production! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ActorActedInUpdateConnectionInput { node: ProductionUpdateInput } @@ -6529,7 +7135,9 @@ describe("@settable", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -6633,6 +7241,25 @@ describe("@settable", () => { where: ActorConnectWhere } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + all: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + none: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + single: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + some: ProductionActorsConnectionWhere + } + input MovieActorsCreateFieldInput { node: ActorCreateInput! } @@ -6663,6 +7290,17 @@ describe("@settable", () => { name_SHORTEST_LENGTH_LTE: Int } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -6715,7 +7353,9 @@ describe("@settable", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related ProductionActorsConnections match this filter \\"\\"\\" @@ -6810,6 +7450,25 @@ describe("@settable", () => { totalCount: Int! } + input ProductionActorsConnectionFilters { + \\"\\"\\" + Return Productions where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + all: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + none: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + single: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + some: ProductionActorsConnectionWhere + } + input ProductionActorsConnectionSort { node: ActorSort } @@ -6861,6 +7520,17 @@ describe("@settable", () => { node: Actor! } + input ProductionActorsRelationshipFilters { + \\"\\"\\"Return Productions where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Productions where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Productions where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Productions where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input ProductionActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -6929,7 +7599,9 @@ describe("@settable", () => { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] + actors: ProductionActorsRelationshipFilters actorsAggregate: ProductionActorsAggregateInput + actorsConnection: ProductionActorsConnectionFilters \\"\\"\\" Return Productions where all of the related ProductionActorsConnections match this filter \\"\\"\\" @@ -7024,6 +7696,25 @@ describe("@settable", () => { where: ActorConnectWhere } + input SeriesActorsConnectionFilters { + \\"\\"\\" + Return Series where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + all: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + none: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + single: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + some: ProductionActorsConnectionWhere + } + input SeriesActorsCreateFieldInput { node: ActorCreateInput! } @@ -7054,6 +7745,17 @@ describe("@settable", () => { name_SHORTEST_LENGTH_LTE: Int } + input SeriesActorsRelationshipFilters { + \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input SeriesActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -7112,7 +7814,9 @@ describe("@settable", () => { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] + actors: SeriesActorsRelationshipFilters actorsAggregate: SeriesActorsAggregateInput + actorsConnection: SeriesActorsConnectionFilters \\"\\"\\" Return Series where all of the related ProductionActorsConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/federation.test.ts b/packages/graphql/tests/schema/federation.test.ts index 3ad3f0b953..26cfc2e8fd 100644 --- a/packages/graphql/tests/schema/federation.test.ts +++ b/packages/graphql/tests/schema/federation.test.ts @@ -147,6 +147,25 @@ describe("Apollo Federation", () => { totalCount: Int! } + input PostAuthorConnectionFilters { + \\"\\"\\" + Return Posts where all of the related PostAuthorConnections match this filter + \\"\\"\\" + all: PostAuthorConnectionWhere + \\"\\"\\" + Return Posts where none of the related PostAuthorConnections match this filter + \\"\\"\\" + none: PostAuthorConnectionWhere + \\"\\"\\" + Return Posts where one of the related PostAuthorConnections match this filter + \\"\\"\\" + single: PostAuthorConnectionWhere + \\"\\"\\" + Return Posts where some of the related PostAuthorConnections match this filter + \\"\\"\\" + some: PostAuthorConnectionWhere + } + input PostAuthorConnectionSort { node: UserSort } @@ -203,6 +222,17 @@ describe("Apollo Federation", () => { node: User! } + input PostAuthorRelationshipFilters { + \\"\\"\\"Return Posts where all of the related Users match this filter\\"\\"\\" + all: UserWhere + \\"\\"\\"Return Posts where none of the related Users match this filter\\"\\"\\" + none: UserWhere + \\"\\"\\"Return Posts where one of the related Users match this filter\\"\\"\\" + single: UserWhere + \\"\\"\\"Return Posts where some of the related Users match this filter\\"\\"\\" + some: UserWhere + } + input PostAuthorUpdateConnectionInput { node: UserUpdateInput } @@ -267,7 +297,9 @@ describe("Apollo Federation", () => { AND: [PostWhere!] NOT: PostWhere OR: [PostWhere!] + author: PostAuthorRelationshipFilters authorAggregate: PostAuthorAggregateInput + authorConnection: PostAuthorConnectionFilters \\"\\"\\" Return Posts where all of the related PostAuthorConnections match this filter \\"\\"\\" @@ -433,6 +465,25 @@ describe("Apollo Federation", () => { totalCount: Int! } + input UserPostsConnectionFilters { + \\"\\"\\" + Return Users where all of the related UserPostsConnections match this filter + \\"\\"\\" + all: UserPostsConnectionWhere + \\"\\"\\" + Return Users where none of the related UserPostsConnections match this filter + \\"\\"\\" + none: UserPostsConnectionWhere + \\"\\"\\" + Return Users where one of the related UserPostsConnections match this filter + \\"\\"\\" + single: UserPostsConnectionWhere + \\"\\"\\" + Return Users where some of the related UserPostsConnections match this filter + \\"\\"\\" + some: UserPostsConnectionWhere + } + input UserPostsConnectionSort { node: PostSort } @@ -489,6 +540,17 @@ describe("Apollo Federation", () => { node: Post! } + input UserPostsRelationshipFilters { + \\"\\"\\"Return Users where all of the related Posts match this filter\\"\\"\\" + all: PostWhere + \\"\\"\\"Return Users where none of the related Posts match this filter\\"\\"\\" + none: PostWhere + \\"\\"\\"Return Users where one of the related Posts match this filter\\"\\"\\" + single: PostWhere + \\"\\"\\"Return Users where some of the related Posts match this filter\\"\\"\\" + some: PostWhere + } + input UserPostsUpdateConnectionInput { node: PostUpdateInput } @@ -524,7 +586,9 @@ describe("Apollo Federation", () => { name_EQ: String name_IN: [String!] name_STARTS_WITH: String + posts: UserPostsRelationshipFilters postsAggregate: UserPostsAggregateInput + postsConnection: UserPostsConnectionFilters \\"\\"\\" Return Users where all of the related UserPostsConnections match this filter \\"\\"\\" @@ -702,6 +766,25 @@ describe("Apollo Federation", () => { totalCount: Int! } + input PostAuthorConnectionFilters { + \\"\\"\\" + Return Posts where all of the related PostAuthorConnections match this filter + \\"\\"\\" + all: PostAuthorConnectionWhere + \\"\\"\\" + Return Posts where none of the related PostAuthorConnections match this filter + \\"\\"\\" + none: PostAuthorConnectionWhere + \\"\\"\\" + Return Posts where one of the related PostAuthorConnections match this filter + \\"\\"\\" + single: PostAuthorConnectionWhere + \\"\\"\\" + Return Posts where some of the related PostAuthorConnections match this filter + \\"\\"\\" + some: PostAuthorConnectionWhere + } + input PostAuthorConnectionSort { node: UserSort } @@ -756,6 +839,17 @@ describe("Apollo Federation", () => { node: User! } + input PostAuthorRelationshipFilters { + \\"\\"\\"Return Posts where all of the related Users match this filter\\"\\"\\" + all: UserWhere + \\"\\"\\"Return Posts where none of the related Users match this filter\\"\\"\\" + none: UserWhere + \\"\\"\\"Return Posts where one of the related Users match this filter\\"\\"\\" + single: UserWhere + \\"\\"\\"Return Posts where some of the related Users match this filter\\"\\"\\" + some: UserWhere + } + input PostAuthorUpdateConnectionInput { node: UserUpdateInput } @@ -808,7 +902,9 @@ describe("Apollo Federation", () => { AND: [PostWhere!] NOT: PostWhere OR: [PostWhere!] + author: PostAuthorRelationshipFilters authorAggregate: PostAuthorAggregateInput + authorConnection: PostAuthorConnectionFilters \\"\\"\\" Return Posts where all of the related PostAuthorConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/inheritance.test.ts b/packages/graphql/tests/schema/inheritance.test.ts index bad6422ab9..2e310ca42c 100644 --- a/packages/graphql/tests/schema/inheritance.test.ts +++ b/packages/graphql/tests/schema/inheritance.test.ts @@ -103,6 +103,25 @@ describe("inheritance", () => { where: PersonConnectWhere } + input ActorFriendsConnectionFilters { + \\"\\"\\" + Return Actors where all of the related PersonFriendsConnections match this filter + \\"\\"\\" + all: PersonFriendsConnectionWhere + \\"\\"\\" + Return Actors where none of the related PersonFriendsConnections match this filter + \\"\\"\\" + none: PersonFriendsConnectionWhere + \\"\\"\\" + Return Actors where one of the related PersonFriendsConnections match this filter + \\"\\"\\" + single: PersonFriendsConnectionWhere + \\"\\"\\" + Return Actors where some of the related PersonFriendsConnections match this filter + \\"\\"\\" + some: PersonFriendsConnectionWhere + } + input ActorFriendsCreateFieldInput { edge: FriendsWithCreateInput node: PersonCreateInput! @@ -144,6 +163,17 @@ describe("inheritance", () => { name_SHORTEST_LENGTH_LTE: Int } + input ActorFriendsRelationshipFilters { + \\"\\"\\"Return Actors where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Actors where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Actors where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Actors where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input ActorFriendsUpdateConnectionInput { edge: FriendsWithUpdateInput node: PersonUpdateInput @@ -188,7 +218,9 @@ describe("inheritance", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + friends: ActorFriendsRelationshipFilters friendsAggregate: ActorFriendsAggregateInput + friendsConnection: ActorFriendsConnectionFilters \\"\\"\\" Return Actors where all of the related PersonFriendsConnections match this filter \\"\\"\\" @@ -407,6 +439,25 @@ describe("inheritance", () => { totalCount: Int! } + input PersonFriendsConnectionFilters { + \\"\\"\\" + Return People where all of the related PersonFriendsConnections match this filter + \\"\\"\\" + all: PersonFriendsConnectionWhere + \\"\\"\\" + Return People where none of the related PersonFriendsConnections match this filter + \\"\\"\\" + none: PersonFriendsConnectionWhere + \\"\\"\\" + Return People where one of the related PersonFriendsConnections match this filter + \\"\\"\\" + single: PersonFriendsConnectionWhere + \\"\\"\\" + Return People where some of the related PersonFriendsConnections match this filter + \\"\\"\\" + some: PersonFriendsConnectionWhere + } + input PersonFriendsConnectionSort { edge: PersonFriendsEdgeSort node: PersonSort @@ -502,6 +553,17 @@ describe("inheritance", () => { properties: PersonFriendsRelationshipProperties! } + input PersonFriendsRelationshipFilters { + \\"\\"\\"Return People where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return People where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return People where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return People where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + union PersonFriendsRelationshipProperties = FriendsWith input PersonFriendsUpdateConnectionInput { @@ -538,7 +600,9 @@ describe("inheritance", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] + friends: PersonFriendsRelationshipFilters friendsAggregate: PersonFriendsAggregateInput + friendsConnection: PersonFriendsConnectionFilters \\"\\"\\" Return People where all of the related PersonFriendsConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/interface-relationships.test.ts b/packages/graphql/tests/schema/interface-relationships.test.ts index 6cb5f85e79..4c51636de1 100644 --- a/packages/graphql/tests/schema/interface-relationships.test.ts +++ b/packages/graphql/tests/schema/interface-relationships.test.ts @@ -149,6 +149,25 @@ describe("Interface Relationships", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { edge: ActedInSort node: ProductionSort @@ -207,6 +226,17 @@ describe("Interface Relationships", () => { properties: ActedIn! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ActorActedInUpdateConnectionInput { edge: ActedInUpdateInput node: ProductionUpdateInput @@ -270,7 +300,9 @@ describe("Interface Relationships", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -764,6 +796,25 @@ describe("Interface Relationships", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { edge: ActedInSort node: ProductionSort @@ -824,6 +875,17 @@ describe("Interface Relationships", () => { properties: ActedIn! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ActorActedInUpdateConnectionInput { edge: ActedInUpdateInput node: ProductionUpdateInput @@ -899,7 +961,9 @@ describe("Interface Relationships", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -1035,6 +1099,25 @@ describe("Interface Relationships", () => { totalCount: Int! } + input EpisodeSeriesConnectionFilters { + \\"\\"\\" + Return Episodes where all of the related EpisodeSeriesConnections match this filter + \\"\\"\\" + all: EpisodeSeriesConnectionWhere + \\"\\"\\" + Return Episodes where none of the related EpisodeSeriesConnections match this filter + \\"\\"\\" + none: EpisodeSeriesConnectionWhere + \\"\\"\\" + Return Episodes where one of the related EpisodeSeriesConnections match this filter + \\"\\"\\" + single: EpisodeSeriesConnectionWhere + \\"\\"\\" + Return Episodes where some of the related EpisodeSeriesConnections match this filter + \\"\\"\\" + some: EpisodeSeriesConnectionWhere + } + input EpisodeSeriesConnectionSort { node: SeriesSort } @@ -1111,6 +1194,17 @@ describe("Interface Relationships", () => { node: Series! } + input EpisodeSeriesRelationshipFilters { + \\"\\"\\"Return Episodes where all of the related Series match this filter\\"\\"\\" + all: SeriesWhere + \\"\\"\\"Return Episodes where none of the related Series match this filter\\"\\"\\" + none: SeriesWhere + \\"\\"\\"Return Episodes where one of the related Series match this filter\\"\\"\\" + single: SeriesWhere + \\"\\"\\"Return Episodes where some of the related Series match this filter\\"\\"\\" + some: SeriesWhere + } + type EpisodeSeriesSeriesAggregationSelection { count: Int! node: EpisodeSeriesSeriesNodeAggregateSelection @@ -1159,7 +1253,9 @@ describe("Interface Relationships", () => { runtime_IN: [Int!] runtime_LT: Int runtime_LTE: Int + series: EpisodeSeriesRelationshipFilters seriesAggregate: EpisodeSeriesAggregateInput + seriesConnection: EpisodeSeriesConnectionFilters \\"\\"\\" Return Episodes where all of the related EpisodeSeriesConnections match this filter \\"\\"\\" @@ -1250,6 +1346,25 @@ describe("Interface Relationships", () => { where: ActorConnectWhere } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + all: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + none: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + single: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + some: ProductionActorsConnectionWhere + } + input MovieActorsCreateFieldInput { edge: ActedInCreateInput! node: ActorCreateInput! @@ -1281,6 +1396,17 @@ describe("Interface Relationships", () => { name_SHORTEST_LENGTH_LTE: Int } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { edge: ActedInUpdateInput node: ActorUpdateInput @@ -1336,7 +1462,9 @@ describe("Interface Relationships", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related ProductionActorsConnections match this filter \\"\\"\\" @@ -1436,6 +1564,25 @@ describe("Interface Relationships", () => { totalCount: Int! } + input ProductionActorsConnectionFilters { + \\"\\"\\" + Return Productions where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + all: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + none: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + single: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + some: ProductionActorsConnectionWhere + } + input ProductionActorsConnectionSort { edge: ProductionActorsEdgeSort node: ActorSort @@ -1536,6 +1683,17 @@ describe("Interface Relationships", () => { properties: ProductionActorsRelationshipProperties! } + input ProductionActorsRelationshipFilters { + \\"\\"\\"Return Productions where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Productions where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Productions where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Productions where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + union ProductionActorsRelationshipProperties = ActedIn input ProductionActorsUpdateConnectionInput { @@ -1604,7 +1762,9 @@ describe("Interface Relationships", () => { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] + actors: ProductionActorsRelationshipFilters actorsAggregate: ProductionActorsAggregateInput + actorsConnection: ProductionActorsConnectionFilters \\"\\"\\" Return Productions where all of the related ProductionActorsConnections match this filter \\"\\"\\" @@ -1706,6 +1866,25 @@ describe("Interface Relationships", () => { where: ActorConnectWhere } + input SeriesActorsConnectionFilters { + \\"\\"\\" + Return Series where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + all: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + none: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + single: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + some: ProductionActorsConnectionWhere + } + input SeriesActorsCreateFieldInput { edge: ActedInCreateInput! node: ActorCreateInput! @@ -1737,6 +1916,17 @@ describe("Interface Relationships", () => { name_SHORTEST_LENGTH_LTE: Int } + input SeriesActorsRelationshipFilters { + \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input SeriesActorsUpdateConnectionInput { edge: ActedInUpdateInput node: ActorUpdateInput @@ -1826,6 +2016,25 @@ describe("Interface Relationships", () => { totalCount: Int! } + input SeriesEpisodesConnectionFilters { + \\"\\"\\" + Return Series where all of the related SeriesEpisodesConnections match this filter + \\"\\"\\" + all: SeriesEpisodesConnectionWhere + \\"\\"\\" + Return Series where none of the related SeriesEpisodesConnections match this filter + \\"\\"\\" + none: SeriesEpisodesConnectionWhere + \\"\\"\\" + Return Series where one of the related SeriesEpisodesConnections match this filter + \\"\\"\\" + single: SeriesEpisodesConnectionWhere + \\"\\"\\" + Return Series where some of the related SeriesEpisodesConnections match this filter + \\"\\"\\" + some: SeriesEpisodesConnectionWhere + } + input SeriesEpisodesConnectionSort { node: EpisodeSort } @@ -1887,6 +2096,17 @@ describe("Interface Relationships", () => { node: Episode! } + input SeriesEpisodesRelationshipFilters { + \\"\\"\\"Return Series where all of the related Episodes match this filter\\"\\"\\" + all: EpisodeWhere + \\"\\"\\"Return Series where none of the related Episodes match this filter\\"\\"\\" + none: EpisodeWhere + \\"\\"\\"Return Series where one of the related Episodes match this filter\\"\\"\\" + single: EpisodeWhere + \\"\\"\\"Return Series where some of the related Episodes match this filter\\"\\"\\" + some: EpisodeWhere + } + input SeriesEpisodesUpdateConnectionInput { node: EpisodeUpdateInput } @@ -1921,7 +2141,9 @@ describe("Interface Relationships", () => { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] + actors: SeriesActorsRelationshipFilters actorsAggregate: SeriesActorsAggregateInput + actorsConnection: SeriesActorsConnectionFilters \\"\\"\\" Return Series where all of the related ProductionActorsConnections match this filter \\"\\"\\" @@ -1953,7 +2175,9 @@ describe("Interface Relationships", () => { episodeCount_IN: [Int!] episodeCount_LT: Int episodeCount_LTE: Int + episodes: SeriesEpisodesRelationshipFilters episodesAggregate: SeriesEpisodesAggregateInput + episodesConnection: SeriesEpisodesConnectionFilters \\"\\"\\" Return Series where all of the related SeriesEpisodesConnections match this filter \\"\\"\\" @@ -2186,6 +2410,25 @@ describe("Interface Relationships", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { edge: ActedInSort node: ProductionSort @@ -2246,6 +2489,17 @@ describe("Interface Relationships", () => { properties: ActedIn! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ActorActedInUpdateConnectionInput { edge: ActedInUpdateInput node: ProductionUpdateInput @@ -2321,7 +2575,9 @@ describe("Interface Relationships", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -2457,6 +2713,25 @@ describe("Interface Relationships", () => { totalCount: Int! } + input EpisodeSeriesConnectionFilters { + \\"\\"\\" + Return Episodes where all of the related EpisodeSeriesConnections match this filter + \\"\\"\\" + all: EpisodeSeriesConnectionWhere + \\"\\"\\" + Return Episodes where none of the related EpisodeSeriesConnections match this filter + \\"\\"\\" + none: EpisodeSeriesConnectionWhere + \\"\\"\\" + Return Episodes where one of the related EpisodeSeriesConnections match this filter + \\"\\"\\" + single: EpisodeSeriesConnectionWhere + \\"\\"\\" + Return Episodes where some of the related EpisodeSeriesConnections match this filter + \\"\\"\\" + some: EpisodeSeriesConnectionWhere + } + input EpisodeSeriesConnectionSort { node: SeriesSort } @@ -2533,6 +2808,17 @@ describe("Interface Relationships", () => { node: Series! } + input EpisodeSeriesRelationshipFilters { + \\"\\"\\"Return Episodes where all of the related Series match this filter\\"\\"\\" + all: SeriesWhere + \\"\\"\\"Return Episodes where none of the related Series match this filter\\"\\"\\" + none: SeriesWhere + \\"\\"\\"Return Episodes where one of the related Series match this filter\\"\\"\\" + single: SeriesWhere + \\"\\"\\"Return Episodes where some of the related Series match this filter\\"\\"\\" + some: SeriesWhere + } + type EpisodeSeriesSeriesAggregationSelection { count: Int! node: EpisodeSeriesSeriesNodeAggregateSelection @@ -2581,7 +2867,9 @@ describe("Interface Relationships", () => { runtime_IN: [Int!] runtime_LT: Int runtime_LTE: Int + series: EpisodeSeriesRelationshipFilters seriesAggregate: EpisodeSeriesAggregateInput + seriesConnection: EpisodeSeriesConnectionFilters \\"\\"\\" Return Episodes where all of the related EpisodeSeriesConnections match this filter \\"\\"\\" @@ -2672,6 +2960,25 @@ describe("Interface Relationships", () => { where: ActorConnectWhere } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + all: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + none: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + single: ProductionActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + some: ProductionActorsConnectionWhere + } + input MovieActorsCreateFieldInput { edge: ActedInCreateInput! node: ActorCreateInput! @@ -2703,6 +3010,17 @@ describe("Interface Relationships", () => { name_SHORTEST_LENGTH_LTE: Int } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { edge: ActedInUpdateInput node: ActorUpdateInput @@ -2758,7 +3076,9 @@ describe("Interface Relationships", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related ProductionActorsConnections match this filter \\"\\"\\" @@ -2858,6 +3178,25 @@ describe("Interface Relationships", () => { totalCount: Int! } + input ProductionActorsConnectionFilters { + \\"\\"\\" + Return Productions where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + all: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + none: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + single: ProductionActorsConnectionWhere + \\"\\"\\" + Return Productions where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + some: ProductionActorsConnectionWhere + } + input ProductionActorsConnectionSort { edge: ProductionActorsEdgeSort node: ActorSort @@ -2978,6 +3317,17 @@ describe("Interface Relationships", () => { properties: ProductionActorsRelationshipProperties! } + input ProductionActorsRelationshipFilters { + \\"\\"\\"Return Productions where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Productions where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Productions where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Productions where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + union ProductionActorsRelationshipProperties = ActedIn | StarredIn input ProductionActorsUpdateConnectionInput { @@ -3046,7 +3396,9 @@ describe("Interface Relationships", () => { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] + actors: ProductionActorsRelationshipFilters actorsAggregate: ProductionActorsAggregateInput + actorsConnection: ProductionActorsConnectionFilters \\"\\"\\" Return Productions where all of the related ProductionActorsConnections match this filter \\"\\"\\" @@ -3148,6 +3500,25 @@ describe("Interface Relationships", () => { where: ActorConnectWhere } + input SeriesActorsConnectionFilters { + \\"\\"\\" + Return Series where all of the related ProductionActorsConnections match this filter + \\"\\"\\" + all: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where none of the related ProductionActorsConnections match this filter + \\"\\"\\" + none: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where one of the related ProductionActorsConnections match this filter + \\"\\"\\" + single: ProductionActorsConnectionWhere + \\"\\"\\" + Return Series where some of the related ProductionActorsConnections match this filter + \\"\\"\\" + some: ProductionActorsConnectionWhere + } + input SeriesActorsCreateFieldInput { edge: StarredInCreateInput! node: ActorCreateInput! @@ -3179,6 +3550,17 @@ describe("Interface Relationships", () => { name_SHORTEST_LENGTH_LTE: Int } + input SeriesActorsRelationshipFilters { + \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input SeriesActorsUpdateConnectionInput { edge: StarredInUpdateInput node: ActorUpdateInput @@ -3268,6 +3650,25 @@ describe("Interface Relationships", () => { totalCount: Int! } + input SeriesEpisodesConnectionFilters { + \\"\\"\\" + Return Series where all of the related SeriesEpisodesConnections match this filter + \\"\\"\\" + all: SeriesEpisodesConnectionWhere + \\"\\"\\" + Return Series where none of the related SeriesEpisodesConnections match this filter + \\"\\"\\" + none: SeriesEpisodesConnectionWhere + \\"\\"\\" + Return Series where one of the related SeriesEpisodesConnections match this filter + \\"\\"\\" + single: SeriesEpisodesConnectionWhere + \\"\\"\\" + Return Series where some of the related SeriesEpisodesConnections match this filter + \\"\\"\\" + some: SeriesEpisodesConnectionWhere + } + input SeriesEpisodesConnectionSort { node: EpisodeSort } @@ -3329,8 +3730,19 @@ describe("Interface Relationships", () => { node: Episode! } - input SeriesEpisodesUpdateConnectionInput { - node: EpisodeUpdateInput + input SeriesEpisodesRelationshipFilters { + \\"\\"\\"Return Series where all of the related Episodes match this filter\\"\\"\\" + all: EpisodeWhere + \\"\\"\\"Return Series where none of the related Episodes match this filter\\"\\"\\" + none: EpisodeWhere + \\"\\"\\"Return Series where one of the related Episodes match this filter\\"\\"\\" + single: EpisodeWhere + \\"\\"\\"Return Series where some of the related Episodes match this filter\\"\\"\\" + some: EpisodeWhere + } + + input SeriesEpisodesUpdateConnectionInput { + node: EpisodeUpdateInput } input SeriesEpisodesUpdateFieldInput { @@ -3363,7 +3775,9 @@ describe("Interface Relationships", () => { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] + actors: SeriesActorsRelationshipFilters actorsAggregate: SeriesActorsAggregateInput + actorsConnection: SeriesActorsConnectionFilters \\"\\"\\" Return Series where all of the related ProductionActorsConnections match this filter \\"\\"\\" @@ -3395,7 +3809,9 @@ describe("Interface Relationships", () => { episodeCount_IN: [Int!] episodeCount_LT: Int episodeCount_LTE: Int + episodes: SeriesEpisodesRelationshipFilters episodesAggregate: SeriesEpisodesAggregateInput + episodesConnection: SeriesEpisodesConnectionFilters \\"\\"\\" Return Series where all of the related SeriesEpisodesConnections match this filter \\"\\"\\" @@ -3697,6 +4113,25 @@ describe("Interface Relationships", () => { totalCount: Int! } + input Interface1Interface2ConnectionFilters { + \\"\\"\\" + Return Interface1s where all of the related Interface1Interface2Connections match this filter + \\"\\"\\" + all: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Interface1s where none of the related Interface1Interface2Connections match this filter + \\"\\"\\" + none: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Interface1s where one of the related Interface1Interface2Connections match this filter + \\"\\"\\" + single: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Interface1s where some of the related Interface1Interface2Connections match this filter + \\"\\"\\" + some: Interface1Interface2ConnectionWhere + } + input Interface1Interface2ConnectionSort { node: Interface2Sort } @@ -3746,6 +4181,25 @@ describe("Interface Relationships", () => { node: Interface2! } + input Interface1Interface2RelationshipFilters { + \\"\\"\\" + Return Interface1s where all of the related Interface2s match this filter + \\"\\"\\" + all: Interface2Where + \\"\\"\\" + Return Interface1s where none of the related Interface2s match this filter + \\"\\"\\" + none: Interface2Where + \\"\\"\\" + Return Interface1s where one of the related Interface2s match this filter + \\"\\"\\" + single: Interface2Where + \\"\\"\\" + Return Interface1s where some of the related Interface2s match this filter + \\"\\"\\" + some: Interface2Where + } + input Interface1Interface2UpdateConnectionInput { node: Interface2UpdateInput } @@ -3781,7 +4235,9 @@ describe("Interface Relationships", () => { field1_EQ: String field1_IN: [String!] field1_STARTS_WITH: String + interface2: Interface1Interface2RelationshipFilters interface2Aggregate: Interface1Interface2AggregateInput + interface2Connection: Interface1Interface2ConnectionFilters \\"\\"\\" Return Interface1s where all of the related Interface1Interface2Connections match this filter \\"\\"\\" @@ -4019,6 +4475,25 @@ describe("Interface Relationships", () => { totalCount: Int! } + input Type1Interface1ConnectionFilters { + \\"\\"\\" + Return Type1s where all of the related Type1Interface1Connections match this filter + \\"\\"\\" + all: Type1Interface1ConnectionWhere + \\"\\"\\" + Return Type1s where none of the related Type1Interface1Connections match this filter + \\"\\"\\" + none: Type1Interface1ConnectionWhere + \\"\\"\\" + Return Type1s where one of the related Type1Interface1Connections match this filter + \\"\\"\\" + single: Type1Interface1ConnectionWhere + \\"\\"\\" + Return Type1s where some of the related Type1Interface1Connections match this filter + \\"\\"\\" + some: Type1Interface1ConnectionWhere + } + input Type1Interface1ConnectionSort { node: Interface1Sort } @@ -4088,6 +4563,25 @@ describe("Interface Relationships", () => { where: Interface2ConnectWhere } + input Type1Interface1Interface2ConnectionFilters { + \\"\\"\\" + Return Type1Interface1s where all of the related Interface1Interface2Connections match this filter + \\"\\"\\" + all: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type1Interface1s where none of the related Interface1Interface2Connections match this filter + \\"\\"\\" + none: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type1Interface1s where one of the related Interface1Interface2Connections match this filter + \\"\\"\\" + single: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type1Interface1s where some of the related Interface1Interface2Connections match this filter + \\"\\"\\" + some: Interface1Interface2ConnectionWhere + } + input Type1Interface1Interface2CreateFieldInput { node: Interface2CreateInput! } @@ -4135,6 +4629,25 @@ describe("Interface Relationships", () => { field2_SHORTEST_LENGTH_LTE: Int } + input Type1Interface1Interface2RelationshipFilters { + \\"\\"\\" + Return Type1Interface1s where all of the related Interface2s match this filter + \\"\\"\\" + all: Interface2Where + \\"\\"\\" + Return Type1Interface1s where none of the related Interface2s match this filter + \\"\\"\\" + none: Interface2Where + \\"\\"\\" + Return Type1Interface1s where one of the related Interface2s match this filter + \\"\\"\\" + single: Interface2Where + \\"\\"\\" + Return Type1Interface1s where some of the related Interface2s match this filter + \\"\\"\\" + some: Interface2Where + } + input Type1Interface1Interface2UpdateConnectionInput { node: Interface2UpdateInput } @@ -4174,6 +4687,17 @@ describe("Interface Relationships", () => { node: Interface1! } + input Type1Interface1RelationshipFilters { + \\"\\"\\"Return Type1s where all of the related Interface1s match this filter\\"\\"\\" + all: Interface1Where + \\"\\"\\"Return Type1s where none of the related Interface1s match this filter\\"\\"\\" + none: Interface1Where + \\"\\"\\"Return Type1s where one of the related Interface1s match this filter\\"\\"\\" + single: Interface1Where + \\"\\"\\"Return Type1s where some of the related Interface1s match this filter\\"\\"\\" + some: Interface1Where + } + \\"\\"\\" Fields to sort Type1Interface1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type1Interface1Sort object. \\"\\"\\" @@ -4209,7 +4733,9 @@ describe("Interface Relationships", () => { field1_EQ: String field1_IN: [String!] field1_STARTS_WITH: String + interface2: Type1Interface1Interface2RelationshipFilters interface2Aggregate: Type1Interface1Interface2AggregateInput + interface2Connection: Type1Interface1Interface2ConnectionFilters \\"\\"\\" Return Type1Interface1s where all of the related Interface1Interface2Connections match this filter \\"\\"\\" @@ -4319,7 +4845,9 @@ describe("Interface Relationships", () => { field1_EQ: String field1_IN: [String!] field1_STARTS_WITH: String + interface1: Type1Interface1RelationshipFilters interface1Aggregate: Type1Interface1AggregateInput + interface1Connection: Type1Interface1ConnectionFilters \\"\\"\\" Return Type1s where all of the related Type1Interface1Connections match this filter \\"\\"\\" @@ -4394,6 +4922,25 @@ describe("Interface Relationships", () => { where: Interface2ConnectWhere } + input Type2Interface1Interface2ConnectionFilters { + \\"\\"\\" + Return Type2Interface1s where all of the related Interface1Interface2Connections match this filter + \\"\\"\\" + all: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type2Interface1s where none of the related Interface1Interface2Connections match this filter + \\"\\"\\" + none: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type2Interface1s where one of the related Interface1Interface2Connections match this filter + \\"\\"\\" + single: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type2Interface1s where some of the related Interface1Interface2Connections match this filter + \\"\\"\\" + some: Interface1Interface2ConnectionWhere + } + input Type2Interface1Interface2CreateFieldInput { node: Interface2CreateInput! } @@ -4441,6 +4988,25 @@ describe("Interface Relationships", () => { field2_SHORTEST_LENGTH_LTE: Int } + input Type2Interface1Interface2RelationshipFilters { + \\"\\"\\" + Return Type2Interface1s where all of the related Interface2s match this filter + \\"\\"\\" + all: Interface2Where + \\"\\"\\" + Return Type2Interface1s where none of the related Interface2s match this filter + \\"\\"\\" + none: Interface2Where + \\"\\"\\" + Return Type2Interface1s where one of the related Interface2s match this filter + \\"\\"\\" + single: Interface2Where + \\"\\"\\" + Return Type2Interface1s where some of the related Interface2s match this filter + \\"\\"\\" + some: Interface2Where + } + input Type2Interface1Interface2UpdateConnectionInput { node: Interface2UpdateInput } @@ -4476,7 +5042,9 @@ describe("Interface Relationships", () => { field1_EQ: String field1_IN: [String!] field1_STARTS_WITH: String + interface2: Type2Interface1Interface2RelationshipFilters interface2Aggregate: Type2Interface1Interface2AggregateInput + interface2Connection: Type2Interface1Interface2ConnectionFilters \\"\\"\\" Return Type2Interface1s where all of the related Interface1Interface2Connections match this filter \\"\\"\\" @@ -4778,6 +5346,25 @@ describe("Interface Relationships", () => { totalCount: Int! } + input Interface1Interface2ConnectionFilters { + \\"\\"\\" + Return Interface1s where all of the related Interface1Interface2Connections match this filter + \\"\\"\\" + all: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Interface1s where none of the related Interface1Interface2Connections match this filter + \\"\\"\\" + none: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Interface1s where one of the related Interface1Interface2Connections match this filter + \\"\\"\\" + single: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Interface1s where some of the related Interface1Interface2Connections match this filter + \\"\\"\\" + some: Interface1Interface2ConnectionWhere + } + input Interface1Interface2ConnectionSort { edge: Interface1Interface2EdgeSort node: Interface2Sort @@ -4876,6 +5463,25 @@ describe("Interface Relationships", () => { properties: Interface1Interface2RelationshipProperties! } + input Interface1Interface2RelationshipFilters { + \\"\\"\\" + Return Interface1s where all of the related Interface2s match this filter + \\"\\"\\" + all: Interface2Where + \\"\\"\\" + Return Interface1s where none of the related Interface2s match this filter + \\"\\"\\" + none: Interface2Where + \\"\\"\\" + Return Interface1s where one of the related Interface2s match this filter + \\"\\"\\" + single: Interface2Where + \\"\\"\\" + Return Interface1s where some of the related Interface2s match this filter + \\"\\"\\" + some: Interface2Where + } + union Interface1Interface2RelationshipProperties = Props input Interface1Interface2UpdateConnectionInput { @@ -4914,7 +5520,9 @@ describe("Interface Relationships", () => { field1_EQ: String field1_IN: [String!] field1_STARTS_WITH: String + interface2: Interface1Interface2RelationshipFilters interface2Aggregate: Interface1Interface2AggregateInput + interface2Connection: Interface1Interface2ConnectionFilters \\"\\"\\" Return Interface1s where all of the related Interface1Interface2Connections match this filter \\"\\"\\" @@ -5214,6 +5822,25 @@ describe("Interface Relationships", () => { totalCount: Int! } + input Type1Interface1ConnectionFilters { + \\"\\"\\" + Return Type1s where all of the related Type1Interface1Connections match this filter + \\"\\"\\" + all: Type1Interface1ConnectionWhere + \\"\\"\\" + Return Type1s where none of the related Type1Interface1Connections match this filter + \\"\\"\\" + none: Type1Interface1ConnectionWhere + \\"\\"\\" + Return Type1s where one of the related Type1Interface1Connections match this filter + \\"\\"\\" + single: Type1Interface1ConnectionWhere + \\"\\"\\" + Return Type1s where some of the related Type1Interface1Connections match this filter + \\"\\"\\" + some: Type1Interface1ConnectionWhere + } + input Type1Interface1ConnectionSort { node: Interface1Sort } @@ -5285,6 +5912,25 @@ describe("Interface Relationships", () => { where: Interface2ConnectWhere } + input Type1Interface1Interface2ConnectionFilters { + \\"\\"\\" + Return Type1Interface1s where all of the related Interface1Interface2Connections match this filter + \\"\\"\\" + all: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type1Interface1s where none of the related Interface1Interface2Connections match this filter + \\"\\"\\" + none: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type1Interface1s where one of the related Interface1Interface2Connections match this filter + \\"\\"\\" + single: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type1Interface1s where some of the related Interface1Interface2Connections match this filter + \\"\\"\\" + some: Interface1Interface2ConnectionWhere + } + input Type1Interface1Interface2CreateFieldInput { edge: PropsCreateInput! node: Interface2CreateInput! @@ -5338,6 +5984,25 @@ describe("Interface Relationships", () => { field2_SHORTEST_LENGTH_LTE: Int } + input Type1Interface1Interface2RelationshipFilters { + \\"\\"\\" + Return Type1Interface1s where all of the related Interface2s match this filter + \\"\\"\\" + all: Interface2Where + \\"\\"\\" + Return Type1Interface1s where none of the related Interface2s match this filter + \\"\\"\\" + none: Interface2Where + \\"\\"\\" + Return Type1Interface1s where one of the related Interface2s match this filter + \\"\\"\\" + single: Interface2Where + \\"\\"\\" + Return Type1Interface1s where some of the related Interface2s match this filter + \\"\\"\\" + some: Interface2Where + } + input Type1Interface1Interface2UpdateConnectionInput { edge: PropsUpdateInput node: Interface2UpdateInput @@ -5378,6 +6043,17 @@ describe("Interface Relationships", () => { node: Interface1! } + input Type1Interface1RelationshipFilters { + \\"\\"\\"Return Type1s where all of the related Interface1s match this filter\\"\\"\\" + all: Interface1Where + \\"\\"\\"Return Type1s where none of the related Interface1s match this filter\\"\\"\\" + none: Interface1Where + \\"\\"\\"Return Type1s where one of the related Interface1s match this filter\\"\\"\\" + single: Interface1Where + \\"\\"\\"Return Type1s where some of the related Interface1s match this filter\\"\\"\\" + some: Interface1Where + } + \\"\\"\\" Fields to sort Type1Interface1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type1Interface1Sort object. \\"\\"\\" @@ -5413,7 +6089,9 @@ describe("Interface Relationships", () => { field1_EQ: String field1_IN: [String!] field1_STARTS_WITH: String + interface2: Type1Interface1Interface2RelationshipFilters interface2Aggregate: Type1Interface1Interface2AggregateInput + interface2Connection: Type1Interface1Interface2ConnectionFilters \\"\\"\\" Return Type1Interface1s where all of the related Interface1Interface2Connections match this filter \\"\\"\\" @@ -5523,7 +6201,9 @@ describe("Interface Relationships", () => { field1_EQ: String field1_IN: [String!] field1_STARTS_WITH: String + interface1: Type1Interface1RelationshipFilters interface1Aggregate: Type1Interface1AggregateInput + interface1Connection: Type1Interface1ConnectionFilters \\"\\"\\" Return Type1s where all of the related Type1Interface1Connections match this filter \\"\\"\\" @@ -5600,6 +6280,25 @@ describe("Interface Relationships", () => { where: Interface2ConnectWhere } + input Type2Interface1Interface2ConnectionFilters { + \\"\\"\\" + Return Type2Interface1s where all of the related Interface1Interface2Connections match this filter + \\"\\"\\" + all: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type2Interface1s where none of the related Interface1Interface2Connections match this filter + \\"\\"\\" + none: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type2Interface1s where one of the related Interface1Interface2Connections match this filter + \\"\\"\\" + single: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type2Interface1s where some of the related Interface1Interface2Connections match this filter + \\"\\"\\" + some: Interface1Interface2ConnectionWhere + } + input Type2Interface1Interface2CreateFieldInput { edge: PropsCreateInput! node: Interface2CreateInput! @@ -5653,6 +6352,25 @@ describe("Interface Relationships", () => { field2_SHORTEST_LENGTH_LTE: Int } + input Type2Interface1Interface2RelationshipFilters { + \\"\\"\\" + Return Type2Interface1s where all of the related Interface2s match this filter + \\"\\"\\" + all: Interface2Where + \\"\\"\\" + Return Type2Interface1s where none of the related Interface2s match this filter + \\"\\"\\" + none: Interface2Where + \\"\\"\\" + Return Type2Interface1s where one of the related Interface2s match this filter + \\"\\"\\" + single: Interface2Where + \\"\\"\\" + Return Type2Interface1s where some of the related Interface2s match this filter + \\"\\"\\" + some: Interface2Where + } + input Type2Interface1Interface2UpdateConnectionInput { edge: PropsUpdateInput node: Interface2UpdateInput @@ -5689,7 +6407,9 @@ describe("Interface Relationships", () => { field1_EQ: String field1_IN: [String!] field1_STARTS_WITH: String + interface2: Type2Interface1Interface2RelationshipFilters interface2Aggregate: Type2Interface1Interface2AggregateInput + interface2Connection: Type2Interface1Interface2ConnectionFilters \\"\\"\\" Return Type2Interface1s where all of the related Interface1Interface2Connections match this filter \\"\\"\\" @@ -5997,6 +6717,25 @@ describe("Interface Relationships", () => { totalCount: Int! } + input Interface1Interface2ConnectionFilters { + \\"\\"\\" + Return Interface1s where all of the related Interface1Interface2Connections match this filter + \\"\\"\\" + all: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Interface1s where none of the related Interface1Interface2Connections match this filter + \\"\\"\\" + none: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Interface1s where one of the related Interface1Interface2Connections match this filter + \\"\\"\\" + single: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Interface1s where some of the related Interface1Interface2Connections match this filter + \\"\\"\\" + some: Interface1Interface2ConnectionWhere + } + input Interface1Interface2ConnectionSort { edge: Interface1Interface2EdgeSort node: Interface2Sort @@ -6115,6 +6854,25 @@ describe("Interface Relationships", () => { properties: Interface1Interface2RelationshipProperties! } + input Interface1Interface2RelationshipFilters { + \\"\\"\\" + Return Interface1s where all of the related Interface2s match this filter + \\"\\"\\" + all: Interface2Where + \\"\\"\\" + Return Interface1s where none of the related Interface2s match this filter + \\"\\"\\" + none: Interface2Where + \\"\\"\\" + Return Interface1s where one of the related Interface2s match this filter + \\"\\"\\" + single: Interface2Where + \\"\\"\\" + Return Interface1s where some of the related Interface2s match this filter + \\"\\"\\" + some: Interface2Where + } + union Interface1Interface2RelationshipProperties = Type1Props | Type2Props input Interface1Interface2UpdateConnectionInput { @@ -6153,7 +6911,9 @@ describe("Interface Relationships", () => { field1_EQ: String field1_IN: [String!] field1_STARTS_WITH: String + interface2: Interface1Interface2RelationshipFilters interface2Aggregate: Interface1Interface2AggregateInput + interface2Connection: Interface1Interface2ConnectionFilters \\"\\"\\" Return Interface1s where all of the related Interface1Interface2Connections match this filter \\"\\"\\" @@ -6391,18 +7151,37 @@ describe("Interface Relationships", () => { totalCount: Int! } - input Type1Interface1ConnectionSort { - node: Interface1Sort - } - - input Type1Interface1ConnectionWhere { - AND: [Type1Interface1ConnectionWhere!] - NOT: Type1Interface1ConnectionWhere - OR: [Type1Interface1ConnectionWhere!] - node: Interface1Where - } - - input Type1Interface1CreateFieldInput { + input Type1Interface1ConnectionFilters { + \\"\\"\\" + Return Type1s where all of the related Type1Interface1Connections match this filter + \\"\\"\\" + all: Type1Interface1ConnectionWhere + \\"\\"\\" + Return Type1s where none of the related Type1Interface1Connections match this filter + \\"\\"\\" + none: Type1Interface1ConnectionWhere + \\"\\"\\" + Return Type1s where one of the related Type1Interface1Connections match this filter + \\"\\"\\" + single: Type1Interface1ConnectionWhere + \\"\\"\\" + Return Type1s where some of the related Type1Interface1Connections match this filter + \\"\\"\\" + some: Type1Interface1ConnectionWhere + } + + input Type1Interface1ConnectionSort { + node: Interface1Sort + } + + input Type1Interface1ConnectionWhere { + AND: [Type1Interface1ConnectionWhere!] + NOT: Type1Interface1ConnectionWhere + OR: [Type1Interface1ConnectionWhere!] + node: Interface1Where + } + + input Type1Interface1CreateFieldInput { node: Interface1CreateInput! } @@ -6462,6 +7241,25 @@ describe("Interface Relationships", () => { where: Interface2ConnectWhere } + input Type1Interface1Interface2ConnectionFilters { + \\"\\"\\" + Return Type1Interface1s where all of the related Interface1Interface2Connections match this filter + \\"\\"\\" + all: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type1Interface1s where none of the related Interface1Interface2Connections match this filter + \\"\\"\\" + none: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type1Interface1s where one of the related Interface1Interface2Connections match this filter + \\"\\"\\" + single: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type1Interface1s where some of the related Interface1Interface2Connections match this filter + \\"\\"\\" + some: Interface1Interface2ConnectionWhere + } + input Type1Interface1Interface2CreateFieldInput { edge: Type1PropsCreateInput! node: Interface2CreateInput! @@ -6515,6 +7313,25 @@ describe("Interface Relationships", () => { field2_SHORTEST_LENGTH_LTE: Int } + input Type1Interface1Interface2RelationshipFilters { + \\"\\"\\" + Return Type1Interface1s where all of the related Interface2s match this filter + \\"\\"\\" + all: Interface2Where + \\"\\"\\" + Return Type1Interface1s where none of the related Interface2s match this filter + \\"\\"\\" + none: Interface2Where + \\"\\"\\" + Return Type1Interface1s where one of the related Interface2s match this filter + \\"\\"\\" + single: Interface2Where + \\"\\"\\" + Return Type1Interface1s where some of the related Interface2s match this filter + \\"\\"\\" + some: Interface2Where + } + input Type1Interface1Interface2UpdateConnectionInput { edge: Type1PropsUpdateInput node: Interface2UpdateInput @@ -6555,6 +7372,17 @@ describe("Interface Relationships", () => { node: Interface1! } + input Type1Interface1RelationshipFilters { + \\"\\"\\"Return Type1s where all of the related Interface1s match this filter\\"\\"\\" + all: Interface1Where + \\"\\"\\"Return Type1s where none of the related Interface1s match this filter\\"\\"\\" + none: Interface1Where + \\"\\"\\"Return Type1s where one of the related Interface1s match this filter\\"\\"\\" + single: Interface1Where + \\"\\"\\"Return Type1s where some of the related Interface1s match this filter\\"\\"\\" + some: Interface1Where + } + \\"\\"\\" Fields to sort Type1Interface1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Type1Interface1Sort object. \\"\\"\\" @@ -6590,7 +7418,9 @@ describe("Interface Relationships", () => { field1_EQ: String field1_IN: [String!] field1_STARTS_WITH: String + interface2: Type1Interface1Interface2RelationshipFilters interface2Aggregate: Type1Interface1Interface2AggregateInput + interface2Connection: Type1Interface1Interface2ConnectionFilters \\"\\"\\" Return Type1Interface1s where all of the related Interface1Interface2Connections match this filter \\"\\"\\" @@ -6761,7 +7591,9 @@ describe("Interface Relationships", () => { field1_EQ: String field1_IN: [String!] field1_STARTS_WITH: String + interface1: Type1Interface1RelationshipFilters interface1Aggregate: Type1Interface1AggregateInput + interface1Connection: Type1Interface1ConnectionFilters \\"\\"\\" Return Type1s where all of the related Type1Interface1Connections match this filter \\"\\"\\" @@ -6838,6 +7670,25 @@ describe("Interface Relationships", () => { where: Interface2ConnectWhere } + input Type2Interface1Interface2ConnectionFilters { + \\"\\"\\" + Return Type2Interface1s where all of the related Interface1Interface2Connections match this filter + \\"\\"\\" + all: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type2Interface1s where none of the related Interface1Interface2Connections match this filter + \\"\\"\\" + none: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type2Interface1s where one of the related Interface1Interface2Connections match this filter + \\"\\"\\" + single: Interface1Interface2ConnectionWhere + \\"\\"\\" + Return Type2Interface1s where some of the related Interface1Interface2Connections match this filter + \\"\\"\\" + some: Interface1Interface2ConnectionWhere + } + input Type2Interface1Interface2CreateFieldInput { edge: Type2PropsCreateInput! node: Interface2CreateInput! @@ -6891,6 +7742,25 @@ describe("Interface Relationships", () => { field2_SHORTEST_LENGTH_LTE: Int } + input Type2Interface1Interface2RelationshipFilters { + \\"\\"\\" + Return Type2Interface1s where all of the related Interface2s match this filter + \\"\\"\\" + all: Interface2Where + \\"\\"\\" + Return Type2Interface1s where none of the related Interface2s match this filter + \\"\\"\\" + none: Interface2Where + \\"\\"\\" + Return Type2Interface1s where one of the related Interface2s match this filter + \\"\\"\\" + single: Interface2Where + \\"\\"\\" + Return Type2Interface1s where some of the related Interface2s match this filter + \\"\\"\\" + some: Interface2Where + } + input Type2Interface1Interface2UpdateConnectionInput { edge: Type2PropsUpdateInput node: Interface2UpdateInput @@ -6927,7 +7797,9 @@ describe("Interface Relationships", () => { field1_EQ: String field1_IN: [String!] field1_STARTS_WITH: String + interface2: Type2Interface1Interface2RelationshipFilters interface2Aggregate: Type2Interface1Interface2AggregateInput + interface2Connection: Type2Interface1Interface2ConnectionFilters \\"\\"\\" Return Type2Interface1s where all of the related Interface1Interface2Connections match this filter \\"\\"\\" @@ -7206,6 +8078,25 @@ describe("Interface Relationships", () => { where: UserConnectWhere } + input CommentCreatorConnectionFilters { + \\"\\"\\" + Return Comments where all of the related ContentCreatorConnections match this filter + \\"\\"\\" + all: ContentCreatorConnectionWhere + \\"\\"\\" + Return Comments where none of the related ContentCreatorConnections match this filter + \\"\\"\\" + none: ContentCreatorConnectionWhere + \\"\\"\\" + Return Comments where one of the related ContentCreatorConnections match this filter + \\"\\"\\" + single: ContentCreatorConnectionWhere + \\"\\"\\" + Return Comments where some of the related ContentCreatorConnections match this filter + \\"\\"\\" + some: ContentCreatorConnectionWhere + } + input CommentCreatorCreateFieldInput { node: UserCreateInput! } @@ -7246,6 +8137,17 @@ describe("Interface Relationships", () => { name_SHORTEST_LENGTH_LTE: Int } + input CommentCreatorRelationshipFilters { + \\"\\"\\"Return Comments where all of the related Users match this filter\\"\\"\\" + all: UserWhere + \\"\\"\\"Return Comments where none of the related Users match this filter\\"\\"\\" + none: UserWhere + \\"\\"\\"Return Comments where one of the related Users match this filter\\"\\"\\" + single: UserWhere + \\"\\"\\"Return Comments where some of the related Users match this filter\\"\\"\\" + some: UserWhere + } + input CommentCreatorUpdateConnectionInput { node: UserUpdateInput } @@ -7297,6 +8199,25 @@ describe("Interface Relationships", () => { totalCount: Int! } + input CommentPostConnectionFilters { + \\"\\"\\" + Return Comments where all of the related CommentPostConnections match this filter + \\"\\"\\" + all: CommentPostConnectionWhere + \\"\\"\\" + Return Comments where none of the related CommentPostConnections match this filter + \\"\\"\\" + none: CommentPostConnectionWhere + \\"\\"\\" + Return Comments where one of the related CommentPostConnections match this filter + \\"\\"\\" + single: CommentPostConnectionWhere + \\"\\"\\" + Return Comments where some of the related CommentPostConnections match this filter + \\"\\"\\" + some: CommentPostConnectionWhere + } + input CommentPostConnectionSort { node: PostSort } @@ -7373,6 +8294,17 @@ describe("Interface Relationships", () => { node: Post! } + input CommentPostRelationshipFilters { + \\"\\"\\"Return Comments where all of the related Posts match this filter\\"\\"\\" + all: PostWhere + \\"\\"\\"Return Comments where none of the related Posts match this filter\\"\\"\\" + none: PostWhere + \\"\\"\\"Return Comments where one of the related Posts match this filter\\"\\"\\" + single: PostWhere + \\"\\"\\"Return Comments where some of the related Posts match this filter\\"\\"\\" + some: PostWhere + } + input CommentPostUpdateConnectionInput { node: PostUpdateInput } @@ -7421,7 +8353,9 @@ describe("Interface Relationships", () => { content_EQ: String content_IN: [String] content_STARTS_WITH: String + creator: CommentCreatorRelationshipFilters creatorAggregate: CommentCreatorAggregateInput + creatorConnection: CommentCreatorConnectionFilters \\"\\"\\" Return Comments where all of the related ContentCreatorConnections match this filter \\"\\"\\" @@ -7452,7 +8386,9 @@ describe("Interface Relationships", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID + post: CommentPostRelationshipFilters postAggregate: CommentPostAggregateInput + postConnection: CommentPostConnectionFilters \\"\\"\\" Return Comments where all of the related CommentPostConnections match this filter \\"\\"\\" @@ -7534,6 +8470,25 @@ describe("Interface Relationships", () => { totalCount: Int! } + input ContentCreatorConnectionFilters { + \\"\\"\\" + Return Contents where all of the related ContentCreatorConnections match this filter + \\"\\"\\" + all: ContentCreatorConnectionWhere + \\"\\"\\" + Return Contents where none of the related ContentCreatorConnections match this filter + \\"\\"\\" + none: ContentCreatorConnectionWhere + \\"\\"\\" + Return Contents where one of the related ContentCreatorConnections match this filter + \\"\\"\\" + single: ContentCreatorConnectionWhere + \\"\\"\\" + Return Contents where some of the related ContentCreatorConnections match this filter + \\"\\"\\" + some: ContentCreatorConnectionWhere + } + input ContentCreatorConnectionSort { node: UserSort } @@ -7595,6 +8550,17 @@ describe("Interface Relationships", () => { node: User! } + input ContentCreatorRelationshipFilters { + \\"\\"\\"Return Contents where all of the related Users match this filter\\"\\"\\" + all: UserWhere + \\"\\"\\"Return Contents where none of the related Users match this filter\\"\\"\\" + none: UserWhere + \\"\\"\\"Return Contents where one of the related Users match this filter\\"\\"\\" + single: UserWhere + \\"\\"\\"Return Contents where some of the related Users match this filter\\"\\"\\" + some: UserWhere + } + input ContentCreatorUpdateConnectionInput { node: UserUpdateInput } @@ -7650,7 +8616,9 @@ describe("Interface Relationships", () => { content_EQ: String content_IN: [String] content_STARTS_WITH: String + creator: ContentCreatorRelationshipFilters creatorAggregate: ContentCreatorAggregateInput + creatorConnection: ContentCreatorConnectionFilters \\"\\"\\" Return Contents where all of the related ContentCreatorConnections match this filter \\"\\"\\" @@ -7810,6 +8778,25 @@ describe("Interface Relationships", () => { totalCount: Int! } + input PostCommentsConnectionFilters { + \\"\\"\\" + Return Posts where all of the related PostCommentsConnections match this filter + \\"\\"\\" + all: PostCommentsConnectionWhere + \\"\\"\\" + Return Posts where none of the related PostCommentsConnections match this filter + \\"\\"\\" + none: PostCommentsConnectionWhere + \\"\\"\\" + Return Posts where one of the related PostCommentsConnections match this filter + \\"\\"\\" + single: PostCommentsConnectionWhere + \\"\\"\\" + Return Posts where some of the related PostCommentsConnections match this filter + \\"\\"\\" + some: PostCommentsConnectionWhere + } + input PostCommentsConnectionSort { node: CommentSort } @@ -7876,6 +8863,17 @@ describe("Interface Relationships", () => { node: Comment! } + input PostCommentsRelationshipFilters { + \\"\\"\\"Return Posts where all of the related Comments match this filter\\"\\"\\" + all: CommentWhere + \\"\\"\\"Return Posts where none of the related Comments match this filter\\"\\"\\" + none: CommentWhere + \\"\\"\\"Return Posts where one of the related Comments match this filter\\"\\"\\" + single: CommentWhere + \\"\\"\\"Return Posts where some of the related Comments match this filter\\"\\"\\" + some: CommentWhere + } + input PostCommentsUpdateConnectionInput { node: CommentUpdateInput } @@ -7922,6 +8920,25 @@ describe("Interface Relationships", () => { where: UserConnectWhere } + input PostCreatorConnectionFilters { + \\"\\"\\" + Return Posts where all of the related ContentCreatorConnections match this filter + \\"\\"\\" + all: ContentCreatorConnectionWhere + \\"\\"\\" + Return Posts where none of the related ContentCreatorConnections match this filter + \\"\\"\\" + none: ContentCreatorConnectionWhere + \\"\\"\\" + Return Posts where one of the related ContentCreatorConnections match this filter + \\"\\"\\" + single: ContentCreatorConnectionWhere + \\"\\"\\" + Return Posts where some of the related ContentCreatorConnections match this filter + \\"\\"\\" + some: ContentCreatorConnectionWhere + } + input PostCreatorCreateFieldInput { node: UserCreateInput! } @@ -7962,6 +8979,17 @@ describe("Interface Relationships", () => { name_SHORTEST_LENGTH_LTE: Int } + input PostCreatorRelationshipFilters { + \\"\\"\\"Return Posts where all of the related Users match this filter\\"\\"\\" + all: UserWhere + \\"\\"\\"Return Posts where none of the related Users match this filter\\"\\"\\" + none: UserWhere + \\"\\"\\"Return Posts where one of the related Users match this filter\\"\\"\\" + single: UserWhere + \\"\\"\\"Return Posts where some of the related Users match this filter\\"\\"\\" + some: UserWhere + } + input PostCreatorUpdateConnectionInput { node: UserUpdateInput } @@ -8019,7 +9047,9 @@ describe("Interface Relationships", () => { AND: [PostWhere!] NOT: PostWhere OR: [PostWhere!] + comments: PostCommentsRelationshipFilters commentsAggregate: PostCommentsAggregateInput + commentsConnection: PostCommentsConnectionFilters \\"\\"\\" Return Posts where all of the related PostCommentsConnections match this filter \\"\\"\\" @@ -8050,7 +9080,9 @@ describe("Interface Relationships", () => { content_EQ: String content_IN: [String] content_STARTS_WITH: String + creator: PostCreatorRelationshipFilters creatorAggregate: PostCreatorAggregateInput + creatorConnection: PostCreatorConnectionFilters \\"\\"\\" Return Posts where all of the related ContentCreatorConnections match this filter \\"\\"\\" @@ -8201,6 +9233,25 @@ describe("Interface Relationships", () => { totalCount: Int! } + input UserContentConnectionFilters { + \\"\\"\\" + Return Users where all of the related UserContentConnections match this filter + \\"\\"\\" + all: UserContentConnectionWhere + \\"\\"\\" + Return Users where none of the related UserContentConnections match this filter + \\"\\"\\" + none: UserContentConnectionWhere + \\"\\"\\" + Return Users where one of the related UserContentConnections match this filter + \\"\\"\\" + single: UserContentConnectionWhere + \\"\\"\\" + Return Users where some of the related UserContentConnections match this filter + \\"\\"\\" + some: UserContentConnectionWhere + } + input UserContentConnectionSort { node: ContentSort } @@ -8277,6 +9328,17 @@ describe("Interface Relationships", () => { node: Content! } + input UserContentRelationshipFilters { + \\"\\"\\"Return Users where all of the related Contents match this filter\\"\\"\\" + all: ContentWhere + \\"\\"\\"Return Users where none of the related Contents match this filter\\"\\"\\" + none: ContentWhere + \\"\\"\\"Return Users where one of the related Contents match this filter\\"\\"\\" + single: ContentWhere + \\"\\"\\"Return Users where some of the related Contents match this filter\\"\\"\\" + some: ContentWhere + } + input UserContentUpdateConnectionInput { node: ContentUpdateInput } @@ -8327,7 +9389,9 @@ describe("Interface Relationships", () => { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] + content: UserContentRelationshipFilters contentAggregate: UserContentAggregateInput + contentConnection: UserContentConnectionFilters \\"\\"\\" Return Users where all of the related UserContentConnections match this filter \\"\\"\\" @@ -8515,6 +9579,25 @@ describe("Interface Relationships", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { edge: ActedInSort node: ShowSort @@ -8575,6 +9658,17 @@ describe("Interface Relationships", () => { properties: ActedIn! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Shows match this filter\\"\\"\\" + all: ShowWhere + \\"\\"\\"Return Actors where none of the related Shows match this filter\\"\\"\\" + none: ShowWhere + \\"\\"\\"Return Actors where one of the related Shows match this filter\\"\\"\\" + single: ShowWhere + \\"\\"\\"Return Actors where some of the related Shows match this filter\\"\\"\\" + some: ShowWhere + } + input ActorActedInUpdateConnectionInput { edge: ActedInUpdateInput node: ShowUpdateInput @@ -8650,7 +9744,9 @@ describe("Interface Relationships", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -8778,6 +9874,25 @@ describe("Interface Relationships", () => { where: ActorConnectWhere } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related ShowActorsConnections match this filter + \\"\\"\\" + all: ShowActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related ShowActorsConnections match this filter + \\"\\"\\" + none: ShowActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related ShowActorsConnections match this filter + \\"\\"\\" + single: ShowActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related ShowActorsConnections match this filter + \\"\\"\\" + some: ShowActorsConnectionWhere + } + input MovieActorsCreateFieldInput { edge: ActedInCreateInput! node: ActorCreateInput! @@ -8809,6 +9924,17 @@ describe("Interface Relationships", () => { name_SHORTEST_LENGTH_LTE: Int } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { edge: ActedInUpdateInput node: ActorUpdateInput @@ -8864,7 +9990,9 @@ describe("Interface Relationships", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related ShowActorsConnections match this filter \\"\\"\\" @@ -9035,6 +10163,25 @@ describe("Interface Relationships", () => { where: ActorConnectWhere } + input SeriesActorsConnectionFilters { + \\"\\"\\" + Return Series where all of the related ShowActorsConnections match this filter + \\"\\"\\" + all: ShowActorsConnectionWhere + \\"\\"\\" + Return Series where none of the related ShowActorsConnections match this filter + \\"\\"\\" + none: ShowActorsConnectionWhere + \\"\\"\\" + Return Series where one of the related ShowActorsConnections match this filter + \\"\\"\\" + single: ShowActorsConnectionWhere + \\"\\"\\" + Return Series where some of the related ShowActorsConnections match this filter + \\"\\"\\" + some: ShowActorsConnectionWhere + } + input SeriesActorsCreateFieldInput { edge: StarredInCreateInput! node: ActorCreateInput! @@ -9066,6 +10213,17 @@ describe("Interface Relationships", () => { name_SHORTEST_LENGTH_LTE: Int } + input SeriesActorsRelationshipFilters { + \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input SeriesActorsUpdateConnectionInput { edge: StarredInUpdateInput node: ActorUpdateInput @@ -9127,7 +10285,9 @@ describe("Interface Relationships", () => { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] + actors: SeriesActorsRelationshipFilters actorsAggregate: SeriesActorsAggregateInput + actorsConnection: SeriesActorsConnectionFilters \\"\\"\\" Return Series where all of the related ShowActorsConnections match this filter \\"\\"\\" @@ -9198,6 +10358,25 @@ describe("Interface Relationships", () => { totalCount: Int! } + input ShowActorsConnectionFilters { + \\"\\"\\" + Return Shows where all of the related ShowActorsConnections match this filter + \\"\\"\\" + all: ShowActorsConnectionWhere + \\"\\"\\" + Return Shows where none of the related ShowActorsConnections match this filter + \\"\\"\\" + none: ShowActorsConnectionWhere + \\"\\"\\" + Return Shows where one of the related ShowActorsConnections match this filter + \\"\\"\\" + single: ShowActorsConnectionWhere + \\"\\"\\" + Return Shows where some of the related ShowActorsConnections match this filter + \\"\\"\\" + some: ShowActorsConnectionWhere + } + input ShowActorsConnectionSort { edge: ShowActorsEdgeSort node: ActorSort @@ -9318,6 +10497,17 @@ describe("Interface Relationships", () => { properties: ShowActorsRelationshipProperties! } + input ShowActorsRelationshipFilters { + \\"\\"\\"Return Shows where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Shows where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Shows where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Shows where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + union ShowActorsRelationshipProperties = ActedIn | StarredIn input ShowActorsUpdateConnectionInput { @@ -9386,7 +10576,9 @@ describe("Interface Relationships", () => { AND: [ShowWhere!] NOT: ShowWhere OR: [ShowWhere!] + actors: ShowActorsRelationshipFilters actorsAggregate: ShowActorsAggregateInput + actorsConnection: ShowActorsConnectionFilters \\"\\"\\" Return Shows where all of the related ShowActorsConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/interfaces.test.ts b/packages/graphql/tests/schema/interfaces.test.ts index 240ad2284f..24030c0700 100644 --- a/packages/graphql/tests/schema/interfaces.test.ts +++ b/packages/graphql/tests/schema/interfaces.test.ts @@ -160,6 +160,25 @@ describe("Interfaces", () => { where: MovieConnectWhere } + input MovieMoviesConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + all: MovieNodeMoviesConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + none: MovieNodeMoviesConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + single: MovieNodeMoviesConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + some: MovieNodeMoviesConnectionWhere + } + input MovieMoviesCreateFieldInput { node: MovieCreateInput! } @@ -185,6 +204,17 @@ describe("Interfaces", () => { id_MIN_LTE: ID } + input MovieMoviesRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Movies where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Movies where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Movies where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input MovieMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -237,6 +267,25 @@ describe("Interfaces", () => { totalCount: Int! } + input MovieNodeMoviesConnectionFilters { + \\"\\"\\" + Return MovieNodes where all of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + all: MovieNodeMoviesConnectionWhere + \\"\\"\\" + Return MovieNodes where none of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + none: MovieNodeMoviesConnectionWhere + \\"\\"\\" + Return MovieNodes where one of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + single: MovieNodeMoviesConnectionWhere + \\"\\"\\" + Return MovieNodes where some of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + some: MovieNodeMoviesConnectionWhere + } + input MovieNodeMoviesConnectionSort { node: MovieSort } @@ -279,6 +328,17 @@ describe("Interfaces", () => { node: Movie! } + input MovieNodeMoviesRelationshipFilters { + \\"\\"\\"Return MovieNodes where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return MovieNodes where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return MovieNodes where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return MovieNodes where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort MovieNodes by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieNodeSort object. \\"\\"\\" @@ -296,7 +356,9 @@ describe("Interfaces", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID + movies: MovieNodeMoviesRelationshipFilters moviesAggregate: MovieNodeMoviesAggregateInput + moviesConnection: MovieNodeMoviesConnectionFilters \\"\\"\\" Return MovieNodes where all of the related MovieNodeMoviesConnections match this filter \\"\\"\\" @@ -352,7 +414,9 @@ describe("Interfaces", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID + movies: MovieMoviesRelationshipFilters moviesAggregate: MovieMoviesAggregateInput + moviesConnection: MovieMoviesConnectionFilters \\"\\"\\" Return Movies where all of the related MovieNodeMoviesConnections match this filter \\"\\"\\" @@ -573,6 +637,25 @@ describe("Interfaces", () => { where: MovieConnectWhere } + input MovieMoviesConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + all: MovieNodeMoviesConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + none: MovieNodeMoviesConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + single: MovieNodeMoviesConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + some: MovieNodeMoviesConnectionWhere + } + input MovieMoviesCreateFieldInput { node: MovieCreateInput! } @@ -598,6 +681,17 @@ describe("Interfaces", () => { id_MIN_LTE: ID } + input MovieMoviesRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Movies where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Movies where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Movies where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input MovieMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -650,6 +744,25 @@ describe("Interfaces", () => { totalCount: Int! } + input MovieNodeMoviesConnectionFilters { + \\"\\"\\" + Return MovieNodes where all of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + all: MovieNodeMoviesConnectionWhere + \\"\\"\\" + Return MovieNodes where none of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + none: MovieNodeMoviesConnectionWhere + \\"\\"\\" + Return MovieNodes where one of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + single: MovieNodeMoviesConnectionWhere + \\"\\"\\" + Return MovieNodes where some of the related MovieNodeMoviesConnections match this filter + \\"\\"\\" + some: MovieNodeMoviesConnectionWhere + } + input MovieNodeMoviesConnectionSort { node: MovieSort } @@ -692,6 +805,17 @@ describe("Interfaces", () => { node: Movie! } + input MovieNodeMoviesRelationshipFilters { + \\"\\"\\"Return MovieNodes where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return MovieNodes where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return MovieNodes where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return MovieNodes where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort MovieNodes by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieNodeSort object. \\"\\"\\" @@ -709,7 +833,9 @@ describe("Interfaces", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID + movies: MovieNodeMoviesRelationshipFilters moviesAggregate: MovieNodeMoviesAggregateInput + moviesConnection: MovieNodeMoviesConnectionFilters \\"\\"\\" Return MovieNodes where all of the related MovieNodeMoviesConnections match this filter \\"\\"\\" @@ -765,7 +891,9 @@ describe("Interfaces", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID + movies: MovieMoviesRelationshipFilters moviesAggregate: MovieMoviesAggregateInput + moviesConnection: MovieMoviesConnectionFilters \\"\\"\\" Return Movies where all of the related MovieNodeMoviesConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/issues/1182.test.ts b/packages/graphql/tests/schema/issues/1182.test.ts index b66ffbc234..a0ec72d71c 100644 --- a/packages/graphql/tests/schema/issues/1182.test.ts +++ b/packages/graphql/tests/schema/issues/1182.test.ts @@ -235,6 +235,25 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: ActorSort } @@ -309,6 +328,17 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { node: Actor! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -359,7 +389,9 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/issues/1614.test.ts b/packages/graphql/tests/schema/issues/1614.test.ts index 4f2b5714ce..6148970cc1 100644 --- a/packages/graphql/tests/schema/issues/1614.test.ts +++ b/packages/graphql/tests/schema/issues/1614.test.ts @@ -126,6 +126,25 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { totalCount: Int! } + input CrewMemberMoviesConnectionFilters { + \\"\\"\\" + Return CrewMembers where all of the related CrewMemberMoviesConnections match this filter + \\"\\"\\" + all: CrewMemberMoviesConnectionWhere + \\"\\"\\" + Return CrewMembers where none of the related CrewMemberMoviesConnections match this filter + \\"\\"\\" + none: CrewMemberMoviesConnectionWhere + \\"\\"\\" + Return CrewMembers where one of the related CrewMemberMoviesConnections match this filter + \\"\\"\\" + single: CrewMemberMoviesConnectionWhere + \\"\\"\\" + Return CrewMembers where some of the related CrewMemberMoviesConnections match this filter + \\"\\"\\" + some: CrewMemberMoviesConnectionWhere + } + input CrewMemberMoviesConnectionSort { edge: CrewPositionSort node: MovieSort @@ -184,6 +203,17 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { properties: CrewPosition! } + input CrewMemberMoviesRelationshipFilters { + \\"\\"\\"Return CrewMembers where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return CrewMembers where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return CrewMembers where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return CrewMembers where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input CrewMemberMoviesUpdateConnectionInput { edge: CrewPositionUpdateInput node: MovieUpdateInput @@ -206,7 +236,9 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { AND: [CrewMemberWhere!] NOT: CrewMemberWhere OR: [CrewMemberWhere!] + movies: CrewMemberMoviesRelationshipFilters moviesAggregate: CrewMemberMoviesAggregateInput + moviesConnection: CrewMemberMoviesConnectionFilters \\"\\"\\" Return CrewMembers where all of the related CrewMemberMoviesConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/issues/162.test.ts b/packages/graphql/tests/schema/issues/162.test.ts index 8005e4934a..0ca3693248 100644 --- a/packages/graphql/tests/schema/issues/162.test.ts +++ b/packages/graphql/tests/schema/issues/162.test.ts @@ -246,6 +246,25 @@ describe("162", () => { totalCount: Int! } + input TigerJawLevel2Part1ConnectionFilters { + \\"\\"\\" + Return TigerJawLevel2s where all of the related TigerJawLevel2Part1Connections match this filter + \\"\\"\\" + all: TigerJawLevel2Part1ConnectionWhere + \\"\\"\\" + Return TigerJawLevel2s where none of the related TigerJawLevel2Part1Connections match this filter + \\"\\"\\" + none: TigerJawLevel2Part1ConnectionWhere + \\"\\"\\" + Return TigerJawLevel2s where one of the related TigerJawLevel2Part1Connections match this filter + \\"\\"\\" + single: TigerJawLevel2Part1ConnectionWhere + \\"\\"\\" + Return TigerJawLevel2s where some of the related TigerJawLevel2Part1Connections match this filter + \\"\\"\\" + some: TigerJawLevel2Part1ConnectionWhere + } + input TigerJawLevel2Part1ConnectionSort { node: TigerJawLevel2Part1Sort } @@ -315,6 +334,25 @@ describe("162", () => { node: TigerJawLevel2Part1! } + input TigerJawLevel2Part1RelationshipFilters { + \\"\\"\\" + Return TigerJawLevel2s where all of the related TigerJawLevel2Part1s match this filter + \\"\\"\\" + all: TigerJawLevel2Part1Where + \\"\\"\\" + Return TigerJawLevel2s where none of the related TigerJawLevel2Part1s match this filter + \\"\\"\\" + none: TigerJawLevel2Part1Where + \\"\\"\\" + Return TigerJawLevel2s where one of the related TigerJawLevel2Part1s match this filter + \\"\\"\\" + single: TigerJawLevel2Part1Where + \\"\\"\\" + Return TigerJawLevel2s where some of the related TigerJawLevel2Part1s match this filter + \\"\\"\\" + some: TigerJawLevel2Part1Where + } + \\"\\"\\" Fields to sort TigerJawLevel2Part1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one TigerJawLevel2Part1Sort object. \\"\\"\\" @@ -344,6 +382,25 @@ describe("162", () => { totalCount: Int! } + input TigerJawLevel2Part1TigerConnectionFilters { + \\"\\"\\" + Return TigerJawLevel2Part1s where all of the related TigerJawLevel2Part1TigerConnections match this filter + \\"\\"\\" + all: TigerJawLevel2Part1TigerConnectionWhere + \\"\\"\\" + Return TigerJawLevel2Part1s where none of the related TigerJawLevel2Part1TigerConnections match this filter + \\"\\"\\" + none: TigerJawLevel2Part1TigerConnectionWhere + \\"\\"\\" + Return TigerJawLevel2Part1s where one of the related TigerJawLevel2Part1TigerConnections match this filter + \\"\\"\\" + single: TigerJawLevel2Part1TigerConnectionWhere + \\"\\"\\" + Return TigerJawLevel2Part1s where some of the related TigerJawLevel2Part1TigerConnections match this filter + \\"\\"\\" + some: TigerJawLevel2Part1TigerConnectionWhere + } + input TigerJawLevel2Part1TigerConnectionSort { node: TigerSort } @@ -403,6 +460,25 @@ describe("162", () => { node: Tiger! } + input TigerJawLevel2Part1TigerRelationshipFilters { + \\"\\"\\" + Return TigerJawLevel2Part1s where all of the related Tigers match this filter + \\"\\"\\" + all: TigerWhere + \\"\\"\\" + Return TigerJawLevel2Part1s where none of the related Tigers match this filter + \\"\\"\\" + none: TigerWhere + \\"\\"\\" + Return TigerJawLevel2Part1s where one of the related Tigers match this filter + \\"\\"\\" + single: TigerWhere + \\"\\"\\" + Return TigerJawLevel2Part1s where some of the related Tigers match this filter + \\"\\"\\" + some: TigerWhere + } + type TigerJawLevel2Part1TigerTigerAggregationSelection { count: Int! node: TigerJawLevel2Part1TigerTigerNodeAggregateSelection @@ -453,7 +529,9 @@ describe("162", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID + tiger: TigerJawLevel2Part1TigerRelationshipFilters tigerAggregate: TigerJawLevel2Part1TigerAggregateInput + tigerConnection: TigerJawLevel2Part1TigerConnectionFilters \\"\\"\\" Return TigerJawLevel2Part1s where all of the related TigerJawLevel2Part1TigerConnections match this filter \\"\\"\\" @@ -525,7 +603,9 @@ describe("162", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID + part1: TigerJawLevel2Part1RelationshipFilters part1Aggregate: TigerJawLevel2Part1AggregateInput + part1Connection: TigerJawLevel2Part1ConnectionFilters \\"\\"\\" Return TigerJawLevel2s where all of the related TigerJawLevel2Part1Connections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/issues/2187.test.ts b/packages/graphql/tests/schema/issues/2187.test.ts index 1f5e61b7ea..e46612db91 100644 --- a/packages/graphql/tests/schema/issues/2187.test.ts +++ b/packages/graphql/tests/schema/issues/2187.test.ts @@ -163,6 +163,25 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { totalCount: Int! } + input GenreMoviesConnectionFilters { + \\"\\"\\" + Return Genres where all of the related GenreMoviesConnections match this filter + \\"\\"\\" + all: GenreMoviesConnectionWhere + \\"\\"\\" + Return Genres where none of the related GenreMoviesConnections match this filter + \\"\\"\\" + none: GenreMoviesConnectionWhere + \\"\\"\\" + Return Genres where one of the related GenreMoviesConnections match this filter + \\"\\"\\" + single: GenreMoviesConnectionWhere + \\"\\"\\" + Return Genres where some of the related GenreMoviesConnections match this filter + \\"\\"\\" + some: GenreMoviesConnectionWhere + } + input GenreMoviesConnectionSort { node: MovieSort } @@ -259,6 +278,17 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { node: Movie! } + input GenreMoviesRelationshipFilters { + \\"\\"\\"Return Genres where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Genres where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Genres where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Genres where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input GenreMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -288,7 +318,9 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { AND: [GenreWhere!] NOT: GenreWhere OR: [GenreWhere!] + movies: GenreMoviesRelationshipFilters moviesAggregate: GenreMoviesAggregateInput + moviesConnection: GenreMoviesConnectionFilters \\"\\"\\" Return Genres where all of the related GenreMoviesConnections match this filter \\"\\"\\" @@ -420,6 +452,25 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { totalCount: Int! } + input MovieGenresConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieGenresConnections match this filter + \\"\\"\\" + all: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use genre\\") + \\"\\"\\" + Return Movies where none of the related MovieGenresConnections match this filter + \\"\\"\\" + none: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use genre\\") + \\"\\"\\" + Return Movies where one of the related MovieGenresConnections match this filter + \\"\\"\\" + single: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use genre\\") + \\"\\"\\" + Return Movies where some of the related MovieGenresConnections match this filter + \\"\\"\\" + some: MovieGenresConnectionWhere @deprecated(reason: \\"Do not use genre\\") + } + input MovieGenresConnectionSort { node: GenreSort } @@ -476,6 +527,17 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { node: Genre! } + input MovieGenresRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" + all: GenreWhere @deprecated(reason: \\"Do not use genre\\") + \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" + none: GenreWhere @deprecated(reason: \\"Do not use genre\\") + \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" + single: GenreWhere @deprecated(reason: \\"Do not use genre\\") + \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" + some: GenreWhere @deprecated(reason: \\"Do not use genre\\") + } + input MovieGenresUpdateConnectionInput { node: GenreUpdateInput } @@ -515,7 +577,9 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + genres: MovieGenresRelationshipFilters genresAggregate: MovieGenresAggregateInput @deprecated(reason: \\"Do not use genre\\") + genresConnection: MovieGenresConnectionFilters \\"\\"\\" Return Movies where all of the related MovieGenresConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/issues/2377.test.ts b/packages/graphql/tests/schema/issues/2377.test.ts index 29b616f4cc..fdbb180204 100644 --- a/packages/graphql/tests/schema/issues/2377.test.ts +++ b/packages/graphql/tests/schema/issues/2377.test.ts @@ -240,6 +240,25 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { totalCount: Int! } + input ResourceContainedByConnectionFilters { + \\"\\"\\" + Return Resources where all of the related ResourceContainedByConnections match this filter + \\"\\"\\" + all: ResourceContainedByConnectionWhere + \\"\\"\\" + Return Resources where none of the related ResourceContainedByConnections match this filter + \\"\\"\\" + none: ResourceContainedByConnectionWhere + \\"\\"\\" + Return Resources where one of the related ResourceContainedByConnections match this filter + \\"\\"\\" + single: ResourceContainedByConnectionWhere + \\"\\"\\" + Return Resources where some of the related ResourceContainedByConnections match this filter + \\"\\"\\" + some: ResourceContainedByConnectionWhere + } + input ResourceContainedByConnectionSort { node: ResourceSort } @@ -326,6 +345,17 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { node: Resource! } + input ResourceContainedByRelationshipFilters { + \\"\\"\\"Return Resources where all of the related Resources match this filter\\"\\"\\" + all: ResourceWhere + \\"\\"\\"Return Resources where none of the related Resources match this filter\\"\\"\\" + none: ResourceWhere + \\"\\"\\"Return Resources where one of the related Resources match this filter\\"\\"\\" + single: ResourceWhere + \\"\\"\\"Return Resources where some of the related Resources match this filter\\"\\"\\" + some: ResourceWhere + } + input ResourceContainedByUpdateConnectionInput { node: ResourceUpdateInput } @@ -483,7 +513,9 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { AND: [ResourceWhere!] NOT: ResourceWhere OR: [ResourceWhere!] + containedBy: ResourceContainedByRelationshipFilters containedByAggregate: ResourceContainedByAggregateInput + containedByConnection: ResourceContainedByConnectionFilters \\"\\"\\" Return Resources where all of the related ResourceContainedByConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/issues/2993.test.ts b/packages/graphql/tests/schema/issues/2993.test.ts index eab9efe954..727baeb681 100644 --- a/packages/graphql/tests/schema/issues/2993.test.ts +++ b/packages/graphql/tests/schema/issues/2993.test.ts @@ -335,6 +335,25 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { totalCount: Int! } + input UserFollowingConnectionFilters { + \\"\\"\\" + Return Users where all of the related UserFollowingConnections match this filter + \\"\\"\\" + all: UserFollowingConnectionWhere + \\"\\"\\" + Return Users where none of the related UserFollowingConnections match this filter + \\"\\"\\" + none: UserFollowingConnectionWhere + \\"\\"\\" + Return Users where one of the related UserFollowingConnections match this filter + \\"\\"\\" + single: UserFollowingConnectionWhere + \\"\\"\\" + Return Users where some of the related UserFollowingConnections match this filter + \\"\\"\\" + some: UserFollowingConnectionWhere + } + input UserFollowingConnectionSort { edge: FOLLOWSSort node: ProfileSort @@ -402,6 +421,17 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { properties: FOLLOWS! } + input UserFollowingRelationshipFilters { + \\"\\"\\"Return Users where all of the related Profiles match this filter\\"\\"\\" + all: ProfileWhere + \\"\\"\\"Return Users where none of the related Profiles match this filter\\"\\"\\" + none: ProfileWhere + \\"\\"\\"Return Users where one of the related Profiles match this filter\\"\\"\\" + single: ProfileWhere + \\"\\"\\"Return Users where some of the related Profiles match this filter\\"\\"\\" + some: ProfileWhere + } + input UserFollowingUpdateConnectionInput { edge: FOLLOWSUpdateInput node: ProfileUpdateInput @@ -448,7 +478,9 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] + following: UserFollowingRelationshipFilters followingAggregate: UserFollowingAggregateInput + followingConnection: UserFollowingConnectionFilters \\"\\"\\" Return Users where all of the related UserFollowingConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/issues/3428.test.ts b/packages/graphql/tests/schema/issues/3428.test.ts index 7d6e1a0312..d1ae83114b 100644 --- a/packages/graphql/tests/schema/issues/3428.test.ts +++ b/packages/graphql/tests/schema/issues/3428.test.ts @@ -114,6 +114,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: PersonSort } @@ -161,6 +180,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @@ -200,7 +230,9 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -458,6 +490,25 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionWhere { PersonOne: MovieActorsPersonOneConnectionWhere PersonTwo: MovieActorsPersonTwoConnectionWhere @@ -482,6 +533,17 @@ describe("Relationship nested operations", () => { node: Person! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @@ -511,6 +573,8 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/issues/3541.test.ts b/packages/graphql/tests/schema/issues/3541.test.ts index da0c11a530..639bb3b016 100644 --- a/packages/graphql/tests/schema/issues/3541.test.ts +++ b/packages/graphql/tests/schema/issues/3541.test.ts @@ -138,6 +138,25 @@ describe("Extending the schema in when using getSubgraphSchema", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: ActorSort } @@ -175,6 +194,17 @@ describe("Extending the schema in when using getSubgraphSchema", () => { node: Actor! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + type MovieAggregateSelection @shareable { count: Int! title: StringAggregateSelection! @@ -196,7 +226,9 @@ describe("Extending the schema in when using getSubgraphSchema", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -480,6 +512,25 @@ describe("Extending the schema in when using getSubgraphSchema", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: ActorSort } @@ -534,6 +585,17 @@ describe("Extending the schema in when using getSubgraphSchema", () => { node: Actor! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -567,7 +629,9 @@ describe("Extending the schema in when using getSubgraphSchema", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/issues/3698.test.ts b/packages/graphql/tests/schema/issues/3698.test.ts index 12a1b63329..e32b5de673 100644 --- a/packages/graphql/tests/schema/issues/3698.test.ts +++ b/packages/graphql/tests/schema/issues/3698.test.ts @@ -192,6 +192,25 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { totalCount: Int! } + input GenreProductConnectionFilters { + \\"\\"\\" + Return Genres where all of the related GenreProductConnections match this filter + \\"\\"\\" + all: GenreProductConnectionWhere + \\"\\"\\" + Return Genres where none of the related GenreProductConnections match this filter + \\"\\"\\" + none: GenreProductConnectionWhere + \\"\\"\\" + Return Genres where one of the related GenreProductConnections match this filter + \\"\\"\\" + single: GenreProductConnectionWhere + \\"\\"\\" + Return Genres where some of the related GenreProductConnections match this filter + \\"\\"\\" + some: GenreProductConnectionWhere + } + input GenreProductConnectionSort { node: IProductSort } @@ -276,6 +295,17 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { node: IProduct! } + input GenreProductRelationshipFilters { + \\"\\"\\"Return Genres where all of the related IProducts match this filter\\"\\"\\" + all: IProductWhere + \\"\\"\\"Return Genres where none of the related IProducts match this filter\\"\\"\\" + none: IProductWhere + \\"\\"\\"Return Genres where one of the related IProducts match this filter\\"\\"\\" + single: IProductWhere + \\"\\"\\"Return Genres where some of the related IProducts match this filter\\"\\"\\" + some: IProductWhere + } + input GenreProductUpdateConnectionInput { node: IProductUpdateInput } @@ -330,7 +360,9 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { name_EQ: String name_IN: [String!] name_STARTS_WITH: String + product: GenreProductRelationshipFilters productAggregate: GenreProductAggregateInput + productConnection: GenreProductConnectionFilters \\"\\"\\" Return Genres where all of the related GenreProductConnections match this filter \\"\\"\\" @@ -510,6 +542,25 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { totalCount: Int! } + input MovieGenreConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieGenreConnections match this filter + \\"\\"\\" + all: MovieGenreConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieGenreConnections match this filter + \\"\\"\\" + none: MovieGenreConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieGenreConnections match this filter + \\"\\"\\" + single: MovieGenreConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieGenreConnections match this filter + \\"\\"\\" + some: MovieGenreConnectionWhere + } + input MovieGenreConnectionSort { node: GenreSort } @@ -575,6 +626,17 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { node: Genre! } + input MovieGenreRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" + all: GenreWhere + \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" + none: GenreWhere + \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" + single: GenreWhere + \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" + some: GenreWhere + } + input MovieGenreUpdateConnectionInput { node: GenreUpdateInput } @@ -631,7 +693,9 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + genre: MovieGenreRelationshipFilters genreAggregate: MovieGenreAggregateInput + genreConnection: MovieGenreConnectionFilters \\"\\"\\" Return Movies where all of the related MovieGenreConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/issues/3817.test.ts b/packages/graphql/tests/schema/issues/3817.test.ts index c3d5718e44..5603d5e80a 100644 --- a/packages/graphql/tests/schema/issues/3817.test.ts +++ b/packages/graphql/tests/schema/issues/3817.test.ts @@ -231,6 +231,25 @@ describe("ttps://github.com/neo4j/graphql/issues/3817", () => { totalCount: Int! } + input PersonFriendsConnectionFilters { + \\"\\"\\" + Return People where all of the related PersonFriendsConnections match this filter + \\"\\"\\" + all: PersonFriendsConnectionWhere + \\"\\"\\" + Return People where none of the related PersonFriendsConnections match this filter + \\"\\"\\" + none: PersonFriendsConnectionWhere + \\"\\"\\" + Return People where one of the related PersonFriendsConnections match this filter + \\"\\"\\" + single: PersonFriendsConnectionWhere + \\"\\"\\" + Return People where some of the related PersonFriendsConnections match this filter + \\"\\"\\" + some: PersonFriendsConnectionWhere + } + input PersonFriendsConnectionSort { edge: FriendOfSort node: PersonSort @@ -285,6 +304,17 @@ describe("ttps://github.com/neo4j/graphql/issues/3817", () => { properties: FriendOf! } + input PersonFriendsRelationshipFilters { + \\"\\"\\"Return People where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return People where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return People where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return People where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input PersonFriendsUpdateConnectionInput { edge: FriendOfUpdateInput node: PersonUpdateInput @@ -328,7 +358,9 @@ describe("ttps://github.com/neo4j/graphql/issues/3817", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] + friends: PersonFriendsRelationshipFilters friendsAggregate: PersonFriendsAggregateInput + friendsConnection: PersonFriendsConnectionFilters \\"\\"\\" Return People where all of the related PersonFriendsConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/issues/4511.test.ts b/packages/graphql/tests/schema/issues/4511.test.ts index 2c18ff1b28..a18d97a0f9 100644 --- a/packages/graphql/tests/schema/issues/4511.test.ts +++ b/packages/graphql/tests/schema/issues/4511.test.ts @@ -148,6 +148,25 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { totalCount: Int! } + input CreatureMoviesConnectionFilters { + \\"\\"\\" + Return Creatures where all of the related CreatureMoviesConnections match this filter + \\"\\"\\" + all: CreatureMoviesConnectionWhere + \\"\\"\\" + Return Creatures where none of the related CreatureMoviesConnections match this filter + \\"\\"\\" + none: CreatureMoviesConnectionWhere + \\"\\"\\" + Return Creatures where one of the related CreatureMoviesConnections match this filter + \\"\\"\\" + single: CreatureMoviesConnectionWhere + \\"\\"\\" + Return Creatures where some of the related CreatureMoviesConnections match this filter + \\"\\"\\" + some: CreatureMoviesConnectionWhere + } + input CreatureMoviesConnectionSort { node: ProductionSort } @@ -194,6 +213,25 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { node: Production! } + input CreatureMoviesRelationshipFilters { + \\"\\"\\" + Return Creatures where all of the related Productions match this filter + \\"\\"\\" + all: ProductionWhere + \\"\\"\\" + Return Creatures where none of the related Productions match this filter + \\"\\"\\" + none: ProductionWhere + \\"\\"\\" + Return Creatures where one of the related Productions match this filter + \\"\\"\\" + single: ProductionWhere + \\"\\"\\" + Return Creatures where some of the related Productions match this filter + \\"\\"\\" + some: ProductionWhere + } + input CreatureMoviesUpdateConnectionInput { node: ProductionUpdateInput } @@ -215,7 +253,9 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { AND: [CreatureWhere!] NOT: CreatureWhere OR: [CreatureWhere!] + movies: CreatureMoviesRelationshipFilters moviesAggregate: CreatureMoviesAggregateInput + moviesConnection: CreatureMoviesConnectionFilters \\"\\"\\" Return Creatures where all of the related CreatureMoviesConnections match this filter \\"\\"\\" @@ -353,6 +393,25 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { where: CreatureConnectWhere } + input MovieDirectorConnectionFilters { + \\"\\"\\" + Return Movies where all of the related ProductionDirectorConnections match this filter + \\"\\"\\" + all: ProductionDirectorConnectionWhere + \\"\\"\\" + Return Movies where none of the related ProductionDirectorConnections match this filter + \\"\\"\\" + none: ProductionDirectorConnectionWhere + \\"\\"\\" + Return Movies where one of the related ProductionDirectorConnections match this filter + \\"\\"\\" + single: ProductionDirectorConnectionWhere + \\"\\"\\" + Return Movies where some of the related ProductionDirectorConnections match this filter + \\"\\"\\" + some: ProductionDirectorConnectionWhere + } + input MovieDirectorCreateFieldInput { node: CreatureCreateInput! } @@ -372,6 +431,17 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { create: [MovieDirectorCreateFieldInput!] } + input MovieDirectorRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Creatures match this filter\\"\\"\\" + all: CreatureWhere + \\"\\"\\"Return Movies where none of the related Creatures match this filter\\"\\"\\" + none: CreatureWhere + \\"\\"\\"Return Movies where one of the related Creatures match this filter\\"\\"\\" + single: CreatureWhere + \\"\\"\\"Return Movies where some of the related Creatures match this filter\\"\\"\\" + some: CreatureWhere + } + input MovieDirectorUpdateConnectionInput { node: CreatureUpdateInput } @@ -408,7 +478,9 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + director: MovieDirectorRelationshipFilters directorAggregate: MovieDirectorAggregateInput + directorConnection: MovieDirectorConnectionFilters \\"\\"\\" Return Movies where all of the related ProductionDirectorConnections match this filter \\"\\"\\" @@ -529,6 +601,25 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { where: ProductionConnectWhere } + input PersonMoviesConnectionFilters { + \\"\\"\\" + Return People where all of the related CreatureMoviesConnections match this filter + \\"\\"\\" + all: CreatureMoviesConnectionWhere + \\"\\"\\" + Return People where none of the related CreatureMoviesConnections match this filter + \\"\\"\\" + none: CreatureMoviesConnectionWhere + \\"\\"\\" + Return People where one of the related CreatureMoviesConnections match this filter + \\"\\"\\" + single: CreatureMoviesConnectionWhere + \\"\\"\\" + Return People where some of the related CreatureMoviesConnections match this filter + \\"\\"\\" + some: CreatureMoviesConnectionWhere + } + input PersonMoviesCreateFieldInput { node: ProductionCreateInput! } @@ -564,6 +655,17 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { id_MIN_LTE: ID } + input PersonMoviesRelationshipFilters { + \\"\\"\\"Return People where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return People where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return People where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return People where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input PersonMoviesUpdateConnectionInput { node: ProductionUpdateInput } @@ -599,7 +701,9 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] + movies: PersonMoviesRelationshipFilters moviesAggregate: PersonMoviesAggregateInput + moviesConnection: PersonMoviesConnectionFilters \\"\\"\\" Return People where all of the related CreatureMoviesConnections match this filter \\"\\"\\" @@ -676,6 +780,25 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { totalCount: Int! } + input ProductionDirectorConnectionFilters { + \\"\\"\\" + Return Productions where all of the related ProductionDirectorConnections match this filter + \\"\\"\\" + all: ProductionDirectorConnectionWhere + \\"\\"\\" + Return Productions where none of the related ProductionDirectorConnections match this filter + \\"\\"\\" + none: ProductionDirectorConnectionWhere + \\"\\"\\" + Return Productions where one of the related ProductionDirectorConnections match this filter + \\"\\"\\" + single: ProductionDirectorConnectionWhere + \\"\\"\\" + Return Productions where some of the related ProductionDirectorConnections match this filter + \\"\\"\\" + some: ProductionDirectorConnectionWhere + } + input ProductionDirectorConnectionWhere { AND: [ProductionDirectorConnectionWhere!] NOT: ProductionDirectorConnectionWhere @@ -702,6 +825,25 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { node: Creature! } + input ProductionDirectorRelationshipFilters { + \\"\\"\\" + Return Productions where all of the related Creatures match this filter + \\"\\"\\" + all: CreatureWhere + \\"\\"\\" + Return Productions where none of the related Creatures match this filter + \\"\\"\\" + none: CreatureWhere + \\"\\"\\" + Return Productions where one of the related Creatures match this filter + \\"\\"\\" + single: CreatureWhere + \\"\\"\\" + Return Productions where some of the related Creatures match this filter + \\"\\"\\" + some: CreatureWhere + } + input ProductionDirectorUpdateConnectionInput { node: CreatureUpdateInput } @@ -745,7 +887,9 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] + director: ProductionDirectorRelationshipFilters directorAggregate: ProductionDirectorAggregateInput + directorConnection: ProductionDirectorConnectionFilters \\"\\"\\" Return Productions where all of the related ProductionDirectorConnections match this filter \\"\\"\\" @@ -876,6 +1020,25 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { where: CreatureConnectWhere } + input SeriesDirectorConnectionFilters { + \\"\\"\\" + Return Series where all of the related ProductionDirectorConnections match this filter + \\"\\"\\" + all: ProductionDirectorConnectionWhere + \\"\\"\\" + Return Series where none of the related ProductionDirectorConnections match this filter + \\"\\"\\" + none: ProductionDirectorConnectionWhere + \\"\\"\\" + Return Series where one of the related ProductionDirectorConnections match this filter + \\"\\"\\" + single: ProductionDirectorConnectionWhere + \\"\\"\\" + Return Series where some of the related ProductionDirectorConnections match this filter + \\"\\"\\" + some: ProductionDirectorConnectionWhere + } + input SeriesDirectorCreateFieldInput { node: CreatureCreateInput! } @@ -895,6 +1058,17 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { create: [SeriesDirectorCreateFieldInput!] } + input SeriesDirectorRelationshipFilters { + \\"\\"\\"Return Series where all of the related Creatures match this filter\\"\\"\\" + all: CreatureWhere + \\"\\"\\"Return Series where none of the related Creatures match this filter\\"\\"\\" + none: CreatureWhere + \\"\\"\\"Return Series where one of the related Creatures match this filter\\"\\"\\" + single: CreatureWhere + \\"\\"\\"Return Series where some of the related Creatures match this filter\\"\\"\\" + some: CreatureWhere + } + input SeriesDirectorUpdateConnectionInput { node: CreatureUpdateInput } @@ -973,7 +1147,9 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] + director: SeriesDirectorRelationshipFilters directorAggregate: SeriesDirectorAggregateInput + directorConnection: SeriesDirectorConnectionFilters \\"\\"\\" Return Series where all of the related ProductionDirectorConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/issues/4615.test.ts b/packages/graphql/tests/schema/issues/4615.test.ts index 8fa1d8cbcc..88c10a857e 100644 --- a/packages/graphql/tests/schema/issues/4615.test.ts +++ b/packages/graphql/tests/schema/issues/4615.test.ts @@ -158,6 +158,25 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { edge: ActedInSort node: ShowSort @@ -218,6 +237,17 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { properties: ActedIn! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Shows match this filter\\"\\"\\" + all: ShowWhere + \\"\\"\\"Return Actors where none of the related Shows match this filter\\"\\"\\" + none: ShowWhere + \\"\\"\\"Return Actors where one of the related Shows match this filter\\"\\"\\" + single: ShowWhere + \\"\\"\\"Return Actors where some of the related Shows match this filter\\"\\"\\" + some: ShowWhere + } + input ActorActedInUpdateConnectionInput { edge: ActedInUpdateInput node: ShowUpdateInput @@ -293,7 +323,9 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -440,6 +472,25 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { where: ActorConnectWhere } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related ShowActorsConnections match this filter + \\"\\"\\" + all: ShowActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related ShowActorsConnections match this filter + \\"\\"\\" + none: ShowActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related ShowActorsConnections match this filter + \\"\\"\\" + single: ShowActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related ShowActorsConnections match this filter + \\"\\"\\" + some: ShowActorsConnectionWhere + } + input MovieActorsCreateFieldInput { edge: ActedInCreateInput node: ActorCreateInput! @@ -471,6 +522,17 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { name_SHORTEST_LENGTH_LTE: Int } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { edge: ActedInUpdateInput node: ActorUpdateInput @@ -530,7 +592,9 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related ShowActorsConnections match this filter \\"\\"\\" @@ -659,6 +723,25 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { where: ActorConnectWhere } + input SeriesActorsConnectionFilters { + \\"\\"\\" + Return Series where all of the related ShowActorsConnections match this filter + \\"\\"\\" + all: ShowActorsConnectionWhere + \\"\\"\\" + Return Series where none of the related ShowActorsConnections match this filter + \\"\\"\\" + none: ShowActorsConnectionWhere + \\"\\"\\" + Return Series where one of the related ShowActorsConnections match this filter + \\"\\"\\" + single: ShowActorsConnectionWhere + \\"\\"\\" + Return Series where some of the related ShowActorsConnections match this filter + \\"\\"\\" + some: ShowActorsConnectionWhere + } + input SeriesActorsCreateFieldInput { edge: ActedInCreateInput node: ActorCreateInput! @@ -690,6 +773,17 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { name_SHORTEST_LENGTH_LTE: Int } + input SeriesActorsRelationshipFilters { + \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input SeriesActorsUpdateConnectionInput { edge: ActedInUpdateInput node: ActorUpdateInput @@ -751,7 +845,9 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] + actors: SeriesActorsRelationshipFilters actorsAggregate: SeriesActorsAggregateInput + actorsConnection: SeriesActorsConnectionFilters \\"\\"\\" Return Series where all of the related ShowActorsConnections match this filter \\"\\"\\" @@ -822,6 +918,25 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { totalCount: Int! } + input ShowActorsConnectionFilters { + \\"\\"\\" + Return Shows where all of the related ShowActorsConnections match this filter + \\"\\"\\" + all: ShowActorsConnectionWhere + \\"\\"\\" + Return Shows where none of the related ShowActorsConnections match this filter + \\"\\"\\" + none: ShowActorsConnectionWhere + \\"\\"\\" + Return Shows where one of the related ShowActorsConnections match this filter + \\"\\"\\" + single: ShowActorsConnectionWhere + \\"\\"\\" + Return Shows where some of the related ShowActorsConnections match this filter + \\"\\"\\" + some: ShowActorsConnectionWhere + } + input ShowActorsConnectionSort { edge: ShowActorsEdgeSort node: ActorSort @@ -922,6 +1037,17 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { properties: ShowActorsRelationshipProperties! } + input ShowActorsRelationshipFilters { + \\"\\"\\"Return Shows where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Shows where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Shows where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Shows where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + union ShowActorsRelationshipProperties = ActedIn input ShowActorsUpdateConnectionInput { @@ -990,7 +1116,9 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { AND: [ShowWhere!] NOT: ShowWhere OR: [ShowWhere!] + actors: ShowActorsRelationshipFilters actorsAggregate: ShowActorsAggregateInput + actorsConnection: ShowActorsConnectionFilters \\"\\"\\" Return Shows where all of the related ShowActorsConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/issues/872.test.ts b/packages/graphql/tests/schema/issues/872.test.ts index fb6d9c8648..4622a16955 100644 --- a/packages/graphql/tests/schema/issues/872.test.ts +++ b/packages/graphql/tests/schema/issues/872.test.ts @@ -114,6 +114,25 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { totalCount: Int! } + input Actor2MoviesConnectionFilters { + \\"\\"\\" + Return Actor2s where all of the related Actor2MoviesConnections match this filter + \\"\\"\\" + all: Actor2MoviesConnectionWhere + \\"\\"\\" + Return Actor2s where none of the related Actor2MoviesConnections match this filter + \\"\\"\\" + none: Actor2MoviesConnectionWhere + \\"\\"\\" + Return Actor2s where one of the related Actor2MoviesConnections match this filter + \\"\\"\\" + single: Actor2MoviesConnectionWhere + \\"\\"\\" + Return Actor2s where some of the related Actor2MoviesConnections match this filter + \\"\\"\\" + some: Actor2MoviesConnectionWhere + } + input Actor2MoviesConnectionSort { node: MovieSort } @@ -178,6 +197,17 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { node: Movie! } + input Actor2MoviesRelationshipFilters { + \\"\\"\\"Return Actor2s where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actor2s where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actor2s where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actor2s where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input Actor2MoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -207,7 +237,9 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { AND: [Actor2Where!] NOT: Actor2Where OR: [Actor2Where!] + movies: Actor2MoviesRelationshipFilters moviesAggregate: Actor2MoviesAggregateInput + moviesConnection: Actor2MoviesConnectionFilters \\"\\"\\" Return Actor2s where all of the related Actor2MoviesConnections match this filter \\"\\"\\" @@ -297,6 +329,25 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { totalCount: Int! } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + all: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + none: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + single: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + some: ActorMoviesConnectionWhere + } + input ActorMoviesConnectionSort { node: MovieSort } @@ -361,6 +412,17 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { node: Movie! } + input ActorMoviesRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -390,7 +452,9 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: ActorMoviesRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/lowercase-type-names.test.ts b/packages/graphql/tests/schema/lowercase-type-names.test.ts index 80b4930f1f..2c4a1078df 100644 --- a/packages/graphql/tests/schema/lowercase-type-names.test.ts +++ b/packages/graphql/tests/schema/lowercase-type-names.test.ts @@ -263,6 +263,25 @@ describe("lower case type names", () => { totalCount: Int! } + input actorMoviesConnectionFilters { + \\"\\"\\" + Return actors where all of the related actorMoviesConnections match this filter + \\"\\"\\" + all: actorMoviesConnectionWhere + \\"\\"\\" + Return actors where none of the related actorMoviesConnections match this filter + \\"\\"\\" + none: actorMoviesConnectionWhere + \\"\\"\\" + Return actors where one of the related actorMoviesConnections match this filter + \\"\\"\\" + single: actorMoviesConnectionWhere + \\"\\"\\" + Return actors where some of the related actorMoviesConnections match this filter + \\"\\"\\" + some: actorMoviesConnectionWhere + } + input actorMoviesConnectionSort { node: movieSort } @@ -364,6 +383,17 @@ describe("lower case type names", () => { node: movie! } + input actorMoviesRelationshipFilters { + \\"\\"\\"Return actors where all of the related movies match this filter\\"\\"\\" + all: movieWhere + \\"\\"\\"Return actors where none of the related movies match this filter\\"\\"\\" + none: movieWhere + \\"\\"\\"Return actors where one of the related movies match this filter\\"\\"\\" + single: movieWhere + \\"\\"\\"Return actors where some of the related movies match this filter\\"\\"\\" + some: movieWhere + } + input actorMoviesUpdateConnectionInput { node: movieUpdateInput } @@ -406,7 +436,9 @@ describe("lower case type names", () => { createdAt_IN: [DateTime] createdAt_LT: DateTime createdAt_LTE: DateTime + movies: actorMoviesRelationshipFilters moviesAggregate: actorMoviesAggregateInput + moviesConnection: actorMoviesConnectionFilters \\"\\"\\" Return actors where all of the related actorMoviesConnections match this filter \\"\\"\\" @@ -491,6 +523,25 @@ describe("lower case type names", () => { totalCount: Int! } + input movieActorsConnectionFilters { + \\"\\"\\" + Return movies where all of the related movieActorsConnections match this filter + \\"\\"\\" + all: movieActorsConnectionWhere + \\"\\"\\" + Return movies where none of the related movieActorsConnections match this filter + \\"\\"\\" + none: movieActorsConnectionWhere + \\"\\"\\" + Return movies where one of the related movieActorsConnections match this filter + \\"\\"\\" + single: movieActorsConnectionWhere + \\"\\"\\" + Return movies where some of the related movieActorsConnections match this filter + \\"\\"\\" + some: movieActorsConnectionWhere + } + input movieActorsConnectionSort { node: actorSort } @@ -577,6 +628,17 @@ describe("lower case type names", () => { node: actor! } + input movieActorsRelationshipFilters { + \\"\\"\\"Return movies where all of the related actors match this filter\\"\\"\\" + all: actorWhere + \\"\\"\\"Return movies where none of the related actors match this filter\\"\\"\\" + none: actorWhere + \\"\\"\\"Return movies where one of the related actors match this filter\\"\\"\\" + single: actorWhere + \\"\\"\\"Return movies where some of the related actors match this filter\\"\\"\\" + some: actorWhere + } + input movieActorsUpdateConnectionInput { node: actorUpdateInput } @@ -651,7 +713,9 @@ describe("lower case type names", () => { AND: [movieWhere!] NOT: movieWhere OR: [movieWhere!] + actors: movieActorsRelationshipFilters actorsAggregate: movieActorsAggregateInput + actorsConnection: movieActorsConnectionFilters \\"\\"\\" Return movies where all of the related movieActorsConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/math.test.ts b/packages/graphql/tests/schema/math.test.ts index 12e8039ee3..b799ad5e67 100644 --- a/packages/graphql/tests/schema/math.test.ts +++ b/packages/graphql/tests/schema/math.test.ts @@ -664,6 +664,25 @@ describe("Algebraic", () => { totalCount: Int! } + input DirectorDirectsConnectionFilters { + \\"\\"\\" + Return Directors where all of the related DirectorDirectsConnections match this filter + \\"\\"\\" + all: DirectorDirectsConnectionWhere + \\"\\"\\" + Return Directors where none of the related DirectorDirectsConnections match this filter + \\"\\"\\" + none: DirectorDirectsConnectionWhere + \\"\\"\\" + Return Directors where one of the related DirectorDirectsConnections match this filter + \\"\\"\\" + single: DirectorDirectsConnectionWhere + \\"\\"\\" + Return Directors where some of the related DirectorDirectsConnections match this filter + \\"\\"\\" + some: DirectorDirectsConnectionWhere + } + input DirectorDirectsConnectionSort { node: MovieSort } @@ -735,6 +754,17 @@ describe("Algebraic", () => { node: Movie! } + input DirectorDirectsRelationshipFilters { + \\"\\"\\"Return Directors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Directors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Directors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Directors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input DirectorDirectsUpdateConnectionInput { node: MovieUpdateInput } @@ -783,7 +813,9 @@ describe("Algebraic", () => { AND: [DirectorWhere!] NOT: DirectorWhere OR: [DirectorWhere!] + directs: DirectorDirectsRelationshipFilters directsAggregate: DirectorDirectsAggregateInput + directsConnection: DirectorDirectsConnectionFilters \\"\\"\\" Return Directors where all of the related DirectorDirectsConnections match this filter \\"\\"\\" @@ -913,6 +945,25 @@ describe("Algebraic", () => { totalCount: Int! } + input MovieDirectedByConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieDirectedByConnections match this filter + \\"\\"\\" + all: MovieDirectedByConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieDirectedByConnections match this filter + \\"\\"\\" + none: MovieDirectedByConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieDirectedByConnections match this filter + \\"\\"\\" + single: MovieDirectedByConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieDirectedByConnections match this filter + \\"\\"\\" + some: MovieDirectedByConnectionWhere + } + input MovieDirectedByConnectionSort { node: DirectorSort } @@ -969,6 +1020,17 @@ describe("Algebraic", () => { node: Director! } + input MovieDirectedByRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Directors match this filter\\"\\"\\" + all: DirectorWhere + \\"\\"\\"Return Movies where none of the related Directors match this filter\\"\\"\\" + none: DirectorWhere + \\"\\"\\"Return Movies where one of the related Directors match this filter\\"\\"\\" + single: DirectorWhere + \\"\\"\\"Return Movies where some of the related Directors match this filter\\"\\"\\" + some: DirectorWhere + } + input MovieDirectedByUpdateConnectionInput { node: DirectorUpdateInput } @@ -1020,7 +1082,9 @@ describe("Algebraic", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + directedBy: MovieDirectedByRelationshipFilters directedByAggregate: MovieDirectedByAggregateInput + directedByConnection: MovieDirectedByConnectionFilters \\"\\"\\" Return Movies where all of the related MovieDirectedByConnections match this filter \\"\\"\\" @@ -1299,7 +1363,9 @@ describe("Algebraic", () => { viewers_IN: [Int!] viewers_LT: Int viewers_LTE: Int + workers: MovieWorkersRelationshipFilters workersAggregate: MovieWorkersAggregateInput + workersConnection: MovieWorkersConnectionFilters \\"\\"\\" Return Movies where all of the related MovieWorkersConnections match this filter \\"\\"\\" @@ -1349,6 +1415,25 @@ describe("Algebraic", () => { totalCount: Int! } + input MovieWorkersConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieWorkersConnections match this filter + \\"\\"\\" + all: MovieWorkersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieWorkersConnections match this filter + \\"\\"\\" + none: MovieWorkersConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieWorkersConnections match this filter + \\"\\"\\" + single: MovieWorkersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieWorkersConnections match this filter + \\"\\"\\" + some: MovieWorkersConnectionWhere + } + input MovieWorkersConnectionSort { node: PersonSort } @@ -1405,6 +1490,17 @@ describe("Algebraic", () => { node: Person! } + input MovieWorkersRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieWorkersUpdateConnectionInput { node: PersonUpdateInput } @@ -1516,7 +1612,9 @@ describe("Algebraic", () => { name_EQ: String name_IN: [String!] name_STARTS_WITH: String + worksInProduction: PersonWorksInProductionRelationshipFilters worksInProductionAggregate: PersonWorksInProductionAggregateInput + worksInProductionConnection: PersonWorksInProductionConnectionFilters \\"\\"\\" Return People where all of the related PersonWorksInProductionConnections match this filter \\"\\"\\" @@ -1565,6 +1663,25 @@ describe("Algebraic", () => { totalCount: Int! } + input PersonWorksInProductionConnectionFilters { + \\"\\"\\" + Return People where all of the related PersonWorksInProductionConnections match this filter + \\"\\"\\" + all: PersonWorksInProductionConnectionWhere + \\"\\"\\" + Return People where none of the related PersonWorksInProductionConnections match this filter + \\"\\"\\" + none: PersonWorksInProductionConnectionWhere + \\"\\"\\" + Return People where one of the related PersonWorksInProductionConnections match this filter + \\"\\"\\" + single: PersonWorksInProductionConnectionWhere + \\"\\"\\" + Return People where some of the related PersonWorksInProductionConnections match this filter + \\"\\"\\" + some: PersonWorksInProductionConnectionWhere + } + input PersonWorksInProductionConnectionSort { node: ProductionSort } @@ -1624,6 +1741,17 @@ describe("Algebraic", () => { node: Production! } + input PersonWorksInProductionRelationshipFilters { + \\"\\"\\"Return People where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return People where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return People where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return People where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input PersonWorksInProductionUpdateConnectionInput { node: ProductionUpdateInput } @@ -1931,6 +2059,25 @@ describe("Algebraic", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { edge: ActedInSort node: PersonSort @@ -1991,6 +2138,17 @@ describe("Algebraic", () => { properties: ActedIn! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input MovieActorsUpdateConnectionInput { edge: ActedInUpdateInput node: PersonUpdateInput @@ -2066,7 +2224,9 @@ describe("Algebraic", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -2160,6 +2320,25 @@ describe("Algebraic", () => { totalCount: Int! } + input PersonActedInMoviesConnectionFilters { + \\"\\"\\" + Return People where all of the related PersonActedInMoviesConnections match this filter + \\"\\"\\" + all: PersonActedInMoviesConnectionWhere + \\"\\"\\" + Return People where none of the related PersonActedInMoviesConnections match this filter + \\"\\"\\" + none: PersonActedInMoviesConnectionWhere + \\"\\"\\" + Return People where one of the related PersonActedInMoviesConnections match this filter + \\"\\"\\" + single: PersonActedInMoviesConnectionWhere + \\"\\"\\" + Return People where some of the related PersonActedInMoviesConnections match this filter + \\"\\"\\" + some: PersonActedInMoviesConnectionWhere + } + input PersonActedInMoviesConnectionSort { edge: ActedInSort node: MovieSort @@ -2220,6 +2399,17 @@ describe("Algebraic", () => { properties: ActedIn! } + input PersonActedInMoviesRelationshipFilters { + \\"\\"\\"Return People where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return People where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return People where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return People where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input PersonActedInMoviesUpdateConnectionInput { edge: ActedInUpdateInput node: MovieUpdateInput @@ -2295,7 +2485,9 @@ describe("Algebraic", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] + actedInMovies: PersonActedInMoviesRelationshipFilters actedInMoviesAggregate: PersonActedInMoviesAggregateInput + actedInMoviesConnection: PersonActedInMoviesConnectionFilters \\"\\"\\" Return People where all of the related PersonActedInMoviesConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/nested-aggregation-on-type.test.ts b/packages/graphql/tests/schema/nested-aggregation-on-type.test.ts index 1872693f77..bd56308d7e 100644 --- a/packages/graphql/tests/schema/nested-aggregation-on-type.test.ts +++ b/packages/graphql/tests/schema/nested-aggregation-on-type.test.ts @@ -122,6 +122,25 @@ describe("nested aggregation on interface", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { edge: ActedInSort node: MovieSort @@ -220,6 +239,17 @@ describe("nested aggregation on interface", () => { properties: ActedIn! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorActedInUpdateConnectionInput { edge: ActedInUpdateInput node: MovieUpdateInput @@ -285,7 +315,9 @@ describe("nested aggregation on interface", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/pluralize-consistency.test.ts b/packages/graphql/tests/schema/pluralize-consistency.test.ts index 8936078e2a..f3fe5f5a21 100644 --- a/packages/graphql/tests/schema/pluralize-consistency.test.ts +++ b/packages/graphql/tests/schema/pluralize-consistency.test.ts @@ -247,6 +247,25 @@ describe("Pluralize consistency", () => { totalCount: Int! } + input super_userMy_friendConnectionFilters { + \\"\\"\\" + Return super_users where all of the related super_userMy_friendConnections match this filter + \\"\\"\\" + all: super_userMy_friendConnectionWhere + \\"\\"\\" + Return super_users where none of the related super_userMy_friendConnections match this filter + \\"\\"\\" + none: super_userMy_friendConnectionWhere + \\"\\"\\" + Return super_users where one of the related super_userMy_friendConnections match this filter + \\"\\"\\" + single: super_userMy_friendConnectionWhere + \\"\\"\\" + Return super_users where some of the related super_userMy_friendConnections match this filter + \\"\\"\\" + some: super_userMy_friendConnectionWhere + } + input super_userMy_friendConnectionSort { node: super_friendSort } @@ -301,6 +320,25 @@ describe("Pluralize consistency", () => { node: super_friend! } + input super_userMy_friendRelationshipFilters { + \\"\\"\\" + Return super_users where all of the related super_friends match this filter + \\"\\"\\" + all: super_friendWhere + \\"\\"\\" + Return super_users where none of the related super_friends match this filter + \\"\\"\\" + none: super_friendWhere + \\"\\"\\" + Return super_users where one of the related super_friends match this filter + \\"\\"\\" + single: super_friendWhere + \\"\\"\\" + Return super_users where some of the related super_friends match this filter + \\"\\"\\" + some: super_friendWhere + } + input super_userMy_friendUpdateConnectionInput { node: super_friendUpdateInput } @@ -330,7 +368,9 @@ describe("Pluralize consistency", () => { AND: [super_userWhere!] NOT: super_userWhere OR: [super_userWhere!] + my_friend: super_userMy_friendRelationshipFilters my_friendAggregate: super_userMy_friendAggregateInput + my_friendConnection: super_userMy_friendConnectionFilters \\"\\"\\" Return super_users where all of the related super_userMy_friendConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/query-direction.test.ts b/packages/graphql/tests/schema/query-direction.test.ts index db8670aa8a..c2611ae44c 100644 --- a/packages/graphql/tests/schema/query-direction.test.ts +++ b/packages/graphql/tests/schema/query-direction.test.ts @@ -183,6 +183,25 @@ describe("Query Direction", () => { totalCount: Int! } + input UserFriendsConnectionFilters { + \\"\\"\\" + Return Users where all of the related UserFriendsConnections match this filter + \\"\\"\\" + all: UserFriendsConnectionWhere + \\"\\"\\" + Return Users where none of the related UserFriendsConnections match this filter + \\"\\"\\" + none: UserFriendsConnectionWhere + \\"\\"\\" + Return Users where one of the related UserFriendsConnections match this filter + \\"\\"\\" + single: UserFriendsConnectionWhere + \\"\\"\\" + Return Users where some of the related UserFriendsConnections match this filter + \\"\\"\\" + some: UserFriendsConnectionWhere + } + input UserFriendsConnectionSort { node: UserSort } @@ -239,6 +258,17 @@ describe("Query Direction", () => { node: User! } + input UserFriendsRelationshipFilters { + \\"\\"\\"Return Users where all of the related Users match this filter\\"\\"\\" + all: UserWhere + \\"\\"\\"Return Users where none of the related Users match this filter\\"\\"\\" + none: UserWhere + \\"\\"\\"Return Users where one of the related Users match this filter\\"\\"\\" + single: UserWhere + \\"\\"\\"Return Users where some of the related Users match this filter\\"\\"\\" + some: UserWhere + } + input UserFriendsUpdateConnectionInput { node: UserUpdateInput } @@ -277,7 +307,9 @@ describe("Query Direction", () => { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] + friends: UserFriendsRelationshipFilters friendsAggregate: UserFriendsAggregateInput + friendsConnection: UserFriendsConnectionFilters \\"\\"\\" Return Users where all of the related UserFriendsConnections match this filter \\"\\"\\" @@ -478,6 +510,25 @@ describe("Query Direction", () => { totalCount: Int! } + input UserFriendsConnectionFilters { + \\"\\"\\" + Return Users where all of the related UserFriendsConnections match this filter + \\"\\"\\" + all: UserFriendsConnectionWhere + \\"\\"\\" + Return Users where none of the related UserFriendsConnections match this filter + \\"\\"\\" + none: UserFriendsConnectionWhere + \\"\\"\\" + Return Users where one of the related UserFriendsConnections match this filter + \\"\\"\\" + single: UserFriendsConnectionWhere + \\"\\"\\" + Return Users where some of the related UserFriendsConnections match this filter + \\"\\"\\" + some: UserFriendsConnectionWhere + } + input UserFriendsConnectionSort { node: UserSort } @@ -534,6 +585,17 @@ describe("Query Direction", () => { node: User! } + input UserFriendsRelationshipFilters { + \\"\\"\\"Return Users where all of the related Users match this filter\\"\\"\\" + all: UserWhere + \\"\\"\\"Return Users where none of the related Users match this filter\\"\\"\\" + none: UserWhere + \\"\\"\\"Return Users where one of the related Users match this filter\\"\\"\\" + single: UserWhere + \\"\\"\\"Return Users where some of the related Users match this filter\\"\\"\\" + some: UserWhere + } + input UserFriendsUpdateConnectionInput { node: UserUpdateInput } @@ -572,7 +634,9 @@ describe("Query Direction", () => { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] + friends: UserFriendsRelationshipFilters friendsAggregate: UserFriendsAggregateInput + friendsConnection: UserFriendsConnectionFilters \\"\\"\\" Return Users where all of the related UserFriendsConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts b/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts index f3f416d233..6f4a5ce461 100644 --- a/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts @@ -115,6 +115,25 @@ describe("Arrays Methods", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { edge: ActedInSort node: MovieSort @@ -190,6 +209,17 @@ describe("Arrays Methods", () => { properties: ActedIn! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorActedInUpdateConnectionInput { edge: ActedInUpdateInput node: MovieUpdateInput @@ -261,7 +291,9 @@ describe("Arrays Methods", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -410,6 +442,25 @@ describe("Arrays Methods", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { edge: ActedInSort node: ActorSort @@ -470,6 +521,17 @@ describe("Arrays Methods", () => { properties: ActedIn! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { edge: ActedInUpdateInput node: ActorUpdateInput @@ -543,7 +605,9 @@ describe("Arrays Methods", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/remove-deprecated/comments.test.ts b/packages/graphql/tests/schema/remove-deprecated/comments.test.ts index 19ef6b29ba..55947411a4 100644 --- a/packages/graphql/tests/schema/remove-deprecated/comments.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/comments.test.ts @@ -477,6 +477,25 @@ describe("Comments", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: ActorSort } @@ -531,6 +550,17 @@ describe("Comments", () => { node: Actor! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -579,7 +609,9 @@ describe("Comments", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -823,6 +855,25 @@ describe("Comments", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { edge: ActedInSort node: ProductionSort @@ -881,6 +932,17 @@ describe("Comments", () => { properties: ActedIn! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ActorActedInUpdateConnectionInput { edge: ActedInUpdateInput node: ProductionUpdateInput @@ -944,7 +1006,9 @@ describe("Comments", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -1470,6 +1534,25 @@ describe("Comments", () => { totalCount: Int! } + input MovieSearchConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieSearchConnections match this filter + \\"\\"\\" + all: MovieSearchConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieSearchConnections match this filter + \\"\\"\\" + none: MovieSearchConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieSearchConnections match this filter + \\"\\"\\" + single: MovieSearchConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieSearchConnections match this filter + \\"\\"\\" + some: MovieSearchConnectionWhere + } + input MovieSearchConnectionWhere { Genre: MovieSearchGenreConnectionWhere Movie: MovieSearchMovieConnectionWhere @@ -1580,6 +1663,17 @@ describe("Comments", () => { node: Search! } + input MovieSearchRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Searches match this filter\\"\\"\\" + all: SearchWhere + \\"\\"\\"Return Movies where none of the related Searches match this filter\\"\\"\\" + none: SearchWhere + \\"\\"\\"Return Movies where one of the related Searches match this filter\\"\\"\\" + single: SearchWhere + \\"\\"\\"Return Movies where some of the related Searches match this filter\\"\\"\\" + some: SearchWhere + } + input MovieSearchUpdateInput { Genre: [MovieSearchGenreUpdateFieldInput!] Movie: [MovieSearchMovieUpdateFieldInput!] @@ -1607,6 +1701,8 @@ describe("Comments", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID + search: MovieSearchRelationshipFilters + searchConnection: MovieSearchConnectionFilters \\"\\"\\" Return Movies where all of the related MovieSearchConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/string-comparators.test.ts b/packages/graphql/tests/schema/string-comparators.test.ts index 252acf372a..8554ff06b3 100644 --- a/packages/graphql/tests/schema/string-comparators.test.ts +++ b/packages/graphql/tests/schema/string-comparators.test.ts @@ -623,6 +623,25 @@ describe("String Comparators", () => { totalCount: Int! } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + all: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + none: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + single: ActorActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + some: ActorActedInConnectionWhere + } + input ActorActedInConnectionSort { edge: ActedInSort node: MovieSort @@ -683,6 +702,17 @@ describe("String Comparators", () => { properties: ActedIn! } + input ActorActedInRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorActedInUpdateConnectionInput { edge: ActedInUpdateInput node: MovieUpdateInput @@ -758,7 +788,9 @@ describe("String Comparators", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ActorActedInRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" @@ -873,6 +905,25 @@ describe("String Comparators", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { edge: ActedInSort node: ActorSort @@ -933,6 +984,17 @@ describe("String Comparators", () => { properties: ActedIn! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { edge: ActedInUpdateInput node: ActorUpdateInput @@ -994,7 +1056,9 @@ describe("String Comparators", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/subscriptions.test.ts b/packages/graphql/tests/schema/subscriptions.test.ts index 706aafce8a..bd3a9574ad 100644 --- a/packages/graphql/tests/schema/subscriptions.test.ts +++ b/packages/graphql/tests/schema/subscriptions.test.ts @@ -272,6 +272,25 @@ describe("Subscriptions", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: ActorSort } @@ -326,6 +345,17 @@ describe("Subscriptions", () => { node: Actor! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -452,7 +482,9 @@ describe("Subscriptions", () => { actorCount_IN: [Int] actorCount_LT: Int actorCount_LTE: Int + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -694,6 +726,25 @@ describe("Subscriptions", () => { totalCount: Int! } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + all: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + none: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + single: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + some: ActorMoviesConnectionWhere + } + input ActorMoviesConnectionSort { node: MovieSort } @@ -785,6 +836,17 @@ describe("Subscriptions", () => { node: Movie! } + input ActorMoviesRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -811,7 +873,9 @@ describe("Subscriptions", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: ActorMoviesRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" @@ -972,6 +1036,25 @@ describe("Subscriptions", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionWhere { AND: [MovieActorsConnectionWhere!] NOT: MovieActorsConnectionWhere @@ -1003,6 +1086,17 @@ describe("Subscriptions", () => { node: Actor! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -1141,7 +1235,9 @@ describe("Subscriptions", () => { actorCount_IN: [Int] actorCount_LT: Int actorCount_LTE: Int + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -1414,6 +1510,25 @@ describe("Subscriptions", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionWhere { Person: MovieActorsPersonConnectionWhere Star: MovieActorsStarConnectionWhere @@ -1483,6 +1598,17 @@ describe("Subscriptions", () => { node: Actor! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsStarConnectFieldInput { connect: [StarConnectInput!] where: StarConnectWhere @@ -1657,6 +1783,8 @@ describe("Subscriptions", () => { actorCount_IN: [Int] actorCount_LT: Int actorCount_LTE: Int + actors: MovieActorsRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -1809,6 +1937,25 @@ describe("Subscriptions", () => { totalCount: Int! } + input PersonMoviesConnectionFilters { + \\"\\"\\" + Return People where all of the related PersonMoviesConnections match this filter + \\"\\"\\" + all: PersonMoviesConnectionWhere + \\"\\"\\" + Return People where none of the related PersonMoviesConnections match this filter + \\"\\"\\" + none: PersonMoviesConnectionWhere + \\"\\"\\" + Return People where one of the related PersonMoviesConnections match this filter + \\"\\"\\" + single: PersonMoviesConnectionWhere + \\"\\"\\" + Return People where some of the related PersonMoviesConnections match this filter + \\"\\"\\" + some: PersonMoviesConnectionWhere + } + input PersonMoviesConnectionSort { node: MovieSort } @@ -1900,6 +2047,17 @@ describe("Subscriptions", () => { node: Movie! } + input PersonMoviesRelationshipFilters { + \\"\\"\\"Return People where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return People where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return People where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return People where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input PersonMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -1926,7 +2084,9 @@ describe("Subscriptions", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] + movies: PersonMoviesRelationshipFilters moviesAggregate: PersonMoviesAggregateInput + moviesConnection: PersonMoviesConnectionFilters \\"\\"\\" Return People where all of the related PersonMoviesConnections match this filter \\"\\"\\" @@ -2053,6 +2213,25 @@ describe("Subscriptions", () => { totalCount: Int! } + input StarMoviesConnectionFilters { + \\"\\"\\" + Return Stars where all of the related StarMoviesConnections match this filter + \\"\\"\\" + all: StarMoviesConnectionWhere + \\"\\"\\" + Return Stars where none of the related StarMoviesConnections match this filter + \\"\\"\\" + none: StarMoviesConnectionWhere + \\"\\"\\" + Return Stars where one of the related StarMoviesConnections match this filter + \\"\\"\\" + single: StarMoviesConnectionWhere + \\"\\"\\" + Return Stars where some of the related StarMoviesConnections match this filter + \\"\\"\\" + some: StarMoviesConnectionWhere + } + input StarMoviesConnectionSort { node: MovieSort } @@ -2144,6 +2323,17 @@ describe("Subscriptions", () => { node: Movie! } + input StarMoviesRelationshipFilters { + \\"\\"\\"Return Stars where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Stars where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Stars where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Stars where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input StarMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -2170,7 +2360,9 @@ describe("Subscriptions", () => { AND: [StarWhere!] NOT: StarWhere OR: [StarWhere!] + movies: StarMoviesRelationshipFilters moviesAggregate: StarMoviesAggregateInput + moviesConnection: StarMoviesConnectionFilters \\"\\"\\" Return Stars where all of the related StarMoviesConnections match this filter \\"\\"\\" @@ -2417,6 +2609,25 @@ describe("Subscriptions", () => { totalCount: Int! } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + all: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + none: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + single: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + some: ActorMoviesConnectionWhere + } + input ActorMoviesConnectionSort { node: MovieSort } @@ -2508,6 +2719,17 @@ describe("Subscriptions", () => { node: Movie! } + input ActorMoviesRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -2534,7 +2756,9 @@ describe("Subscriptions", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: ActorMoviesRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" @@ -2702,6 +2926,25 @@ describe("Subscriptions", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { edge: ActedInSort } @@ -2740,6 +2983,17 @@ describe("Subscriptions", () => { properties: ActedIn! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { edge: ActedInUpdateInput node: ActorUpdateInput @@ -2879,7 +3133,9 @@ describe("Subscriptions", () => { actorCount_IN: [Int] actorCount_LT: Int actorCount_LTE: Int + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -3240,6 +3496,25 @@ describe("Subscriptions", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { node: ActorSort } @@ -3294,6 +3569,17 @@ describe("Subscriptions", () => { node: Actor! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { node: ActorUpdateInput } @@ -3366,7 +3652,9 @@ describe("Subscriptions", () => { actorCount_IN: [Int] actorCount_LT: Int actorCount_LTE: Int + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -3655,6 +3943,25 @@ describe("Subscriptions", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionWhere { Person: MovieActorsPersonConnectionWhere Star: MovieActorsStarConnectionWhere @@ -3724,6 +4031,17 @@ describe("Subscriptions", () => { node: Actor! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsStarConnectFieldInput { connect: [StarConnectInput!] where: StarConnectWhere @@ -3898,6 +4216,8 @@ describe("Subscriptions", () => { actorCount_IN: [Int] actorCount_LT: Int actorCount_LTE: Int + actors: MovieActorsRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -4050,6 +4370,25 @@ describe("Subscriptions", () => { totalCount: Int! } + input PersonMoviesConnectionFilters { + \\"\\"\\" + Return People where all of the related PersonMoviesConnections match this filter + \\"\\"\\" + all: PersonMoviesConnectionWhere + \\"\\"\\" + Return People where none of the related PersonMoviesConnections match this filter + \\"\\"\\" + none: PersonMoviesConnectionWhere + \\"\\"\\" + Return People where one of the related PersonMoviesConnections match this filter + \\"\\"\\" + single: PersonMoviesConnectionWhere + \\"\\"\\" + Return People where some of the related PersonMoviesConnections match this filter + \\"\\"\\" + some: PersonMoviesConnectionWhere + } + input PersonMoviesConnectionSort { node: MovieSort } @@ -4141,6 +4480,17 @@ describe("Subscriptions", () => { node: Movie! } + input PersonMoviesRelationshipFilters { + \\"\\"\\"Return People where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return People where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return People where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return People where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input PersonMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -4167,7 +4517,9 @@ describe("Subscriptions", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] + movies: PersonMoviesRelationshipFilters moviesAggregate: PersonMoviesAggregateInput + moviesConnection: PersonMoviesConnectionFilters \\"\\"\\" Return People where all of the related PersonMoviesConnections match this filter \\"\\"\\" @@ -4284,6 +4636,25 @@ describe("Subscriptions", () => { totalCount: Int! } + input StarMoviesConnectionFilters { + \\"\\"\\" + Return Stars where all of the related StarMoviesConnections match this filter + \\"\\"\\" + all: StarMoviesConnectionWhere + \\"\\"\\" + Return Stars where none of the related StarMoviesConnections match this filter + \\"\\"\\" + none: StarMoviesConnectionWhere + \\"\\"\\" + Return Stars where one of the related StarMoviesConnections match this filter + \\"\\"\\" + single: StarMoviesConnectionWhere + \\"\\"\\" + Return Stars where some of the related StarMoviesConnections match this filter + \\"\\"\\" + some: StarMoviesConnectionWhere + } + input StarMoviesConnectionSort { node: MovieSort } @@ -4375,6 +4746,17 @@ describe("Subscriptions", () => { node: Movie! } + input StarMoviesRelationshipFilters { + \\"\\"\\"Return Stars where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Stars where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Stars where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Stars where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input StarMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -4396,7 +4778,9 @@ describe("Subscriptions", () => { AND: [StarWhere!] NOT: StarWhere OR: [StarWhere!] + movies: StarMoviesRelationshipFilters moviesAggregate: StarMoviesAggregateInput + moviesConnection: StarMoviesConnectionFilters \\"\\"\\" Return Stars where all of the related StarMoviesConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/union-interface-relationship.test.ts b/packages/graphql/tests/schema/union-interface-relationship.test.ts index 727e8ce2e7..f5e9b7805c 100644 --- a/packages/graphql/tests/schema/union-interface-relationship.test.ts +++ b/packages/graphql/tests/schema/union-interface-relationship.test.ts @@ -223,6 +223,25 @@ describe("Union Interface Relationships", () => { totalCount: Int! } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorMoviesConnections match this filter + \\"\\"\\" + all: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorMoviesConnections match this filter + \\"\\"\\" + none: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorMoviesConnections match this filter + \\"\\"\\" + single: ActorMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorMoviesConnections match this filter + \\"\\"\\" + some: ActorMoviesConnectionWhere + } + input ActorMoviesConnectionSort { edge: ActedInSort node: MovieSort @@ -303,6 +322,17 @@ describe("Union Interface Relationships", () => { properties: ActedIn! } + input ActorMoviesRelationshipFilters { + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input ActorMoviesUpdateConnectionInput { edge: ActedInUpdateInput node: MovieUpdateInput @@ -344,7 +374,9 @@ describe("Union Interface Relationships", () => { id_IN: [Int] id_LT: Int id_LTE: Int + movies: ActorMoviesRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" @@ -606,6 +638,25 @@ describe("Union Interface Relationships", () => { totalCount: Int! } + input MovieActorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + all: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + none: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + single: MovieActorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + some: MovieActorsConnectionWhere + } + input MovieActorsConnectionSort { edge: ActedInSort node: ActorSort @@ -686,6 +737,17 @@ describe("Union Interface Relationships", () => { properties: ActedIn! } + input MovieActorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input MovieActorsUpdateConnectionInput { edge: ActedInUpdateInput node: ActorUpdateInput @@ -789,6 +851,25 @@ describe("Union Interface Relationships", () => { totalCount: Int! } + input MovieDirectorsConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieDirectorsConnections match this filter + \\"\\"\\" + all: MovieDirectorsConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieDirectorsConnections match this filter + \\"\\"\\" + none: MovieDirectorsConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieDirectorsConnections match this filter + \\"\\"\\" + single: MovieDirectorsConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieDirectorsConnections match this filter + \\"\\"\\" + some: MovieDirectorsConnectionWhere + } + input MovieDirectorsConnectionSort { edge: DirectedSort } @@ -867,6 +948,17 @@ describe("Union Interface Relationships", () => { properties: Directed! } + input MovieDirectorsRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Directors match this filter\\"\\"\\" + all: DirectorWhere + \\"\\"\\"Return Movies where none of the related Directors match this filter\\"\\"\\" + none: DirectorWhere + \\"\\"\\"Return Movies where one of the related Directors match this filter\\"\\"\\" + single: DirectorWhere + \\"\\"\\"Return Movies where some of the related Directors match this filter\\"\\"\\" + some: DirectorWhere + } + input MovieDirectorsUpdateInput { Actor: [MovieDirectorsActorUpdateFieldInput!] Person: [MovieDirectorsPersonUpdateFieldInput!] @@ -922,6 +1014,25 @@ describe("Union Interface Relationships", () => { totalCount: Int! } + input MovieReviewersConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieReviewersConnections match this filter + \\"\\"\\" + all: MovieReviewersConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieReviewersConnections match this filter + \\"\\"\\" + none: MovieReviewersConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieReviewersConnections match this filter + \\"\\"\\" + single: MovieReviewersConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieReviewersConnections match this filter + \\"\\"\\" + some: MovieReviewersConnectionWhere + } + input MovieReviewersConnectionSort { edge: ReviewSort node: ReviewerSort @@ -1005,6 +1116,17 @@ describe("Union Interface Relationships", () => { properties: Review! } + input MovieReviewersRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Reviewers match this filter\\"\\"\\" + all: ReviewerWhere + \\"\\"\\"Return Movies where none of the related Reviewers match this filter\\"\\"\\" + none: ReviewerWhere + \\"\\"\\"Return Movies where one of the related Reviewers match this filter\\"\\"\\" + single: ReviewerWhere + \\"\\"\\"Return Movies where some of the related Reviewers match this filter\\"\\"\\" + some: ReviewerWhere + } + input MovieReviewersUpdateConnectionInput { edge: ReviewUpdateInput node: ReviewerUpdateInput @@ -1041,7 +1163,9 @@ describe("Union Interface Relationships", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: MovieActorsRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -1066,6 +1190,8 @@ describe("Union Interface Relationships", () => { actors_SINGLE: ActorWhere \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" actors_SOME: ActorWhere + directors: MovieDirectorsRelationshipFilters + directorsConnection: MovieDirectorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieDirectorsConnections match this filter \\"\\"\\" @@ -1097,7 +1223,9 @@ describe("Union Interface Relationships", () => { imdbId_IN: [Int] imdbId_LT: Int imdbId_LTE: Int + reviewers: MovieReviewersRelationshipFilters reviewersAggregate: MovieReviewersAggregateInput + reviewersConnection: MovieReviewersConnectionFilters \\"\\"\\" Return Movies where all of the related MovieReviewersConnections match this filter \\"\\"\\" @@ -1252,6 +1380,25 @@ describe("Union Interface Relationships", () => { totalCount: Int! } + input PersonMoviesConnectionFilters { + \\"\\"\\" + Return People where all of the related PersonMoviesConnections match this filter + \\"\\"\\" + all: PersonMoviesConnectionWhere + \\"\\"\\" + Return People where none of the related PersonMoviesConnections match this filter + \\"\\"\\" + none: PersonMoviesConnectionWhere + \\"\\"\\" + Return People where one of the related PersonMoviesConnections match this filter + \\"\\"\\" + single: PersonMoviesConnectionWhere + \\"\\"\\" + Return People where some of the related PersonMoviesConnections match this filter + \\"\\"\\" + some: PersonMoviesConnectionWhere + } + input PersonMoviesConnectionSort { edge: ReviewSort node: MovieSort @@ -1332,6 +1479,17 @@ describe("Union Interface Relationships", () => { properties: Review! } + input PersonMoviesRelationshipFilters { + \\"\\"\\"Return People where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Return People where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Return People where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Return People where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input PersonMoviesUpdateConnectionInput { edge: ReviewUpdateInput node: MovieUpdateInput @@ -1381,7 +1539,9 @@ describe("Union Interface Relationships", () => { id_IN: [Int] id_LT: Int id_LTE: Int + movies: PersonMoviesRelationshipFilters moviesAggregate: PersonMoviesAggregateInput + moviesConnection: PersonMoviesConnectionFilters \\"\\"\\" Return People where all of the related PersonMoviesConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/schema/unions.test.ts b/packages/graphql/tests/schema/unions.test.ts index 0c9d19ea7d..06ce12f5b4 100644 --- a/packages/graphql/tests/schema/unions.test.ts +++ b/packages/graphql/tests/schema/unions.test.ts @@ -191,6 +191,25 @@ describe("Unions", () => { totalCount: Int! } + input MovieSearchConnectionFilters { + \\"\\"\\" + Return Movies where all of the related MovieSearchConnections match this filter + \\"\\"\\" + all: MovieSearchConnectionWhere + \\"\\"\\" + Return Movies where none of the related MovieSearchConnections match this filter + \\"\\"\\" + none: MovieSearchConnectionWhere + \\"\\"\\" + Return Movies where one of the related MovieSearchConnections match this filter + \\"\\"\\" + single: MovieSearchConnectionWhere + \\"\\"\\" + Return Movies where some of the related MovieSearchConnections match this filter + \\"\\"\\" + some: MovieSearchConnectionWhere + } + input MovieSearchConnectionWhere { Genre: MovieSearchGenreConnectionWhere Movie: MovieSearchMovieConnectionWhere @@ -301,6 +320,17 @@ describe("Unions", () => { node: Search! } + input MovieSearchRelationshipFilters { + \\"\\"\\"Return Movies where all of the related Searches match this filter\\"\\"\\" + all: SearchWhere + \\"\\"\\"Return Movies where none of the related Searches match this filter\\"\\"\\" + none: SearchWhere + \\"\\"\\"Return Movies where one of the related Searches match this filter\\"\\"\\" + single: SearchWhere + \\"\\"\\"Return Movies where some of the related Searches match this filter\\"\\"\\" + some: SearchWhere + } + input MovieSearchUpdateInput { Genre: [MovieSearchGenreUpdateFieldInput!] Movie: [MovieSearchMovieUpdateFieldInput!] @@ -328,6 +358,8 @@ describe("Unions", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID + search: MovieSearchRelationshipFilters + searchConnection: MovieSearchConnectionFilters \\"\\"\\" Return Movies where all of the related MovieSearchConnections match this filter \\"\\"\\" diff --git a/packages/graphql/tests/tck/advanced-filtering.test.ts b/packages/graphql/tests/tck/advanced-filtering.test.ts index 04960badb9..6e52309bf5 100644 --- a/packages/graphql/tests/tck/advanced-filtering.test.ts +++ b/packages/graphql/tests/tck/advanced-filtering.test.ts @@ -542,7 +542,7 @@ describe("Cypher Advanced Filtering", () => { test("equality", async () => { const query = /* GraphQL */ ` { - movies(where: { genres_SOME: { name: { equals: "some genre" } } }) { + movies(where: { genres: { some: { name: { equals: "some genre" } } } }) { actorCount } } @@ -566,46 +566,19 @@ describe("Cypher Advanced Filtering", () => { `); }); - test("NONE", async () => { - const query = /* GraphQL */ ` - { - movies(where: { genres_NONE: { name: { equals: "some genre" } } }) { - actorCount - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) - WHERE NOT (EXISTS { - MATCH (this)-[:IN_GENRE]->(this0:Genre) - WHERE this0.name = $param0 - }) - RETURN this { .actorCount } AS this" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(` - "{ - \\"param0\\": \\"some genre\\" - }" - `); - }); - describe("List Predicates", () => { - const generateQuery = (operator: "ALL" | "NONE" | "SINGLE" | "SOME"): string => { + const generateQuery = (operator: "all" | "none" | "single" | "some"): string => { const query = /* GraphQL */ ` { - movies(where: { genres_${operator}: { name: { equals: "some genre" } } }) { + movies(where: { genres: { ${operator}: { name: { equals: "some genre" } } } }) { actorCount } } `; return query; }; - test("ALL", async () => { - const query = generateQuery("ALL"); + test("all", async () => { + const query = generateQuery("all"); const result = await translateQuery(neoSchema, query); @@ -626,8 +599,9 @@ describe("Cypher Advanced Filtering", () => { }" `); }); - test("NONE", async () => { - const query = generateQuery("NONE"); + + test("none", async () => { + const query = generateQuery("none"); const result = await translateQuery(neoSchema, query); @@ -645,8 +619,9 @@ describe("Cypher Advanced Filtering", () => { }" `); }); - test("SINGLE", async () => { - const query = generateQuery("SINGLE"); + + test("single", async () => { + const query = generateQuery("single"); const result = await translateQuery(neoSchema, query); @@ -661,8 +636,8 @@ describe("Cypher Advanced Filtering", () => { }" `); }); - test("SOME", async () => { - const query = generateQuery("SOME"); + test("some", async () => { + const query = generateQuery("some"); const result = await translateQuery(neoSchema, query); @@ -687,7 +662,7 @@ describe("Cypher Advanced Filtering", () => { test("Node and relationship properties equality", async () => { const query = /* GraphQL */ ` { - movies(where: { genresConnection_SOME: { node: { name: { equals: "some genre" } } } }) { + movies(where: { genresConnection: { some: { node: { name: { equals: "some genre" } } } } }) { actorCount } } @@ -714,7 +689,7 @@ describe("Cypher Advanced Filtering", () => { test("Node and relationship properties NONE", async () => { const query = /* GraphQL */ ` { - movies(where: { genresConnection_NONE: { node: { name: { equals: "some genre" } } } }) { + movies(where: { genresConnection: { none: { node: { name: { equals: "some genre" } } } } }) { actorCount } } @@ -739,18 +714,18 @@ describe("Cypher Advanced Filtering", () => { }); describe("List Predicates", () => { - const generateQuery = (operator: "ALL" | "NONE" | "SINGLE" | "SOME"): string => { + const generateQuery = (operator: "all" | "none" | "single" | "some"): string => { const query = /* GraphQL */ ` { - movies(where: { genresConnection_${operator}: { node: { name: { equals: "some genre" }} } }) { + movies(where: { genresConnection: { ${operator}: { node: { name: { equals: "some genre" }} } } }) { actorCount } } `; return query; }; - test("ALL", async () => { - const query = generateQuery("ALL"); + test("all", async () => { + const query = generateQuery("all"); const result = await translateQuery(neoSchema, query); @@ -771,8 +746,8 @@ describe("Cypher Advanced Filtering", () => { }" `); }); - test("NONE", async () => { - const query = generateQuery("NONE"); + test("none", async () => { + const query = generateQuery("none"); const result = await translateQuery(neoSchema, query); @@ -790,8 +765,8 @@ describe("Cypher Advanced Filtering", () => { }" `); }); - test("SINGLE", async () => { - const query = generateQuery("SINGLE"); + test("single", async () => { + const query = generateQuery("single"); const result = await translateQuery(neoSchema, query); @@ -806,8 +781,8 @@ describe("Cypher Advanced Filtering", () => { }" `); }); - test("SOME", async () => { - const query = generateQuery("SOME"); + test("some", async () => { + const query = generateQuery("some"); const result = await translateQuery(neoSchema, query); diff --git a/packages/graphql/tests/tck/deprecated/generic-filtering/advanced-filtering-deprecated.test.ts b/packages/graphql/tests/tck/deprecated/generic-filtering/advanced-filtering-deprecated.test.ts index 8537d95938..2b760ecfe6 100644 --- a/packages/graphql/tests/tck/deprecated/generic-filtering/advanced-filtering-deprecated.test.ts +++ b/packages/graphql/tests/tck/deprecated/generic-filtering/advanced-filtering-deprecated.test.ts @@ -60,30 +60,6 @@ describe("Cypher Advanced Filtering - deprecated", () => { }); }); - test("implicit EQ", async () => { - const query = /* GraphQL */ ` - { - movies(where: { title_EQ: "The Matrix" }) { - title - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) - WHERE this.title = $param0 - RETURN this { .title } AS this" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(` - "{ - \\"param0\\": \\"The Matrix\\" - }" - `); - }); - test("EQ", async () => { const query = /* GraphQL */ ` { diff --git a/packages/graphql/tests/tck/null.test.ts b/packages/graphql/tests/tck/null.test.ts index 2747bacb07..2b9647dbd6 100644 --- a/packages/graphql/tests/tck/null.test.ts +++ b/packages/graphql/tests/tck/null.test.ts @@ -106,6 +106,28 @@ describe("Cypher NULL", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); }); + test("Simple connection relationship IS NULL", async () => { + const query = /* GraphQL */ ` + query { + movies(where: { actorsConnection_SOME: null }) { + title + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE NOT (EXISTS { + MATCH (this)<-[:ACTED_IN]-(this0:Actor) + }) + RETURN this { .title } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); + }); + test("Simple relationship IS NOT NULL", async () => { const query = /* GraphQL */ ` query { From 70f1c67b8729eb2d26d62a024bcc5aa98bcc2a8f Mon Sep 17 00:00:00 2001 From: MacondoExpress Date: Thu, 5 Dec 2024 18:15:38 +0000 Subject: [PATCH 2/7] fix aggregation inside relationship filters --- .../queryAST/ast/filters/RelationshipFilter.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/graphql/src/translate/queryAST/ast/filters/RelationshipFilter.ts b/packages/graphql/src/translate/queryAST/ast/filters/RelationshipFilter.ts index 7c205be053..b76eebe8ff 100644 --- a/packages/graphql/src/translate/queryAST/ast/filters/RelationshipFilter.ts +++ b/packages/graphql/src/translate/queryAST/ast/filters/RelationshipFilter.ts @@ -191,8 +191,8 @@ export class RelationshipFilter extends Filter { // NOTE: NONE is SOME + isNot // TODO: move to wrapInNullIfNeeded in getPredicate - // const comparator = this.isNot ? Cypher.false : Cypher.true; - this.subqueryPredicate = Cypher.eq(returnVar, Cypher.true); + const comparator = this.operator === "NONE" ? Cypher.false : Cypher.true; + this.subqueryPredicate = Cypher.eq(returnVar, comparator); const withAfterSubqueries = new Cypher.With("*"); @@ -268,11 +268,7 @@ export class RelationshipFilter extends Filter { switch (this.operator) { case "NONE": case "SOME": - if (this.relationship.isList) { - return Cypher.gt(Cypher.count(target), new Cypher.Literal(0)); - } else { - return Cypher.eq(Cypher.count(target), new Cypher.Literal(1)); - } + return Cypher.gt(Cypher.count(target), new Cypher.Literal(0)); case "SINGLE": return Cypher.eq(Cypher.count(target), new Cypher.Literal(1)); case "ALL": @@ -318,6 +314,9 @@ export class RelationshipFilter extends Filter { // if (this.isNot) { // return Cypher.and(Cypher.eq(this.countVariable, new Cypher.Literal(0)), innerPredicate); // } else { + if (this.operator === "NONE") { + throw new Error("WHOOO"); + } return Cypher.and(Cypher.neq(this.countVariable, new Cypher.Literal(0)), innerPredicate); // } } From 940dfda0e03297aebf98fa8e669db56cbf07584f Mon Sep 17 00:00:00 2001 From: MacondoExpress Date: Fri, 6 Dec 2024 15:12:58 +0000 Subject: [PATCH 3/7] remove isNot from relationship filters and remove relationship filters against null values --- .../ast/filters/RelationshipFilter.ts | 63 +-------------- .../AuthRelationshipFilter.ts | 17 +--- .../advanced-filtering-deprecated.int.test.ts | 60 --------------- .../filtering/advanced-filtering.int.test.ts | 60 --------------- .../tests/integration/issues/4667.int.test.ts | 77 ------------------- .../tests/tck/advanced-filtering.test.ts | 22 ++++++ packages/graphql/tests/tck/null.test.ts | 66 ---------------- 7 files changed, 27 insertions(+), 338 deletions(-) delete mode 100644 packages/graphql/tests/integration/issues/4667.int.test.ts diff --git a/packages/graphql/src/translate/queryAST/ast/filters/RelationshipFilter.ts b/packages/graphql/src/translate/queryAST/ast/filters/RelationshipFilter.ts index b76eebe8ff..33b6c5e702 100644 --- a/packages/graphql/src/translate/queryAST/ast/filters/RelationshipFilter.ts +++ b/packages/graphql/src/translate/queryAST/ast/filters/RelationshipFilter.ts @@ -189,8 +189,6 @@ export class RelationshipFilter extends Filter { const subqueriesPredicate = Cypher.and(...subqueriesFilters); - // NOTE: NONE is SOME + isNot - // TODO: move to wrapInNullIfNeeded in getPredicate const comparator = this.operator === "NONE" ? Cypher.false : Cypher.true; this.subqueryPredicate = Cypher.eq(returnVar, comparator); @@ -276,51 +274,12 @@ export class RelationshipFilter extends Filter { } } - protected shouldCreateOptionalMatch(): boolean { - return !this.relationship.isList && !this.relationship.isNullable; - } - - public getSelection(queryASTContext: QueryASTContext): Array { - if (this.shouldCreateOptionalMatch() && !this.subqueryPredicate) { - const nestedContext = this.getNestedContext(queryASTContext); - if (!nestedContext.hasTarget()) { - throw new Error("No parent node found!"); - } - - const pattern = new Cypher.Pattern(nestedContext.source) - .related({ - type: this.relationship.type, - direction: this.relationship.getCypherDirection(), - }) - .to(nestedContext.target, { - labels: getEntityLabels(this.target, nestedContext.neo4jGraphQLContext), - }); - return [ - new Cypher.OptionalMatch(pattern).with("*", [Cypher.count(nestedContext.target), this.countVariable]), - ]; - } - return []; - } - public getPredicate(queryASTContext: QueryASTContext): Cypher.Predicate | undefined { if (this.subqueryPredicate) { return this.subqueryPredicate; } const nestedContext = this.getNestedContext(queryASTContext); - if (this.shouldCreateOptionalMatch()) { - const predicates = this.targetNodeFilters.map((c) => c.getPredicate(nestedContext)); - const innerPredicate = Cypher.and(...predicates); - // if (this.isNot) { - // return Cypher.and(Cypher.eq(this.countVariable, new Cypher.Literal(0)), innerPredicate); - // } else { - if (this.operator === "NONE") { - throw new Error("WHOOO"); - } - return Cypher.and(Cypher.neq(this.countVariable, new Cypher.Literal(0)), innerPredicate); - // } - } - const pattern = new Cypher.Pattern(nestedContext.source as Cypher.Node) .related({ type: this.relationship.type, @@ -384,20 +343,9 @@ export class RelationshipFilter extends Filter { case "SOME": { const match = new Cypher.Match(pattern); if (innerPredicate) { - if (!this.relationship.isList) { - return this.getSingleRelationshipOperation({ - pattern, - queryASTContext, - innerPredicate, - }); - } - - const exists = new Cypher.Exists(match.where(innerPredicate)); - if (this.operator === "NONE") { - return Cypher.not(exists); - } - return exists; + match.where(innerPredicate); } + const exists = new Cypher.Exists(match); if (this.operator === "NONE") { return Cypher.not(exists); @@ -406,11 +354,4 @@ export class RelationshipFilter extends Filter { } } } - - // protected wrapInNotIfNeeded(predicate: Cypher.Predicate): Cypher.Predicate { - // if (this.isNot) { - // return Cypher.not(predicate); - // } - // return predicate; - // } } diff --git a/packages/graphql/src/translate/queryAST/ast/filters/authorization-filters/AuthRelationshipFilter.ts b/packages/graphql/src/translate/queryAST/ast/filters/authorization-filters/AuthRelationshipFilter.ts index 777354b404..e924a6eb74 100644 --- a/packages/graphql/src/translate/queryAST/ast/filters/authorization-filters/AuthRelationshipFilter.ts +++ b/packages/graphql/src/translate/queryAST/ast/filters/authorization-filters/AuthRelationshipFilter.ts @@ -24,14 +24,10 @@ import { RelationshipFilter } from "../RelationshipFilter"; export class AuthRelationshipFilter extends RelationshipFilter { public getPredicate(queryASTContext: QueryASTContext): Cypher.Predicate | undefined { - if (this.subqueryPredicate) return this.subqueryPredicate; - const nestedContext = this.getNestedContext(queryASTContext); - - if (this.shouldCreateOptionalMatch()) { - const predicates = this.targetNodeFilters.map((c) => c.getPredicate(nestedContext)); - const innerPredicate = Cypher.and(...predicates); - return Cypher.and(Cypher.neq(this.countVariable, new Cypher.Literal(0)), innerPredicate); + if (this.subqueryPredicate) { + return this.subqueryPredicate; } + const nestedContext = this.getNestedContext(queryASTContext); const pattern = new Cypher.Pattern(nestedContext.source as Cypher.Node) .related({ @@ -78,13 +74,6 @@ export class AuthRelationshipFilter extends RelationshipFilter { } case "NONE": case "SOME": { - if (!this.relationship.isList && this.relationship.isNullable) { - return this.getSingleRelationshipOperation({ - pattern, - queryASTContext, - innerPredicate, - }); - } if (!useExist) { const patternComprehension = new Cypher.PatternComprehension(pattern).map(new Cypher.Literal(1)); const sizeFunction = Cypher.size(patternComprehension.where(innerPredicate)); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/advanced-filtering-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/advanced-filtering-deprecated.int.test.ts index 5c2518df70..5304ae5505 100644 --- a/packages/graphql/tests/integration/deprecations/generic-filtering/advanced-filtering-deprecated.int.test.ts +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/advanced-filtering-deprecated.int.test.ts @@ -1799,66 +1799,6 @@ describe("Advanced Filtering - deprecated", () => { }); }); }); - - test("should test for not null", async () => { - const randomType1 = testHelper.createUniqueType("Movie"); - const randomType2 = testHelper.createUniqueType("Genre"); - - const typeDefs = ` - type ${randomType1.name} @node { - id: ID - ${randomType2.plural}: [${randomType2.name}!]! @relationship(type: "IN_GENRE", direction: OUT) - } - - type ${randomType2.name} @node { - id: ID - } - `; - - await testHelper.initNeo4jGraphQL({ typeDefs }); - - const rootId = generate({ - charset: "alphabetic", - }); - - const relationId = generate({ - charset: "alphabetic", - }); - - const randomId = generate({ - charset: "alphabetic", - }); - - await testHelper.executeCypher( - ` - CREATE (root:${randomType1.name} {id: $rootId}) - CREATE (:${randomType1.name} {id: $randomId}) - CREATE (relation:${randomType2.name} {id: $relationId}) - CREATE (:${randomType2.name} {id: $randomId}) - MERGE (root)-[:IN_GENRE]->(relation) - `, - { rootId, relationId, randomId } - ); - - const nullQuery = ` - { - ${randomType1.plural}(where: { ${randomType2.plural}_SOME: null }) { - id - } - } - `; - - // Test null checking (nodes without any related nodes on the specified field) - - const nullResult = await testHelper.executeGraphQL(nullQuery); - - expect(nullResult.errors).toBeUndefined(); - - expect((nullResult.data as any)[randomType1.plural]).toHaveLength(1); - expect((nullResult.data as any)[randomType1.plural][0]).toMatchObject({ - id: randomId, - }); - }); }); describe("NULL Filtering", () => { diff --git a/packages/graphql/tests/integration/filtering/advanced-filtering.int.test.ts b/packages/graphql/tests/integration/filtering/advanced-filtering.int.test.ts index c7e8b0b11a..97a1d41802 100644 --- a/packages/graphql/tests/integration/filtering/advanced-filtering.int.test.ts +++ b/packages/graphql/tests/integration/filtering/advanced-filtering.int.test.ts @@ -1798,66 +1798,6 @@ describe("Advanced Filtering", () => { }); }); }); - - test("should test for not null", async () => { - const randomType1 = testHelper.createUniqueType("Movie"); - const randomType2 = testHelper.createUniqueType("Genre"); - - const typeDefs = /* GraphQL */ ` - type ${randomType1.name} @node { - id: ID - ${randomType2.plural}: [${randomType2.name}!]! @relationship(type: "IN_GENRE", direction: OUT) - } - - type ${randomType2.name} @node { - id: ID - } - `; - - await testHelper.initNeo4jGraphQL({ typeDefs }); - - const rootId = generate({ - charset: "alphabetic", - }); - - const relationId = generate({ - charset: "alphabetic", - }); - - const randomId = generate({ - charset: "alphabetic", - }); - - await testHelper.executeCypher( - ` - CREATE (root:${randomType1.name} {id: $rootId}) - CREATE (:${randomType1.name} {id: $randomId}) - CREATE (relation:${randomType2.name} {id: $relationId}) - CREATE (:${randomType2.name} {id: $randomId}) - MERGE (root)-[:IN_GENRE]->(relation) - `, - { rootId, relationId, randomId } - ); - - const nullQuery = /* GraphQL */ ` - { - ${randomType1.plural}(where: { ${randomType2.plural}_SOME: null }) { - id - } - } - `; - - // Test null checking (nodes without any related nodes on the specified field) - - const nullResult = await testHelper.executeGraphQL(nullQuery); - - expect(nullResult.errors).toBeUndefined(); - - expect((nullResult.data as any)[randomType1.plural]).toHaveLength(1); - expect((nullResult.data as any)[randomType1.plural][0]).toMatchObject({ - id: randomId, - }); - }); }); describe("NULL Filtering", () => { diff --git a/packages/graphql/tests/integration/issues/4667.int.test.ts b/packages/graphql/tests/integration/issues/4667.int.test.ts deleted file mode 100644 index c1e4aeb8f0..0000000000 --- a/packages/graphql/tests/integration/issues/4667.int.test.ts +++ /dev/null @@ -1,77 +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 { UniqueType } from "../../utils/graphql-types"; -import { TestHelper } from "../../utils/tests-helper"; - -describe("https://github.com/neo4j/graphql/issues/4667", () => { - const testHelper = new TestHelper(); - - let MyThing: UniqueType; - let MyStuff: UniqueType; - - beforeEach(async () => { - MyThing = testHelper.createUniqueType("MyThing"); - MyStuff = testHelper.createUniqueType("MyStuff"); - - await testHelper.executeCypher(` - CREATE (:${MyThing} {id: "A"})-[:THE_STUFF]->(b1:${MyStuff} {id: "C"}) - CREATE (:${MyThing} {id: "B"}) - `); - }); - - afterEach(async () => { - await testHelper.close(); - }); - - test("when passed null as an argument of a relationship filter should check that a relationship does not exist", async () => { - const typeDefs = /* GraphQL */ ` - type ${MyThing} @node { - id: ID! @id - stuff: [${MyStuff}!]! @relationship(type: "THE_STUFF", direction: OUT) - } - - type ${MyStuff} @node { - id: ID! @id - thing: [${MyThing}!]! @relationship(type: "THE_STUFF", direction: IN) - } - `; - await testHelper.initNeo4jGraphQL({ - typeDefs, - }); - const query = /* GraphQL */ ` - query { - ${MyThing.plural}(where: { stuff_SOME: null }) { - id - stuff { - id - } - } - - } - `; - - const result = await testHelper.executeGraphQL(query); - - expect(result.errors).toBeUndefined(); - expect(result.data).toEqual({ - [MyThing.plural]: expect.toIncludeSameMembers([expect.objectContaining({ id: "B" })]), - }); - }); -}); diff --git a/packages/graphql/tests/tck/advanced-filtering.test.ts b/packages/graphql/tests/tck/advanced-filtering.test.ts index 6e52309bf5..d24e61a39b 100644 --- a/packages/graphql/tests/tck/advanced-filtering.test.ts +++ b/packages/graphql/tests/tck/advanced-filtering.test.ts @@ -538,6 +538,28 @@ describe("Cypher Advanced Filtering", () => { `); }); + test.only("some-> null", async () => { + const query = /* GraphQL */ ` + { + movies(where: { genres: { some: null } }) { + actorCount + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE EXISTS { + MATCH (this)-[:IN_GENRE]->(this0:Genre) + } + RETURN this { .actorCount } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); + }); + describe("Relationships", () => { test("equality", async () => { const query = /* GraphQL */ ` diff --git a/packages/graphql/tests/tck/null.test.ts b/packages/graphql/tests/tck/null.test.ts index 2b9647dbd6..6ab1100b1d 100644 --- a/packages/graphql/tests/tck/null.test.ts +++ b/packages/graphql/tests/tck/null.test.ts @@ -83,70 +83,4 @@ describe("Cypher NULL", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); }); - - test("Simple relationship IS NULL", async () => { - const query = /* GraphQL */ ` - query { - movies(where: { actors_SOME: null }) { - title - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) - WHERE NOT (EXISTS { - MATCH (this)<-[:ACTED_IN]-(this0:Actor) - }) - RETURN this { .title } AS this" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); - - test("Simple connection relationship IS NULL", async () => { - const query = /* GraphQL */ ` - query { - movies(where: { actorsConnection_SOME: null }) { - title - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) - WHERE NOT (EXISTS { - MATCH (this)<-[:ACTED_IN]-(this0:Actor) - }) - RETURN this { .title } AS this" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); - - test("Simple relationship IS NOT NULL", async () => { - const query = /* GraphQL */ ` - query { - movies(where: { NOT: { actors_SOME: null } }) { - title - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) - WHERE NOT (NOT (EXISTS { - MATCH (this)<-[:ACTED_IN]-(this0:Actor) - })) - RETURN this { .title } AS this" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); }); From 2e20b57cb33f223cbba418a6ec202cf0f1e20a0e Mon Sep 17 00:00:00 2001 From: MacondoExpress Date: Fri, 6 Dec 2024 15:28:51 +0000 Subject: [PATCH 4/7] remove neo4j 4.4 implementation branch from relationship filters --- .../ast/filters/RelationshipFilter.ts | 4 - .../AuthRelationshipFilter.ts | 11 -- .../tests/tck/advanced-filtering.test.ts | 22 ---- .../arguments/allow/allow.test.ts | 78 +++++++++--- .../implementation-allow.test.ts | 25 +++- .../arguments/roles-where.test.ts | 115 ++++++++++++++---- .../implementation-bind.test.ts | 10 +- .../arguments/validate/validate.test.ts | 15 ++- .../where/connection-auth-filter.test.ts | 35 ++++-- .../implementation-where.test.ts | 95 ++++++++++++--- .../arguments/where/where.test.ts | 80 +++++++++--- .../projection-connection-union.test.ts | 5 +- .../projection-connection.test.ts | 20 ++- .../node/node-with-auth-projection.test.ts | 5 +- .../graphql/tests/tck/issues/4095.test.ts | 5 +- .../graphql/tests/tck/issues/4115.test.ts | 11 +- .../graphql/tests/tck/issues/4116.test.ts | 8 +- .../graphql/tests/tck/issues/4170.test.ts | 32 ++++- .../graphql/tests/tck/issues/4214.test.ts | 32 ++++- .../graphql/tests/tck/issues/4223.test.ts | 41 ++++++- .../graphql/tests/tck/issues/4239.test.ts | 5 +- .../graphql/tests/tck/issues/4292.test.ts | 58 ++++++++- .../graphql/tests/tck/issues/5023.test.ts | 75 ++++++++++-- packages/graphql/tests/tck/issues/505.test.ts | 100 ++++++++++++++- .../graphql/tests/tck/issues/5066.test.ts | 18 ++- .../graphql/tests/tck/issues/5080.test.ts | 8 +- .../graphql/tests/tck/issues/5143.test.ts | 8 +- .../graphql/tests/tck/issues/5270.test.ts | 8 +- .../graphql/tests/tck/issues/5515.test.ts | 8 +- 29 files changed, 771 insertions(+), 166 deletions(-) diff --git a/packages/graphql/src/translate/queryAST/ast/filters/RelationshipFilter.ts b/packages/graphql/src/translate/queryAST/ast/filters/RelationshipFilter.ts index 33b6c5e702..ba8caa1b52 100644 --- a/packages/graphql/src/translate/queryAST/ast/filters/RelationshipFilter.ts +++ b/packages/graphql/src/translate/queryAST/ast/filters/RelationshipFilter.ts @@ -34,7 +34,6 @@ export class RelationshipFilter extends Filter { protected targetNodeFilters: Filter[] = []; protected relationship: RelationshipAdapter; protected operator: RelationshipWhereOperator; - protected isNot: boolean; protected target: ConcreteEntityAdapter | InterfaceEntityAdapter; // TODO: remove this, this is not good @@ -46,17 +45,14 @@ export class RelationshipFilter extends Filter { constructor({ relationship, operator, - isNot, target, }: { relationship: RelationshipAdapter; operator: RelationshipWhereOperator; - isNot: boolean; target: ConcreteEntityAdapter | InterfaceEntityAdapter; }) { super(); this.relationship = relationship; - this.isNot = isNot; this.operator = operator; this.target = target; diff --git a/packages/graphql/src/translate/queryAST/ast/filters/authorization-filters/AuthRelationshipFilter.ts b/packages/graphql/src/translate/queryAST/ast/filters/authorization-filters/AuthRelationshipFilter.ts index e924a6eb74..8c5ed6f6c7 100644 --- a/packages/graphql/src/translate/queryAST/ast/filters/authorization-filters/AuthRelationshipFilter.ts +++ b/packages/graphql/src/translate/queryAST/ast/filters/authorization-filters/AuthRelationshipFilter.ts @@ -52,14 +52,8 @@ export class AuthRelationshipFilter extends RelationshipFilter { if (!innerPredicate) { return; } - const useExist = queryASTContext.neo4jGraphQLContext.neo4jDatabaseInfo?.gte("5.0"); switch (this.operator) { case "ALL": { - if (!useExist) { - const patternComprehension = new Cypher.PatternComprehension(pattern).map(new Cypher.Literal(1)); - const sizeFunction = Cypher.size(patternComprehension.where(Cypher.not(innerPredicate))); - return Cypher.eq(sizeFunction, new Cypher.Literal(0)); - } const match = new Cypher.Match(pattern).where(innerPredicate); const negativeMatch = new Cypher.Match(pattern).where(Cypher.not(innerPredicate)); // Testing "ALL" requires testing that at least one element exists and that no elements not matching the filter exists @@ -74,11 +68,6 @@ export class AuthRelationshipFilter extends RelationshipFilter { } case "NONE": case "SOME": { - if (!useExist) { - const patternComprehension = new Cypher.PatternComprehension(pattern).map(new Cypher.Literal(1)); - const sizeFunction = Cypher.size(patternComprehension.where(innerPredicate)); - return Cypher.gt(sizeFunction, new Cypher.Literal(0)); - } const matchClause = new Cypher.Match(pattern).where(innerPredicate); const existsPredicate = new Cypher.Exists(matchClause); return existsPredicate; diff --git a/packages/graphql/tests/tck/advanced-filtering.test.ts b/packages/graphql/tests/tck/advanced-filtering.test.ts index d24e61a39b..6e52309bf5 100644 --- a/packages/graphql/tests/tck/advanced-filtering.test.ts +++ b/packages/graphql/tests/tck/advanced-filtering.test.ts @@ -538,28 +538,6 @@ describe("Cypher Advanced Filtering", () => { `); }); - test.only("some-> null", async () => { - const query = /* GraphQL */ ` - { - movies(where: { genres: { some: null } }) { - actorCount - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Movie) - WHERE EXISTS { - MATCH (this)-[:IN_GENRE]->(this0:Genre) - } - RETURN this { .actorCount } AS this" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); - describe("Relationships", () => { test("equality", async () => { const query = /* GraphQL */ ` diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/allow/allow.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/allow/allow.test.ts index 6951c9af5f..c84d8662cc 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/allow/allow.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/allow/allow.test.ts @@ -194,7 +194,10 @@ describe("Cypher Auth Allow", () => { WITH this MATCH (this)-[this0:HAS_POST]->(this1:Post) WITH * - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this1 { .content } AS this1 RETURN collect(this1) AS var3 } @@ -233,7 +236,10 @@ describe("Cypher Auth Allow", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Post) WITH * - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[:HAS_POST]-(this0:User) WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:HAS_POST]-(this0:User) + WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this MATCH (this)<-[this1:HAS_POST]-(this2:User) @@ -285,12 +291,18 @@ describe("Cypher Auth Allow", () => { WITH this MATCH (this)-[this0:HAS_POST]->(this1:Post) WITH * - WHERE (this1.id = $param3 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (this1.id = $param3 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH this1 MATCH (this1)-[this3:HAS_COMMENT]->(this4:Comment) WITH * - WHERE (this4.id = $param4 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this4)<-[:HAS_COMMENT]-(this5:User) WHERE ($jwt.sub IS NOT NULL AND this5.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (this4.id = $param4 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this4)<-[:HAS_COMMENT]-(this5:User) + WHERE ($jwt.sub IS NOT NULL AND this5.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH this4 { .content } AS this4 RETURN collect(this4) AS var6 } @@ -424,7 +436,10 @@ describe("Cypher Auth Allow", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Post) WITH * - WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[:HAS_POST]-(this0:User) WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:HAS_POST]-(this0:User) + WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH this CALL { WITH this @@ -434,7 +449,10 @@ describe("Cypher Auth Allow", () => { RETURN count(*) AS update_this_creator0 } WITH * - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[:HAS_POST]-(update_this0:User) WHERE ($jwt.sub IS NOT NULL AND update_this0.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:HAS_POST]-(update_this0:User) + WHERE ($jwt.sub IS NOT NULL AND update_this0.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN collect(DISTINCT this { .id }) AS data" `); @@ -476,7 +494,10 @@ describe("Cypher Auth Allow", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Post) WITH * - WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[:HAS_POST]-(this0:User) WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:HAS_POST]-(this0:User) + WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH this CALL { WITH this @@ -488,7 +509,10 @@ describe("Cypher Auth Allow", () => { RETURN count(*) AS update_this_creator0 } WITH * - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[:HAS_POST]-(update_this0:User) WHERE ($jwt.sub IS NOT NULL AND update_this0.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:HAS_POST]-(update_this0:User) + WHERE ($jwt.sub IS NOT NULL AND update_this0.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN collect(DISTINCT this { .id }) AS data" `); @@ -563,7 +587,10 @@ describe("Cypher Auth Allow", () => { CALL { WITH * OPTIONAL MATCH (this)-[this0:HAS_POST]->(this1:Post) - WHERE (this1.id = $param3 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (this1.id = $param3 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH this0, collect(DISTINCT this1) AS var3 CALL { WITH var3 @@ -617,7 +644,10 @@ describe("Cypher Auth Allow", () => { CALL { WITH this OPTIONAL MATCH (this)-[this_posts0_disconnect0_rel:HAS_POST]->(this_posts0_disconnect0:Post) - WHERE this_posts0_disconnect0.id = $updateUsers_args_update_posts0_disconnect0_where_Post_this_posts0_disconnect0param0 AND (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this_posts0_disconnect0)<-[:HAS_POST]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE this_posts0_disconnect0.id = $updateUsers_args_update_posts0_disconnect0_where_Post_this_posts0_disconnect0param0 AND (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this_posts0_disconnect0)<-[:HAS_POST]-(authorization__before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH this_posts0_disconnect0, this_posts0_disconnect0_rel, this WITH collect(this_posts0_disconnect0) as this_posts0_disconnect0, this_posts0_disconnect0_rel, this @@ -690,12 +720,21 @@ describe("Cypher Auth Allow", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Comment) WITH * - WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[:HAS_COMMENT]-(this0:User) WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:HAS_COMMENT]-(this0:User) + WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH this CALL { WITH this OPTIONAL MATCH (this)<-[this_post0_disconnect0_rel:HAS_COMMENT]-(this_post0_disconnect0:Post) - WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[:HAS_COMMENT]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this_post0_disconnect0)<-[:HAS_POST]-(authorization__before_this1:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this1.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:HAS_COMMENT]-(authorization__before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this_post0_disconnect0)<-[:HAS_POST]-(authorization__before_this1:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this1.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH this_post0_disconnect0, this_post0_disconnect0_rel, this WITH collect(this_post0_disconnect0) as this_post0_disconnect0, this_post0_disconnect0_rel, this @@ -705,7 +744,10 @@ describe("Cypher Auth Allow", () => { CALL { WITH this, this_post0_disconnect0 OPTIONAL MATCH (this_post0_disconnect0)<-[this_post0_disconnect0_creator0_rel:HAS_POST]-(this_post0_disconnect0_creator0:User) - WHERE this_post0_disconnect0_creator0.id = $updateComments_args_update_post0_disconnect0_disconnect_creator0_where_User_this_post0_disconnect0_creator0param0 AND (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this_post0_disconnect0)<-[:HAS_POST]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this_post0_disconnect0_creator0.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE this_post0_disconnect0_creator0.id = $updateComments_args_update_post0_disconnect0_disconnect_creator0_where_User_this_post0_disconnect0_creator0param0 AND (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this_post0_disconnect0)<-[:HAS_POST]-(authorization__before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this_post0_disconnect0_creator0.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH this_post0_disconnect0_creator0, this_post0_disconnect0_creator0_rel, this_post0_disconnect0 WITH collect(this_post0_disconnect0_creator0) as this_post0_disconnect0_creator0, this_post0_disconnect0_creator0_rel, this_post0_disconnect0 @@ -717,7 +759,10 @@ describe("Cypher Auth Allow", () => { RETURN count(*) AS disconnect_this_post0_disconnect_Post } WITH * - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[:HAS_COMMENT]-(update_this0:User) WHERE ($jwt.sub IS NOT NULL AND update_this0.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:HAS_COMMENT]-(update_this0:User) + WHERE ($jwt.sub IS NOT NULL AND update_this0.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN collect(DISTINCT this { .id }) AS data" `); @@ -789,7 +834,10 @@ describe("Cypher Auth Allow", () => { CALL { WITH this OPTIONAL MATCH (this_posts0_connect0_node:Post) - WHERE this_posts0_connect0_node.id = $this_posts0_connect0_node_param0 AND (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this_posts0_connect0_node)<-[:HAS_POST]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE this_posts0_connect0_node.id = $this_posts0_connect0_node_param0 AND (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this_posts0_connect0_node)<-[:HAS_POST]-(authorization__before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH * WITH collect(this_posts0_connect0_node) as connectedNodes, collect(this) as parentNodes 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 70c4019aa0..2a321d5c95 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 @@ -105,7 +105,10 @@ describe("@auth allow on specific interface implementation", () => { UNION WITH * MATCH (this)-[this3:HAS_CONTENT]->(this4:Post) - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this4)<-[:HAS_CONTENT]-(this5:User) WHERE ($jwt.sub IS NOT NULL AND this5.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this4)<-[:HAS_CONTENT]-(this5:User) + WHERE ($jwt.sub IS NOT NULL AND this5.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this4 { .id, .content, __resolveType: \\"Post\\", __id: id(this4) } AS this4 RETURN this4 AS var2 } @@ -163,7 +166,10 @@ describe("@auth allow on specific interface implementation", () => { UNION WITH * MATCH (this)-[this3:HAS_CONTENT]->(this4:Post) - WHERE (this4.id = $param2 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this4)<-[:HAS_CONTENT]-(this5:User) WHERE ($jwt.sub IS NOT NULL AND this5.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (this4.id = $param2 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this4)<-[:HAS_CONTENT]-(this5:User) + WHERE ($jwt.sub IS NOT NULL AND this5.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH this4 MATCH (this4)-[this6:HAS_COMMENT]->(this7:Comment) @@ -240,7 +246,10 @@ describe("@auth allow on specific interface implementation", () => { CALL { WITH this MATCH (this)-[this_has_content0_relationship:HAS_CONTENT]->(this_content0:Post) - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this_content0)<-[:HAS_CONTENT]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this_content0)<-[:HAS_CONTENT]-(authorization__before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) SET this_content0.id = $this_update_content0_id_SET RETURN count(*) AS update_this_content0 } @@ -257,7 +266,10 @@ describe("@auth allow on specific interface implementation", () => { UNION WITH * MATCH (this)-[update_this3:HAS_CONTENT]->(update_this4:Post) - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(update_this4)<-[:HAS_CONTENT]-(update_this5:User) WHERE ($jwt.sub IS NOT NULL AND update_this5.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (update_this4)<-[:HAS_CONTENT]-(update_this5:User) + WHERE ($jwt.sub IS NOT NULL AND update_this5.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH update_this4 { .id, __resolveType: \\"Post\\", __id: id(update_this4) } AS update_this4 RETURN update_this4 AS update_var2 } @@ -318,7 +330,10 @@ describe("@auth allow on specific interface implementation", () => { CALL { WITH * OPTIONAL MATCH (this)-[this4:HAS_CONTENT]->(this5:Post) - WHERE (this5.id = $param2 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this5)<-[:HAS_CONTENT]-(this6:User) WHERE ($jwt.sub IS NOT NULL AND this6.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (this5.id = $param2 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this5)<-[:HAS_CONTENT]-(this6:User) + WHERE ($jwt.sub IS NOT NULL AND this6.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH this4, collect(DISTINCT this5) AS var7 CALL { WITH var7 diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/roles-where.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/roles-where.test.ts index b4063815d7..29be81aa91 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/roles-where.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/roles-where.test.ts @@ -180,7 +180,10 @@ describe("Cypher Auth Where with Roles", () => { WITH this MATCH (this)-[this0:HAS_POST]->(this1:Post) WITH * - WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this1 { .content } AS this1 RETURN collect(this1) AS var3 } @@ -232,7 +235,10 @@ describe("Cypher Auth Where with Roles", () => { CALL { WITH this MATCH (this)-[this0:HAS_POST]->(this1:Post) - WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH collect({ node: this1, relationship: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { @@ -291,7 +297,10 @@ describe("Cypher Auth Where with Roles", () => { CALL { WITH this MATCH (this)-[this0:HAS_POST]->(this1:Post) - WHERE (this1.id = $param4 AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $param5 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param6 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (this1.id = $param4 AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $param5 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param6 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH collect({ node: this1, relationship: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { @@ -348,7 +357,10 @@ describe("Cypher Auth Where with Roles", () => { WITH this MATCH (this)-[this0:HAS_POST]->(this1:Post) WITH * - WHERE (this1.content = $param4 AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $param5 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param6 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (this1.content = $param4 AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $param5 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param6 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH this1 { .content } AS this1 RETURN collect(this1) AS var3 } @@ -401,7 +413,10 @@ describe("Cypher Auth Where with Roles", () => { CALL { WITH * MATCH (this)-[this0:HAS_POST]->(this1:Post) - WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this1 { .id, __resolveType: \\"Post\\", __id: id(this1) } AS this1 RETURN this1 AS var3 } @@ -460,7 +475,10 @@ describe("Cypher Auth Where with Roles", () => { CALL { WITH this MATCH (this)-[this0:HAS_POST]->(this1:Post) - WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH { node: { __resolveType: \\"Post\\", __id: id(this1), id: this1.id } } AS edge RETURN edge } @@ -520,7 +538,10 @@ describe("Cypher Auth Where with Roles", () => { CALL { WITH this MATCH (this)-[this0:HAS_POST]->(this1:Post) - WHERE (this1.id = $param4 AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $param5 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param6 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (this1.id = $param4 AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $param5 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param6 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) WITH { node: { __resolveType: \\"Post\\", __id: id(this1), id: this1.id } } AS edge RETURN edge } @@ -675,10 +696,16 @@ describe("Cypher Auth Where with Roles", () => { CALL { WITH this MATCH (this)-[this_has_post0_relationship:HAS_POST]->(this_posts0:Post) - WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(this_posts0)<-[:HAS_POST]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $authorization__before_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this_posts0)<-[:HAS_POST]-(authorization__before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $authorization__before_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) SET this_posts0.id = $this_update_posts0_id_SET WITH this, this_posts0 - WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(this_posts0)<-[:HAS_POST]-(authorization__after_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__after_this0.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this_posts0)<-[:HAS_POST]-(authorization__after_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__after_this0.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN count(*) AS update_this_posts0 } WITH this @@ -689,7 +716,10 @@ describe("Cypher Auth Where with Roles", () => { WITH this MATCH (this)-[update_this0:HAS_POST]->(update_this1:Post) WITH * - WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(update_this1)<-[:HAS_POST]-(update_this2:User) WHERE ($jwt.sub IS NOT NULL AND update_this2.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $update_param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $update_param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (update_this1)<-[:HAS_POST]-(update_this2:User) + WHERE ($jwt.sub IS NOT NULL AND update_this2.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $update_param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $update_param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH update_this1 { .id } AS update_this1 RETURN collect(update_this1) AS update_var3 } @@ -777,7 +807,10 @@ describe("Cypher Auth Where with Roles", () => { CALL { WITH * OPTIONAL MATCH (this)-[this0:HAS_POST]->(this1:Post) - WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this0, collect(DISTINCT this1) AS var3 CALL { WITH var3 @@ -836,7 +869,10 @@ describe("Cypher Auth Where with Roles", () => { CALL { WITH this0 OPTIONAL MATCH (this0_posts_connect0_node:Post) - WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(this0_posts_connect0_node)<-[:HAS_POST]-(authorization_0_before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization_0_before_this0.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $authorization_0_before_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization_0_before_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this0_posts_connect0_node)<-[:HAS_POST]-(authorization_0_before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization_0_before_this0.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $authorization_0_before_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization_0_before_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH * WITH collect(this0_posts_connect0_node) as connectedNodes, collect(this0) as parentNodes @@ -849,7 +885,10 @@ describe("Cypher Auth Where with Roles", () => { } WITH this0, this0_posts_connect0_node WITH this0, this0_posts_connect0_node - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $authorization_0_after_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization_0_after_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(this0_posts_connect0_node)<-[:HAS_POST]-(authorization_0_after_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization_0_after_this0.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $authorization_0_after_param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization_0_after_param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $authorization_0_after_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization_0_after_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this0_posts_connect0_node)<-[:HAS_POST]-(authorization_0_after_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization_0_after_this0.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $authorization_0_after_param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization_0_after_param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN count(*) AS connect_this0_posts_connect_Post0 } WITH * @@ -921,7 +960,10 @@ describe("Cypher Auth Where with Roles", () => { CALL { WITH this0 OPTIONAL MATCH (this0_posts_connect0_node:Post) - WHERE this0_posts_connect0_node.id = $this0_posts_connect0_node_param0 AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(this0_posts_connect0_node)<-[:HAS_POST]-(authorization_0_before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization_0_before_this0.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $authorization_0_before_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization_0_before_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE this0_posts_connect0_node.id = $this0_posts_connect0_node_param0 AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this0_posts_connect0_node)<-[:HAS_POST]-(authorization_0_before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization_0_before_this0.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $authorization_0_before_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization_0_before_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH * WITH collect(this0_posts_connect0_node) as connectedNodes, collect(this0) as parentNodes @@ -934,7 +976,10 @@ describe("Cypher Auth Where with Roles", () => { } WITH this0, this0_posts_connect0_node WITH this0, this0_posts_connect0_node - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $authorization_0_after_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization_0_after_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(this0_posts_connect0_node)<-[:HAS_POST]-(authorization_0_after_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization_0_after_this0.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $authorization_0_after_param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization_0_after_param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $authorization_0_after_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization_0_after_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this0_posts_connect0_node)<-[:HAS_POST]-(authorization_0_after_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization_0_after_this0.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $authorization_0_after_param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization_0_after_param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN count(*) AS connect_this0_posts_connect_Post0 } WITH * @@ -996,7 +1041,10 @@ describe("Cypher Auth Where with Roles", () => { CALL { WITH this OPTIONAL MATCH (this_posts0_connect0_node:Post) - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(this_posts0_connect0_node)<-[:HAS_POST]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $authorization__before_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $authorization__before_param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this_posts0_connect0_node)<-[:HAS_POST]-(authorization__before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $authorization__before_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $authorization__before_param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH * WITH collect(this_posts0_connect0_node) as connectedNodes, collect(this) as parentNodes @@ -1009,7 +1057,10 @@ describe("Cypher Auth Where with Roles", () => { } WITH this, this_posts0_connect0_node WITH this, this_posts0_connect0_node - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(this_posts0_connect0_node)<-[:HAS_POST]-(authorization__after_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__after_this0.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $authorization__after_param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this_posts0_connect0_node)<-[:HAS_POST]-(authorization__after_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__after_this0.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $authorization__after_param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN count(*) AS connect_this_posts0_connect_Post0 } WITH this @@ -1069,7 +1120,10 @@ describe("Cypher Auth Where with Roles", () => { CALL { WITH this OPTIONAL MATCH (this_posts0_connect0_node:Post) - WHERE this_posts0_connect0_node.id = $this_posts0_connect0_node_param0 AND (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(this_posts0_connect0_node)<-[:HAS_POST]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $authorization__before_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $authorization__before_param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE this_posts0_connect0_node.id = $this_posts0_connect0_node_param0 AND (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this_posts0_connect0_node)<-[:HAS_POST]-(authorization__before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $authorization__before_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $authorization__before_param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH * WITH collect(this_posts0_connect0_node) as connectedNodes, collect(this) as parentNodes @@ -1082,7 +1136,10 @@ describe("Cypher Auth Where with Roles", () => { } WITH this, this_posts0_connect0_node WITH this, this_posts0_connect0_node - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(this_posts0_connect0_node)<-[:HAS_POST]-(authorization__after_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__after_this0.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $authorization__after_param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this_posts0_connect0_node)<-[:HAS_POST]-(authorization__after_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__after_this0.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $authorization__after_param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN count(*) AS connect_this_posts0_connect_Post0 } WITH this @@ -1143,7 +1200,10 @@ describe("Cypher Auth Where with Roles", () => { CALL { WITH this OPTIONAL MATCH (this)-[this_posts0_disconnect0_rel:HAS_POST]->(this_posts0_disconnect0:Post) - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $authorization__before_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(this_posts0_disconnect0)<-[:HAS_POST]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $authorization__before_param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $authorization__before_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this_posts0_disconnect0)<-[:HAS_POST]-(authorization__before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $authorization__before_param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH this_posts0_disconnect0, this_posts0_disconnect0_rel, this WITH collect(this_posts0_disconnect0) as this_posts0_disconnect0, this_posts0_disconnect0_rel, this @@ -1151,7 +1211,10 @@ describe("Cypher Auth Where with Roles", () => { DELETE this_posts0_disconnect0_rel } WITH this, this_posts0_disconnect0 - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(this_posts0_disconnect0)<-[:HAS_POST]-(authorization__after_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__after_this0.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $authorization__after_param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this_posts0_disconnect0)<-[:HAS_POST]-(authorization__after_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__after_this0.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $authorization__after_param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN count(*) AS disconnect_this_posts0_disconnect_Post } WITH this @@ -1211,7 +1274,10 @@ describe("Cypher Auth Where with Roles", () => { CALL { WITH this OPTIONAL MATCH (this)-[this_posts0_disconnect0_rel:HAS_POST]->(this_posts0_disconnect0:Post) - WHERE this_posts0_disconnect0.id = $updateUsers_args_update_posts0_disconnect0_where_Post_this_posts0_disconnect0param0 AND (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $authorization__before_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(this_posts0_disconnect0)<-[:HAS_POST]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $authorization__before_param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE this_posts0_disconnect0.id = $updateUsers_args_update_posts0_disconnect0_where_Post_this_posts0_disconnect0param0 AND (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $authorization__before_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this_posts0_disconnect0)<-[:HAS_POST]-(authorization__before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $authorization__before_param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH this_posts0_disconnect0, this_posts0_disconnect0_rel, this WITH collect(this_posts0_disconnect0) as this_posts0_disconnect0, this_posts0_disconnect0_rel, this @@ -1219,7 +1285,10 @@ describe("Cypher Auth Where with Roles", () => { DELETE this_posts0_disconnect0_rel } WITH this, this_posts0_disconnect0 - WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND size([(this_posts0_disconnect0)<-[:HAS_POST]-(authorization__after_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__after_this0.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $authorization__after_param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub) AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this_posts0_disconnect0)<-[:HAS_POST]-(authorization__after_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__after_this0.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $authorization__after_param4 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param5 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN count(*) AS disconnect_this_posts0_disconnect_Post } WITH this diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/validate/interface-relationships/implementation-bind.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/validate/interface-relationships/implementation-bind.test.ts index e586e86649..fbe02f90cd 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/validate/interface-relationships/implementation-bind.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/validate/interface-relationships/implementation-bind.test.ts @@ -130,7 +130,10 @@ describe("Cypher Auth Allow", () => { MERGE (this0_contentPost0_node)<-[:HAS_CONTENT]-(this0_contentPost0_node_creator0_node) MERGE (this0)-[:HAS_CONTENT]->(this0_contentPost0_node) WITH * - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this0_contentPost0_node_creator0_node.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this0_contentPost0_node)<-[:HAS_CONTENT]-(authorization_0_2_0_1_after_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization_0_2_0_1_after_this0.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this0_contentPost0_node_creator0_node.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this0_contentPost0_node)<-[:HAS_CONTENT]-(authorization_0_2_0_1_after_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization_0_2_0_1_after_this0.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this0 } CALL { @@ -300,7 +303,10 @@ describe("Cypher Auth Allow", () => { RETURN count(*) AS update_this_content0_creator0 } WITH this, this_content0 - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this_content0)<-[:HAS_CONTENT]-(authorization__after_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__after_this0.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this_content0)<-[:HAS_CONTENT]-(authorization__after_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__after_this0.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN count(*) AS update_this_content0 } RETURN count(*) AS update_this_Post diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/validate/validate.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/validate/validate.test.ts index 154429144b..2e89c44934 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/validate/validate.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/validate/validate.test.ts @@ -177,7 +177,10 @@ describe("Cypher Auth Allow", () => { RETURN collect(NULL) AS create_var8 } WITH * - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(create_this3)<-[:HAS_POST]-(create_this9:User) WHERE ($jwt.sub IS NOT NULL AND create_this9.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (create_this3)<-[:HAS_POST]-(create_this9:User) + WHERE ($jwt.sub IS NOT NULL AND create_this9.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN collect(NULL) AS create_var10 } WITH * @@ -397,7 +400,10 @@ describe("Cypher Auth Allow", () => { } WITH this, this_creator0_connect0_node WITH this, this_creator0_connect0_node - WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[:HAS_POST]-(authorization__after_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__after_this0.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this_creator0_connect0_node.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:HAS_POST]-(authorization__after_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__after_this0.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this_creator0_connect0_node.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN count(*) AS connect_this_creator0_connect_User0 } RETURN collect(DISTINCT this { .id }) AS data" @@ -453,7 +459,10 @@ describe("Cypher Auth Allow", () => { DELETE this_creator0_disconnect0_rel } WITH this, this_creator0_disconnect0 - WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[:HAS_POST]-(authorization__after_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__after_this0.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this_creator0_disconnect0.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:HAS_POST]-(authorization__after_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__after_this0.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this_creator0_disconnect0.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN count(*) AS disconnect_this_creator0_disconnect_User } RETURN collect(DISTINCT this { .id }) AS data" diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/where/connection-auth-filter.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/where/connection-auth-filter.test.ts index 65dc63bd5d..7a2b9db177 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/where/connection-auth-filter.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/where/connection-auth-filter.test.ts @@ -198,7 +198,10 @@ describe("Connection auth filter", () => { WITH this0 MATCH (this0)-[this1:HAS_POST]->(this2:Post) WITH * - WHERE ($isAuthenticated = true AND size([(this2)<-[:HAS_POST]-(this3:User) WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this2)<-[:HAS_POST]-(this3:User) + WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) + }) WITH this2 { .content } AS this2 RETURN collect(this2) AS var4 } @@ -257,7 +260,10 @@ describe("Connection auth filter", () => { CALL { WITH this0 MATCH (this0)-[this1:HAS_POST]->(this2:Post) - WHERE ($isAuthenticated = true AND size([(this2)<-[:HAS_POST]-(this3:User) WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this2)<-[:HAS_POST]-(this3:User) + WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) + }) WITH collect({ node: this2, relationship: this1 }) AS edges WITH edges, size(edges) AS totalCount CALL { @@ -323,7 +329,10 @@ describe("Connection auth filter", () => { CALL { WITH this0 MATCH (this0)-[this1:HAS_POST]->(this2:Post) - WHERE (this2.id = $param2 AND ($isAuthenticated = true AND size([(this2)<-[:HAS_POST]-(this3:User) WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) | 1]) > 0)) + WHERE (this2.id = $param2 AND ($isAuthenticated = true AND EXISTS { + MATCH (this2)<-[:HAS_POST]-(this3:User) + WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) + })) WITH collect({ node: this2, relationship: this1 }) AS edges WITH edges, size(edges) AS totalCount CALL { @@ -387,7 +396,10 @@ describe("Connection auth filter", () => { WITH this0 MATCH (this0)-[this1:HAS_POST]->(this2:Post) WITH * - WHERE (this2.content = $param2 AND ($isAuthenticated = true AND size([(this2)<-[:HAS_POST]-(this3:User) WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) | 1]) > 0)) + WHERE (this2.content = $param2 AND ($isAuthenticated = true AND EXISTS { + MATCH (this2)<-[:HAS_POST]-(this3:User) + WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) + })) WITH this2 { .content } AS this2 RETURN collect(this2) AS var4 } @@ -447,7 +459,10 @@ describe("Connection auth filter", () => { CALL { WITH * MATCH (this0)-[this1:HAS_POST]->(this2:Post) - WHERE ($isAuthenticated = true AND size([(this2)<-[:HAS_POST]-(this3:User) WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this2)<-[:HAS_POST]-(this3:User) + WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) + }) WITH this2 { .id, __resolveType: \\"Post\\", __id: id(this2) } AS this2 RETURN this2 AS var4 } @@ -513,7 +528,10 @@ describe("Connection auth filter", () => { CALL { WITH this0 MATCH (this0)-[this1:HAS_POST]->(this2:Post) - WHERE ($isAuthenticated = true AND size([(this2)<-[:HAS_POST]-(this3:User) WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this2)<-[:HAS_POST]-(this3:User) + WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) + }) WITH { node: { __resolveType: \\"Post\\", __id: id(this2), id: this2.id } } AS edge RETURN edge } @@ -580,7 +598,10 @@ describe("Connection auth filter", () => { CALL { WITH this0 MATCH (this0)-[this1:HAS_POST]->(this2:Post) - WHERE (this2.id = $param2 AND ($isAuthenticated = true AND size([(this2)<-[:HAS_POST]-(this3:User) WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) | 1]) > 0)) + WHERE (this2.id = $param2 AND ($isAuthenticated = true AND EXISTS { + MATCH (this2)<-[:HAS_POST]-(this3:User) + WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) + })) WITH { node: { __resolveType: \\"Post\\", __id: id(this2), id: this2.id } } AS edge RETURN edge } diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/where/interface-relationships/implementation-where.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/where/interface-relationships/implementation-where.test.ts index 139f28da73..b0d0ca068d 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/where/interface-relationships/implementation-where.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/where/interface-relationships/implementation-where.test.ts @@ -109,7 +109,10 @@ describe("Cypher Auth Where", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Post) WITH * - WHERE ($isAuthenticated = true AND size([(this)<-[:HAS_CONTENT]-(this0:User) WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:HAS_CONTENT]-(this0:User) + WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) + }) RETURN this { .id } AS this" `); @@ -141,7 +144,10 @@ describe("Cypher Auth Where", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Post) WITH * - WHERE (this.content = $param0 AND ($isAuthenticated = true AND size([(this)<-[:HAS_CONTENT]-(this0:User) WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) | 1]) > 0)) + WHERE (this.content = $param0 AND ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:HAS_CONTENT]-(this0:User) + WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) + })) RETURN this { .id } AS this" `); @@ -190,7 +196,10 @@ describe("Cypher Auth Where", () => { UNION WITH * MATCH (this)-[this3:HAS_CONTENT]->(this4:Post) - WHERE ($isAuthenticated = true AND size([(this4)<-[:HAS_CONTENT]-(this5:User) WHERE ($jwt.sub IS NOT NULL AND this5.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this4)<-[:HAS_CONTENT]-(this5:User) + WHERE ($jwt.sub IS NOT NULL AND this5.id = $jwt.sub) + }) WITH this4 { .id, __resolveType: \\"Post\\", __id: id(this4) } AS this4 RETURN this4 AS var2 } @@ -248,7 +257,10 @@ describe("Cypher Auth Where", () => { UNION WITH this MATCH (this)-[this2:HAS_CONTENT]->(this3:Post) - WHERE ($isAuthenticated = true AND size([(this3)<-[:HAS_CONTENT]-(this4:User) WHERE ($jwt.sub IS NOT NULL AND this4.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this3)<-[:HAS_CONTENT]-(this4:User) + WHERE ($jwt.sub IS NOT NULL AND this4.id = $jwt.sub) + }) WITH { node: { __resolveType: \\"Post\\", __id: id(this3), id: this3.id } } AS edge RETURN edge } @@ -308,7 +320,10 @@ describe("Cypher Auth Where", () => { UNION WITH this MATCH (this)-[this2:HAS_CONTENT]->(this3:Post) - WHERE (this3.id = $param3 AND ($isAuthenticated = true AND size([(this3)<-[:HAS_CONTENT]-(this4:User) WHERE ($jwt.sub IS NOT NULL AND this4.id = $jwt.sub) | 1]) > 0)) + WHERE (this3.id = $param3 AND ($isAuthenticated = true AND EXISTS { + MATCH (this3)<-[:HAS_CONTENT]-(this4:User) + WHERE ($jwt.sub IS NOT NULL AND this4.id = $jwt.sub) + })) WITH { node: { __resolveType: \\"Post\\", __id: id(this3), id: this3.id } } AS edge RETURN edge } @@ -351,10 +366,16 @@ describe("Cypher Auth Where", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Post) WITH * - WHERE ($isAuthenticated = true AND size([(this)<-[:HAS_CONTENT]-(this0:User) WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:HAS_CONTENT]-(this0:User) + WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) + }) SET this.content = $this_update_content_SET WITH * - WHERE ($isAuthenticated = true AND size([(this)<-[:HAS_CONTENT]-(update_this0:User) WHERE ($jwt.sub IS NOT NULL AND update_this0.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:HAS_CONTENT]-(update_this0:User) + WHERE ($jwt.sub IS NOT NULL AND update_this0.id = $jwt.sub) + }) RETURN collect(DISTINCT this { .id }) AS data" `); @@ -390,10 +411,16 @@ describe("Cypher Auth Where", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Post) WITH * - WHERE (this.content = $param0 AND ($isAuthenticated = true AND size([(this)<-[:HAS_CONTENT]-(this0:User) WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) | 1]) > 0)) + WHERE (this.content = $param0 AND ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:HAS_CONTENT]-(this0:User) + WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) + })) SET this.content = $this_update_content_SET WITH * - WHERE ($isAuthenticated = true AND size([(this)<-[:HAS_CONTENT]-(update_this0:User) WHERE ($jwt.sub IS NOT NULL AND update_this0.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:HAS_CONTENT]-(update_this0:User) + WHERE ($jwt.sub IS NOT NULL AND update_this0.id = $jwt.sub) + }) RETURN collect(DISTINCT this { .id }) AS data" `); @@ -449,7 +476,10 @@ describe("Cypher Auth Where", () => { CALL { WITH this MATCH (this)-[this_has_content0_relationship:HAS_CONTENT]->(this_content0:Post) - WHERE ($isAuthenticated = true AND size([(this_content0)<-[:HAS_CONTENT]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this_content0)<-[:HAS_CONTENT]-(authorization__before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) + }) SET this_content0.id = $this_update_content0_id_SET RETURN count(*) AS update_this_content0 } @@ -489,7 +519,10 @@ describe("Cypher Auth Where", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Post) - WHERE ($isAuthenticated = true AND size([(this)<-[:HAS_CONTENT]-(this0:User) WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:HAS_CONTENT]-(this0:User) + WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) + }) DETACH DELETE this" `); @@ -520,7 +553,10 @@ describe("Cypher Auth Where", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Post) - WHERE (this.content = $param0 AND ($isAuthenticated = true AND size([(this)<-[:HAS_CONTENT]-(this0:User) WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) | 1]) > 0)) + WHERE (this.content = $param0 AND ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:HAS_CONTENT]-(this0:User) + WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) + })) DETACH DELETE this" `); @@ -567,7 +603,10 @@ describe("Cypher Auth Where", () => { CALL { WITH * OPTIONAL MATCH (this)-[this4:HAS_CONTENT]->(this5:Post) - WHERE ($isAuthenticated = true AND size([(this5)<-[:HAS_CONTENT]-(this6:User) WHERE ($jwt.sub IS NOT NULL AND this6.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this5)<-[:HAS_CONTENT]-(this6:User) + WHERE ($jwt.sub IS NOT NULL AND this6.id = $jwt.sub) + }) WITH this4, collect(DISTINCT this5) AS var7 CALL { WITH var7 @@ -636,7 +675,10 @@ describe("Cypher Auth Where", () => { CALL { WITH this0 OPTIONAL MATCH (this0_content_connect1_node:Post) - WHERE ($isAuthenticated = true AND size([(this0_content_connect1_node)<-[:HAS_CONTENT]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this0_content_connect1_node)<-[:HAS_CONTENT]-(authorization__before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) + }) CALL { WITH * WITH collect(this0_content_connect1_node) as connectedNodes, collect(this0) as parentNodes @@ -726,7 +768,10 @@ describe("Cypher Auth Where", () => { CALL { WITH this0 OPTIONAL MATCH (this0_content_connect1_node:Post) - WHERE this0_content_connect1_node.id = $this0_content_connect1_node_param0 AND ($isAuthenticated = true AND size([(this0_content_connect1_node)<-[:HAS_CONTENT]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1]) > 0) + WHERE this0_content_connect1_node.id = $this0_content_connect1_node_param0 AND ($isAuthenticated = true AND EXISTS { + MATCH (this0_content_connect1_node)<-[:HAS_CONTENT]-(authorization__before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) + }) CALL { WITH * WITH collect(this0_content_connect1_node) as connectedNodes, collect(this0) as parentNodes @@ -815,7 +860,10 @@ describe("Cypher Auth Where", () => { CALL { WITH this OPTIONAL MATCH (this_content0_connect0_node:Post) - WHERE (($isAuthenticated = true AND size([(this_content0_connect0_node)<-[:HAS_CONTENT]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1]) > 0) AND ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub))) + WHERE (($isAuthenticated = true AND EXISTS { + MATCH (this_content0_connect0_node)<-[:HAS_CONTENT]-(authorization__before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) + }) AND ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub))) CALL { WITH * WITH collect(this_content0_connect0_node) as connectedNodes, collect(this) as parentNodes @@ -897,7 +945,10 @@ describe("Cypher Auth Where", () => { CALL { WITH this OPTIONAL MATCH (this_content0_connect0_node:Post) - WHERE this_content0_connect0_node.id = $this_content0_connect0_node_param0 AND (($isAuthenticated = true AND size([(this_content0_connect0_node)<-[:HAS_CONTENT]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1]) > 0) AND ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub))) + WHERE this_content0_connect0_node.id = $this_content0_connect0_node_param0 AND (($isAuthenticated = true AND EXISTS { + MATCH (this_content0_connect0_node)<-[:HAS_CONTENT]-(authorization__before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) + }) AND ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub))) CALL { WITH * WITH collect(this_content0_connect0_node) as connectedNodes, collect(this) as parentNodes @@ -975,7 +1026,10 @@ describe("Cypher Auth Where", () => { CALL { WITH this OPTIONAL MATCH (this)-[this_content0_disconnect0_rel:HAS_CONTENT]->(this_content0_disconnect0:Post) - WHERE (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) AND ($isAuthenticated = true AND size([(this_content0_disconnect0)<-[:HAS_CONTENT]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1]) > 0)) + WHERE (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) AND ($isAuthenticated = true AND EXISTS { + MATCH (this_content0_disconnect0)<-[:HAS_CONTENT]-(authorization__before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) + })) CALL { WITH this_content0_disconnect0, this_content0_disconnect0_rel, this WITH collect(this_content0_disconnect0) as this_content0_disconnect0, this_content0_disconnect0_rel, this @@ -1047,7 +1101,10 @@ describe("Cypher Auth Where", () => { CALL { WITH this OPTIONAL MATCH (this)-[this_content0_disconnect0_rel:HAS_CONTENT]->(this_content0_disconnect0:Post) - WHERE this_content0_disconnect0.id = $updateUsers_args_update_content0_disconnect0_where_Post_this_content0_disconnect0param0 AND (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) AND ($isAuthenticated = true AND size([(this_content0_disconnect0)<-[:HAS_CONTENT]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1]) > 0)) + WHERE this_content0_disconnect0.id = $updateUsers_args_update_content0_disconnect0_where_Post_this_content0_disconnect0param0 AND (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) AND ($isAuthenticated = true AND EXISTS { + MATCH (this_content0_disconnect0)<-[:HAS_CONTENT]-(authorization__before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) + })) CALL { WITH this_content0_disconnect0, this_content0_disconnect0_rel, this WITH collect(this_content0_disconnect0) as this_content0_disconnect0, this_content0_disconnect0_rel, this diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/where/where.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/where/where.test.ts index ef4129255b..50d0546e2b 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/where/where.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/where/where.test.ts @@ -167,7 +167,10 @@ describe("Cypher Auth Where", () => { WITH this MATCH (this)-[this0:HAS_POST]->(this1:Post) WITH * - WHERE ($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + }) WITH this1 { .content } AS this1 RETURN collect(this1) AS var3 } @@ -215,7 +218,10 @@ describe("Cypher Auth Where", () => { CALL { WITH this MATCH (this)-[this0:HAS_POST]->(this1:Post) - WHERE ($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + }) WITH collect({ node: this1, relationship: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { @@ -270,7 +276,10 @@ describe("Cypher Auth Where", () => { CALL { WITH this MATCH (this)-[this0:HAS_POST]->(this1:Post) - WHERE (this1.id = $param2 AND ($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0)) + WHERE (this1.id = $param2 AND ($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + })) WITH collect({ node: this1, relationship: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { @@ -323,7 +332,10 @@ describe("Cypher Auth Where", () => { WITH this MATCH (this)-[this0:HAS_POST]->(this1:Post) WITH * - WHERE (this1.content = $param2 AND ($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0)) + WHERE (this1.content = $param2 AND ($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + })) WITH this1 { .content } AS this1 RETURN collect(this1) AS var3 } @@ -372,7 +384,10 @@ describe("Cypher Auth Where", () => { CALL { WITH * MATCH (this)-[this0:HAS_POST]->(this1:Post) - WHERE ($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + }) WITH this1 { .id, __resolveType: \\"Post\\", __id: id(this1) } AS this1 RETURN this1 AS var3 } @@ -427,7 +442,10 @@ describe("Cypher Auth Where", () => { CALL { WITH this MATCH (this)-[this0:HAS_POST]->(this1:Post) - WHERE ($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + }) WITH { node: { __resolveType: \\"Post\\", __id: id(this1), id: this1.id } } AS edge RETURN edge } @@ -483,7 +501,10 @@ describe("Cypher Auth Where", () => { CALL { WITH this MATCH (this)-[this0:HAS_POST]->(this1:Post) - WHERE (this1.id = $param2 AND ($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0)) + WHERE (this1.id = $param2 AND ($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + })) WITH { node: { __resolveType: \\"Post\\", __id: id(this1), id: this1.id } } AS edge RETURN edge } @@ -618,7 +639,10 @@ describe("Cypher Auth Where", () => { CALL { WITH this MATCH (this)-[this_has_post0_relationship:HAS_POST]->(this_posts0:Post) - WHERE ($isAuthenticated = true AND size([(this_posts0)<-[:HAS_POST]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this_posts0)<-[:HAS_POST]-(authorization__before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) + }) SET this_posts0.id = $this_update_posts0_id_SET RETURN count(*) AS update_this_posts0 } @@ -628,7 +652,10 @@ describe("Cypher Auth Where", () => { WITH this MATCH (this)-[update_this0:HAS_POST]->(update_this1:Post) WITH * - WHERE ($isAuthenticated = true AND size([(update_this1)<-[:HAS_POST]-(update_this2:User) WHERE ($jwt.sub IS NOT NULL AND update_this2.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (update_this1)<-[:HAS_POST]-(update_this2:User) + WHERE ($jwt.sub IS NOT NULL AND update_this2.id = $jwt.sub) + }) WITH update_this1 { .id } AS update_this1 RETURN collect(update_this1) AS update_var3 } @@ -738,7 +765,10 @@ describe("Cypher Auth Where", () => { CALL { WITH * OPTIONAL MATCH (this)-[this0:HAS_POST]->(this1:Post) - WHERE ($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + }) WITH this0, collect(DISTINCT this1) AS var3 CALL { WITH var3 @@ -793,7 +823,10 @@ describe("Cypher Auth Where", () => { CALL { WITH this0 OPTIONAL MATCH (this0_posts_connect0_node:Post) - WHERE ($isAuthenticated = true AND size([(this0_posts_connect0_node)<-[:HAS_POST]-(authorization_0_before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization_0_before_this0.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this0_posts_connect0_node)<-[:HAS_POST]-(authorization_0_before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization_0_before_this0.id = $jwt.sub) + }) CALL { WITH * WITH collect(this0_posts_connect0_node) as connectedNodes, collect(this0) as parentNodes @@ -868,7 +901,10 @@ describe("Cypher Auth Where", () => { CALL { WITH this0 OPTIONAL MATCH (this0_posts_connect0_node:Post) - WHERE this0_posts_connect0_node.id = $this0_posts_connect0_node_param0 AND ($isAuthenticated = true AND size([(this0_posts_connect0_node)<-[:HAS_POST]-(authorization_0_before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization_0_before_this0.id = $jwt.sub) | 1]) > 0) + WHERE this0_posts_connect0_node.id = $this0_posts_connect0_node_param0 AND ($isAuthenticated = true AND EXISTS { + MATCH (this0_posts_connect0_node)<-[:HAS_POST]-(authorization_0_before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization_0_before_this0.id = $jwt.sub) + }) CALL { WITH * WITH collect(this0_posts_connect0_node) as connectedNodes, collect(this0) as parentNodes @@ -933,7 +969,10 @@ describe("Cypher Auth Where", () => { CALL { WITH this OPTIONAL MATCH (this_posts0_connect0_node:Post) - WHERE (($isAuthenticated = true AND size([(this_posts0_connect0_node)<-[:HAS_POST]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1]) > 0) AND ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub))) + WHERE (($isAuthenticated = true AND EXISTS { + MATCH (this_posts0_connect0_node)<-[:HAS_POST]-(authorization__before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) + }) AND ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub))) CALL { WITH * WITH collect(this_posts0_connect0_node) as connectedNodes, collect(this) as parentNodes @@ -990,7 +1029,10 @@ describe("Cypher Auth Where", () => { CALL { WITH this OPTIONAL MATCH (this_posts0_connect0_node:Post) - WHERE this_posts0_connect0_node.id = $this_posts0_connect0_node_param0 AND (($isAuthenticated = true AND size([(this_posts0_connect0_node)<-[:HAS_POST]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1]) > 0) AND ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub))) + WHERE this_posts0_connect0_node.id = $this_posts0_connect0_node_param0 AND (($isAuthenticated = true AND EXISTS { + MATCH (this_posts0_connect0_node)<-[:HAS_POST]-(authorization__before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) + }) AND ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub))) CALL { WITH * WITH collect(this_posts0_connect0_node) as connectedNodes, collect(this) as parentNodes @@ -1048,7 +1090,10 @@ describe("Cypher Auth Where", () => { CALL { WITH this OPTIONAL MATCH (this)-[this_posts0_disconnect0_rel:HAS_POST]->(this_posts0_disconnect0:Post) - WHERE (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) AND ($isAuthenticated = true AND size([(this_posts0_disconnect0)<-[:HAS_POST]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1]) > 0)) + WHERE (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) AND ($isAuthenticated = true AND EXISTS { + MATCH (this_posts0_disconnect0)<-[:HAS_POST]-(authorization__before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) + })) CALL { WITH this_posts0_disconnect0, this_posts0_disconnect0_rel, this WITH collect(this_posts0_disconnect0) as this_posts0_disconnect0, this_posts0_disconnect0_rel, this @@ -1100,7 +1145,10 @@ describe("Cypher Auth Where", () => { CALL { WITH this OPTIONAL MATCH (this)-[this_posts0_disconnect0_rel:HAS_POST]->(this_posts0_disconnect0:Post) - WHERE this_posts0_disconnect0.id = $updateUsers_args_update_posts0_disconnect0_where_Post_this_posts0_disconnect0param0 AND (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) AND ($isAuthenticated = true AND size([(this_posts0_disconnect0)<-[:HAS_POST]-(authorization__before_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) | 1]) > 0)) + WHERE this_posts0_disconnect0.id = $updateUsers_args_update_posts0_disconnect0_where_Post_this_posts0_disconnect0param0 AND (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) AND ($isAuthenticated = true AND EXISTS { + MATCH (this_posts0_disconnect0)<-[:HAS_POST]-(authorization__before_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization__before_this0.id = $jwt.sub) + })) CALL { WITH this_posts0_disconnect0, this_posts0_disconnect0_rel, this WITH collect(this_posts0_disconnect0) as this_posts0_disconnect0, this_posts0_disconnect0_rel, this diff --git a/packages/graphql/tests/tck/directives/authorization/projection-connection-union.test.ts b/packages/graphql/tests/tck/directives/authorization/projection-connection-union.test.ts index 45c864e8c3..18109f90c5 100644 --- a/packages/graphql/tests/tck/directives/authorization/projection-connection-union.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/projection-connection-union.test.ts @@ -94,7 +94,10 @@ describe("Cypher Auth Projection On Connections On Unions", () => { CALL { WITH this MATCH (this)-[this0:PUBLISHED]->(this1:Post) - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this1 MATCH (this1)<-[this3:HAS_POST]-(this4:User) diff --git a/packages/graphql/tests/tck/directives/authorization/projection-connection.test.ts b/packages/graphql/tests/tck/directives/authorization/projection-connection.test.ts index 373f70857d..3c5b5422d1 100644 --- a/packages/graphql/tests/tck/directives/authorization/projection-connection.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/projection-connection.test.ts @@ -82,7 +82,10 @@ describe("Cypher Auth Projection On Connections", () => { CALL { WITH this MATCH (this)-[this0:HAS_POST]->(this1:Post) - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH collect({ node: this1, relationship: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { @@ -142,7 +145,10 @@ describe("Cypher Auth Projection On Connections", () => { CALL { WITH this MATCH (this)-[this0:HAS_POST]->(this1:Post) - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH collect({ node: this1, relationship: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { @@ -252,7 +258,10 @@ describe("Cypher Auth Projection On top-level connections", () => { CALL { WITH this0 MATCH (this0)-[this1:HAS_POST]->(this2:Post) - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this2)<-[:HAS_POST]-(this3:User) WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this2)<-[:HAS_POST]-(this3:User) + WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH collect({ node: this2, relationship: this1 }) AS edges WITH edges, size(edges) AS totalCount CALL { @@ -323,7 +332,10 @@ describe("Cypher Auth Projection On top-level connections", () => { CALL { WITH this0 MATCH (this0)-[this1:HAS_POST]->(this2:Post) - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this2)<-[:HAS_POST]-(this3:User) WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this2)<-[:HAS_POST]-(this3:User) + WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH collect({ node: this2, relationship: this1 }) AS edges WITH edges, size(edges) AS totalCount CALL { diff --git a/packages/graphql/tests/tck/directives/node/node-with-auth-projection.test.ts b/packages/graphql/tests/tck/directives/node/node-with-auth-projection.test.ts index 0270abee3e..83b69d5da1 100644 --- a/packages/graphql/tests/tck/directives/node/node-with-auth-projection.test.ts +++ b/packages/graphql/tests/tck/directives/node/node-with-auth-projection.test.ts @@ -78,7 +78,10 @@ describe("Cypher Auth Projection On Connections", () => { CALL { WITH this MATCH (this)-[this0:HAS_POST]->(this1:Comment) - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this1)<-[:HAS_POST]-(this2:Person) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:HAS_POST]-(this2:Person) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH collect({ node: this1, relationship: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { diff --git a/packages/graphql/tests/tck/issues/4095.test.ts b/packages/graphql/tests/tck/issues/4095.test.ts index 9645d3dfa6..55e535584b 100644 --- a/packages/graphql/tests/tck/issues/4095.test.ts +++ b/packages/graphql/tests/tck/issues/4095.test.ts @@ -75,7 +75,10 @@ describe("https://github.com/neo4j/graphql/issues/4095", () => { CALL { WITH this MATCH (this)<-[this0:MEMBER_OF]-(this1:Person) - WHERE ($isAuthenticated = true AND size([(this1)<-[:CREATOR_OF]-(this2:User) WHERE ($jwt.uid IS NOT NULL AND this2.id = $jwt.uid) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:CREATOR_OF]-(this2:User) + WHERE ($jwt.uid IS NOT NULL AND this2.id = $jwt.uid) + }) RETURN count(this1) AS var3 } RETURN this { .id, membersAggregate: { count: var3 } } AS this" diff --git a/packages/graphql/tests/tck/issues/4115.test.ts b/packages/graphql/tests/tck/issues/4115.test.ts index c85174c25b..f5dafdec68 100644 --- a/packages/graphql/tests/tck/issues/4115.test.ts +++ b/packages/graphql/tests/tck/issues/4115.test.ts @@ -94,7 +94,16 @@ describe("https://github.com/neo4j/graphql/issues/4115", () => { CALL { WITH this MATCH (this)<-[this0:MEMBER_OF]-(this1:Person) - WHERE ($isAuthenticated = true AND (size([(this1)<-[:CREATOR_OF]-(this2:User) WHERE ($jwt.uid IS NOT NULL AND this2.id = $jwt.uid) | 1]) > 0 AND size([(this1)-[:MEMBER_OF]->(this4:Family) WHERE size([(this4)<-[:CREATOR_OF]-(this3:User) WHERE ($param2 IS NOT NULL AND $param2 IN this3.roles) | 1]) > 0 | 1]) > 0)) + WHERE ($isAuthenticated = true AND (EXISTS { + MATCH (this1)<-[:CREATOR_OF]-(this2:User) + WHERE ($jwt.uid IS NOT NULL AND this2.id = $jwt.uid) + } AND EXISTS { + MATCH (this1)-[:MEMBER_OF]->(this3:Family) + WHERE EXISTS { + MATCH (this3)<-[:CREATOR_OF]-(this4:User) + WHERE ($param2 IS NOT NULL AND $param2 IN this4.roles) + } + })) RETURN count(this1) AS var5 } RETURN this { .id, membersAggregate: { count: var5 } } AS this" diff --git a/packages/graphql/tests/tck/issues/4116.test.ts b/packages/graphql/tests/tck/issues/4116.test.ts index bcb4503084..fb3e099c9b 100644 --- a/packages/graphql/tests/tck/issues/4116.test.ts +++ b/packages/graphql/tests/tck/issues/4116.test.ts @@ -85,7 +85,13 @@ describe("https://github.com/neo4j/graphql/issues/4116", () => { CALL { WITH this MATCH (this)<-[this0:MEMBER_OF]-(this1:Person) - WHERE ($isAuthenticated = true AND size([(this1)-[:MEMBER_OF]->(this3:Family) WHERE size([(this3)<-[:CREATOR_OF]-(this2:User) WHERE ($param1 IS NOT NULL AND $param1 IN this2.roles) | 1]) > 0 | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this1)-[:MEMBER_OF]->(this2:Family) + WHERE EXISTS { + MATCH (this2)<-[:CREATOR_OF]-(this3:User) + WHERE ($param1 IS NOT NULL AND $param1 IN this3.roles) + } + }) RETURN count(this1) AS var4 } RETURN this { .id, membersAggregate: { count: var4 } } AS this" diff --git a/packages/graphql/tests/tck/issues/4170.test.ts b/packages/graphql/tests/tck/issues/4170.test.ts index 7720595596..9d3a5d1b28 100644 --- a/packages/graphql/tests/tck/issues/4170.test.ts +++ b/packages/graphql/tests/tck/issues/4170.test.ts @@ -161,7 +161,37 @@ describe("https://github.com/neo4j/graphql/issues/4170", () => { SET this0_admins0_node.userId = $this0_admins0_node_userId MERGE (this0)<-[:ADMIN_IN]-(this0_admins0_node) WITH * - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this0_settings0_node_openingDays0_node_open0_node)<-[:HAS_OPEN_INTERVALS]-(authorization_0_0_0_0_0_0_0_0_0_0_after_this3:OpeningDay) WHERE size([(authorization_0_0_0_0_0_0_0_0_0_0_after_this3)<-[:VALID_GARAGES]-(authorization_0_0_0_0_0_0_0_0_0_0_after_this2:Settings) WHERE size([(authorization_0_0_0_0_0_0_0_0_0_0_after_this2)<-[:HAS_SETTINGS]-(authorization_0_0_0_0_0_0_0_0_0_0_after_this1:Tenant) WHERE size([(authorization_0_0_0_0_0_0_0_0_0_0_after_this1)<-[:ADMIN_IN]-(authorization_0_0_0_0_0_0_0_0_0_0_after_this0:User) WHERE ($jwt.id IS NOT NULL AND authorization_0_0_0_0_0_0_0_0_0_0_after_this0.userId = $jwt.id) | 1]) > 0 | 1]) > 0 | 1]) > 0 | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this0_settings0_node_openingDays0_node)<-[:VALID_GARAGES]-(authorization_0_0_0_0_0_0_0_after_this2:Settings) WHERE size([(authorization_0_0_0_0_0_0_0_after_this2)<-[:HAS_SETTINGS]-(authorization_0_0_0_0_0_0_0_after_this1:Tenant) WHERE size([(authorization_0_0_0_0_0_0_0_after_this1)<-[:ADMIN_IN]-(authorization_0_0_0_0_0_0_0_after_this0:User) WHERE ($jwt.id IS NOT NULL AND authorization_0_0_0_0_0_0_0_after_this0.userId = $jwt.id) | 1]) > 0 | 1]) > 0 | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this0_settings0_node)<-[:HAS_SETTINGS]-(authorization_0_0_0_0_after_this1:Tenant) WHERE size([(authorization_0_0_0_0_after_this1)<-[:ADMIN_IN]-(authorization_0_0_0_0_after_this0:User) WHERE ($jwt.id IS NOT NULL AND authorization_0_0_0_0_after_this0.userId = $jwt.id) | 1]) > 0 | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this0)<-[:ADMIN_IN]-(authorization_0_after_this0:User) WHERE ($jwt.id IS NOT NULL AND authorization_0_after_this0.userId = $jwt.id) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this0_settings0_node_openingDays0_node_open0_node)<-[:HAS_OPEN_INTERVALS]-(authorization_0_0_0_0_0_0_0_0_0_0_after_this0:OpeningDay) + WHERE EXISTS { + MATCH (authorization_0_0_0_0_0_0_0_0_0_0_after_this0)<-[:VALID_GARAGES]-(authorization_0_0_0_0_0_0_0_0_0_0_after_this1:Settings) + WHERE EXISTS { + MATCH (authorization_0_0_0_0_0_0_0_0_0_0_after_this1)<-[:HAS_SETTINGS]-(authorization_0_0_0_0_0_0_0_0_0_0_after_this2:Tenant) + WHERE EXISTS { + MATCH (authorization_0_0_0_0_0_0_0_0_0_0_after_this2)<-[:ADMIN_IN]-(authorization_0_0_0_0_0_0_0_0_0_0_after_this3:User) + WHERE ($jwt.id IS NOT NULL AND authorization_0_0_0_0_0_0_0_0_0_0_after_this3.userId = $jwt.id) + } + } + } + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this0_settings0_node_openingDays0_node)<-[:VALID_GARAGES]-(authorization_0_0_0_0_0_0_0_after_this0:Settings) + WHERE EXISTS { + MATCH (authorization_0_0_0_0_0_0_0_after_this0)<-[:HAS_SETTINGS]-(authorization_0_0_0_0_0_0_0_after_this1:Tenant) + WHERE EXISTS { + MATCH (authorization_0_0_0_0_0_0_0_after_this1)<-[:ADMIN_IN]-(authorization_0_0_0_0_0_0_0_after_this2:User) + WHERE ($jwt.id IS NOT NULL AND authorization_0_0_0_0_0_0_0_after_this2.userId = $jwt.id) + } + } + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this0_settings0_node)<-[:HAS_SETTINGS]-(authorization_0_0_0_0_after_this0:Tenant) + WHERE EXISTS { + MATCH (authorization_0_0_0_0_after_this0)<-[:ADMIN_IN]-(authorization_0_0_0_0_after_this1:User) + WHERE ($jwt.id IS NOT NULL AND authorization_0_0_0_0_after_this1.userId = $jwt.id) + } + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this0)<-[:ADMIN_IN]-(authorization_0_after_this0:User) + WHERE ($jwt.id IS NOT NULL AND authorization_0_after_this0.userId = $jwt.id) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this0 } CALL { diff --git a/packages/graphql/tests/tck/issues/4214.test.ts b/packages/graphql/tests/tck/issues/4214.test.ts index 640ab3f5da..54c74575fb 100644 --- a/packages/graphql/tests/tck/issues/4214.test.ts +++ b/packages/graphql/tests/tck/issues/4214.test.ts @@ -167,7 +167,13 @@ describe("https://github.com/neo4j/graphql/issues/4214", () => { CALL { WITH this0 OPTIONAL MATCH (this0_transaction_connect0_node:Transaction) - WHERE this0_transaction_connect0_node.id = $this0_transaction_connect0_node_param0 AND ((($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization_0_before_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND (($jwt.roles IS NOT NULL AND $authorization_0_before_param3 IN $jwt.roles) OR ($jwt.roles IS NOT NULL AND $authorization_0_before_param4 IN $jwt.roles)) AND size([(this0_transaction_connect0_node)-[:TRANSACTION]->(authorization_0_before_this0:Store) WHERE ($jwt.store IS NOT NULL AND authorization_0_before_this0.id = $jwt.store) | 1]) > 0)) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (($jwt.roles IS NOT NULL AND $authorization_0_before_param5 IN $jwt.roles) OR ($jwt.roles IS NOT NULL AND $authorization_0_before_param6 IN $jwt.roles)) AND size([(this0_transaction_connect0_node)-[:TRANSACTION]->(authorization_0_before_this1:Store) WHERE ($jwt.store IS NOT NULL AND authorization_0_before_this1.id = $jwt.store) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE this0_transaction_connect0_node.id = $this0_transaction_connect0_node_param0 AND ((($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization_0_before_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND (($jwt.roles IS NOT NULL AND $authorization_0_before_param3 IN $jwt.roles) OR ($jwt.roles IS NOT NULL AND $authorization_0_before_param4 IN $jwt.roles)) AND EXISTS { + MATCH (this0_transaction_connect0_node)-[:TRANSACTION]->(authorization_0_before_this0:Store) + WHERE ($jwt.store IS NOT NULL AND authorization_0_before_this0.id = $jwt.store) + })) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (($jwt.roles IS NOT NULL AND $authorization_0_before_param5 IN $jwt.roles) OR ($jwt.roles IS NOT NULL AND $authorization_0_before_param6 IN $jwt.roles)) AND EXISTS { + MATCH (this0_transaction_connect0_node)-[:TRANSACTION]->(authorization_0_before_this1:Store) + WHERE ($jwt.store IS NOT NULL AND authorization_0_before_this1.id = $jwt.store) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0])) CALL { WITH * WITH collect(this0_transaction_connect0_node) as connectedNodes, collect(this0) as parentNodes @@ -180,11 +186,26 @@ describe("https://github.com/neo4j/graphql/issues/4214", () => { } WITH this0, this0_transaction_connect0_node WITH this0, this0_transaction_connect0_node - WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (($jwt.roles IS NOT NULL AND $authorization_0_after_param2 IN $jwt.roles) OR ($jwt.roles IS NOT NULL AND $authorization_0_after_param3 IN $jwt.roles)) AND size([(this0)-[:ITEM_TRANSACTED]->(authorization_0_after_this1:Transaction) WHERE size([(authorization_0_after_this1)-[:TRANSACTION]->(authorization_0_after_this0:Store) WHERE ($jwt.store IS NOT NULL AND authorization_0_after_this0.id = $jwt.store) | 1]) > 0 | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (($jwt.roles IS NOT NULL AND $authorization_0_after_param4 IN $jwt.roles) OR ($jwt.roles IS NOT NULL AND $authorization_0_after_param5 IN $jwt.roles)) AND size([(this0_transaction_connect0_node)-[:TRANSACTION]->(authorization_0_after_this2:Store) WHERE ($jwt.store IS NOT NULL AND authorization_0_after_this2.id = $jwt.store) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (($jwt.roles IS NOT NULL AND $authorization_0_after_param2 IN $jwt.roles) OR ($jwt.roles IS NOT NULL AND $authorization_0_after_param3 IN $jwt.roles)) AND EXISTS { + MATCH (this0)-[:ITEM_TRANSACTED]->(authorization_0_after_this0:Transaction) + WHERE EXISTS { + MATCH (authorization_0_after_this0)-[:TRANSACTION]->(authorization_0_after_this1:Store) + WHERE ($jwt.store IS NOT NULL AND authorization_0_after_this1.id = $jwt.store) + } + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (($jwt.roles IS NOT NULL AND $authorization_0_after_param4 IN $jwt.roles) OR ($jwt.roles IS NOT NULL AND $authorization_0_after_param5 IN $jwt.roles)) AND EXISTS { + MATCH (this0_transaction_connect0_node)-[:TRANSACTION]->(authorization_0_after_this2:Store) + WHERE ($jwt.store IS NOT NULL AND authorization_0_after_this2.id = $jwt.store) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0])) RETURN count(*) AS connect_this0_transaction_connect_Transaction0 } WITH * - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (($jwt.roles IS NOT NULL AND $authorization_0_after_param2 IN $jwt.roles) OR ($jwt.roles IS NOT NULL AND $authorization_0_after_param3 IN $jwt.roles)) AND size([(this0)-[:ITEM_TRANSACTED]->(authorization_0_after_this1:Transaction) WHERE size([(authorization_0_after_this1)-[:TRANSACTION]->(authorization_0_after_this0:Store) WHERE ($jwt.store IS NOT NULL AND authorization_0_after_this0.id = $jwt.store) | 1]) > 0 | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (($jwt.roles IS NOT NULL AND $authorization_0_after_param2 IN $jwt.roles) OR ($jwt.roles IS NOT NULL AND $authorization_0_after_param3 IN $jwt.roles)) AND EXISTS { + MATCH (this0)-[:ITEM_TRANSACTED]->(authorization_0_after_this0:Transaction) + WHERE EXISTS { + MATCH (authorization_0_after_this0)-[:TRANSACTION]->(authorization_0_after_this1:Store) + WHERE ($jwt.store IS NOT NULL AND authorization_0_after_this1.id = $jwt.store) + } + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this0 } CALL { @@ -192,7 +213,10 @@ describe("https://github.com/neo4j/graphql/issues/4214", () => { CALL { WITH this0 MATCH (this0)-[create_this0:ITEM_TRANSACTED]->(create_this1:Transaction) - WHERE (($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $create_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND (($jwt.roles IS NOT NULL AND $create_param3 IN $jwt.roles) OR ($jwt.roles IS NOT NULL AND $create_param4 IN $jwt.roles)) AND size([(create_this1)-[:TRANSACTION]->(create_this2:Store) WHERE ($jwt.store IS NOT NULL AND create_this2.id = $jwt.store) | 1]) > 0)) + WHERE (($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $create_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND (($jwt.roles IS NOT NULL AND $create_param3 IN $jwt.roles) OR ($jwt.roles IS NOT NULL AND $create_param4 IN $jwt.roles)) AND EXISTS { + MATCH (create_this1)-[:TRANSACTION]->(create_this2:Store) + WHERE ($jwt.store IS NOT NULL AND create_this2.id = $jwt.store) + })) CALL { WITH create_this1 MATCH (create_this1)-[create_this3:TRANSACTION]->(create_this4:Store) diff --git a/packages/graphql/tests/tck/issues/4223.test.ts b/packages/graphql/tests/tck/issues/4223.test.ts index 34e8e3a5bf..f934e17146 100644 --- a/packages/graphql/tests/tck/issues/4223.test.ts +++ b/packages/graphql/tests/tck/issues/4223.test.ts @@ -186,7 +186,46 @@ describe("https://github.com/neo4j/graphql/issues/4223", () => { SET this0_admins0_node.userId = $this0_admins0_node_userId MERGE (this0)<-[:ADMIN_IN]-(this0_admins0_node) WITH * - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this0_settings0_node_openingDays0_node_open0_node)<-[:HAS_OPEN_INTERVALS]-(authorization_0_0_0_0_0_0_0_0_0_0_after_this3:OpeningDay) WHERE size([(authorization_0_0_0_0_0_0_0_0_0_0_after_this3)<-[:VALID_GARAGES]-(authorization_0_0_0_0_0_0_0_0_0_0_after_this2:Settings) WHERE size([(authorization_0_0_0_0_0_0_0_0_0_0_after_this2)<-[:HAS_SETTINGS]-(authorization_0_0_0_0_0_0_0_0_0_0_after_this1:Tenant) WHERE size([(authorization_0_0_0_0_0_0_0_0_0_0_after_this1)<-[:ADMIN_IN]-(authorization_0_0_0_0_0_0_0_0_0_0_after_this0:User) WHERE ($jwt.id IS NOT NULL AND authorization_0_0_0_0_0_0_0_0_0_0_after_this0.userId = $jwt.id) | 1]) > 0 | 1]) > 0 | 1]) > 0 | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this0_settings0_node_openingDays0_node)<-[:VALID_GARAGES]-(authorization_0_0_0_0_0_0_0_after_this2:Settings) WHERE size([(authorization_0_0_0_0_0_0_0_after_this2)<-[:HAS_SETTINGS]-(authorization_0_0_0_0_0_0_0_after_this1:Tenant) WHERE size([(authorization_0_0_0_0_0_0_0_after_this1)<-[:ADMIN_IN]-(authorization_0_0_0_0_0_0_0_after_this0:User) WHERE ($jwt.id IS NOT NULL AND authorization_0_0_0_0_0_0_0_after_this0.userId = $jwt.id) | 1]) > 0 | 1]) > 0 | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this0_settings0_node_myWorkspace0_node)<-[:HAS_WORKSPACE_SETTINGS]-(authorization_0_0_0_0_1_0_0_after_this2:Settings) WHERE size([(authorization_0_0_0_0_1_0_0_after_this2)<-[:HAS_SETTINGS]-(authorization_0_0_0_0_1_0_0_after_this1:Tenant) WHERE size([(authorization_0_0_0_0_1_0_0_after_this1)<-[:ADMIN_IN]-(authorization_0_0_0_0_1_0_0_after_this0:User) WHERE ($jwt.id IS NOT NULL AND authorization_0_0_0_0_1_0_0_after_this0.userId = $jwt.id) | 1]) > 0 | 1]) > 0 | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this0_settings0_node)<-[:HAS_SETTINGS]-(authorization_0_0_0_0_after_this1:Tenant) WHERE size([(authorization_0_0_0_0_after_this1)<-[:ADMIN_IN]-(authorization_0_0_0_0_after_this0:User) WHERE ($jwt.id IS NOT NULL AND authorization_0_0_0_0_after_this0.userId = $jwt.id) | 1]) > 0 | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this0)<-[:ADMIN_IN]-(authorization_0_after_this0:User) WHERE ($jwt.id IS NOT NULL AND authorization_0_after_this0.userId = $jwt.id) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this0_settings0_node_openingDays0_node_open0_node)<-[:HAS_OPEN_INTERVALS]-(authorization_0_0_0_0_0_0_0_0_0_0_after_this0:OpeningDay) + WHERE EXISTS { + MATCH (authorization_0_0_0_0_0_0_0_0_0_0_after_this0)<-[:VALID_GARAGES]-(authorization_0_0_0_0_0_0_0_0_0_0_after_this1:Settings) + WHERE EXISTS { + MATCH (authorization_0_0_0_0_0_0_0_0_0_0_after_this1)<-[:HAS_SETTINGS]-(authorization_0_0_0_0_0_0_0_0_0_0_after_this2:Tenant) + WHERE EXISTS { + MATCH (authorization_0_0_0_0_0_0_0_0_0_0_after_this2)<-[:ADMIN_IN]-(authorization_0_0_0_0_0_0_0_0_0_0_after_this3:User) + WHERE ($jwt.id IS NOT NULL AND authorization_0_0_0_0_0_0_0_0_0_0_after_this3.userId = $jwt.id) + } + } + } + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this0_settings0_node_openingDays0_node)<-[:VALID_GARAGES]-(authorization_0_0_0_0_0_0_0_after_this0:Settings) + WHERE EXISTS { + MATCH (authorization_0_0_0_0_0_0_0_after_this0)<-[:HAS_SETTINGS]-(authorization_0_0_0_0_0_0_0_after_this1:Tenant) + WHERE EXISTS { + MATCH (authorization_0_0_0_0_0_0_0_after_this1)<-[:ADMIN_IN]-(authorization_0_0_0_0_0_0_0_after_this2:User) + WHERE ($jwt.id IS NOT NULL AND authorization_0_0_0_0_0_0_0_after_this2.userId = $jwt.id) + } + } + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this0_settings0_node_myWorkspace0_node)<-[:HAS_WORKSPACE_SETTINGS]-(authorization_0_0_0_0_1_0_0_after_this0:Settings) + WHERE EXISTS { + MATCH (authorization_0_0_0_0_1_0_0_after_this0)<-[:HAS_SETTINGS]-(authorization_0_0_0_0_1_0_0_after_this1:Tenant) + WHERE EXISTS { + MATCH (authorization_0_0_0_0_1_0_0_after_this1)<-[:ADMIN_IN]-(authorization_0_0_0_0_1_0_0_after_this2:User) + WHERE ($jwt.id IS NOT NULL AND authorization_0_0_0_0_1_0_0_after_this2.userId = $jwt.id) + } + } + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this0_settings0_node)<-[:HAS_SETTINGS]-(authorization_0_0_0_0_after_this0:Tenant) + WHERE EXISTS { + MATCH (authorization_0_0_0_0_after_this0)<-[:ADMIN_IN]-(authorization_0_0_0_0_after_this1:User) + WHERE ($jwt.id IS NOT NULL AND authorization_0_0_0_0_after_this1.userId = $jwt.id) + } + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this0)<-[:ADMIN_IN]-(authorization_0_after_this0:User) + WHERE ($jwt.id IS NOT NULL AND authorization_0_after_this0.userId = $jwt.id) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this0 } CALL { diff --git a/packages/graphql/tests/tck/issues/4239.test.ts b/packages/graphql/tests/tck/issues/4239.test.ts index 8102283c04..cfeda9c607 100644 --- a/packages/graphql/tests/tck/issues/4239.test.ts +++ b/packages/graphql/tests/tck/issues/4239.test.ts @@ -137,7 +137,10 @@ describe("https://github.com/neo4j/graphql/issues/4239", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Movie) WITH * - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[:DIRECTED]-(this0:Person) WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:DIRECTED]-(this0:Person) + WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN this { .title } AS this" `); diff --git a/packages/graphql/tests/tck/issues/4292.test.ts b/packages/graphql/tests/tck/issues/4292.test.ts index b265033cff..51f87f1bfd 100644 --- a/packages/graphql/tests/tck/issues/4292.test.ts +++ b/packages/graphql/tests/tck/issues/4292.test.ts @@ -192,11 +192,65 @@ describe("https://github.com/neo4j/graphql/issues/4292", () => { WITH this MATCH (this)<-[this0:MEMBER_OF]-(this1:Person) WITH * - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (size([(this1)<-[:CREATOR_OF]-(this2:User) WHERE ($jwt.uid IS NOT NULL AND this2.id = $jwt.uid) | 1]) > 0 OR size([(this1)-[:MEMBER_OF]->(this5:Group) WHERE size([(this5)<-[:ADMIN_OF]-(this4:Admin) WHERE size([(this4)-[:IS_USER]->(this3:User) WHERE ($jwt.uid IS NOT NULL AND this3.id = $jwt.uid) | 1]) > 0 | 1]) > 0 | 1]) > 0 OR size([(this1)-[:MEMBER_OF]->(this8:Group) WHERE size([(this8)<-[:CONTRIBUTOR_TO]-(this7:Contributor) WHERE size([(this7)-[:IS_USER]->(this6:User) WHERE ($jwt.uid IS NOT NULL AND this6.id = $jwt.uid) | 1]) > 0 | 1]) > 0 | 1]) > 0 OR size([(this1)-[:MEMBER_OF]->(this10:Group) WHERE size([(this10)<-[:CREATOR_OF]-(this9:User) WHERE ($jwt.uid IS NOT NULL AND this9.id = $jwt.uid) | 1]) > 0 | 1]) > 0)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (EXISTS { + MATCH (this1)<-[:CREATOR_OF]-(this2:User) + WHERE ($jwt.uid IS NOT NULL AND this2.id = $jwt.uid) + } OR EXISTS { + MATCH (this1)-[:MEMBER_OF]->(this3:Group) + WHERE EXISTS { + MATCH (this3)<-[:ADMIN_OF]-(this4:Admin) + WHERE EXISTS { + MATCH (this4)-[:IS_USER]->(this5:User) + WHERE ($jwt.uid IS NOT NULL AND this5.id = $jwt.uid) + } + } + } OR EXISTS { + MATCH (this1)-[:MEMBER_OF]->(this6:Group) + WHERE EXISTS { + MATCH (this6)<-[:CONTRIBUTOR_TO]-(this7:Contributor) + WHERE EXISTS { + MATCH (this7)-[:IS_USER]->(this8:User) + WHERE ($jwt.uid IS NOT NULL AND this8.id = $jwt.uid) + } + } + } OR EXISTS { + MATCH (this1)-[:MEMBER_OF]->(this9:Group) + WHERE EXISTS { + MATCH (this9)<-[:CREATOR_OF]-(this10:User) + WHERE ($jwt.uid IS NOT NULL AND this10.id = $jwt.uid) + } + })), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this1 MATCH (this1)-[this11:PARTNER_OF]-(this12:Person) - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (size([(this12)<-[:CREATOR_OF]-(this13:User) WHERE ($jwt.uid IS NOT NULL AND this13.id = $jwt.uid) | 1]) > 0 OR size([(this12)-[:MEMBER_OF]->(this16:Group) WHERE size([(this16)<-[:ADMIN_OF]-(this15:Admin) WHERE size([(this15)-[:IS_USER]->(this14:User) WHERE ($jwt.uid IS NOT NULL AND this14.id = $jwt.uid) | 1]) > 0 | 1]) > 0 | 1]) > 0 OR size([(this12)-[:MEMBER_OF]->(this19:Group) WHERE size([(this19)<-[:CONTRIBUTOR_TO]-(this18:Contributor) WHERE size([(this18)-[:IS_USER]->(this17:User) WHERE ($jwt.uid IS NOT NULL AND this17.id = $jwt.uid) | 1]) > 0 | 1]) > 0 | 1]) > 0 OR size([(this12)-[:MEMBER_OF]->(this21:Group) WHERE size([(this21)<-[:CREATOR_OF]-(this20:User) WHERE ($jwt.uid IS NOT NULL AND this20.id = $jwt.uid) | 1]) > 0 | 1]) > 0)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND (EXISTS { + MATCH (this12)<-[:CREATOR_OF]-(this13:User) + WHERE ($jwt.uid IS NOT NULL AND this13.id = $jwt.uid) + } OR EXISTS { + MATCH (this12)-[:MEMBER_OF]->(this14:Group) + WHERE EXISTS { + MATCH (this14)<-[:ADMIN_OF]-(this15:Admin) + WHERE EXISTS { + MATCH (this15)-[:IS_USER]->(this16:User) + WHERE ($jwt.uid IS NOT NULL AND this16.id = $jwt.uid) + } + } + } OR EXISTS { + MATCH (this12)-[:MEMBER_OF]->(this17:Group) + WHERE EXISTS { + MATCH (this17)<-[:CONTRIBUTOR_TO]-(this18:Contributor) + WHERE EXISTS { + MATCH (this18)-[:IS_USER]->(this19:User) + WHERE ($jwt.uid IS NOT NULL AND this19.id = $jwt.uid) + } + } + } OR EXISTS { + MATCH (this12)-[:MEMBER_OF]->(this20:Group) + WHERE EXISTS { + MATCH (this20)<-[:CREATOR_OF]-(this21:User) + WHERE ($jwt.uid IS NOT NULL AND this21.id = $jwt.uid) + } + })), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH collect({ node: this12, relationship: this11 }) AS edges WITH edges, size(edges) AS totalCount CALL { diff --git a/packages/graphql/tests/tck/issues/5023.test.ts b/packages/graphql/tests/tck/issues/5023.test.ts index 7c185a5991..3742e5324a 100644 --- a/packages/graphql/tests/tck/issues/5023.test.ts +++ b/packages/graphql/tests/tck/issues/5023.test.ts @@ -127,17 +127,35 @@ describe("https://github.com/neo4j/graphql/issues/5023", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Tenant) WITH * - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[:ADMIN_IN]-(this0:User) WHERE ($jwt.id IS NOT NULL AND this0.userId = $jwt.id) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:ADMIN_IN]-(this0:User) + WHERE ($jwt.id IS NOT NULL AND this0.userId = $jwt.id) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this CALL { WITH this MATCH (this)-[this_has_settings0_relationship:HAS_SETTINGS]->(this_settings0:Settings) - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this_settings0)<-[:HAS_SETTINGS]-(authorization__before_this1:Tenant) WHERE size([(authorization__before_this1)<-[:ADMIN_IN]-(authorization__before_this0:User) WHERE ($jwt.id IS NOT NULL AND authorization__before_this0.userId = $jwt.id) | 1]) > 0 | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this_settings0)<-[:HAS_SETTINGS]-(authorization__before_this0:Tenant) + WHERE EXISTS { + MATCH (authorization__before_this0)<-[:ADMIN_IN]-(authorization__before_this1:User) + WHERE ($jwt.id IS NOT NULL AND authorization__before_this1.userId = $jwt.id) + } + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH * CALL { WITH * OPTIONAL MATCH (this_settings0)-[this_settings0_extendedOpeningHours0_delete0_relationship:HAS_OPENING_HOURS]->(this_settings0_extendedOpeningHours0_delete0:OpeningDay) - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this_settings0_extendedOpeningHours0_delete0)<-[:HAS_OPENING_HOURS]-(authorization__before_this2:Settings) WHERE size([(authorization__before_this2)<-[:HAS_SETTINGS]-(authorization__before_this1:Tenant) WHERE size([(authorization__before_this1)<-[:ADMIN_IN]-(authorization__before_this0:User) WHERE ($jwt.id IS NOT NULL AND authorization__before_this0.userId = $jwt.id) | 1]) > 0 | 1]) > 0 | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this_settings0_extendedOpeningHours0_delete0)<-[:HAS_OPENING_HOURS]-(authorization__before_this0:Settings) + WHERE EXISTS { + MATCH (authorization__before_this0)<-[:HAS_SETTINGS]-(authorization__before_this1:Tenant) + WHERE EXISTS { + MATCH (authorization__before_this1)<-[:ADMIN_IN]-(authorization__before_this2:User) + WHERE ($jwt.id IS NOT NULL AND authorization__before_this2.userId = $jwt.id) + } + } + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this_settings0_extendedOpeningHours0_delete0_relationship, collect(DISTINCT this_settings0_extendedOpeningHours0_delete0) AS this_settings0_extendedOpeningHours0_delete0_to_delete CALL { WITH this_settings0_extendedOpeningHours0_delete0_to_delete @@ -146,28 +164,67 @@ describe("https://github.com/neo4j/graphql/issues/5023", () => { } } WITH this, this_settings0 - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this_settings0)<-[:HAS_SETTINGS]-(authorization__after_this1:Tenant) WHERE size([(authorization__after_this1)<-[:ADMIN_IN]-(authorization__after_this0:User) WHERE ($jwt.id IS NOT NULL AND authorization__after_this0.userId = $jwt.id) | 1]) > 0 | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this_settings0)<-[:HAS_SETTINGS]-(authorization__after_this0:Tenant) + WHERE EXISTS { + MATCH (authorization__after_this0)<-[:ADMIN_IN]-(authorization__after_this1:User) + WHERE ($jwt.id IS NOT NULL AND authorization__after_this1.userId = $jwt.id) + } + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) RETURN count(*) AS update_this_settings0 } WITH this - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[:ADMIN_IN]-(authorization__after_this0:User) WHERE ($jwt.id IS NOT NULL AND authorization__after_this0.userId = $jwt.id) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:ADMIN_IN]-(authorization__after_this0:User) + WHERE ($jwt.id IS NOT NULL AND authorization__after_this0.userId = $jwt.id) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH * - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this)<-[:ADMIN_IN]-(update_this0:User) WHERE ($jwt.id IS NOT NULL AND update_this0.userId = $jwt.id) | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:ADMIN_IN]-(update_this0:User) + WHERE ($jwt.id IS NOT NULL AND update_this0.userId = $jwt.id) + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH this MATCH (this)-[update_this1:HAS_SETTINGS]->(update_this2:Settings) WITH * - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(update_this2)<-[:HAS_SETTINGS]-(update_this4:Tenant) WHERE size([(update_this4)<-[:ADMIN_IN]-(update_this3:User) WHERE ($jwt.id IS NOT NULL AND update_this3.userId = $jwt.id) | 1]) > 0 | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (update_this2)<-[:HAS_SETTINGS]-(update_this3:Tenant) + WHERE EXISTS { + MATCH (update_this3)<-[:ADMIN_IN]-(update_this4:User) + WHERE ($jwt.id IS NOT NULL AND update_this4.userId = $jwt.id) + } + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH update_this2 MATCH (update_this2)-[update_this5:HAS_OPENING_HOURS]->(update_this6:OpeningDay) WITH * - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(update_this6)<-[:HAS_OPENING_HOURS]-(update_this9:Settings) WHERE size([(update_this9)<-[:HAS_SETTINGS]-(update_this8:Tenant) WHERE size([(update_this8)<-[:ADMIN_IN]-(update_this7:User) WHERE ($jwt.id IS NOT NULL AND update_this7.userId = $jwt.id) | 1]) > 0 | 1]) > 0 | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (update_this6)<-[:HAS_OPENING_HOURS]-(update_this7:Settings) + WHERE EXISTS { + MATCH (update_this7)<-[:HAS_SETTINGS]-(update_this8:Tenant) + WHERE EXISTS { + MATCH (update_this8)<-[:ADMIN_IN]-(update_this9:User) + WHERE ($jwt.id IS NOT NULL AND update_this9.userId = $jwt.id) + } + } + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) CALL { WITH update_this6 MATCH (update_this6)-[update_this10:HAS_OPEN_INTERVALS]->(update_this11:OpeningHoursInterval) WITH * - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(update_this11)<-[:HAS_OPEN_INTERVALS]-(update_this15:OpeningDay) WHERE size([(update_this15)<-[:HAS_OPENING_HOURS]-(update_this14:Settings) WHERE size([(update_this14)<-[:HAS_SETTINGS]-(update_this13:Tenant) WHERE size([(update_this13)<-[:ADMIN_IN]-(update_this12:User) WHERE ($jwt.id IS NOT NULL AND update_this12.userId = $jwt.id) | 1]) > 0 | 1]) > 0 | 1]) > 0 | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (update_this11)<-[:HAS_OPEN_INTERVALS]-(update_this12:OpeningDay) + WHERE EXISTS { + MATCH (update_this12)<-[:HAS_OPENING_HOURS]-(update_this13:Settings) + WHERE EXISTS { + MATCH (update_this13)<-[:HAS_SETTINGS]-(update_this14:Tenant) + WHERE EXISTS { + MATCH (update_this14)<-[:ADMIN_IN]-(update_this15:User) + WHERE ($jwt.id IS NOT NULL AND update_this15.userId = $jwt.id) + } + } + } + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH update_this11 { .name } AS update_this11 RETURN collect(update_this11) AS update_var16 } diff --git a/packages/graphql/tests/tck/issues/505.test.ts b/packages/graphql/tests/tck/issues/505.test.ts index 47b27d981b..fbd3ffbdbb 100644 --- a/packages/graphql/tests/tck/issues/505.test.ts +++ b/packages/graphql/tests/tck/issues/505.test.ts @@ -124,7 +124,28 @@ describe("https://github.com/neo4j/graphql/issues/505", () => { WITH this MATCH (this)-[this0:CREATED_PAGE]->(this1:Page) WITH * - WHERE ($isAuthenticated = true AND (size([(this1)<-[:CREATED_PAGE]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.authId = $jwt.sub) | 1]) > 0 OR (($param3 IS NOT NULL AND this1.shared = $param3) AND size([(this1)<-[:HAS_PAGE]-(this4:Workspace) WHERE NOT (size([(this4)<-[:MEMBER_OF]-(this3:User) WHERE ($jwt.sub IS NOT NULL AND this3.authId = $jwt.sub) | 1]) > 0 OR size([(this4)-[:HAS_ADMIN]->(this5:User) WHERE ($jwt.sub IS NOT NULL AND this5.authId = $jwt.sub) | 1]) > 0) | 1]) = 0))) + WHERE ($isAuthenticated = true AND (EXISTS { + MATCH (this1)<-[:CREATED_PAGE]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.authId = $jwt.sub) + } OR (($param3 IS NOT NULL AND this1.shared = $param3) AND (EXISTS { + MATCH (this1)<-[:HAS_PAGE]-(this3:Workspace) + WHERE (EXISTS { + MATCH (this3)<-[:MEMBER_OF]-(this4:User) + WHERE ($jwt.sub IS NOT NULL AND this4.authId = $jwt.sub) + } OR EXISTS { + MATCH (this3)-[:HAS_ADMIN]->(this5:User) + WHERE ($jwt.sub IS NOT NULL AND this5.authId = $jwt.sub) + }) + } AND NOT (EXISTS { + MATCH (this1)<-[:HAS_PAGE]-(this3:Workspace) + WHERE NOT (EXISTS { + MATCH (this3)<-[:MEMBER_OF]-(this4:User) + WHERE ($jwt.sub IS NOT NULL AND this4.authId = $jwt.sub) + } OR EXISTS { + MATCH (this3)-[:HAS_ADMIN]->(this5:User) + WHERE ($jwt.sub IS NOT NULL AND this5.authId = $jwt.sub) + }) + }))))) WITH this1 { .id } AS this1 RETURN collect(this1) AS var6 } @@ -158,12 +179,39 @@ describe("https://github.com/neo4j/graphql/issues/505", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Workspace) WITH * - WHERE (this.id = $param0 AND ($isAuthenticated = true AND (size([(this)<-[:MEMBER_OF]-(this0:User) WHERE ($jwt.sub IS NOT NULL AND this0.authId = $jwt.sub) | 1]) > 0 OR size([(this)-[:HAS_ADMIN]->(this1:User) WHERE ($jwt.sub IS NOT NULL AND this1.authId = $jwt.sub) | 1]) > 0))) + WHERE (this.id = $param0 AND ($isAuthenticated = true AND (EXISTS { + MATCH (this)<-[:MEMBER_OF]-(this0:User) + WHERE ($jwt.sub IS NOT NULL AND this0.authId = $jwt.sub) + } OR EXISTS { + MATCH (this)-[:HAS_ADMIN]->(this1:User) + WHERE ($jwt.sub IS NOT NULL AND this1.authId = $jwt.sub) + }))) CALL { WITH this MATCH (this)-[this2:HAS_PAGE]->(this3:Page) WITH * - WHERE ($isAuthenticated = true AND (size([(this3)<-[:CREATED_PAGE]-(this4:User) WHERE ($jwt.sub IS NOT NULL AND this4.authId = $jwt.sub) | 1]) > 0 OR (($param3 IS NOT NULL AND this3.shared = $param3) AND size([(this3)<-[:HAS_PAGE]-(this6:Workspace) WHERE NOT (size([(this6)<-[:MEMBER_OF]-(this5:User) WHERE ($jwt.sub IS NOT NULL AND this5.authId = $jwt.sub) | 1]) > 0 OR size([(this6)-[:HAS_ADMIN]->(this7:User) WHERE ($jwt.sub IS NOT NULL AND this7.authId = $jwt.sub) | 1]) > 0) | 1]) = 0))) + WHERE ($isAuthenticated = true AND (EXISTS { + MATCH (this3)<-[:CREATED_PAGE]-(this4:User) + WHERE ($jwt.sub IS NOT NULL AND this4.authId = $jwt.sub) + } OR (($param3 IS NOT NULL AND this3.shared = $param3) AND (EXISTS { + MATCH (this3)<-[:HAS_PAGE]-(this5:Workspace) + WHERE (EXISTS { + MATCH (this5)<-[:MEMBER_OF]-(this6:User) + WHERE ($jwt.sub IS NOT NULL AND this6.authId = $jwt.sub) + } OR EXISTS { + MATCH (this5)-[:HAS_ADMIN]->(this7:User) + WHERE ($jwt.sub IS NOT NULL AND this7.authId = $jwt.sub) + }) + } AND NOT (EXISTS { + MATCH (this3)<-[:HAS_PAGE]-(this5:Workspace) + WHERE NOT (EXISTS { + MATCH (this5)<-[:MEMBER_OF]-(this6:User) + WHERE ($jwt.sub IS NOT NULL AND this6.authId = $jwt.sub) + } OR EXISTS { + MATCH (this5)-[:HAS_ADMIN]->(this7:User) + WHERE ($jwt.sub IS NOT NULL AND this7.authId = $jwt.sub) + }) + }))))) WITH this3 { .id } AS this3 RETURN collect(this3) AS var8 } @@ -200,7 +248,28 @@ describe("https://github.com/neo4j/graphql/issues/505", () => { } AND NOT (EXISTS { MATCH (this)<-[:HAS_PAGE]-(this0:Workspace) WHERE NOT (this0.id = $param0) - })) AND ($isAuthenticated = true AND (size([(this)<-[:CREATED_PAGE]-(this1:User) WHERE ($jwt.sub IS NOT NULL AND this1.authId = $jwt.sub) | 1]) > 0 OR (($param3 IS NOT NULL AND this.shared = $param3) AND size([(this)<-[:HAS_PAGE]-(this3:Workspace) WHERE NOT (size([(this3)<-[:MEMBER_OF]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.authId = $jwt.sub) | 1]) > 0 OR size([(this3)-[:HAS_ADMIN]->(this4:User) WHERE ($jwt.sub IS NOT NULL AND this4.authId = $jwt.sub) | 1]) > 0) | 1]) = 0)))) + })) AND ($isAuthenticated = true AND (EXISTS { + MATCH (this)<-[:CREATED_PAGE]-(this1:User) + WHERE ($jwt.sub IS NOT NULL AND this1.authId = $jwt.sub) + } OR (($param3 IS NOT NULL AND this.shared = $param3) AND (EXISTS { + MATCH (this)<-[:HAS_PAGE]-(this2:Workspace) + WHERE (EXISTS { + MATCH (this2)<-[:MEMBER_OF]-(this3:User) + WHERE ($jwt.sub IS NOT NULL AND this3.authId = $jwt.sub) + } OR EXISTS { + MATCH (this2)-[:HAS_ADMIN]->(this4:User) + WHERE ($jwt.sub IS NOT NULL AND this4.authId = $jwt.sub) + }) + } AND NOT (EXISTS { + MATCH (this)<-[:HAS_PAGE]-(this2:Workspace) + WHERE NOT (EXISTS { + MATCH (this2)<-[:MEMBER_OF]-(this3:User) + WHERE ($jwt.sub IS NOT NULL AND this3.authId = $jwt.sub) + } OR EXISTS { + MATCH (this2)-[:HAS_ADMIN]->(this4:User) + WHERE ($jwt.sub IS NOT NULL AND this4.authId = $jwt.sub) + }) + })))))) RETURN this { .id } AS this" `); @@ -228,7 +297,28 @@ describe("https://github.com/neo4j/graphql/issues/505", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Page) WITH * - WHERE ($isAuthenticated = true AND (size([(this)<-[:CREATED_PAGE]-(this0:User) WHERE ($jwt.sub IS NOT NULL AND this0.authId = $jwt.sub) | 1]) > 0 OR (($param2 IS NOT NULL AND this.shared = $param2) AND size([(this)<-[:HAS_PAGE]-(this2:Workspace) WHERE NOT (size([(this2)<-[:MEMBER_OF]-(this1:User) WHERE ($jwt.sub IS NOT NULL AND this1.authId = $jwt.sub) | 1]) > 0 OR size([(this2)-[:HAS_ADMIN]->(this3:User) WHERE ($jwt.sub IS NOT NULL AND this3.authId = $jwt.sub) | 1]) > 0) | 1]) = 0))) + WHERE ($isAuthenticated = true AND (EXISTS { + MATCH (this)<-[:CREATED_PAGE]-(this0:User) + WHERE ($jwt.sub IS NOT NULL AND this0.authId = $jwt.sub) + } OR (($param2 IS NOT NULL AND this.shared = $param2) AND (EXISTS { + MATCH (this)<-[:HAS_PAGE]-(this1:Workspace) + WHERE (EXISTS { + MATCH (this1)<-[:MEMBER_OF]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.authId = $jwt.sub) + } OR EXISTS { + MATCH (this1)-[:HAS_ADMIN]->(this3:User) + WHERE ($jwt.sub IS NOT NULL AND this3.authId = $jwt.sub) + }) + } AND NOT (EXISTS { + MATCH (this)<-[:HAS_PAGE]-(this1:Workspace) + WHERE NOT (EXISTS { + MATCH (this1)<-[:MEMBER_OF]-(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.authId = $jwt.sub) + } OR EXISTS { + MATCH (this1)-[:HAS_ADMIN]->(this3:User) + WHERE ($jwt.sub IS NOT NULL AND this3.authId = $jwt.sub) + }) + }))))) RETURN this { .id } AS this" `); diff --git a/packages/graphql/tests/tck/issues/5066.test.ts b/packages/graphql/tests/tck/issues/5066.test.ts index 1c75f911a2..8b6682a8c0 100644 --- a/packages/graphql/tests/tck/issues/5066.test.ts +++ b/packages/graphql/tests/tck/issues/5066.test.ts @@ -132,19 +132,31 @@ describe("https://github.com/neo4j/graphql/issues/5066", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Party) WITH * - WHERE (($isAuthenticated = true AND size([(this)<-[this1:CREATED_PARTY]-(this0:User) WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) | 1]) > 0) OR ($isAuthenticated = true AND size([(this)<-[this4:CREATED_PARTY]-(this3:AdminGroup) WHERE size([(this3)<-[:CREATED_ADMIN_GROUP]-(this2:User) WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) | 1]) > 0 | 1]) > 0)) + WHERE (($isAuthenticated = true AND size([(this)<-[this1:CREATED_PARTY]-(this0:User) WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) | 1]) > 0) OR ($isAuthenticated = true AND size([(this)<-[this4:CREATED_PARTY]-(this2:AdminGroup) WHERE EXISTS { + MATCH (this2)<-[:CREATED_ADMIN_GROUP]-(this3:User) + WHERE ($jwt.sub IS NOT NULL AND this3.id = $jwt.sub) + } | 1]) > 0)) CALL { WITH this CALL { WITH * MATCH (this)<-[this5:CREATED_PARTY]-(this6:User) - WHERE ($isAuthenticated = true AND NOT (size([(this6)-[:HAS_BLOCKED]->(this8:UserBlockedUser) WHERE size([(this8)-[:IS_BLOCKING]->(this7:User) WHERE ($jwt.sub IS NOT NULL AND this7.id = $jwt.sub) | 1]) > 0 | 1]) > 0)) + WHERE ($isAuthenticated = true AND NOT (EXISTS { + MATCH (this6)-[:HAS_BLOCKED]->(this7:UserBlockedUser) + WHERE EXISTS { + MATCH (this7)-[:IS_BLOCKING]->(this8:User) + WHERE ($jwt.sub IS NOT NULL AND this8.id = $jwt.sub) + } + })) WITH this6 { .username, __resolveType: \\"User\\", __id: id(this6) } AS this6 RETURN this6 AS var9 UNION WITH * MATCH (this)<-[this10:CREATED_PARTY]-(this11:AdminGroup) - WHERE ($isAuthenticated = true AND size([(this11)<-[:CREATED_ADMIN_GROUP]-(this12:User) WHERE ($jwt.sub IS NOT NULL AND this12.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this11)<-[:CREATED_ADMIN_GROUP]-(this12:User) + WHERE ($jwt.sub IS NOT NULL AND this12.id = $jwt.sub) + }) WITH this11 { __resolveType: \\"AdminGroup\\", __id: id(this11) } AS this11 RETURN this11 AS var9 } diff --git a/packages/graphql/tests/tck/issues/5080.test.ts b/packages/graphql/tests/tck/issues/5080.test.ts index babb4a2315..754c773b02 100644 --- a/packages/graphql/tests/tck/issues/5080.test.ts +++ b/packages/graphql/tests/tck/issues/5080.test.ts @@ -131,7 +131,13 @@ describe("https://github.com/neo4j/graphql/issues/5080", () => { } WITH s AS this0 WITH * - WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND size([(this0)-[:OWNED_BY]->(this2:Tenant) WHERE size([(this2)<-[:ADMIN_IN]-(this1:User) WHERE ($jwt.id IS NOT NULL AND this1.userId = $jwt.id) | 1]) > 0 | 1]) > 0), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND EXISTS { + MATCH (this0)-[:OWNED_BY]->(this1:Tenant) + WHERE EXISTS { + MATCH (this1)<-[:ADMIN_IN]-(this2:User) + WHERE ($jwt.id IS NOT NULL AND this2.userId = $jwt.id) + } + }), \\"@neo4j/graphql/FORBIDDEN\\", [0]) WITH this0 { .id } AS this0 RETURN this0 AS this" `); diff --git a/packages/graphql/tests/tck/issues/5143.test.ts b/packages/graphql/tests/tck/issues/5143.test.ts index b04fee77d4..fbe915d8b1 100644 --- a/packages/graphql/tests/tck/issues/5143.test.ts +++ b/packages/graphql/tests/tck/issues/5143.test.ts @@ -85,7 +85,13 @@ describe("https://github.com/neo4j/graphql/issues/5143", () => { } WITH video AS this0 WITH * - WHERE ($isAuthenticated = true AND size([(this0)<-[:PUBLISHER]-(this1:User) WHERE NOT ($jwt.sub IS NOT NULL AND this1.id = $jwt.sub) | 1]) = 0) + WHERE ($isAuthenticated = true AND (EXISTS { + MATCH (this0)<-[:PUBLISHER]-(this1:User) + WHERE ($jwt.sub IS NOT NULL AND this1.id = $jwt.sub) + } AND NOT (EXISTS { + MATCH (this0)<-[:PUBLISHER]-(this1:User) + WHERE NOT ($jwt.sub IS NOT NULL AND this1.id = $jwt.sub) + }))) WITH this0 { .id } AS this0 RETURN this0 AS this" `); diff --git a/packages/graphql/tests/tck/issues/5270.test.ts b/packages/graphql/tests/tck/issues/5270.test.ts index fa39a13132..0fd4963280 100644 --- a/packages/graphql/tests/tck/issues/5270.test.ts +++ b/packages/graphql/tests/tck/issues/5270.test.ts @@ -94,7 +94,13 @@ describe("https://github.com/neo4j/graphql/issues/5270", () => { } WITH u AS this0 WITH * - WHERE ($isAuthenticated = true AND NOT (size([(this0)-[:HAS_BLOCKED]->(this2:UserBlockedUser) WHERE size([(this2)-[:IS_BLOCKING]->(this1:User) WHERE ($jwt.sub IS NOT NULL AND this1.id = $jwt.sub) | 1]) > 0 | 1]) > 0)) + WHERE ($isAuthenticated = true AND NOT (EXISTS { + MATCH (this0)-[:HAS_BLOCKED]->(this1:UserBlockedUser) + WHERE EXISTS { + MATCH (this1)-[:IS_BLOCKING]->(this2:User) + WHERE ($jwt.sub IS NOT NULL AND this2.id = $jwt.sub) + } + })) WITH this0 { .id } AS this0 RETURN this0 AS this" `); diff --git a/packages/graphql/tests/tck/issues/5515.test.ts b/packages/graphql/tests/tck/issues/5515.test.ts index 19f3345964..ac01724d0a 100644 --- a/packages/graphql/tests/tck/issues/5515.test.ts +++ b/packages/graphql/tests/tck/issues/5515.test.ts @@ -83,7 +83,13 @@ describe("https://github.com/neo4j/graphql/issues/5515", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:Category) - WHERE (this.id = $param0 AND ($isAuthenticated = true AND size([(this)<-[:HAS_CATEGORY]-(this1:Cabinet) WHERE size([(this1)<-[:HAS_CABINET]-(this0:User) WHERE ($jwt.sub IS NOT NULL AND this0.id = $jwt.sub) | 1]) > 0 | 1]) > 0)) + WHERE (this.id = $param0 AND ($isAuthenticated = true AND EXISTS { + MATCH (this)<-[:HAS_CATEGORY]-(this0:Cabinet) + WHERE EXISTS { + MATCH (this0)<-[:HAS_CABINET]-(this1:User) + WHERE ($jwt.sub IS NOT NULL AND this1.id = $jwt.sub) + } + })) DETACH DELETE this" `); From 804cb0d0a0513c58eba2fe4c6d65f785cf26fb27 Mon Sep 17 00:00:00 2001 From: MacondoExpress Date: Fri, 6 Dec 2024 17:37:42 +0000 Subject: [PATCH 5/7] remove isNot completely --- .../where/utils/parse-filter-property.ts | 21 +--- .../queryAST/ast/filters/ConnectionFilter.ts | 66 +++++++------ .../CypherOneToOneRelationshipFilter.ts | 19 +--- .../ast/filters/aggregation/CountFilter.ts | 13 +-- .../authorization-filters/JWTFilter.ts | 29 ++---- .../property-filters/ParamPropertyFilter.ts | 9 +- .../property-filters/PropertyFilter.ts | 25 +---- .../queryAST/factory/AuthFilterFactory.ts | 16 +-- .../queryAST/factory/FilterFactory.ts | 99 +++++++------------ .../factory/parsers/parse-where-field.ts | 34 +------ 10 files changed, 94 insertions(+), 237 deletions(-) diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/utils/parse-filter-property.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/utils/parse-filter-property.ts index 05a68f095c..326603d828 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/utils/parse-filter-property.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/utils/parse-filter-property.ts @@ -27,25 +27,6 @@ export function parseFilterProperty(key: string): { fieldName: string; operator: if (operator === "EQ") { operator = undefined; } - // if (isNot) { - // if (operator && isOperatorIsANegateSupportedOperator(operator)) { - // operator = `NOT_${operator}`; - // } else { - // operator = "NOT"; - // } - // } + return { fieldName, operator }; } - -// These are the operator that have a negate version as _NOT_CONTAINS, _NOT_STARTS_WITH etc... . -//type NegateSupportedOperator = "CONTAINS" | "STARTS_WITH" | "ENDS_WITH" | "IN" | "INCLUDES"; - -/** - * isOperatorIsANegateSupportedOperator returns true if the operator is one of these that have the negate version - * the following is temporary required until the `_NOT` operator is removed. - **/ -// function isOperatorIsANegateSupportedOperator(operator: string): operator is NegateSupportedOperator { -// return (["CONTAINS", "STARTS_WITH", "ENDS_WITH", "IN", "INCLUDES"] as const).includes( -// operator as NegateSupportedOperator -// ); -// } diff --git a/packages/graphql/src/translate/queryAST/ast/filters/ConnectionFilter.ts b/packages/graphql/src/translate/queryAST/ast/filters/ConnectionFilter.ts index 187c07ff7f..135336c333 100644 --- a/packages/graphql/src/translate/queryAST/ast/filters/ConnectionFilter.ts +++ b/packages/graphql/src/translate/queryAST/ast/filters/ConnectionFilter.ts @@ -35,8 +35,6 @@ export class ConnectionFilter extends Filter { protected relationship: RelationshipAdapter; protected target: ConcreteEntityAdapter | InterfaceEntityAdapter; // target can be an interface entity, only with the label predicate optimization protected operator: RelationshipWhereOperator; - protected isNot: boolean; - // Predicate generation for subqueries cannot be done separately from subqueries, so we need to create the predicates at the same time // as subqueries and store them protected subqueryPredicate: Cypher.Predicate | undefined; @@ -45,17 +43,14 @@ export class ConnectionFilter extends Filter { relationship, target, operator, - isNot, }: { relationship: RelationshipAdapter; target: ConcreteEntityAdapter | InterfaceEntityAdapter; - operator: RelationshipWhereOperator | undefined; - isNot: boolean; + operator: RelationshipWhereOperator; }) { super(); this.relationship = relationship; - this.isNot = operator === "NONE"; - this.operator = operator || "SOME"; + this.operator = operator; this.target = target; } @@ -72,7 +67,9 @@ export class ConnectionFilter extends Filter { } public getSubqueries(context: QueryASTContext): Cypher.Clause[] { - if (!hasTarget(context)) throw new Error("No parent node found!"); + if (!hasTarget(context)) { + throw new Error("No parent node found!"); + } const targetNode = new Cypher.Node(); const targetLabels = getEntityLabels(this.target, context.neo4jGraphQLContext); const relationship = new Cypher.Relationship(); @@ -98,7 +95,9 @@ export class ConnectionFilter extends Filter { } public getPredicate(queryASTContext: QueryASTContext): Cypher.Predicate | undefined { - if (!hasTarget(queryASTContext)) throw new Error("No parent node found!"); + if (!hasTarget(queryASTContext)) { + throw new Error("No parent node found!"); + } if (this.subqueryPredicate) { return this.subqueryPredicate; } @@ -120,10 +119,7 @@ export class ConnectionFilter extends Filter { const nestedContext = queryASTContext.push({ target, relationship }); - const predicate = this.createRelationshipOperation(pattern, nestedContext); - if (predicate) { - return this.wrapInNotIfNeeded(predicate); - } + return this.createRelationshipOperation(pattern, nestedContext); } /** * Create a label predicate that filters concrete entities for interface target, @@ -137,8 +133,12 @@ export class ConnectionFilter extends Filter { * RETURN this { .name } AS this **/ protected getLabelPredicate(context: QueryASTContext): Cypher.Predicate | undefined { - if (!hasTarget(context)) throw new Error("No parent node found!"); - if (isConcreteEntity(this.target)) return undefined; + if (!hasTarget(context)) { + throw new Error("No parent node found!"); + } + if (isConcreteEntity(this.target)) { + return; + } const labelPredicate = this.target.concreteEntities.map((e) => { return context.target.hasLabels(...e.labels); }); @@ -153,7 +153,9 @@ export class ConnectionFilter extends Filter { const labelPredicate = this.getLabelPredicate(queryASTContext); const innerPredicate = Cypher.and(...connectionFilter, labelPredicate); - if (!innerPredicate) return undefined; + if (!innerPredicate) { + return; + } switch (this.operator) { case "ALL": { @@ -166,11 +168,12 @@ export class ConnectionFilter extends Filter { return this.createSingleRelationshipOperation(pattern, queryASTContext, innerPredicate); } default: { - if (!this.relationship.isList) { - return this.createSingleRelationshipOperation(pattern, queryASTContext, innerPredicate); - } const match = new Cypher.Match(pattern).where(innerPredicate); - return new Cypher.Exists(match); + const existsClause = new Cypher.Exists(match); + if (this.operator === "NONE") { + return Cypher.not(existsClause); + } + return existsClause; } } } @@ -180,7 +183,9 @@ export class ConnectionFilter extends Filter { context: QueryASTContext, innerPredicate: Cypher.Predicate ) { - if (!hasTarget(context)) throw new Error("No parent node found!"); + if (!hasTarget(context)) { + throw new Error("No parent node found!"); + } const patternComprehension = new Cypher.PatternComprehension(pattern) .map(new Cypher.Literal(1)) .where(innerPredicate); @@ -191,7 +196,9 @@ export class ConnectionFilter extends Filter { pattern: Cypher.Pattern, queryASTContext: QueryASTContext ): Cypher.Clause[] { - if (!hasTarget(queryASTContext)) throw new Error("No parent node found!"); + if (!hasTarget(queryASTContext)) { + throw new Error("No parent node found!"); + } const match = new Cypher.Match(pattern); const returnVar = new Cypher.Variable(); const innerFiltersPredicates: Cypher.Predicate[] = []; @@ -213,7 +220,7 @@ export class ConnectionFilter extends Filter { if (subqueries.length === 0) return []; // Hack logic to change predicates logic - const comparisonValue = this.isNot ? Cypher.false : Cypher.true; + const comparisonValue = this.operator === "NONE" ? Cypher.false : Cypher.true; this.subqueryPredicate = Cypher.eq(returnVar, comparisonValue); const countComparisonPredicate = @@ -231,7 +238,9 @@ export class ConnectionFilter extends Filter { // 1. "All" operations require 2 CALL subqueries // 2. Each subquery has its own return variable, that needs to be carried over to the predicate private getSubqueriesForOperationAll(pattern: Cypher.Pattern, queryASTContext: QueryASTContext): Cypher.Clause[] { - if (!hasTarget(queryASTContext)) throw new Error("No parent node found!"); + if (!hasTarget(queryASTContext)) { + throw new Error("No parent node found!"); + } const match = new Cypher.Match(pattern); const match2 = new Cypher.Match(pattern); @@ -255,7 +264,9 @@ export class ConnectionFilter extends Filter { return nestedSubqueries; }); - if (subqueries.length === 0) return []; + if (subqueries.length === 0) { + return []; + } const subqueries2 = this.innerFilters.flatMap((f) => { const nestedSubqueries = f.getSubqueries(queryASTContext).map((sq) => { @@ -280,9 +291,4 @@ export class ConnectionFilter extends Filter { return [Cypher.utils.concat(match, ...subqueries), Cypher.utils.concat(match2, ...subqueries2)]; } - - private wrapInNotIfNeeded(predicate: Cypher.Predicate): Cypher.Predicate { - if (this.isNot) return Cypher.not(predicate); - else return predicate; - } } diff --git a/packages/graphql/src/translate/queryAST/ast/filters/CypherOneToOneRelationshipFilter.ts b/packages/graphql/src/translate/queryAST/ast/filters/CypherOneToOneRelationshipFilter.ts index d326464f8b..d9c691cc1d 100644 --- a/packages/graphql/src/translate/queryAST/ast/filters/CypherOneToOneRelationshipFilter.ts +++ b/packages/graphql/src/translate/queryAST/ast/filters/CypherOneToOneRelationshipFilter.ts @@ -31,28 +31,24 @@ export class CypherOneToOneRelationshipFilter extends Filter { private selection: CustomCypherSelection; private operator: FilterOperator; private targetNodeFilters: Filter[] = []; - private isNot: boolean; private isNull: boolean; constructor({ selection, attribute, operator, - isNot, isNull, returnVariable, }: { selection: CustomCypherSelection; attribute: AttributeAdapter; operator: RelationshipWhereOperator; - isNot: boolean; isNull: boolean; returnVariable: Cypher.Node; }) { super(); this.selection = selection; this.attribute = attribute; - this.isNot = isNot; this.isNull = isNull; this.operator = operator; this.returnVariable = returnVariable; @@ -67,7 +63,7 @@ export class CypherOneToOneRelationshipFilter extends Filter { } public print(): string { - return `${super.print()} [${this.attribute.name}] <${this.isNot ? "NOT " : ""}${this.operator}>`; + return `${super.print()} [${this.attribute.name}] <${this.operator}>`; } public getSubqueries(context: QueryASTContext): Cypher.Clause[] { @@ -84,10 +80,7 @@ export class CypherOneToOneRelationshipFilter extends Filter { public getPredicate(queryASTContext: QueryASTContext): Cypher.Predicate | undefined { const context = queryASTContext.setTarget(this.returnVariable); - const predicate = this.createRelationshipOperation(context); - if (predicate) { - return this.wrapInNotIfNeeded(predicate); - } + return this.createRelationshipOperation(context); } private createRelationshipOperation(queryASTContext: QueryASTContext): Cypher.Predicate | undefined { @@ -100,12 +93,4 @@ export class CypherOneToOneRelationshipFilter extends Filter { return innerPredicate; } - - private wrapInNotIfNeeded(predicate: Cypher.Predicate): Cypher.Predicate { - if (this.isNot) { - return Cypher.not(predicate); - } - - return predicate; - } } diff --git a/packages/graphql/src/translate/queryAST/ast/filters/aggregation/CountFilter.ts b/packages/graphql/src/translate/queryAST/ast/filters/aggregation/CountFilter.ts index 2ef6ab01d9..500e3ab024 100644 --- a/packages/graphql/src/translate/queryAST/ast/filters/aggregation/CountFilter.ts +++ b/packages/graphql/src/translate/queryAST/ast/filters/aggregation/CountFilter.ts @@ -18,30 +18,27 @@ */ import Cypher from "@neo4j/cypher-builder"; -import type { FilterOperator } from "../Filter"; -import { Filter } from "../Filter"; +import { hasTarget } from "../../../utils/context-has-target"; import type { QueryASTContext } from "../../QueryASTContext"; import type { QueryASTNode } from "../../QueryASTNode"; -import { hasTarget } from "../../../utils/context-has-target"; +import type { FilterOperator } from "../Filter"; +import { Filter } from "../Filter"; export class CountFilter extends Filter { protected comparisonValue: unknown; protected operator: FilterOperator; - protected isNot: boolean; // _NOT is deprecated constructor({ - isNot, operator, comparisonValue, }: { operator: FilterOperator; - isNot: boolean; + comparisonValue: unknown; }) { super(); this.comparisonValue = comparisonValue; this.operator = operator; - this.isNot = isNot; } public getPredicate(queryASTContext: QueryASTContext): Cypher.Predicate | undefined { @@ -58,7 +55,7 @@ export class CountFilter extends Filter { } public print(): string { - return `${super.print()} <${this.isNot ? "NOT " : ""}${this.operator}>`; + return `${super.print()} <${this.operator}>`; } /** Returns the default operation for a given filter */ diff --git a/packages/graphql/src/translate/queryAST/ast/filters/authorization-filters/JWTFilter.ts b/packages/graphql/src/translate/queryAST/ast/filters/authorization-filters/JWTFilter.ts index c7ef5992ef..9d7cc251fe 100644 --- a/packages/graphql/src/translate/queryAST/ast/filters/authorization-filters/JWTFilter.ts +++ b/packages/graphql/src/translate/queryAST/ast/filters/authorization-filters/JWTFilter.ts @@ -18,61 +18,46 @@ */ import type { Predicate } from "@neo4j/cypher-builder"; -import type { QueryASTContext } from "../../QueryASTContext"; -import type { FilterOperator } from "../Filter"; -import { Filter } from "../Filter"; import Cypher from "@neo4j/cypher-builder"; import { createComparisonOperation } from "../../../utils/create-comparison-operator"; +import type { QueryASTContext } from "../../QueryASTContext"; import type { QueryASTNode } from "../../QueryASTNode"; +import type { FilterOperator } from "../Filter"; +import { Filter } from "../Filter"; export class JWTFilter extends Filter { protected operator: FilterOperator; protected JWTClaim: Cypher.Property; protected comparisonValue: unknown; - protected isNot: boolean; constructor({ operator, JWTClaim, comparisonValue, - isNot, }: { operator: FilterOperator; JWTClaim: Cypher.Property; comparisonValue: unknown; - isNot: boolean; }) { super(); this.operator = operator; this.JWTClaim = JWTClaim; this.comparisonValue = comparisonValue; - this.isNot = isNot; } public getChildren(): QueryASTNode[] { return []; } - + public print(): string { + return `${super.print()} <${this.operator} ${this.comparisonValue}>`; + } public getPredicate(_context: QueryASTContext): Predicate | undefined { - const operation = createComparisonOperation({ + const predicate = createComparisonOperation({ operator: this.operator, property: this.JWTClaim, param: new Cypher.Param(this.comparisonValue), }); - const predicate = this.wrapInNotIfNeeded(operation); return Cypher.and(Cypher.isNotNull(this.JWTClaim), predicate); } - - public print(): string { - return `${super.print()} <${this.operator} ${this.comparisonValue}>`; - } - - private wrapInNotIfNeeded(predicate: Cypher.Predicate): Cypher.Predicate { - if (this.isNot) { - return Cypher.not(predicate); - } else { - return predicate; - } - } } diff --git a/packages/graphql/src/translate/queryAST/ast/filters/property-filters/ParamPropertyFilter.ts b/packages/graphql/src/translate/queryAST/ast/filters/property-filters/ParamPropertyFilter.ts index d641b4df22..4df64281fd 100644 --- a/packages/graphql/src/translate/queryAST/ast/filters/property-filters/ParamPropertyFilter.ts +++ b/packages/graphql/src/translate/queryAST/ast/filters/property-filters/ParamPropertyFilter.ts @@ -18,11 +18,11 @@ */ import Cypher from "@neo4j/cypher-builder"; -import type { QueryASTContext } from "../../QueryASTContext"; -import { PropertyFilter } from "./PropertyFilter"; import type { AttributeAdapter } from "../../../../../schema-model/attribute/model-adapters/AttributeAdapter"; -import type { FilterOperator } from "../Filter"; import type { RelationshipAdapter } from "../../../../../schema-model/relationship/model-adapters/RelationshipAdapter"; +import type { QueryASTContext } from "../../QueryASTContext"; +import type { FilterOperator } from "../Filter"; +import { PropertyFilter } from "./PropertyFilter"; type CypherVariable = Cypher.Variable | Cypher.Property | Cypher.Param; @@ -33,8 +33,7 @@ export class ParamPropertyFilter extends PropertyFilter { constructor(options: { attribute: AttributeAdapter; comparisonValue: CypherVariable; - operator: FilterOperator; - isNot: boolean; + operator: FilterOperator, attachedTo?: "node" | "relationship"; relationship?: RelationshipAdapter; }) { diff --git a/packages/graphql/src/translate/queryAST/ast/filters/property-filters/PropertyFilter.ts b/packages/graphql/src/translate/queryAST/ast/filters/property-filters/PropertyFilter.ts index 8e4d5d5995..5d799c7a30 100644 --- a/packages/graphql/src/translate/queryAST/ast/filters/property-filters/PropertyFilter.ts +++ b/packages/graphql/src/translate/queryAST/ast/filters/property-filters/PropertyFilter.ts @@ -34,7 +34,6 @@ export class PropertyFilter extends Filter { protected relationship: RelationshipAdapter | undefined; protected comparisonValue: unknown; protected operator: FilterOperator; - protected isNot: boolean; // _NOT is deprecated protected attachedTo: "node" | "relationship"; constructor({ @@ -42,14 +41,12 @@ export class PropertyFilter extends Filter { relationship, comparisonValue, operator, - isNot, attachedTo, }: { attribute: AttributeAdapter; relationship?: RelationshipAdapter; comparisonValue: unknown; operator: FilterOperator; - isNot: boolean; attachedTo?: "node" | "relationship"; }) { super(); @@ -57,7 +54,6 @@ export class PropertyFilter extends Filter { this.relationship = relationship; this.comparisonValue = comparisonValue; this.operator = operator; - this.isNot = isNot; this.attachedTo = attachedTo ?? "node"; } @@ -66,19 +62,17 @@ export class PropertyFilter extends Filter { } public print(): string { - return `${super.print()} [${this.attribute.name}] <${this.isNot ? "NOT " : ""}${this.operator}>`; + return `${super.print()} [${this.attribute.name}] <${this.operator}>`; } public getPredicate(queryASTContext: QueryASTContext): Cypher.Predicate { const prop = this.getPropertyRefOrAliasesCase(queryASTContext); if (this.comparisonValue === null) { - return this.getNullPredicate(prop); + return Cypher.isNull(prop); } - const baseOperation = this.getOperation(prop); - - return this.wrapInNotIfNeeded(baseOperation); + return this.getOperation(prop); } private getPropertyRefOrAliasesCase(queryASTContext: QueryASTContext): Cypher.Property | Cypher.Case { @@ -153,17 +147,4 @@ export class PropertyFilter extends Filter { return createComparisonOperation({ operator, property: coalesceProperty, param }); } - - private getNullPredicate(propertyRef: Cypher.Property | Cypher.Case): Cypher.Predicate { - if (this.isNot) { - return Cypher.isNotNull(propertyRef); - } else { - return Cypher.isNull(propertyRef); - } - } - - private wrapInNotIfNeeded(predicate: Cypher.Predicate): Cypher.Predicate { - if (this.isNot) return Cypher.not(predicate); - else return predicate; - } } diff --git a/packages/graphql/src/translate/queryAST/factory/AuthFilterFactory.ts b/packages/graphql/src/translate/queryAST/factory/AuthFilterFactory.ts index 9454f01df7..1939dafada 100644 --- a/packages/graphql/src/translate/queryAST/factory/AuthFilterFactory.ts +++ b/packages/graphql/src/translate/queryAST/factory/AuthFilterFactory.ts @@ -123,7 +123,6 @@ export class AuthFilterFactory extends FilterFactory { operator: operator || "EQ", JWTClaim: target, comparisonValue: value, - isNot: false, }); }); } @@ -132,14 +131,12 @@ export class AuthFilterFactory extends FilterFactory { attribute, comparisonValue, operator, - // isNot, attachedTo, relationship, }: { attribute: AttributeAdapter; comparisonValue: unknown; operator: FilterOperator | undefined; - // isNot: boolean; attachedTo?: "node" | "relationship"; relationship?: RelationshipAdapter; }): Filter { @@ -170,10 +167,7 @@ export class AuthFilterFactory extends FilterFactory { where: comparisonValue as GraphQLWhereArg, selection, target: entityAdapter, - filterOps: { - //isNot, - operator, - }, + operator, attribute, }), }); @@ -205,7 +199,6 @@ export class AuthFilterFactory extends FilterFactory { attribute, relationship, comparisonValue: new Cypher.Param(comparisonValue), - isNot: false, operator: filterOperator, attachedTo, }); @@ -216,7 +209,6 @@ export class AuthFilterFactory extends FilterFactory { attribute, relationship, comparisonValue: comparisonValue, - isNot: false, operator: filterOperator, attachedTo, }); @@ -226,7 +218,6 @@ export class AuthFilterFactory extends FilterFactory { attribute, relationship, comparisonValue: comparisonValue, - isNot: false, operator: filterOperator, attachedTo, }); @@ -235,7 +226,6 @@ export class AuthFilterFactory extends FilterFactory { attribute, relationship, comparisonValue: new Cypher.Param(comparisonValue), - isNot: false, operator: filterOperator, attachedTo, }); @@ -245,7 +235,6 @@ export class AuthFilterFactory extends FilterFactory { protected createRelationshipFilterTreeNode(options: { relationship: RelationshipAdapter; target: ConcreteEntityAdapter | InterfaceEntityAdapter; - isNot: boolean; operator: RelationshipWhereOperator; }): RelationshipFilter { return new AuthRelationshipFilter(options); @@ -254,8 +243,7 @@ export class AuthFilterFactory extends FilterFactory { protected createConnectionFilterTreeNode(options: { relationship: RelationshipAdapter; target: ConcreteEntityAdapter | InterfaceEntityAdapter; - isNot: boolean; - operator: RelationshipWhereOperator | undefined; + operator: RelationshipWhereOperator; }): ConnectionFilter { return new AuthConnectionFilter(options); } diff --git a/packages/graphql/src/translate/queryAST/factory/FilterFactory.ts b/packages/graphql/src/translate/queryAST/factory/FilterFactory.ts index 3d7e05b937..f470be81e0 100644 --- a/packages/graphql/src/translate/queryAST/factory/FilterFactory.ts +++ b/packages/graphql/src/translate/queryAST/factory/FilterFactory.ts @@ -50,7 +50,7 @@ import { isInterfaceEntity } from "../utils/is-interface-entity"; import { isRelationshipEntity } from "../utils/is-relationship-entity"; import { isUnionEntity } from "../utils/is-union-entity"; import type { QueryASTFactory } from "./QueryASTFactory"; -import { parseAggregationWhereFields, parseConnectionWhereFields, parseWhereField } from "./parsers/parse-where-field"; +import { parseAggregationWhereFields, parseWhereField } from "./parsers/parse-where-field"; type AggregateWhereInput = { count: number; @@ -71,10 +71,8 @@ export class FilterFactory { private createConnectionFilter( relationship: RelationshipAdapter, where: ConnectionWhereArg, - filterOps: { - //isNot: boolean; - operator: RelationshipWhereOperator | undefined; - } + + operator: RelationshipWhereOperator ): Filter[] { if ( isInterfaceEntity(relationship.target) && @@ -83,8 +81,7 @@ export class FilterFactory { const connectionFilter = this.createConnectionFilterTreeNode({ relationship: relationship, target: relationship.target, - isNot: false, - operator: filterOps.operator, + operator, }); const filters = this.createConnectionPredicates({ rel: relationship, entity: relationship.target, where }); connectionFilter.addFilters(filters); @@ -102,8 +99,7 @@ export class FilterFactory { const connectionFilter = this.createConnectionFilterTreeNode({ relationship: relationship, target: concreteEntity, - isNot: false, - operator: filterOps.operator, + operator, }); const filters = this.createConnectionPredicates({ @@ -115,7 +111,7 @@ export class FilterFactory { connectionFilter.addFilters(filters); connectionFilters.push(connectionFilter); } - const logicalOp = this.getLogicalOperatorForRelatedNodeFilters(relationship.target, filterOps.operator); + const logicalOp = this.getLogicalOperatorForRelatedNodeFilters(relationship.target, operator); return this.wrapMultipleFiltersInLogical(connectionFilters, logicalOp); } @@ -146,11 +142,10 @@ export class FilterFactory { ]; } - const connectionWhereField = parseConnectionWhereFields(key); - if (rel && connectionWhereField.fieldName === "edge") { + if (rel && key === "edge") { return this.createEdgeFilters(rel, value); } - if (connectionWhereField.fieldName === "node") { + if (key === "node") { if (partialOf && isInterfaceEntity(partialOf) && isConcreteEntity(entity)) { return this.createInterfaceNodeFilters({ entity: partialOf, @@ -175,12 +170,10 @@ export class FilterFactory { attribute, comparisonValue, operator, - // isNot, }: { attribute: AttributeAdapter; comparisonValue: GraphQLWhereArg; operator: FilterOperator | undefined; - // isNot: boolean; }): Filter | Filter[] { const filterOperator = operator || "EQ"; @@ -201,10 +194,7 @@ export class FilterFactory { where: comparisonValue, selection, target: entityAdapter, - filterOps: { - // isNot, - operator, - }, + operator, attribute, }); } @@ -224,14 +214,14 @@ export class FilterFactory { relationship, comparisonValue, operator, - // isNot, + attachedTo, }: { attribute: AttributeAdapter; relationship?: RelationshipAdapter; comparisonValue: GraphQLWhereArg; operator: FilterOperator | undefined; - //isNot: boolean; + attachedTo?: "node" | "relationship"; }): Filter | Filter[] { const filterOperator = operator || "EQ"; @@ -241,7 +231,6 @@ export class FilterFactory { attribute, comparisonValue, operator, - // isNot, }); } @@ -249,7 +238,7 @@ export class FilterFactory { return new DurationFilter({ attribute, comparisonValue, - isNot: false, + operator: filterOperator, attachedTo, }); @@ -258,7 +247,6 @@ export class FilterFactory { return new PointFilter({ attribute, comparisonValue, - isNot: false, operator: filterOperator, attachedTo, }); @@ -268,7 +256,6 @@ export class FilterFactory { attribute, relationship, comparisonValue, - isNot: false, operator: filterOperator, attachedTo, }); @@ -277,10 +264,7 @@ export class FilterFactory { private createRelationshipFilter( relationship: RelationshipAdapter, where: GraphQLWhereArg, - filterOps: { - //isNot: boolean; - operator: RelationshipWhereOperator | undefined; - } + operator: RelationshipWhereOperator | undefined ): Filter[] { /** * The logic below can be confusing, but it's to handle the following cases: @@ -291,8 +275,6 @@ export class FilterFactory { if (!isNull && Object.keys(where).length === 0) { return []; } - // this is because if isNull is true we want to wrap the Exist subclause in a NOT, but if isNull is true and isNot is true they negate each other - // const isNot = isNull ? !filterOps.isNot : filterOps.isNot; const filteredEntities = getConcreteEntities(relationship.target, where); const relationshipFilters: RelationshipFilter[] = []; @@ -300,8 +282,7 @@ export class FilterFactory { const relationshipFilter = this.createRelationshipFilterTreeNode({ relationship, target: concreteEntity, - isNot: false, - operator: filterOps.operator || "SOME", + operator: operator || "SOME", }); if (!isNull) { @@ -312,7 +293,7 @@ export class FilterFactory { relationshipFilters.push(relationshipFilter); } - const logicalOp = this.getLogicalOperatorForRelatedNodeFilters(relationship.target, filterOps.operator); + const logicalOp = this.getLogicalOperatorForRelatedNodeFilters(relationship.target, operator); return this.wrapMultipleFiltersInLogical(relationshipFilters, logicalOp); } @@ -320,16 +301,13 @@ export class FilterFactory { selection, target, where, - filterOps, attribute, + operator, }: { selection: CustomCypherSelection; target: EntityAdapter; where: GraphQLWhereArg; - filterOps: { - //isNot: boolean; - operator: RelationshipWhereOperator | undefined; - }; + operator: RelationshipWhereOperator | undefined; attribute: AttributeAdapter; }): Filter[] { /** @@ -348,9 +326,8 @@ export class FilterFactory { const returnVariable = new Cypher.Node(); const cypherOneToOneRelationshipFilter = this.createCypherOneToOneRelationshipFilterTreeNode({ selection, - isNot: false, isNull, - operator: filterOps.operator || "SOME", + operator: operator || "SOME", attribute, returnVariable, }); @@ -363,7 +340,7 @@ export class FilterFactory { cypherOneToOneRelationshipFilters.push(cypherOneToOneRelationshipFilter); } - const logicalOp = this.getLogicalOperatorForRelatedNodeFilters(target, filterOps.operator); + const logicalOp = this.getLogicalOperatorForRelatedNodeFilters(target, operator); return this.wrapMultipleFiltersInLogical(cypherOneToOneRelationshipFilters, logicalOp); } @@ -371,7 +348,6 @@ export class FilterFactory { protected createCypherOneToOneRelationshipFilterTreeNode(options: { selection: CustomCypherSelection; attribute: AttributeAdapter; - isNot: boolean; isNull: boolean; operator: RelationshipWhereOperator; returnVariable: Cypher.Node; @@ -383,7 +359,6 @@ export class FilterFactory { protected createRelationshipFilterTreeNode(options: { relationship: RelationshipAdapter; target: ConcreteEntityAdapter | InterfaceEntityAdapter; - isNot: boolean; operator: RelationshipWhereOperator; }): RelationshipFilter { return new RelationshipFilter(options); @@ -393,8 +368,7 @@ export class FilterFactory { protected createConnectionFilterTreeNode(options: { relationship: RelationshipAdapter; target: ConcreteEntityAdapter | InterfaceEntityAdapter; - isNot: boolean; - operator: RelationshipWhereOperator | undefined; + operator: RelationshipWhereOperator; }): ConnectionFilter { return new ConnectionFilter(options); } @@ -463,7 +437,7 @@ export class FilterFactory { relationship, value, operator, - // isNot, + isConnection, isAggregate, }); @@ -481,7 +455,7 @@ export class FilterFactory { relationship, value, operator, - // isNot, + isConnection, isAggregate, }); @@ -500,7 +474,7 @@ export class FilterFactory { if (fieldName === "id" && entity.globalIdField) { return this.createRelayIdPropertyFilter( entity, - //isNot, + operator, value ); @@ -518,7 +492,7 @@ export class FilterFactory { return this.createPropertyFilter({ attribute, comparisonValue: value, - // isNot, + operator, relationship, }); @@ -574,7 +548,7 @@ export class FilterFactory { const filters = this.createPropertyFilter({ attribute, comparisonValue: value, - // isNot: false, + operator, attachedTo, }); @@ -629,14 +603,14 @@ export class FilterFactory { relationship, value, operator, - // isNot, + isConnection, isAggregate, }: { relationship: RelationshipAdapter; value: Record; operator: FilterOperator | undefined; - // isNot: boolean; + isConnection: boolean; isAggregate: boolean; }): Filter | Filter[] { @@ -655,7 +629,7 @@ export class FilterFactory { relationship, value: genericValue, operator: legacyOperator, - // isNot, + isConnection, isAggregate, }); @@ -665,15 +639,9 @@ export class FilterFactory { throw new Error(`Invalid operator ${operator} for relationship`); } if (isConnection) { - return this.createConnectionFilter(relationship, value as ConnectionWhereArg, { - // isNot, - operator, - }); + return this.createConnectionFilter(relationship, value as ConnectionWhereArg, operator); } - return this.createRelationshipFilter(relationship, value as GraphQLWhereArg, { - //isNot, - operator, - }); + return this.createRelationshipFilter(relationship, value as GraphQLWhereArg, operator); } private getLogicalOperatorForRelatedNodeFilters( @@ -693,7 +661,7 @@ export class FilterFactory { private createRelayIdPropertyFilter( entity: ConcreteEntityAdapter, - // isNot: boolean, + operator: FilterOperator | undefined, value: string ): Filter | Filter[] { @@ -719,7 +687,7 @@ export class FilterFactory { return this.createPropertyFilter({ attribute: idAttribute, comparisonValue: id as unknown as GraphQLWhereArg, - //isNot, + operator, }); } @@ -751,7 +719,7 @@ export class FilterFactory { return this.createPropertyFilter({ attribute, comparisonValue: value, - // isNot, + operator, attachedTo: "relationship", }); @@ -783,7 +751,6 @@ export class FilterFactory { if (fieldName === "count") { const countFilter = new CountFilter({ operator: filterOperator, - isNot: false, comparisonValue: value, }); return [countFilter]; diff --git a/packages/graphql/src/translate/queryAST/factory/parsers/parse-where-field.ts b/packages/graphql/src/translate/queryAST/factory/parsers/parse-where-field.ts index d6fa8b2fcd..27cd670cd9 100644 --- a/packages/graphql/src/translate/queryAST/factory/parsers/parse-where-field.ts +++ b/packages/graphql/src/translate/queryAST/factory/parsers/parse-where-field.ts @@ -17,14 +17,13 @@ * limitations under the License. */ -import type { FilterOperator, LogicalOperators } from "../../ast/filters/Filter"; +import type { FilterOperator } from "../../ast/filters/Filter"; export type WhereRegexGroups = { fieldName: string; isAggregate: boolean; operator: FilterOperator | undefined; prefix?: string; - // isNot: boolean; isConnection: boolean; }; @@ -43,48 +42,17 @@ export function parseWhereField(field: string): WhereRegexGroups { isConnection?: string; }; - //let isNot = false; const operator = match?.groups?.operator as FilterOperator | undefined; - // if (matchGroups.operator) { - // const notSplit = matchGroups.operator.split("NOT_"); - // if (notSplit.length === 2) { - // isNot = true; - // operator = notSplit[1] as FilterOperator; - // } else if (matchGroups.operator === "NOT" || matchGroups.operator === "NONE") { - // isNot = true; - // if (matchGroups.operator === "NONE") { - // operator = notSplit[0] as FilterOperator; - // } - // } else { - // operator = notSplit[0] as FilterOperator; - // } - // } - return { fieldName: matchGroups.fieldName, isAggregate: Boolean(matchGroups.isAggregate), operator, - // isNot, prefix: matchGroups.prefix, isConnection: Boolean(matchGroups.isConnection), }; } -type ConnectionWhereArgField = { - isNot: boolean; - fieldName: "node" | "edge" | LogicalOperators; -}; - -export function parseConnectionWhereFields(key: string): ConnectionWhereArgField { - const splitKey = key.split("_NOT"); - const isNot = splitKey.length > 1; - return { - fieldName: splitKey[0] as "node" | "edge" | LogicalOperators, - isNot, - }; -} - export const aggregationFieldRegEx = /(?[_A-Za-z]\w*?)(?:_(?AVERAGE|MAX|MIN|SUM|SHORTEST|LONGEST))?(?:_LENGTH)?(?:_(?EQUAL|GT|GTE|LT|LTE))?$/; From 17911fc197105f5fafc06ce851669af6fc07b18a Mon Sep 17 00:00:00 2001 From: MacondoExpress Date: Fri, 6 Dec 2024 17:59:15 +0000 Subject: [PATCH 6/7] Create unlucky-spoons-trade.md --- .changeset/unlucky-spoons-trade.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .changeset/unlucky-spoons-trade.md diff --git a/.changeset/unlucky-spoons-trade.md b/.changeset/unlucky-spoons-trade.md new file mode 100644 index 0000000000..764a93fc73 --- /dev/null +++ b/.changeset/unlucky-spoons-trade.md @@ -0,0 +1,25 @@ +--- +"@neo4j/graphql": minor +--- + +Introduce a new style for filtering relationships and connections. +The quantifiers `SOME` | `NONE` | `SINGLE` | `ALL` are now available as a nested input object. + +**Relationship** + +```graphql +{ + movies(where: { genres: { some: { name: { equals: "some genre" } } } }) { + actorCount + } +} +``` + +**Connection** +```graphql +{ + movies(where: { genresConnection: { some: { node: { name: { equals: "some genre" } } } } }) { + actorCount + } +} +``` From 6b86e9a03ab31212c3d044da53a603a240cb712a Mon Sep 17 00:00:00 2001 From: MacondoExpress Date: Fri, 6 Dec 2024 18:09:05 +0000 Subject: [PATCH 7/7] update advanced filtering tests for relationship/connections --- .../filtering/advanced-filtering.int.test.ts | 92 +++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/packages/graphql/tests/integration/filtering/advanced-filtering.int.test.ts b/packages/graphql/tests/integration/filtering/advanced-filtering.int.test.ts index 97a1d41802..6163766554 100644 --- a/packages/graphql/tests/integration/filtering/advanced-filtering.int.test.ts +++ b/packages/graphql/tests/integration/filtering/advanced-filtering.int.test.ts @@ -1056,7 +1056,7 @@ describe("Advanced Filtering", () => { const query = /* GraphQL */ ` { - ${randomType1.plural}(where: { ${randomType2.plural}_SOME: { id: { equals: "${relationId}" } } }) { + ${randomType1.plural}(where: { ${randomType2.plural}: { some: {id: { equals: "${relationId}" }} } }) { id ${randomType2.plural} { id @@ -1110,7 +1110,7 @@ describe("Advanced Filtering", () => { const query = /* GraphQL */ ` { - ${Movie.plural}(where: { genresConnection_SOME: { node: { id: { equals: "${genreId}" } } } }) { + ${Movie.plural}(where: { genresConnection: { some: { node: { id: { equals: "${genreId}" } } } } }) { id genres { id @@ -1175,7 +1175,7 @@ describe("Advanced Filtering", () => { const query = /* GraphQL */ ` { - ${Movie.plural}(where: { genresConnection_SOME: { edge: { id: { equals: "${actedInId}" } } } }) { + ${Movie.plural}(where: { genresConnection: { some: { edge: { id: { equals: "${actedInId}" } } } } }) { id genres { id @@ -1239,7 +1239,7 @@ describe("Advanced Filtering", () => { const query = /* GraphQL */ ` { - ${Movie.plural}(where: { genresConnection_SOME: { node: { id: { equals: "${genreId}" }} edge: { id: { equals: "${actedInId}" } } } }) { + ${Movie.plural}(where: { genresConnection: { some: { node: { id: { equals: "${genreId}" }} edge: { id: { equals: "${actedInId}" } } } } }) { id genres { id @@ -1309,7 +1309,7 @@ describe("Advanced Filtering", () => { const query = /* GraphQL */ ` { - ${randomType1.plural}(where: { NOT: { ${randomType2.plural}_SOME: { id: { equals: "${relationId2}" }} } }) { + ${randomType1.plural}(where: { NOT: { ${randomType2.plural}: { some: { id: { equals: "${relationId2}" }}} } }) { id ${randomType2.plural} { id @@ -1377,7 +1377,7 @@ describe("Advanced Filtering", () => { const query = /* GraphQL */ ` { - ${randomType1.plural}(where: { ${randomType2.plural}Connection_NONE: { edge: { id: { equals: "${actedInId}"} } } }) { + ${randomType1.plural}(where: { ${randomType2.plural}Connection: { none: {edge: { id: { equals: "${actedInId}"} } } } }) { id ${randomType2.plural} { id @@ -1453,10 +1453,10 @@ describe("Advanced Filtering", () => { }); describe("on relationship", () => { - function generateQuery(predicate: "ALL" | "NONE" | "SINGLE" | "SOME") { + function generateQuery(predicate: "all" | "none" | "single" | "some") { return /* GraphQL */ ` query($movieIds: [ID!]!) { - ${Movie.plural}(where: { AND: [{ id: { in: $movieIds }}, { actors_${predicate}: { NOT: { flag: { equals: false }} } }] }) { + ${Movie.plural}(where: { AND: [{ id: { in: $movieIds }}, { actors: { ${predicate}: { NOT: { flag: { equals: false }} } } }] }) { id actors(where: { NOT: { flag: {equals: false} } }) { id @@ -1467,8 +1467,8 @@ describe("Advanced Filtering", () => { `; } - test("ALL", async () => { - const gqlResult = await testHelper.executeGraphQL(generateQuery("ALL"), { + test("all", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("all"), { variableValues: { movieIds: movies.map(({ id }) => id) }, }); @@ -1483,8 +1483,8 @@ describe("Advanced Filtering", () => { }); }); - test("NONE", async () => { - const gqlResult = await testHelper.executeGraphQL(generateQuery("NONE"), { + test("none", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("none"), { variableValues: { movieIds: movies.map(({ id }) => id) }, }); @@ -1499,8 +1499,8 @@ describe("Advanced Filtering", () => { }); }); - test("SINGLE", async () => { - const gqlResult = await testHelper.executeGraphQL(generateQuery("SINGLE"), { + test("single", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("single"), { variableValues: { movieIds: movies.map(({ id }) => id) }, }); @@ -1515,8 +1515,8 @@ describe("Advanced Filtering", () => { }); }); - test("SOME", async () => { - const gqlResult = await testHelper.executeGraphQL(generateQuery("SOME"), { + test("some", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("some"), { variableValues: { movieIds: movies.map(({ id }) => id) }, }); @@ -1541,9 +1541,9 @@ describe("Advanced Filtering", () => { }); describe("on relationship using NOT operator", () => { - const generateQuery = (predicate: "ALL" | "NONE" | "SINGLE" | "SOME") => /* GraphQL */ ` + const generateQuery = (predicate: "all" | "none" | "single" | "some") => /* GraphQL */ ` query($movieIds: [ID!]!) { - ${Movie.plural}(where: { AND: [{ id: { in: $movieIds }}, { actors_${predicate}: { NOT: { flag: {equals: false }} } }] }) { + ${Movie.plural}(where: { AND: [{ id: { in: $movieIds }}, { actors: { ${predicate}: { NOT: { flag: {equals: false }}} } }] }) { id actors(where: { NOT: { flag: { equals: false }} }) { id @@ -1553,8 +1553,8 @@ describe("Advanced Filtering", () => { } `; - test("ALL", async () => { - const gqlResult = await testHelper.executeGraphQL(generateQuery("ALL"), { + test("all", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("all"), { variableValues: { movieIds: movies.map(({ id }) => id) }, }); @@ -1569,8 +1569,8 @@ describe("Advanced Filtering", () => { }); }); - test("NONE", async () => { - const gqlResult = await testHelper.executeGraphQL(generateQuery("NONE"), { + test("none", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("none"), { variableValues: { movieIds: movies.map(({ id }) => id) }, }); @@ -1585,8 +1585,8 @@ describe("Advanced Filtering", () => { }); }); - test("SINGLE", async () => { - const gqlResult = await testHelper.executeGraphQL(generateQuery("SINGLE"), { + test("single", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("single"), { variableValues: { movieIds: movies.map(({ id }) => id) }, }); @@ -1601,8 +1601,8 @@ describe("Advanced Filtering", () => { }); }); - test("SOME", async () => { - const gqlResult = await testHelper.executeGraphQL(generateQuery("SOME"), { + test("some", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("some"), { variableValues: { movieIds: movies.map(({ id }) => id) }, }); @@ -1627,9 +1627,9 @@ describe("Advanced Filtering", () => { }); describe("on connection", () => { - const generateQuery = (predicate: "ALL" | "NONE" | "SINGLE" | "SOME") => /* GraphQL */ ` + const generateQuery = (predicate: "all" | "none" | "single" | "some") => /* GraphQL */ ` query($movieIds: [ID!]!) { - ${Movie.plural}(where: { AND: [{ id: {in: $movieIds} }, { actorsConnection_${predicate}: { node: { NOT: { flag: { equals: false} } } }}] }) { + ${Movie.plural}(where: { AND: [{ id: {in: $movieIds} }, { actorsConnection: { ${predicate}: { node: { NOT: { flag: { equals: false} } } }}}] }) { id actors(where: { NOT: { flag:{ equals: false }} }) { id @@ -1639,8 +1639,8 @@ describe("Advanced Filtering", () => { } `; - test("ALL", async () => { - const gqlResult = await testHelper.executeGraphQL(generateQuery("ALL"), { + test("all", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("all"), { variableValues: { movieIds: movies.map(({ id }) => id) }, }); @@ -1655,8 +1655,8 @@ describe("Advanced Filtering", () => { }); }); - test("NONE", async () => { - const gqlResult = await testHelper.executeGraphQL(generateQuery("NONE"), { + test("none", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("none"), { variableValues: { movieIds: movies.map(({ id }) => id) }, }); @@ -1671,8 +1671,8 @@ describe("Advanced Filtering", () => { }); }); - test("SINGLE", async () => { - const gqlResult = await testHelper.executeGraphQL(generateQuery("SINGLE"), { + test("single", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("single"), { variableValues: { movieIds: movies.map(({ id }) => id) }, }); @@ -1687,8 +1687,8 @@ describe("Advanced Filtering", () => { }); }); - test("SOME", async () => { - const gqlResult = await testHelper.executeGraphQL(generateQuery("SOME"), { + test("some", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("some"), { variableValues: { movieIds: movies.map(({ id }) => id) }, }); @@ -1713,9 +1713,9 @@ describe("Advanced Filtering", () => { }); describe("on connection using NOT operator", () => { - const generateQuery = (predicate: "ALL" | "NONE" | "SINGLE" | "SOME") => /* GraphQL */ ` + const generateQuery = (predicate: "all" | "none" | "single" | "some") => /* GraphQL */ ` query($movieIds: [ID!]!) { - ${Movie.plural}(where: { AND: [{ id:{ in: $movieIds }}, { actorsConnection_${predicate}: { node: { NOT: { flag: {equals: false} } } } }] }) { + ${Movie.plural}(where: { AND: [{ id:{ in: $movieIds }}, { actorsConnection: { ${predicate}: { node: { NOT: { flag: {equals: false} } } } } }] }) { id actors(where: { NOT: { flag: { equals: false } }}) { id @@ -1725,8 +1725,8 @@ describe("Advanced Filtering", () => { } `; - test("ALL", async () => { - const gqlResult = await testHelper.executeGraphQL(generateQuery("ALL"), { + test("all", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("all"), { variableValues: { movieIds: movies.map(({ id }) => id) }, }); @@ -1741,8 +1741,8 @@ describe("Advanced Filtering", () => { }); }); - test("NONE", async () => { - const gqlResult = await testHelper.executeGraphQL(generateQuery("NONE"), { + test("none", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("none"), { variableValues: { movieIds: movies.map(({ id }) => id) }, }); @@ -1757,8 +1757,8 @@ describe("Advanced Filtering", () => { }); }); - test("SINGLE", async () => { - const gqlResult = await testHelper.executeGraphQL(generateQuery("SINGLE"), { + test("single", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("single"), { variableValues: { movieIds: movies.map(({ id }) => id) }, }); @@ -1773,8 +1773,8 @@ describe("Advanced Filtering", () => { }); }); - test("SOME", async () => { - const gqlResult = await testHelper.executeGraphQL(generateQuery("SOME"), { + test("some", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("some"), { variableValues: { movieIds: movies.map(({ id }) => id) }, });