diff --git a/.changeset/clever-tomatoes-float.md b/.changeset/clever-tomatoes-float.md new file mode 100644 index 0000000000..811abd99bd --- /dev/null +++ b/.changeset/clever-tomatoes-float.md @@ -0,0 +1,5 @@ +--- +"@neo4j/graphql": major +--- + +The `typename_IN` filter has been renamed to `typename`. diff --git a/.changeset/fair-elephants-yell.md b/.changeset/fair-elephants-yell.md new file mode 100644 index 0000000000..8c7ab0dc26 --- /dev/null +++ b/.changeset/fair-elephants-yell.md @@ -0,0 +1,5 @@ +--- +"@neo4j/graphql": major +--- + +Aggregations are no longer generated for `ID` fields. diff --git a/.changeset/four-insects-repeat.md b/.changeset/four-insects-repeat.md new file mode 100644 index 0000000000..93f9df5278 --- /dev/null +++ b/.changeset/four-insects-repeat.md @@ -0,0 +1,15 @@ +--- +"@neo4j/graphql": patch +--- + +Deprecate individual mutations in favor of generic mutations + +- `_SET` +- `_POP` +- `_PUSH` +- `_INCREMENT` +- `_ADD` +- `_DECREMENT` +- `_SUBTRACT` +- `_MULTIPLY` +- `_DIVIDE` diff --git a/.changeset/green-jobs-jam.md b/.changeset/green-jobs-jam.md new file mode 100644 index 0000000000..8221a8db07 --- /dev/null +++ b/.changeset/green-jobs-jam.md @@ -0,0 +1,16 @@ +--- +"@neo4j/graphql": minor +--- + +Add suport for generic update operators: + +```graphql +mutation { + updateMovies(update: { name: { set: "The Matrix" } }) { + movies { + id + name + } + } +} +``` diff --git a/.changeset/khaki-roses-raise.md b/.changeset/khaki-roses-raise.md new file mode 100644 index 0000000000..1c14bed120 --- /dev/null +++ b/.changeset/khaki-roses-raise.md @@ -0,0 +1,31 @@ +--- +"@neo4j/graphql": patch +--- + +Deprecates old aggregation filters for relationships in favor of more generic filters: + +Before: + +```js +query Movies { + movies( + where: { actorsAggregate: { node: { lastRating_AVERAGE_GT: 6 } } } + ) { + title + } +} +``` + +Now: + +```js +query Movies { + movies( + where: { + actorsAggregate: { node: { lastRating: { average: { gt: 6 } } } } + } + ) { + title + } +} +``` diff --git a/.changeset/nine-games-clap.md b/.changeset/nine-games-clap.md new file mode 100644 index 0000000000..176357f8e9 --- /dev/null +++ b/.changeset/nine-games-clap.md @@ -0,0 +1,6 @@ +--- +"@neo4j/graphql": patch +--- + +Deprecate relationship filtering using the non-generic version such as `actors_SOME: { title_EQ: "The Matrix" }` in favor of the generic input `actors: { some: { title: { eq: "The Matrix" } } }`. +The setting `excludeDeprecatedFields` now contains the option `relationshipFilters` to remove these deprecated filters. diff --git a/.changeset/quick-dolphins-accept.md b/.changeset/quick-dolphins-accept.md new file mode 100644 index 0000000000..0e524a7210 --- /dev/null +++ b/.changeset/quick-dolphins-accept.md @@ -0,0 +1,6 @@ +--- +"@neo4j/graphql": patch +--- + +Deprecate attribute filtering using the non-generic version such as `title_EQ: "The Matrix"` in favor of the generic input `title: { eq: "The Matrix" }`. +The setting `excludeDeprecatedFields` now contains the option `attributeFilters` to remove these deprecated filters. diff --git a/.changeset/silly-toys-sing.md b/.changeset/silly-toys-sing.md new file mode 100644 index 0000000000..8babb36fc9 --- /dev/null +++ b/.changeset/silly-toys-sing.md @@ -0,0 +1,13 @@ +--- +"@neo4j/graphql": patch +--- + +Add generic filters for aggregations: + +```graphql +{ + posts(where: { likesAggregate: { node: { rating: { average: { eq: 3.2 } } } } }) { + title + } +} +``` diff --git a/.changeset/six-bottles-hear.md b/.changeset/six-bottles-hear.md new file mode 100644 index 0000000000..2cdfea5b14 --- /dev/null +++ b/.changeset/six-bottles-hear.md @@ -0,0 +1,12 @@ +--- +"@neo4j/graphql": patch +--- + +Introduce the flag "aggregationFilters" to remove deprecated aggregation filters: + +```js +const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { excludeDeprecatedFields: { aggregationFilters: true } }, +}); +``` 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 + } +} +``` diff --git a/packages/graphql/src/classes/Neo4jGraphQL.test.ts b/packages/graphql/src/classes/Neo4jGraphQL.test.ts index f3c49f9ea8..608926f2f8 100644 --- a/packages/graphql/src/classes/Neo4jGraphQL.test.ts +++ b/packages/graphql/src/classes/Neo4jGraphQL.test.ts @@ -39,10 +39,14 @@ describe("Neo4jGraphQL", () => { describe("getExecutableSchema", () => { test("error should contain path", async () => { let schema: GraphQLSchema | undefined = undefined; + const typeDefs = /* GraphQL */ ` + type User @node @authorization(filter: [{ where: { banana: { id: "$jwt.sub" } } }]) { + id: ID + } + `; const errors: Error[] = await getErrorAsync(async () => { schema = await new Neo4jGraphQL({ - typeDefs: - 'type User @node @authorization(filter: [{ where: { banana: { id: "$jwt.sub" } } }]) {id: ID}', + typeDefs, }).getExecutableSchema(); }); expect(errors).toHaveLength(1); diff --git a/packages/graphql/src/classes/Neo4jGraphQL.ts b/packages/graphql/src/classes/Neo4jGraphQL.ts index 295c162cf1..e4831ec70c 100644 --- a/packages/graphql/src/classes/Neo4jGraphQL.ts +++ b/packages/graphql/src/classes/Neo4jGraphQL.ts @@ -401,7 +401,12 @@ class Neo4jGraphQL { }); if (this.validate) { - validateUserDefinition({ userDocument: document, augmentedDocument: typeDefs, jwt: jwt?.type }); + validateUserDefinition({ + userDocument: document, + augmentedDocument: typeDefs, + jwt: jwt?.type, + features: this.features, + }); } this._nodes = nodes; @@ -473,6 +478,7 @@ class Neo4jGraphQL { additionalDirectives: directives, additionalTypes: types, jwt: jwt?.type, + features: this.features, }); } diff --git a/packages/graphql/src/graphql/directives/type-dependant-directives/get-static-auth-definitions.ts b/packages/graphql/src/graphql/directives/type-dependant-directives/get-static-auth-definitions.ts index 5a65b5ca23..f9695d204b 100644 --- a/packages/graphql/src/graphql/directives/type-dependant-directives/get-static-auth-definitions.ts +++ b/packages/graphql/src/graphql/directives/type-dependant-directives/get-static-auth-definitions.ts @@ -62,6 +62,7 @@ export function getStaticAuthorizationDefinitions( const JWTPayloadWhere = createJWTPayloadWhere(userDocument, schema, JWTPayloadDefinition); const JWTPayloadWhereAST = astFromInputObjectType(JWTPayloadWhere, schema); + ASTs.push(JWTPayloadWhereAST); return ASTs; } @@ -80,14 +81,16 @@ function createJWTPayloadWhere( (field) => new AttributeAdapter(parseAttribute(field, definitionCollection)) ); + const composer = new SchemaComposer(); const inputFieldsType = getWhereFieldsForAttributes({ attributes: jwtFieldAttributeAdapters, userDefinedFieldDirectives: undefined, features: undefined, ignoreCypherFieldFilters: false, + composer, }); - const composer = new SchemaComposer(); + const inputTC = composer.createInputTC({ name: "JWTPayloadWhere", fields: inputFieldsType, diff --git a/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/BigIntScalarAggregationFilters.ts b/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/BigIntScalarAggregationFilters.ts new file mode 100644 index 0000000000..c8f09f3a2f --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/BigIntScalarAggregationFilters.ts @@ -0,0 +1,32 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { GraphQLInputObjectType } from "graphql"; +import { BigIntScalarFilters } from "../generic-operators/BigIntScalarFilters"; + +export const BigIntScalarAggregationFilters = new GraphQLInputObjectType({ + name: "BigIntScalarAggregationFilters", + description: "Filters for an aggregation of an BigInt field", + fields: { + average: { type: BigIntScalarFilters }, + max: { type: BigIntScalarFilters }, + min: { type: BigIntScalarFilters }, + sum: { type: BigIntScalarFilters }, + }, +}); diff --git a/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/DateTimeScalarAggregationFilters.ts b/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/DateTimeScalarAggregationFilters.ts new file mode 100644 index 0000000000..e58747a8f3 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/DateTimeScalarAggregationFilters.ts @@ -0,0 +1,30 @@ +/* + * 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 { GraphQLInputObjectType } from "graphql"; +import { DateTimeScalarFilters } from "../generic-operators/DateTimeScalarFilters"; + +export const DateTimeScalarAggregationFilters = new GraphQLInputObjectType({ + name: "DateTimeScalarAggregationFilters", + description: "Filters for an aggregation of an DateTime input field", + fields: { + max: { type: DateTimeScalarFilters }, + min: { type: DateTimeScalarFilters }, + }, +}); diff --git a/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/DurationScalarAggregationFilters.ts b/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/DurationScalarAggregationFilters.ts new file mode 100644 index 0000000000..3853c5d534 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/DurationScalarAggregationFilters.ts @@ -0,0 +1,31 @@ +/* + * 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 { GraphQLInputObjectType } from "graphql"; +import { DurationScalarFilters } from "../generic-operators/DurationScalarFilters"; + +export const DurationScalarAggregationFilters = new GraphQLInputObjectType({ + name: "DurationScalarAggregationFilters", + description: "Filters for an aggregation of a Dutation input field", + fields: { + max: { type: DurationScalarFilters }, + min: { type: DurationScalarFilters }, + average: { type: DurationScalarFilters }, + }, +}); diff --git a/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/FloatScalarAggregationFilters.ts b/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/FloatScalarAggregationFilters.ts new file mode 100644 index 0000000000..2040199bb8 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/FloatScalarAggregationFilters.ts @@ -0,0 +1,32 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { GraphQLInputObjectType } from "graphql"; +import { FloatScalarFilters } from "../generic-operators/FloatScalarFilters"; + +export const FloatScalarAggregationFilters = new GraphQLInputObjectType({ + name: "FloatScalarAggregationFilters", + description: "Filters for an aggregation of a float field", + fields: { + average: { type: FloatScalarFilters }, + max: { type: FloatScalarFilters }, + min: { type: FloatScalarFilters }, + sum: { type: FloatScalarFilters }, + }, +}); diff --git a/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/IntScalarAggregationFilters.ts b/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/IntScalarAggregationFilters.ts new file mode 100644 index 0000000000..93f13eebe9 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/IntScalarAggregationFilters.ts @@ -0,0 +1,33 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { GraphQLInputObjectType } from "graphql"; +import { FloatScalarFilters } from "../generic-operators/FloatScalarFilters"; +import { IntScalarFilters } from "../generic-operators/IntScalarFilters"; + +export const IntScalarAggregationFilters = new GraphQLInputObjectType({ + name: "IntScalarAggregationFilters", + description: "Filters for an aggregation of an int field", + fields: { + average: { type: FloatScalarFilters }, + max: { type: IntScalarFilters }, + min: { type: IntScalarFilters }, + sum: { type: IntScalarFilters }, + }, +}); diff --git a/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/LocalDateTimeScalarAggregationFilters.ts b/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/LocalDateTimeScalarAggregationFilters.ts new file mode 100644 index 0000000000..f5def1a0ce --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/LocalDateTimeScalarAggregationFilters.ts @@ -0,0 +1,30 @@ +/* + * 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 { GraphQLInputObjectType } from "graphql"; +import { LocalDateTimeScalarFilters } from "../generic-operators/LocalDateTimeScalarFilters"; + +export const LocalDateTimeScalarAggregationFilters = new GraphQLInputObjectType({ + name: "LocalDateTimeScalarAggregationFilters", + description: "Filters for an aggregation of an LocalDateTime input field", + fields: { + max: { type: LocalDateTimeScalarFilters }, + min: { type: LocalDateTimeScalarFilters }, + }, +}); diff --git a/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/LocalTimeScalarAggregationFilters.ts b/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/LocalTimeScalarAggregationFilters.ts new file mode 100644 index 0000000000..031e769c54 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/LocalTimeScalarAggregationFilters.ts @@ -0,0 +1,30 @@ +/* + * 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 { GraphQLInputObjectType } from "graphql"; +import { LocalTimeScalarFilters } from "../generic-operators/LocalTimeScalarFilters"; + +export const LocalTimeScalarAggregationFilters = new GraphQLInputObjectType({ + name: "LocalTimeScalarAggregationFilters", + description: "Filters for an aggregation of an LocalTime input field", + fields: { + max: { type: LocalTimeScalarFilters }, + min: { type: LocalTimeScalarFilters }, + }, +}); diff --git a/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/StringScalarAggregationFilters.ts b/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/StringScalarAggregationFilters.ts new file mode 100644 index 0000000000..a3318322f9 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/StringScalarAggregationFilters.ts @@ -0,0 +1,32 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { GraphQLInputObjectType } from "graphql"; +import { FloatScalarFilters } from "../generic-operators/FloatScalarFilters"; +import { IntScalarFilters } from "../generic-operators/IntScalarFilters"; + +export const StringScalarAggregationFilters = new GraphQLInputObjectType({ + name: "StringScalarAggregationFilters", + description: "Filters for an aggregation of a string field", + fields: { + averageLength: { type: FloatScalarFilters }, + shortestLength: { type: IntScalarFilters }, + longestLength: { type: IntScalarFilters }, + }, +}); diff --git a/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/TimeScalarAggregationFilters.ts b/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/TimeScalarAggregationFilters.ts new file mode 100644 index 0000000000..c98495b819 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-aggregation-filters/TimeScalarAggregationFilters.ts @@ -0,0 +1,30 @@ +/* + * 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 { GraphQLInputObjectType } from "graphql"; +import { TimeScalarFilters } from "../generic-operators/TimeScalarFilters"; + +export const TimeScalarAggregationFilters = new GraphQLInputObjectType({ + name: "TimeScalarAggregationFilters", + description: "Filters for an aggregation of an Time input field", + fields: { + max: { type: TimeScalarFilters }, + min: { type: TimeScalarFilters }, + }, +}); diff --git a/packages/graphql/src/graphql/input-objects/generic-mutation-operations/BigIntScalarMutations.ts b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/BigIntScalarMutations.ts new file mode 100644 index 0000000000..5573c9e377 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/BigIntScalarMutations.ts @@ -0,0 +1,34 @@ +/* + * 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 { GraphQLInputObjectType } from "graphql"; +import { GraphQLBigInt } from "../../scalars"; +import { listMutation } from "./ListMutation"; + +export const BigIntScalarMutations = new GraphQLInputObjectType({ + name: "BigIntScalarMutations", + description: "BigInt mutations", + fields: { + set: { type: GraphQLBigInt }, + add: { type: GraphQLBigInt }, + subtract: { type: GraphQLBigInt }, + }, +}); + +export const BigIntListMutations = listMutation(GraphQLBigInt); diff --git a/packages/graphql/src/graphql/input-objects/generic-mutation-operations/BooleanScalarMutations.ts b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/BooleanScalarMutations.ts new file mode 100644 index 0000000000..26ef76fd2f --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/BooleanScalarMutations.ts @@ -0,0 +1,31 @@ +/* + * 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 { GraphQLBoolean, GraphQLInputObjectType } from "graphql"; +import { listMutation } from "./ListMutation"; + +export const BooleanScalarMutations = new GraphQLInputObjectType({ + name: "BooleanScalarMutations", + description: "Boolean mutations", + fields: { + set: { type: GraphQLBoolean }, + }, +}); + +export const BooleanListMutations = listMutation(GraphQLBoolean); diff --git a/packages/graphql/src/graphql/input-objects/generic-mutation-operations/CartesianPointMutations.ts b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/CartesianPointMutations.ts new file mode 100644 index 0000000000..16ad4cc1f9 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/CartesianPointMutations.ts @@ -0,0 +1,32 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { GraphQLInputObjectType } from "graphql"; +import { CartesianPointInput } from "../CartesianPointInput"; +import { listMutation } from "./ListMutation"; + +export const CartesianPointMutations = new GraphQLInputObjectType({ + name: "CartesianPointMutations", + description: "CartesianPoint mutations", + fields: { + set: { type: CartesianPointInput }, + }, +}); + +export const CartesianPointListMutations = listMutation(CartesianPointInput); diff --git a/packages/graphql/src/graphql/input-objects/generic-mutation-operations/DateScalarMutations.ts b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/DateScalarMutations.ts new file mode 100644 index 0000000000..82339d2c5c --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/DateScalarMutations.ts @@ -0,0 +1,32 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { GraphQLInputObjectType } from "graphql"; +import { GraphQLDate } from "../../scalars"; +import { listMutation } from "./ListMutation"; + +export const DateScalarMutations = new GraphQLInputObjectType({ + name: "DateScalarMutations", + description: "Date mutations", + fields: { + set: { type: GraphQLDate }, + }, +}); + +export const DateListMutations = listMutation(GraphQLDate); diff --git a/packages/graphql/src/graphql/input-objects/generic-mutation-operations/DateTimeScalarMutations.ts b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/DateTimeScalarMutations.ts new file mode 100644 index 0000000000..8b898c8f97 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/DateTimeScalarMutations.ts @@ -0,0 +1,32 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { GraphQLInputObjectType } from "graphql"; +import { GraphQLDateTime } from "../../scalars"; +import { listMutation } from "./ListMutation"; + +export const DateTimeScalarMutations = new GraphQLInputObjectType({ + name: "DateTimeScalarMutations", + description: "DateTime mutations", + fields: { + set: { type: GraphQLDateTime }, + }, +}); + +export const DateTimeListMutations = listMutation(GraphQLDateTime); diff --git a/packages/graphql/src/graphql/input-objects/generic-mutation-operations/DurationScalarMutations.ts b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/DurationScalarMutations.ts new file mode 100644 index 0000000000..788cbaaa17 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/DurationScalarMutations.ts @@ -0,0 +1,32 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { GraphQLInputObjectType } from "graphql"; +import { GraphQLDuration } from "../../scalars"; +import { listMutation } from "./ListMutation"; + +export const DurationScalarMutations = new GraphQLInputObjectType({ + name: "DurationScalarMutations", + description: "Duration mutations", + fields: { + set: { type: GraphQLDuration }, + }, +}); + +export const DurationListMutations = listMutation(GraphQLDuration); diff --git a/packages/graphql/src/graphql/input-objects/generic-mutation-operations/FloatScalarMutations.ts b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/FloatScalarMutations.ts new file mode 100644 index 0000000000..5a5b9615dd --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/FloatScalarMutations.ts @@ -0,0 +1,35 @@ +/* + * 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 { GraphQLFloat, GraphQLInputObjectType } from "graphql"; +import { listMutation } from "./ListMutation"; + +export const FloatScalarMutations = new GraphQLInputObjectType({ + name: "FloatScalarMutations", + description: "Float mutations", + fields: { + set: { type: GraphQLFloat }, + add: { type: GraphQLFloat }, + subtract: { type: GraphQLFloat }, + multiply: { type: GraphQLFloat }, + divide: { type: GraphQLFloat }, + }, +}); + +export const FloatListMutations = listMutation(GraphQLFloat); diff --git a/packages/graphql/src/graphql/input-objects/generic-mutation-operations/IDScalarMutations.ts b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/IDScalarMutations.ts new file mode 100644 index 0000000000..a754ee575e --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/IDScalarMutations.ts @@ -0,0 +1,31 @@ +/* + * 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 { GraphQLID, GraphQLInputObjectType } from "graphql"; +import { listMutation } from "./ListMutation"; + +export const IDScalarMutations = new GraphQLInputObjectType({ + name: "IDScalarMutations", + description: "ID mutations", + fields: { + set: { type: GraphQLID }, + }, +}); + +export const IDListMutations = listMutation(GraphQLID); diff --git a/packages/graphql/src/graphql/input-objects/generic-mutation-operations/IntScalarMutations.ts b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/IntScalarMutations.ts new file mode 100644 index 0000000000..0d367803a7 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/IntScalarMutations.ts @@ -0,0 +1,33 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { GraphQLInputObjectType, GraphQLInt } from "graphql"; +import { listMutation } from "./ListMutation"; + +export const IntScalarMutations = new GraphQLInputObjectType({ + name: "IntScalarMutations", + description: "Int mutations", + fields: { + set: { type: GraphQLInt }, + add: { type: GraphQLInt }, + subtract: { type: GraphQLInt }, + }, +}); + +export const IntListMutations = listMutation(GraphQLInt); diff --git a/packages/graphql/src/graphql/input-objects/generic-mutation-operations/ListMutation.ts b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/ListMutation.ts new file mode 100644 index 0000000000..538d218861 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/ListMutation.ts @@ -0,0 +1,33 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { GraphQLScalarType } from "graphql"; +import { GraphQLInputObjectType, GraphQLInt, GraphQLList, GraphQLNonNull } from "graphql"; + +export function listMutation(inputObject: GraphQLInputObjectType | GraphQLScalarType): GraphQLInputObjectType { + return new GraphQLInputObjectType({ + name: `List${inputObject.name}Mutations`, + description: `Mutations for a list for ${inputObject.name}`, + fields: { + set: { type: new GraphQLList(new GraphQLNonNull(inputObject)) }, + push: { type: new GraphQLList(new GraphQLNonNull(inputObject)) }, + pop: { type: GraphQLInt }, + }, + }); +} diff --git a/packages/graphql/src/graphql/input-objects/generic-mutation-operations/LocalDateTimeScalarMutations.ts b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/LocalDateTimeScalarMutations.ts new file mode 100644 index 0000000000..f1eea3a6b6 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/LocalDateTimeScalarMutations.ts @@ -0,0 +1,32 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { GraphQLInputObjectType } from "graphql"; +import { GraphQLLocalDateTime } from "../../scalars"; +import { listMutation } from "./ListMutation"; + +export const LocalDateTimeScalarMutations = new GraphQLInputObjectType({ + name: "LocalDateTimeScalarMutations", + description: "LocalDateTime mutations", + fields: { + set: { type: GraphQLLocalDateTime }, + }, +}); + +export const LocalDateTimeListMutations = listMutation(GraphQLLocalDateTime); diff --git a/packages/graphql/src/graphql/input-objects/generic-mutation-operations/LocalTimeScalarMutations.ts b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/LocalTimeScalarMutations.ts new file mode 100644 index 0000000000..d9e478c4c9 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/LocalTimeScalarMutations.ts @@ -0,0 +1,32 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { GraphQLInputObjectType } from "graphql"; +import { GraphQLLocalTime } from "../../scalars"; +import { listMutation } from "./ListMutation"; + +export const LocalTimeScalarMutations = new GraphQLInputObjectType({ + name: "LocalTimeScalarMutations", + description: "LocalTime mutations", + fields: { + set: { type: GraphQLLocalTime }, + }, +}); + +export const LocalTimeListMutations = listMutation(GraphQLLocalTime); diff --git a/packages/graphql/src/graphql/input-objects/generic-mutation-operations/PointMutations.ts b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/PointMutations.ts new file mode 100644 index 0000000000..873a0d9364 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/PointMutations.ts @@ -0,0 +1,32 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { GraphQLInputObjectType } from "graphql"; +import { PointInput } from "../PointInput"; +import { listMutation } from "./ListMutation"; + +export const PointMutations = new GraphQLInputObjectType({ + name: "PointMutations", + description: "Point mutations", + fields: { + set: { type: PointInput }, + }, +}); + +export const PointListMutations = listMutation(PointInput); diff --git a/packages/graphql/src/graphql/input-objects/generic-mutation-operations/StringScalarMutations.ts b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/StringScalarMutations.ts new file mode 100644 index 0000000000..8ac4c3e54c --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/StringScalarMutations.ts @@ -0,0 +1,31 @@ +/* + * 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 { GraphQLInputObjectType, GraphQLString } from "graphql"; +import { listMutation } from "./ListMutation"; + +export const StringScalarMutations = new GraphQLInputObjectType({ + name: "StringScalarMutations", + description: "String mutations", + fields: { + set: { type: GraphQLString }, + }, +}); + +export const StringListMutations = listMutation(GraphQLString); diff --git a/packages/graphql/src/graphql/input-objects/generic-mutation-operations/TimeScalarMutations.ts b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/TimeScalarMutations.ts new file mode 100644 index 0000000000..51d9d12e82 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-mutation-operations/TimeScalarMutations.ts @@ -0,0 +1,32 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { GraphQLInputObjectType } from "graphql"; +import { GraphQLTime } from "../../scalars"; +import { listMutation } from "./ListMutation"; + +export const TimeScalarMutations = new GraphQLInputObjectType({ + name: "TimeScalarMutations", + description: "Time mutations", + fields: { + set: { type: GraphQLTime }, + }, +}); + +export const TimeListMutations = listMutation(GraphQLTime); diff --git a/packages/graphql/src/graphql/input-objects/generic-operators/BigIntScalarFilters.ts b/packages/graphql/src/graphql/input-objects/generic-operators/BigIntScalarFilters.ts new file mode 100644 index 0000000000..98f8b10810 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-operators/BigIntScalarFilters.ts @@ -0,0 +1,45 @@ +/* + * 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 { GraphQLInputObjectType, GraphQLList, GraphQLNonNull } from "graphql"; +import { GraphQLBigInt } from "../../scalars"; + +export const BigIntScalarFilters = new GraphQLInputObjectType({ + name: "BigIntScalarFilters", + description: "BigInt filters", + fields: { + eq: { + type: GraphQLBigInt, + }, + gt: { type: GraphQLBigInt }, + gte: { type: GraphQLBigInt }, + in: { type: new GraphQLList(new GraphQLNonNull(GraphQLBigInt)) }, + lt: { type: GraphQLBigInt }, + lte: { type: GraphQLBigInt }, + }, +}); + +export const BigIntListFilters = new GraphQLInputObjectType({ + name: "BigIntListFilters", + description: "BigInt list filters", + fields: { + eq: { type: new GraphQLList(new GraphQLNonNull(GraphQLBigInt)) }, + includes: { type: GraphQLBigInt }, + }, +}); diff --git a/packages/graphql/src/graphql/input-objects/generic-operators/BooleanScalarFilters.ts b/packages/graphql/src/graphql/input-objects/generic-operators/BooleanScalarFilters.ts new file mode 100644 index 0000000000..d067cc2e19 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-operators/BooleanScalarFilters.ts @@ -0,0 +1,38 @@ +/* + * 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 { GraphQLBoolean, GraphQLInputObjectType, GraphQLList, GraphQLNonNull } from "graphql"; + +export const BooleanScalarFilters = new GraphQLInputObjectType({ + name: "BooleanScalarFilters", + description: "Boolean filters", + fields: { + eq: { + type: GraphQLBoolean, + }, + }, +}); + +export const BooleanListFilters = new GraphQLInputObjectType({ + name: "BooleanListFilters", + description: "Boolean list filters", + fields: { + eq: { type: new GraphQLList(new GraphQLNonNull(GraphQLBoolean)) }, + }, +}); diff --git a/packages/graphql/src/graphql/input-objects/generic-operators/CartesianPointFilters.ts b/packages/graphql/src/graphql/input-objects/generic-operators/CartesianPointFilters.ts new file mode 100644 index 0000000000..d3e7f35b3c --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-operators/CartesianPointFilters.ts @@ -0,0 +1,56 @@ +/* + * 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 { GraphQLFloat, GraphQLInputObjectType, GraphQLList, GraphQLNonNull } from "graphql"; +import { CartesianPointInput } from "../CartesianPointInput"; + +const CartesianDistancePointFilters = new GraphQLInputObjectType({ + name: "CartesianDistancePointFilters", + description: "Distance filters for cartesian points", + fields: { + from: { + type: new GraphQLNonNull(CartesianPointInput), + }, + gt: { type: GraphQLFloat }, + gte: { type: GraphQLFloat }, + lt: { type: GraphQLFloat }, + lte: { type: GraphQLFloat }, + }, +}); + +export const CartesianPointFilters = new GraphQLInputObjectType({ + name: "CartesianPointFilters", + description: "Cartesian Point filters", + fields: { + eq: { + type: CartesianPointInput, + }, + in: { type: new GraphQLList(new GraphQLNonNull(CartesianPointInput)) }, + distance: { type: CartesianDistancePointFilters }, + }, +}); + +export const CartesianPointListFilters = new GraphQLInputObjectType({ + name: "CartesianPointListFilters", + description: "CartesianPoint list filters", + fields: { + eq: { type: new GraphQLList(new GraphQLNonNull(CartesianPointInput)) }, + includes: { type: CartesianPointInput }, + }, +}); diff --git a/packages/graphql/src/graphql/input-objects/generic-operators/DateScalarFilters.ts b/packages/graphql/src/graphql/input-objects/generic-operators/DateScalarFilters.ts new file mode 100644 index 0000000000..99babb4d24 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-operators/DateScalarFilters.ts @@ -0,0 +1,45 @@ +/* + * 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 { GraphQLInputObjectType, GraphQLList, GraphQLNonNull } from "graphql"; +import { GraphQLDate } from "../../scalars"; + +export const DateScalarFilters = new GraphQLInputObjectType({ + name: "DateScalarFilters", + description: "Date filters", + fields: { + eq: { + type: GraphQLDate, + }, + gt: { type: GraphQLDate }, + gte: { type: GraphQLDate }, + in: { type: new GraphQLList(new GraphQLNonNull(GraphQLDate)) }, + lt: { type: GraphQLDate }, + lte: { type: GraphQLDate }, + }, +}); + +export const DateListFilters = new GraphQLInputObjectType({ + name: "DateListFilters", + description: "Date list filters", + fields: { + eq: { type: new GraphQLList(new GraphQLNonNull(GraphQLDate)) }, + includes: { type: GraphQLDate }, + }, +}); diff --git a/packages/graphql/src/graphql/input-objects/generic-operators/DateTimeScalarFilters.ts b/packages/graphql/src/graphql/input-objects/generic-operators/DateTimeScalarFilters.ts new file mode 100644 index 0000000000..4fca7078e8 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-operators/DateTimeScalarFilters.ts @@ -0,0 +1,45 @@ +/* + * 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 { GraphQLInputObjectType, GraphQLList, GraphQLNonNull } from "graphql"; +import { GraphQLDateTime } from "../../scalars"; + +export const DateTimeScalarFilters = new GraphQLInputObjectType({ + name: "DateTimeScalarFilters", + description: "DateTime filters", + fields: { + eq: { + type: GraphQLDateTime, + }, + gt: { type: GraphQLDateTime }, + gte: { type: GraphQLDateTime }, + in: { type: new GraphQLList(new GraphQLNonNull(GraphQLDateTime)) }, + lt: { type: GraphQLDateTime }, + lte: { type: GraphQLDateTime }, + }, +}); + +export const DateTimeListFilters = new GraphQLInputObjectType({ + name: "DateTimeListFilters", + description: "DateTime list filters", + fields: { + eq: { type: new GraphQLList(new GraphQLNonNull(GraphQLDateTime)) }, + includes: { type: GraphQLDateTime }, + }, +}); diff --git a/packages/graphql/src/graphql/input-objects/generic-operators/DurationScalarFilters.ts b/packages/graphql/src/graphql/input-objects/generic-operators/DurationScalarFilters.ts new file mode 100644 index 0000000000..358b723853 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-operators/DurationScalarFilters.ts @@ -0,0 +1,45 @@ +/* + * 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 { GraphQLInputObjectType, GraphQLList, GraphQLNonNull } from "graphql"; +import { GraphQLDuration } from "../../scalars"; + +export const DurationScalarFilters = new GraphQLInputObjectType({ + name: "DurationScalarFilters", + description: "Duration filters", + fields: { + eq: { + type: GraphQLDuration, + }, + gt: { type: GraphQLDuration }, + gte: { type: GraphQLDuration }, + in: { type: new GraphQLList(new GraphQLNonNull(GraphQLDuration)) }, + lt: { type: GraphQLDuration }, + lte: { type: GraphQLDuration }, + }, +}); + +export const DurationListFilters = new GraphQLInputObjectType({ + name: "DurationListFilters", + description: "Duration list filters", + fields: { + eq: { type: new GraphQLList(new GraphQLNonNull(GraphQLDuration)) }, + includes: { type: GraphQLDuration }, + }, +}); diff --git a/packages/graphql/src/graphql/input-objects/generic-operators/FloatScalarFilters.ts b/packages/graphql/src/graphql/input-objects/generic-operators/FloatScalarFilters.ts new file mode 100644 index 0000000000..1e57f860da --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-operators/FloatScalarFilters.ts @@ -0,0 +1,44 @@ +/* + * 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 { GraphQLFloat, GraphQLInputObjectType, GraphQLList, GraphQLNonNull } from "graphql"; + +export const FloatScalarFilters = new GraphQLInputObjectType({ + name: "FloatScalarFilters", + description: "Float filters", + fields: { + eq: { + type: GraphQLFloat, + }, + gt: { type: GraphQLFloat }, + gte: { type: GraphQLFloat }, + in: { type: new GraphQLList(new GraphQLNonNull(GraphQLFloat)) }, + lt: { type: GraphQLFloat }, + lte: { type: GraphQLFloat }, + }, +}); + +export const FloatListFilters = new GraphQLInputObjectType({ + name: "FloatListFilters", + description: "Float list filters", + fields: { + eq: { type: new GraphQLList(new GraphQLNonNull(GraphQLFloat)) }, + includes: { type: GraphQLFloat }, + }, +}); diff --git a/packages/graphql/src/graphql/input-objects/generic-operators/IDScalarFilters.ts b/packages/graphql/src/graphql/input-objects/generic-operators/IDScalarFilters.ts new file mode 100644 index 0000000000..07500a0f2d --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-operators/IDScalarFilters.ts @@ -0,0 +1,69 @@ +/* + * 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 { GraphQLID, GraphQLInputObjectType, GraphQLList, GraphQLNonNull } from "graphql"; +import type { Neo4jFeaturesSettings } from "../../../types"; + +export function getIDScalarFilters(features?: Neo4jFeaturesSettings): GraphQLInputObjectType { + const fields = { + eq: { + type: GraphQLID, + }, + in: { type: new GraphQLList(new GraphQLNonNull(GraphQLID)) }, + contains: { type: GraphQLID }, + endsWith: { type: GraphQLID }, + startsWith: { type: GraphQLID }, + }; + for (const filter of Object.entries(features?.filters?.ID ?? {})) { + const [filterName, isEnabled] = filter; + if (isEnabled) { + switch (filterName) { + case "MATCHES": + fields["matches"] = { type: GraphQLID }; + break; + case "GT": + fields["gt"] = { type: GraphQLID }; + break; + case "GTE": + fields["gte"] = { type: GraphQLID }; + break; + case "LT": + fields["lt"] = { type: GraphQLID }; + break; + case "LTE": + fields["lte"] = { type: GraphQLID }; + break; + } + } + } + return new GraphQLInputObjectType({ + name: "IDScalarFilters", + description: "ID filters", + fields, + }); +} + +export const IDListFilters = new GraphQLInputObjectType({ + name: "IDListFilters", + description: "ID list filters", + fields: { + eq: { type: new GraphQLList(new GraphQLNonNull(GraphQLID)) }, + includes: { type: GraphQLID }, + }, +}); diff --git a/packages/graphql/src/graphql/input-objects/generic-operators/IntScalarFilters.ts b/packages/graphql/src/graphql/input-objects/generic-operators/IntScalarFilters.ts new file mode 100644 index 0000000000..94b9aaa611 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-operators/IntScalarFilters.ts @@ -0,0 +1,42 @@ +/* + * 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 { GraphQLInputObjectType, GraphQLInt, GraphQLList, GraphQLNonNull } from "graphql"; + +export const IntScalarFilters = new GraphQLInputObjectType({ + name: "IntScalarFilters", + description: "Int filters", + fields: { + eq: { type: GraphQLInt }, + gt: { type: GraphQLInt }, + gte: { type: GraphQLInt }, + in: { type: new GraphQLList(new GraphQLNonNull(GraphQLInt)) }, + lt: { type: GraphQLInt }, + lte: { type: GraphQLInt }, + }, +}); + +export const IntListFilters = new GraphQLInputObjectType({ + name: "IntListFilters", + description: "Int list filters", + fields: { + eq: { type: new GraphQLList(new GraphQLNonNull(GraphQLInt)) }, + includes: { type: GraphQLInt }, + }, +}); diff --git a/packages/graphql/src/graphql/input-objects/generic-operators/LocalDateTimeScalarFilters.ts b/packages/graphql/src/graphql/input-objects/generic-operators/LocalDateTimeScalarFilters.ts new file mode 100644 index 0000000000..646f5f2d13 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-operators/LocalDateTimeScalarFilters.ts @@ -0,0 +1,45 @@ +/* + * 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 { GraphQLInputObjectType, GraphQLList, GraphQLNonNull } from "graphql"; +import { GraphQLLocalDateTime } from "../../scalars"; + +export const LocalDateTimeScalarFilters = new GraphQLInputObjectType({ + name: "LocalDateTimeScalarFilters", + description: "LocalDateTime filters", + fields: { + eq: { + type: GraphQLLocalDateTime, + }, + gt: { type: GraphQLLocalDateTime }, + gte: { type: GraphQLLocalDateTime }, + in: { type: new GraphQLList(new GraphQLNonNull(GraphQLLocalDateTime)) }, + lt: { type: GraphQLLocalDateTime }, + lte: { type: GraphQLLocalDateTime }, + }, +}); + +export const LocalDateTimeListFilters = new GraphQLInputObjectType({ + name: "LocalDateTimeListFilters", + description: "LocalDateTime list filters", + fields: { + eq: { type: new GraphQLList(new GraphQLNonNull(GraphQLLocalDateTime)) }, + includes: { type: GraphQLLocalDateTime }, + }, +}); diff --git a/packages/graphql/src/graphql/input-objects/generic-operators/LocalTimeScalarFilters.ts b/packages/graphql/src/graphql/input-objects/generic-operators/LocalTimeScalarFilters.ts new file mode 100644 index 0000000000..5c57ddf7ea --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-operators/LocalTimeScalarFilters.ts @@ -0,0 +1,45 @@ +/* + * 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 { GraphQLInputObjectType, GraphQLList, GraphQLNonNull } from "graphql"; +import { GraphQLLocalTime } from "../../scalars"; + +export const LocalTimeScalarFilters = new GraphQLInputObjectType({ + name: "LocalTimeScalarFilters", + description: "LocalTime filters", + fields: { + eq: { + type: GraphQLLocalTime, + }, + gt: { type: GraphQLLocalTime }, + gte: { type: GraphQLLocalTime }, + in: { type: new GraphQLList(new GraphQLNonNull(GraphQLLocalTime)) }, + lt: { type: GraphQLLocalTime }, + lte: { type: GraphQLLocalTime }, + }, +}); + +export const LocalTimeListFilters = new GraphQLInputObjectType({ + name: "LocalTimeListFilters", + description: "LocalTime list filters", + fields: { + eq: { type: new GraphQLList(new GraphQLNonNull(GraphQLLocalTime)) }, + includes: { type: GraphQLLocalTime }, + }, +}); diff --git a/packages/graphql/src/graphql/input-objects/generic-operators/PointFilters.ts b/packages/graphql/src/graphql/input-objects/generic-operators/PointFilters.ts new file mode 100644 index 0000000000..0e3bfba6f2 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-operators/PointFilters.ts @@ -0,0 +1,57 @@ +/* + * 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 { GraphQLFloat, GraphQLInputObjectType, GraphQLList, GraphQLNonNull } from "graphql"; +import { PointInput } from "../PointInput"; + +const DistancePointFilters = new GraphQLInputObjectType({ + name: "PointDistanceFilters", + description: "Distance filters", + fields: { + from: { + type: new GraphQLNonNull(PointInput), + }, + gt: { type: GraphQLFloat }, + gte: { type: GraphQLFloat }, + lt: { type: GraphQLFloat }, + lte: { type: GraphQLFloat }, + eq: { type: GraphQLFloat }, + }, +}); + +export const PointFilters = new GraphQLInputObjectType({ + name: "PointFilters", + description: "Point filters", + fields: { + eq: { + type: PointInput, + }, + in: { type: new GraphQLList(new GraphQLNonNull(PointInput)) }, + distance: { type: DistancePointFilters }, + }, +}); + +export const PointListFilters = new GraphQLInputObjectType({ + name: "PointListFilters", + description: "Point list filters", + fields: { + eq: { type: new GraphQLList(new GraphQLNonNull(PointInput)) }, + includes: { type: PointInput }, + }, +}); diff --git a/packages/graphql/src/graphql/input-objects/generic-operators/StringScalarFilters.ts b/packages/graphql/src/graphql/input-objects/generic-operators/StringScalarFilters.ts new file mode 100644 index 0000000000..4840b2b3d6 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-operators/StringScalarFilters.ts @@ -0,0 +1,69 @@ +/* + * 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 { GraphQLInputObjectType, GraphQLList, GraphQLNonNull, GraphQLString } from "graphql"; +import type { Neo4jFeaturesSettings } from "../../../types"; + +export function getStringScalarFilters(features?: Neo4jFeaturesSettings): GraphQLInputObjectType { + const fields = { + eq: { + type: GraphQLString, + }, + in: { type: new GraphQLList(new GraphQLNonNull(GraphQLString)) }, + contains: { type: GraphQLString }, + endsWith: { type: GraphQLString }, + startsWith: { type: GraphQLString }, + }; + for (const filter of Object.entries(features?.filters?.String ?? {})) { + const [filterName, isEnabled] = filter; + if (isEnabled) { + switch (filterName) { + case "MATCHES": + fields["matches"] = { type: GraphQLString }; + break; + case "GT": + fields["gt"] = { type: GraphQLString }; + break; + case "GTE": + fields["gte"] = { type: GraphQLString }; + break; + case "LT": + fields["lt"] = { type: GraphQLString }; + break; + case "LTE": + fields["lte"] = { type: GraphQLString }; + break; + } + } + } + return new GraphQLInputObjectType({ + name: "StringScalarFilters", + description: "String filters", + fields, + }); +} + +export const StringListFilters = new GraphQLInputObjectType({ + name: "StringListFilters", + description: "String list filters", + fields: { + eq: { type: new GraphQLList(new GraphQLNonNull(GraphQLString)) }, + includes: { type: GraphQLString }, + }, +}); diff --git a/packages/graphql/src/graphql/input-objects/generic-operators/TimeScalarFilters.ts b/packages/graphql/src/graphql/input-objects/generic-operators/TimeScalarFilters.ts new file mode 100644 index 0000000000..a6973485f9 --- /dev/null +++ b/packages/graphql/src/graphql/input-objects/generic-operators/TimeScalarFilters.ts @@ -0,0 +1,45 @@ +/* + * 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 { GraphQLInputObjectType, GraphQLList, GraphQLNonNull } from "graphql"; +import { GraphQLTime } from "../../scalars"; + +export const TimeScalarFilters = new GraphQLInputObjectType({ + name: "TimeScalarFilters", + description: "Time filters", + fields: { + eq: { + type: GraphQLTime, + }, + gt: { type: GraphQLTime }, + gte: { type: GraphQLTime }, + in: { type: new GraphQLList(new GraphQLNonNull(GraphQLTime)) }, + lt: { type: GraphQLTime }, + lte: { type: GraphQLTime }, + }, +}); + +export const TimeListFilters = new GraphQLInputObjectType({ + name: "TimeListFilters", + description: "Time list filters", + fields: { + eq: { type: new GraphQLList(new GraphQLNonNull(GraphQLTime)) }, + includes: { type: GraphQLTime }, + }, +}); diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts index 8774328a73..8e994fb030 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts @@ -177,17 +177,24 @@ export class AttributeAdapter { isAggregableField(): boolean { return ( - !this.typeHelper.isList() && (this.typeHelper.isScalar() || this.typeHelper.isEnum()) && this.isAggregable() + !this.typeHelper.isList() && + !this.typeHelper.isID() && + (this.typeHelper.isScalar() || this.typeHelper.isEnum()) && + this.isAggregable() ); } isAggregationWhereField(): boolean { - const isGraphQLBuiltInScalarWithoutBoolean = - this.typeHelper.isGraphQLBuiltInScalar() && !this.typeHelper.isBoolean(); - const isTemporalWithoutDate = this.typeHelper.isTemporal() && !this.typeHelper.isDate(); + if ( + this.typeHelper.isList() || + this.typeHelper.isID() || + this.typeHelper.isBoolean() || + this.typeHelper.isDate() + ) { + return false; + } return ( - !this.typeHelper.isList() && - (isGraphQLBuiltInScalarWithoutBoolean || isTemporalWithoutDate || this.typeHelper.isBigInt()) && + (this.typeHelper.isGraphQLBuiltInScalar() || this.typeHelper.isTemporal() || this.typeHelper.isBigInt()) && this.isAggregationFilterable() ); } @@ -313,6 +320,7 @@ export class AttributeAdapter { this.isCypher() === false ); } + isAggregationFilterable(): boolean { return ( this.annotations.filterable?.byAggregate !== false && 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..9a8d0447da 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.relationship.target.name}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..c4d273e455 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 | undefined + userDefinedDirectivesOnTargetFields: Map | undefined, + features: Neo4jFeaturesSettings | undefined ): InputTypeComposerFieldConfigMapDefinition { const fields: InputTypeComposerFieldConfigMapDefinition = {}; for (const attribute of attributes) { - addAggregationFieldsByType(attribute, userDefinedDirectivesOnTargetFields?.get(attribute.name), fields); + if (shouldAddDeprecatedFields(features, "aggregationFilters")) { + addDeprecatedAggregationFieldsByType( + attribute, + userDefinedDirectivesOnTargetFields?.get(attribute.name), + fields + ); + } + if (attribute.isAggregationWhereField()) { + fields[attribute.name] = getAggregationFilterFromAttributeType(attribute); + } } return fields; } // TODO: refactor this by introducing specialized Adapters -function addAggregationFieldsByType( +function addDeprecatedAggregationFieldsByType( attribute: AttributeAdapter, directivesOnField: DirectiveNode[] | undefined, fields: InputTypeComposerFieldConfigMapDefinition ): InputTypeComposerFieldConfigMapDefinition { - const deprecatedDirectives = graphqlDirectivesToCompose( - (directivesOnField || []).filter((d) => d.name.value === DEPRECATED) - ); if (attribute.typeHelper.isString()) { for (const operator of AGGREGATION_COMPARISON_OPERATORS) { fields[`${attribute.name}_AVERAGE_LENGTH_${operator}`] = { type: GraphQLFloat, - directives: deprecatedDirectives, + directives: [DEPRECATE_AGGREGATION_FILTERS(attribute.name, "averageLength", operator)], }; fields[`${attribute.name}_LONGEST_LENGTH_${operator}`] = { type: GraphQLInt, - directives: deprecatedDirectives, + directives: [DEPRECATE_AGGREGATION_FILTERS(attribute.name, "longestLength", operator)], }; fields[`${attribute.name}_SHORTEST_LENGTH_${operator}`] = { type: GraphQLInt, - directives: deprecatedDirectives, + directives: [DEPRECATE_AGGREGATION_FILTERS(attribute.name, "shortestLength", operator)], }; } + return fields; } if (attribute.typeHelper.isNumeric() || attribute.typeHelper.isDuration()) { @@ -228,16 +242,16 @@ function addAggregationFieldsByType( for (const operator of AGGREGATION_COMPARISON_OPERATORS) { fields[`${attribute.name}_MIN_${operator}`] = { type: attribute.getTypeName(), - directives: deprecatedDirectives, + directives: [DEPRECATE_AGGREGATION_FILTERS(attribute.name, "min", operator)], }; fields[`${attribute.name}_MAX_${operator}`] = { type: attribute.getTypeName(), - directives: deprecatedDirectives, + directives: [DEPRECATE_AGGREGATION_FILTERS(attribute.name, "max", operator)], }; if (attribute.getTypeName() !== "Duration") { fields[`${attribute.name}_SUM_${operator}`] = { type: attribute.getTypeName(), - directives: deprecatedDirectives, + directives: [DEPRECATE_AGGREGATION_FILTERS(attribute.name, "sum", operator)], }; } const averageType = attribute.typeHelper.isBigInt() @@ -245,18 +259,22 @@ function addAggregationFieldsByType( : attribute.typeHelper.isDuration() ? "Duration" : GraphQLFloat; - fields[`${attribute.name}_AVERAGE_${operator}`] = { type: averageType, directives: deprecatedDirectives }; + fields[`${attribute.name}_AVERAGE_${operator}`] = { + type: averageType, + directives: [DEPRECATE_AGGREGATION_FILTERS(attribute.name, "average", operator)], + }; } + return fields; } for (const operator of AGGREGATION_COMPARISON_OPERATORS) { fields[`${attribute.name}_MIN_${operator}`] = { type: attribute.getTypeName(), - directives: deprecatedDirectives, + directives: [DEPRECATE_AGGREGATION_FILTERS(attribute.name, "min", operator)], }; fields[`${attribute.name}_MAX_${operator}`] = { type: attribute.getTypeName(), - directives: deprecatedDirectives, + directives: [DEPRECATE_AGGREGATION_FILTERS(attribute.name, "max", operator)], }; } return fields; diff --git a/packages/graphql/src/schema/generation/augment-where-input.ts b/packages/graphql/src/schema/generation/augment-where-input.ts index 50466d051f..5bf22e4a7e 100644 --- a/packages/graphql/src/schema/generation/augment-where-input.ts +++ b/packages/graphql/src/schema/generation/augment-where-input.ts @@ -17,77 +17,284 @@ * limitations under the License. */ -import type { Directive, InputTypeComposerFieldConfigMapDefinition } from "graphql-compose"; +import type { + Directive, + InputTypeComposer, + InputTypeComposerFieldConfigMapDefinition, + SchemaComposer, +} from "graphql-compose"; +import pluralize from "pluralize"; +import { DEPRECATED } from "../../constants"; import type { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { RelationshipDeclarationAdapter } from "../../schema-model/relationship/model-adapters/RelationshipDeclarationAdapter"; +import type { Neo4jFeaturesSettings } from "../../types"; +import { shouldAddDeprecatedFields } from "./utils"; -function augmentRelationshipWhereInputType({ - whereType, - fieldName, - filters, +type FieldConfig = { + name: string; + typeName: string; + description: string; + deprecationReason?: string; +}; + +export function augmentWhereInputWithRelationshipFilters({ + whereInput, + composer, relationshipAdapter, deprecatedDirectives, + features, }: { - whereType: string; - fieldName: string; - filters: - | { - type: string; - description: string; - }[] - | undefined; + whereInput: InputTypeComposer; + composer: SchemaComposer; relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter; deprecatedDirectives: Directive[]; -}): InputTypeComposerFieldConfigMapDefinition { - const fields: InputTypeComposerFieldConfigMapDefinition = {}; + features?: Neo4jFeaturesSettings; +}) { if (!relationshipAdapter.isFilterableByValue()) { - return fields; + return {}; } - if (!relationshipAdapter.isList) { - fields[fieldName] = { - type: whereType, - }; - } + // Relationship filters + const relationshipFiltersFields = fieldConfigsToFieldConfigMap({ + deprecatedDirectives, + fields: getRelationshipFilters({ relationshipAdapter }), + }); - if (filters) { - for (const filterField of filters) { - fields[filterField.type] = { - type: whereType, - directives: deprecatedDirectives, - // e.g. "Return Movies where all of the related Actors match this filter" - description: filterField.description, - }; - } - } + composer.getOrCreateITC(relationshipAdapter.operations.relationshipFiltersTypeName, (itc) => { + itc.addFields(relationshipFiltersFields); + }); - return fields; -} + 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), }); -} -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, - deprecatedDirectives, + composer.getOrCreateITC(relationshipAdapter.operations.connectionFiltersTypeName, (itc) => { + itc.addFields(connectionFiltersFields); + }); + + whereInput.addFields({ + [relationshipAdapter.operations.connectionFieldName]: { + type: relationshipAdapter.operations.connectionFiltersTypeName, + }, }); + if (shouldAddDeprecatedFields(features, "relationshipFilters")) { + // 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); + } +} +// exported as reused by Cypher filters +export function getRelationshipFilters({ + relationshipInfo, + relationshipAdapter, +}: { + relationshipInfo?: { targetName: string; inputTypeName: string }; + relationshipAdapter?: RelationshipAdapter | RelationshipDeclarationAdapter; +}): FieldConfig[] { + if (relationshipAdapter) { + return getRelationshipFiltersUsingOptions({ + targetName: relationshipAdapter.target.name, + inputTypeName: relationshipAdapter.target.operations.whereInputTypeName, + }); + } else if (relationshipInfo) { + return getRelationshipFiltersUsingOptions(relationshipInfo); + } + throw new Error("Either relationshipInfo or relationshipAdapter must be provided to getRelationshipFilters method"); +} + +function getRelationshipFiltersUsingOptions({ + targetName, + inputTypeName, +}: { + targetName: string; + inputTypeName: string; +}): FieldConfig[] { + return [ + { + name: "all", + typeName: inputTypeName, + description: `Filter type where all of the related ${pluralize(targetName)} match this filter`, + }, + + { + name: "none", + typeName: inputTypeName, + description: `Filter type where none of the related ${pluralize(targetName)} match this filter`, + }, + + { + name: "single", + typeName: inputTypeName, + description: `Filter type where one of the related ${pluralize(targetName)} match this filter`, + }, + + { + name: "some", + typeName: inputTypeName, + description: `Filter type where some of the related ${pluralize(targetName)} 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`, + + deprecationReason: `Please use the relevant generic filter '${relationshipAdapter.name}: { all: ... }' instead.`, + }, + { + 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`, + + deprecationReason: `Please use the relevant generic filter '${relationshipAdapter.name}: { none: ... }' instead.`, + }, + { + 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`, + + deprecationReason: `Please use the relevant generic filter '${relationshipAdapter.name}: { single: ... }' instead.`, + }, + { + 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`, + + deprecationReason: `Please use the relevant generic filter '${relationshipAdapter.name}: { some: ... }' instead.`, + }, + ]; +} + +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`, + deprecationReason: `Please use the relevant generic filter '${relationshipAdapter.operations.connectionFieldName}: { all: { node: ... } } }' instead.`, + }, + { + 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`, + deprecationReason: `Please use the relevant generic filter '${relationshipAdapter.operations.connectionFieldName}: { none: { node: ... } } }' instead.`, + }, + { + 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`, + deprecationReason: `Please use the relevant generic filter '${relationshipAdapter.operations.connectionFieldName}: { single: { node: ... } } }' instead.`, + }, + { + 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`, + deprecationReason: `Please use the relevant generic filter '${relationshipAdapter.operations.connectionFieldName}: { some: { node: ... } } }' instead.`, + }, + ]; +} + +// NOTE: This used to be a specialized function used specifically to generate relationship fields, +// but now after this refactor, it could be used as schema composer utility if needed. +export function fieldConfigsToFieldConfigMap({ + deprecatedDirectives, + fields, +}: { + deprecatedDirectives: Directive[]; + fields: FieldConfig[]; +}): InputTypeComposerFieldConfigMapDefinition { + const fieldsConfigMap: InputTypeComposerFieldConfigMapDefinition = {}; + + for (const field of fields) { + let directives; + if (deprecatedDirectives.length) { + directives = deprecatedDirectives; + } else if (field.deprecationReason) { + directives = [{ name: DEPRECATED, args: { reason: field.deprecationReason } }]; + } + fieldsConfigMap[field.name] = { + type: field.typeName, + directives, + description: field.description, + }; + } + + return fieldsConfigMap; } diff --git a/packages/graphql/src/schema/generation/get-aggregation-filter-from-attribute-type.ts b/packages/graphql/src/schema/generation/get-aggregation-filter-from-attribute-type.ts new file mode 100644 index 0000000000..80cc55e778 --- /dev/null +++ b/packages/graphql/src/schema/generation/get-aggregation-filter-from-attribute-type.ts @@ -0,0 +1,67 @@ +/* + * 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 { GraphQLInputObjectType } from "graphql"; +import { BigIntScalarAggregationFilters } from "../../graphql/input-objects/generic-aggregation-filters/BigIntScalarAggregationFilters"; +import { DateTimeScalarAggregationFilters } from "../../graphql/input-objects/generic-aggregation-filters/DateTimeScalarAggregationFilters"; +import { DurationScalarAggregationFilters } from "../../graphql/input-objects/generic-aggregation-filters/DurationScalarAggregationFilters"; +import { FloatScalarAggregationFilters } from "../../graphql/input-objects/generic-aggregation-filters/FloatScalarAggregationFilters"; +import { IntScalarAggregationFilters } from "../../graphql/input-objects/generic-aggregation-filters/IntScalarAggregationFilters"; +import { LocalDateTimeScalarAggregationFilters } from "../../graphql/input-objects/generic-aggregation-filters/LocalDateTimeScalarAggregationFilters"; +import { LocalTimeScalarAggregationFilters } from "../../graphql/input-objects/generic-aggregation-filters/LocalTimeScalarAggregationFilters"; +import { StringScalarAggregationFilters } from "../../graphql/input-objects/generic-aggregation-filters/StringScalarAggregationFilters"; +import { TimeScalarAggregationFilters } from "../../graphql/input-objects/generic-aggregation-filters/TimeScalarAggregationFilters"; +import type { AttributeAdapter } from "../../schema-model/attribute/model-adapters/AttributeAdapter"; + +export function getAggregationFilterFromAttributeType(attribute: AttributeAdapter): GraphQLInputObjectType | string { + if (attribute.typeHelper.isList()) { + throw new Error("List types not available for aggregations"); + } + + if (attribute.typeHelper.isString()) { + return StringScalarAggregationFilters; + } + if (attribute.typeHelper.isInt()) { + return IntScalarAggregationFilters; + } + if (attribute.typeHelper.isFloat()) { + return FloatScalarAggregationFilters; + } + if (attribute.typeHelper.isBigInt()) { + return BigIntScalarAggregationFilters; + } + if (attribute.typeHelper.isTime()) { + return TimeScalarAggregationFilters; + } + + if (attribute.typeHelper.isDateTime()) { + return DateTimeScalarAggregationFilters; + } + if (attribute.typeHelper.isLocalTime()) { + return LocalTimeScalarAggregationFilters; + } + if (attribute.typeHelper.isLocalDateTime()) { + return LocalDateTimeScalarAggregationFilters; + } + if (attribute.typeHelper.isDuration()) { + return DurationScalarAggregationFilters; + } + + throw new Error(`No scalar filter found for attribute ${attribute.type.name}`); +} diff --git a/packages/graphql/src/schema/generation/get-input-filter-from-attribute-type.ts b/packages/graphql/src/schema/generation/get-input-filter-from-attribute-type.ts new file mode 100644 index 0000000000..e0dd4e29cf --- /dev/null +++ b/packages/graphql/src/schema/generation/get-input-filter-from-attribute-type.ts @@ -0,0 +1,163 @@ +/* + * 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 { GraphQLInputType } from "graphql"; +import { + BigIntListFilters, + BigIntScalarFilters, +} from "../../graphql/input-objects/generic-operators/BigIntScalarFilters"; +import { + BooleanListFilters, + BooleanScalarFilters, +} from "../../graphql/input-objects/generic-operators/BooleanScalarFilters"; +import { + CartesianPointFilters, + CartesianPointListFilters, +} from "../../graphql/input-objects/generic-operators/CartesianPointFilters"; +import { DateListFilters, DateScalarFilters } from "../../graphql/input-objects/generic-operators/DateScalarFilters"; +import { + DateTimeListFilters, + DateTimeScalarFilters, +} from "../../graphql/input-objects/generic-operators/DateTimeScalarFilters"; +import { + DurationListFilters, + DurationScalarFilters, +} from "../../graphql/input-objects/generic-operators/DurationScalarFilters"; +import { FloatListFilters, FloatScalarFilters } from "../../graphql/input-objects/generic-operators/FloatScalarFilters"; +import { getIDScalarFilters, IDListFilters } from "../../graphql/input-objects/generic-operators/IDScalarFilters"; +import { IntListFilters, IntScalarFilters } from "../../graphql/input-objects/generic-operators/IntScalarFilters"; +import { + LocalDateTimeListFilters, + LocalDateTimeScalarFilters, +} from "../../graphql/input-objects/generic-operators/LocalDateTimeScalarFilters"; +import { + LocalTimeListFilters, + LocalTimeScalarFilters, +} from "../../graphql/input-objects/generic-operators/LocalTimeScalarFilters"; +import { PointFilters, PointListFilters } from "../../graphql/input-objects/generic-operators/PointFilters"; +import { + getStringScalarFilters, + StringListFilters, +} from "../../graphql/input-objects/generic-operators/StringScalarFilters"; +import { TimeListFilters, TimeScalarFilters } from "../../graphql/input-objects/generic-operators/TimeScalarFilters"; +import type { AttributeAdapter } from "../../schema-model/attribute/model-adapters/AttributeAdapter"; +import type { Neo4jFeaturesSettings } from "../../types"; + +export function getInputFilterFromAttributeType( + attribute: AttributeAdapter, + features?: Neo4jFeaturesSettings +): GraphQLInputType | string { + // NOTE: static types returned here must be added to schema-validation > validateUserDefinition + if (attribute.typeHelper.isBoolean()) { + if (attribute.typeHelper.isList()) { + return BooleanListFilters; + } + return BooleanScalarFilters; + } + if (attribute.typeHelper.isID()) { + if (attribute.typeHelper.isList()) { + return IDListFilters; + } + return getIDScalarFilters(features); + } + if (attribute.typeHelper.isString()) { + if (attribute.typeHelper.isList()) { + return StringListFilters; + } + return getStringScalarFilters(features); + } + if (attribute.typeHelper.isInt()) { + if (attribute.typeHelper.isList()) { + return IntListFilters; + } + return IntScalarFilters; + } + if (attribute.typeHelper.isFloat()) { + if (attribute.typeHelper.isList()) { + return FloatListFilters; + } + return FloatScalarFilters; + } + if (attribute.typeHelper.isBigInt()) { + if (attribute.typeHelper.isList()) { + return BigIntListFilters; + } + return BigIntScalarFilters; + } + if (attribute.typeHelper.isTime()) { + if (attribute.typeHelper.isList()) { + return TimeListFilters; + } + return TimeScalarFilters; + } + if (attribute.typeHelper.isPoint()) { + if (attribute.typeHelper.isList()) { + return PointListFilters; + } + return PointFilters; + } + if (attribute.typeHelper.isCartesianPoint()) { + if (attribute.typeHelper.isList()) { + return CartesianPointListFilters; + } + return CartesianPointFilters; + } + if (attribute.typeHelper.isDateTime()) { + if (attribute.typeHelper.isList()) { + return DateTimeListFilters; + } + return DateTimeScalarFilters; + } + if (attribute.typeHelper.isLocalTime()) { + if (attribute.typeHelper.isList()) { + return LocalTimeListFilters; + } + return LocalTimeScalarFilters; + } + if (attribute.typeHelper.isLocalDateTime()) { + if (attribute.typeHelper.isList()) { + return LocalDateTimeListFilters; + } + return LocalDateTimeScalarFilters; + } + if (attribute.typeHelper.isDuration()) { + if (attribute.typeHelper.isList()) { + return DurationListFilters; + } + return DurationScalarFilters; + } + if (attribute.typeHelper.isDate()) { + if (attribute.typeHelper.isList()) { + return DateListFilters; + } + return DateScalarFilters; + } + + if (attribute.typeHelper.isEnum()) { + const filtersName = attribute.typeHelper.isList() ? "ListEnumScalarFilters" : "EnumScalarFilters"; + return `${attribute.getTypeName()}${filtersName}`; + } + + if (attribute.typeHelper.isUserScalar()) { + const filtersName = attribute.typeHelper.isList() ? "ListScalarFilters" : "ScalarFilters"; + return `${attribute.getTypeName()}${filtersName}`; + } + + throw new Error(`No scalar filter found for attribute ${attribute.type.name}`); +} diff --git a/packages/graphql/src/schema/generation/get-mutation-input-from-attribute-type.ts b/packages/graphql/src/schema/generation/get-mutation-input-from-attribute-type.ts new file mode 100644 index 0000000000..dcdd9ee876 --- /dev/null +++ b/packages/graphql/src/schema/generation/get-mutation-input-from-attribute-type.ts @@ -0,0 +1,181 @@ +/* + * 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 { GraphQLInputType } from "graphql"; +import { + BigIntListMutations, + BigIntScalarMutations, +} from "../../graphql/input-objects/generic-mutation-operations/BigIntScalarMutations"; +import { + BooleanListMutations, + BooleanScalarMutations, +} from "../../graphql/input-objects/generic-mutation-operations/BooleanScalarMutations"; +import { + CartesianPointListMutations, + CartesianPointMutations, +} from "../../graphql/input-objects/generic-mutation-operations/CartesianPointMutations"; +import { + DateListMutations, + DateScalarMutations, +} from "../../graphql/input-objects/generic-mutation-operations/DateScalarMutations"; +import { + DateTimeListMutations, + DateTimeScalarMutations, +} from "../../graphql/input-objects/generic-mutation-operations/DateTimeScalarMutations"; +import { + DurationListMutations, + DurationScalarMutations, +} from "../../graphql/input-objects/generic-mutation-operations/DurationScalarMutations"; +import { + FloatListMutations, + FloatScalarMutations, +} from "../../graphql/input-objects/generic-mutation-operations/FloatScalarMutations"; +import { + IDListMutations, + IDScalarMutations, +} from "../../graphql/input-objects/generic-mutation-operations/IDScalarMutations"; +import { + IntListMutations, + IntScalarMutations, +} from "../../graphql/input-objects/generic-mutation-operations/IntScalarMutations"; +import { + LocalDateTimeListMutations, + LocalDateTimeScalarMutations, +} from "../../graphql/input-objects/generic-mutation-operations/LocalDateTimeScalarMutations"; +import { + LocalTimeListMutations, + LocalTimeScalarMutations, +} from "../../graphql/input-objects/generic-mutation-operations/LocalTimeScalarMutations"; +import { + PointListMutations, + PointMutations, +} from "../../graphql/input-objects/generic-mutation-operations/PointMutations"; +import { + StringListMutations, + StringScalarMutations, +} from "../../graphql/input-objects/generic-mutation-operations/StringScalarMutations"; +import { + TimeListMutations, + TimeScalarMutations, +} from "../../graphql/input-objects/generic-mutation-operations/TimeScalarMutations"; +import type { AttributeAdapter } from "../../schema-model/attribute/model-adapters/AttributeAdapter"; + +export function getMutationInputFromAttributeType(attribute: AttributeAdapter): GraphQLInputType | string { + // // NOTE: static types returned here must be added to schema-validation > validateUserDefinition + if (attribute.typeHelper.isBoolean()) { + if (attribute.typeHelper.isList()) { + return BooleanListMutations; + } + return BooleanScalarMutations; + } + if (attribute.typeHelper.isID()) { + if (attribute.typeHelper.isList()) { + return IDListMutations; + } + return IDScalarMutations; + } + if (attribute.typeHelper.isString()) { + if (attribute.typeHelper.isList()) { + return StringListMutations; + } + return StringScalarMutations; + } + if (attribute.typeHelper.isInt()) { + if (attribute.typeHelper.isList()) { + return IntListMutations; + } + return IntScalarMutations; + } + if (attribute.typeHelper.isFloat()) { + if (attribute.typeHelper.isList()) { + return FloatListMutations; + } + return FloatScalarMutations; + } + if (attribute.typeHelper.isBigInt()) { + if (attribute.typeHelper.isList()) { + return BigIntListMutations; + } + return BigIntScalarMutations; + } + if (attribute.typeHelper.isTime()) { + if (attribute.typeHelper.isList()) { + return TimeListMutations; + } + return TimeScalarMutations; + } + if (attribute.typeHelper.isPoint()) { + if (attribute.typeHelper.isList()) { + return PointListMutations; + } + return PointMutations; + } + if (attribute.typeHelper.isCartesianPoint()) { + if (attribute.typeHelper.isList()) { + return CartesianPointListMutations; + } + return CartesianPointMutations; + } + if (attribute.typeHelper.isDateTime()) { + if (attribute.typeHelper.isList()) { + return DateTimeListMutations; + } + return DateTimeScalarMutations; + } + if (attribute.typeHelper.isLocalTime()) { + if (attribute.typeHelper.isList()) { + return LocalTimeListMutations; + } + return LocalTimeScalarMutations; + } + if (attribute.typeHelper.isLocalDateTime()) { + if (attribute.typeHelper.isList()) { + return LocalDateTimeListMutations; + } + return LocalDateTimeScalarMutations; + } + if (attribute.typeHelper.isDuration()) { + if (attribute.typeHelper.isList()) { + return DurationListMutations; + } + return DurationScalarMutations; + } + if (attribute.typeHelper.isDate()) { + if (attribute.typeHelper.isList()) { + return DateListMutations; + } + return DateScalarMutations; + } + + if (attribute.typeHelper.isEnum()) { + if (attribute.typeHelper.isList()) { + return `${attribute.getTypeName()}ListEnumScalarMutations`; + } + return `${attribute.getTypeName()}EnumScalarMutations`; + } + + if (attribute.typeHelper.isUserScalar()) { + if (attribute.typeHelper.isList()) { + return `${attribute.getTypeName()}ListScalarMutations`; + } + return `${attribute.getTypeName()}ScalarMutations`; + } + + throw new Error(`No scalar mutation found for attribute ${attribute.type.name}`); +} diff --git a/packages/graphql/src/schema/generation/update-input.ts b/packages/graphql/src/schema/generation/update-input.ts index 32835f8432..a5459c8d79 100644 --- a/packages/graphql/src/schema/generation/update-input.ts +++ b/packages/graphql/src/schema/generation/update-input.ts @@ -33,21 +33,25 @@ import { RelationshipAdapter } from "../../schema-model/relationship/model-adapt import type { RelationshipDeclarationAdapter } from "../../schema-model/relationship/model-adapters/RelationshipDeclarationAdapter"; import type { Neo4jFeaturesSettings } from "../../types"; import { ensureNonEmptyInput } from "../ensure-non-empty-input"; +import type { AdditionalFieldsCallback } from "../to-compose"; import { concreteEntityToUpdateInputFields, withArrayOperators, withMathOperators } from "../to-compose"; import { withConnectFieldInputType } from "./connect-input"; import { withConnectionWhereInputType } from "./connection-where-input"; import { withDeleteFieldInputType } from "./delete-input"; import { withDisconnectFieldInputType } from "./disconnect-input"; import { withCreateFieldInputType } from "./relation-input"; +import { shouldAddDeprecatedFields } from "./utils"; export function withUpdateInputType({ entityAdapter, userDefinedFieldDirectives, composer, + features, }: { entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter | RelationshipAdapter; userDefinedFieldDirectives: Map; composer: SchemaComposer; + features: Neo4jFeaturesSettings | undefined; }): InputTypeComposer { const inputTypeName = entityAdapter instanceof RelationshipAdapter @@ -63,11 +67,17 @@ export function withUpdateInputType({ }); if (entityAdapter instanceof ConcreteEntityAdapter || entityAdapter instanceof RelationshipAdapter) { + const additionalFields: AdditionalFieldsCallback[] = []; + if (shouldAddDeprecatedFields(features, "mutationOperations")) { + additionalFields.push(withMathOperators(), withArrayOperators()); + } + updateInputType.addFields( concreteEntityToUpdateInputFields({ objectFields: entityAdapter.updateInputFields, userDefinedFieldDirectives, - additionalFieldsCallbacks: [withMathOperators(), withArrayOperators()], + additionalFieldsCallbacks: additionalFields, + features, }) ); } else { @@ -77,11 +87,17 @@ export function withUpdateInputType({ ensureNonEmptyInput(composer, updateInputType); } + const additionalFields: AdditionalFieldsCallback[] = []; + if (shouldAddDeprecatedFields(features, "mutationOperations")) { + additionalFields.push(withMathOperators()); + } + updateInputType.addFields( concreteEntityToUpdateInputFields({ objectFields: entityAdapter.updateInputFields, userDefinedFieldDirectives, - additionalFieldsCallbacks: [withMathOperators()], + additionalFieldsCallbacks: additionalFields, + features, }) ); } @@ -118,6 +134,7 @@ export function augmentUpdateInputTypeWithUpdateFieldInput({ entityAdapter: relationshipAdapter.source, userDefinedFieldDirectives, composer, + features, }); const relationshipField = makeUpdateInputTypeRelationshipField({ relationshipAdapter, @@ -286,6 +303,7 @@ function makeUpdateFieldInputTypeFields({ ifUnionMemberEntity, composer, userDefinedFieldDirectives, + features, }); if (updateFieldInputType) { fields["update"] = { @@ -380,11 +398,13 @@ function withUpdateConnectionFieldInputType({ composer, userDefinedFieldDirectives, ifUnionMemberEntity, + features, }: { relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter; composer: SchemaComposer; userDefinedFieldDirectives: Map; ifUnionMemberEntity?: ConcreteEntityAdapter; + features: Neo4jFeaturesSettings | undefined; }): InputTypeComposer | undefined { const typeName = relationshipAdapter.operations.getUpdateConnectionInputTypename(ifUnionMemberEntity); if (!relationshipAdapter.nestedOperations.has(RelationshipNestedOperationsOption.UPDATE)) { @@ -398,6 +418,7 @@ function withUpdateConnectionFieldInputType({ composer, userDefinedFieldDirectives, ifUnionMemberEntity, + features, }); const updateFieldInput = composer.createInputTC({ name: typeName, fields }); @@ -408,11 +429,13 @@ function makeUpdateConnectionFieldInputTypeFields({ composer, userDefinedFieldDirectives, ifUnionMemberEntity, + features, }: { relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter; composer: SchemaComposer; userDefinedFieldDirectives: Map; ifUnionMemberEntity?: ConcreteEntityAdapter; + features: Neo4jFeaturesSettings | undefined; }): InputTypeComposerFieldConfigMapDefinition { const fields: InputTypeComposerFieldConfigMapDefinition = {}; if (relationshipAdapter.target instanceof UnionEntityAdapter) { @@ -423,6 +446,7 @@ function makeUpdateConnectionFieldInputTypeFields({ entityAdapter: ifUnionMemberEntity, userDefinedFieldDirectives, composer, + features, }); fields["node"] = updateInputType; } else { diff --git a/packages/graphql/src/schema/generation/where-input.ts b/packages/graphql/src/schema/generation/where-input.ts index 193f5cf39d..413109382a 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; @@ -90,32 +88,34 @@ export function withWhereInputType({ if (composer.has(typeName)) { return composer.getITC(typeName); } + const whereFields = makeWhereFields({ entityAdapter, userDefinedFieldDirectives, features, ignoreCypherFieldFilters, + composer, }); + if (returnUndefinedIfEmpty && isEmptyObject(whereFields)) { return undefined; } + const whereInputType = composer.createInputTC({ name: typeName, 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) => [ @@ -128,7 +128,7 @@ export function withWhereInputType({ name: entityAdapter.operations.implementationEnumTypename, values: enumValues, }); - whereInputType.addFields({ typename_IN: { type: interfaceImplementation.NonNull.List } }); + whereInputType.addFields({ typename: { type: interfaceImplementation.NonNull.List } }); } } return whereInputType; @@ -139,11 +139,13 @@ function makeWhereFields({ userDefinedFieldDirectives, features, ignoreCypherFieldFilters, + composer, }: { entityAdapter: EntityAdapter | RelationshipAdapter; userDefinedFieldDirectives?: Map; features: Neo4jFeaturesSettings | undefined; ignoreCypherFieldFilters: boolean; + composer: SchemaComposer }): InputTypeComposerFieldConfigMapDefinition { if (entityAdapter instanceof UnionEntityAdapter) { const fields: InputTypeComposerFieldConfigMapDefinition = {}; @@ -158,6 +160,8 @@ function makeWhereFields({ userDefinedFieldDirectives, features, ignoreCypherFieldFilters, + composer, + }); } @@ -177,11 +181,13 @@ 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, + features, + }); // TODO: Current unions are not supported as relationship targets beyond the above fields if (relationshipTarget instanceof UnionEntityAdapter) { diff --git a/packages/graphql/src/schema/get-where-fields.ts b/packages/graphql/src/schema/get-where-fields.ts index 902bf3d1c3..8aca78cf0a 100644 --- a/packages/graphql/src/schema/get-where-fields.ts +++ b/packages/graphql/src/schema/get-where-fields.ts @@ -18,77 +18,34 @@ */ import type { DirectiveNode } from "graphql"; -import type { Directive } from "graphql-compose"; +import type { Directive, InputTypeComposerFieldConfigMapDefinition, SchemaComposer } from "graphql-compose"; import { DEPRECATED } from "../constants"; import type { AttributeAdapter } from "../schema-model/attribute/model-adapters/AttributeAdapter"; import { ConcreteEntityAdapter } from "../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { Neo4jFeaturesSettings } from "../types"; +import { fieldConfigsToFieldConfigMap, getRelationshipFilters } from "./generation/augment-where-input"; +import { getInputFilterFromAttributeType } from "./generation/get-input-filter-from-attribute-type"; +import { shouldAddDeprecatedFields } from "./generation/utils"; import { graphqlDirectivesToCompose } from "./to-compose"; -function addCypherListFieldFilters({ - field, - type, - result, - deprecatedDirectives, -}: { - field: AttributeAdapter; - type: string; - result: Record< - string, - { - type: string; - directives: Directive[]; - } - >; - deprecatedDirectives: Directive[]; -}) { - result[`${field.name}_ALL`] = { - type, - directives: deprecatedDirectives, - }; - - result[`${field.name}_NONE`] = { - type, - directives: deprecatedDirectives, - }; - - result[`${field.name}_SINGLE`] = { - type, - directives: deprecatedDirectives, - }; - - result[`${field.name}_SOME`] = { - type, - directives: deprecatedDirectives, - }; -} - // TODO: refactoring needed! // isWhereField, isFilterable, ... extracted out into attributes category +// even more now as Cypher filters and generic input object are added in the mix export function getWhereFieldsForAttributes({ attributes, userDefinedFieldDirectives, features, ignoreCypherFieldFilters, + composer, }: { attributes: AttributeAdapter[]; userDefinedFieldDirectives?: Map; features: Neo4jFeaturesSettings | undefined; ignoreCypherFieldFilters: boolean; -}): Record< - string, - { - type: string; - directives: Directive[]; - } -> { - const result: Record< - string, - { - type: string; - directives: Directive[]; - } - > = {}; + composer: SchemaComposer; +}): InputTypeComposerFieldConfigMapDefinition { + const result: InputTypeComposerFieldConfigMapDefinition = {}; + // Add the where fields for each attribute for (const field of attributes) { const userDefinedDirectivesOnField = userDefinedFieldDirectives?.get(field.name); @@ -113,12 +70,14 @@ export function getWhereFieldsForAttributes({ // Add list where field filters (e.g. name_ALL, name_NONE, name_SINGLE, name_SOME) if (field.typeHelper.isList()) { - addCypherListFieldFilters({ + addCypherRelationshipLegacyFilters({ field, type, result, deprecatedDirectives, }); + + addCypherRelationshipFilter({ field, type, result, deprecatedDirectives, composer }); } else { // Add base where field filter (e.g. name) result[field.name] = { @@ -131,9 +90,16 @@ export function getWhereFieldsForAttributes({ } } + result[field.name] = { + type: getInputFilterFromAttributeType(field, features), + directives: deprecatedDirectives, + }; + if (!shouldAddDeprecatedFields(features, "attributeFilters")) { + continue; + } result[`${field.name}_EQ`] = { type: field.getInputTypeNames().where.pretty, - directives: deprecatedDirectives, + directives: getAttributeDeprecationDirective(deprecatedDirectives, field, "EQ"), }; // If the field is a boolean, skip it @@ -147,7 +113,7 @@ export function getWhereFieldsForAttributes({ if (field.typeHelper.isList()) { result[`${field.name}_INCLUDES`] = { type: field.getInputTypeNames().where.type, - directives: deprecatedDirectives, + directives: getAttributeDeprecationDirective(deprecatedDirectives, field, "INCLUDES"), }; continue; @@ -156,15 +122,15 @@ export function getWhereFieldsForAttributes({ // If the field is not an array, add the in and not in fields result[`${field.name}_IN`] = { type: field.getFilterableInputTypeName(), - directives: deprecatedDirectives, + directives: getAttributeDeprecationDirective(deprecatedDirectives, field, "IN"), }; // If the field is a number or temporal, add the comparison operators if (field.isNumericalOrTemporal()) { - ["_LT", "_LTE", "_GT", "_GTE"].forEach((comparator) => { - result[`${field.name}${comparator}`] = { + ["LT", "LTE", "GT", "GTE"].forEach((comparator) => { + result[`${field.name}_${comparator}`] = { type: field.getInputTypeNames().where.type, - directives: deprecatedDirectives, + directives: getAttributeDeprecationDirective(deprecatedDirectives, field, comparator), }; }); continue; @@ -172,10 +138,10 @@ export function getWhereFieldsForAttributes({ // If the field is spatial, add the point comparison operators if (field.typeHelper.isSpatial()) { - ["_DISTANCE", "_LT", "_LTE", "_GT", "_GTE"].forEach((comparator) => { - result[`${field.name}${comparator}`] = { + ["DISTANCE", "LT", "LTE", "GT", "GTE"].forEach((comparator) => { + result[`${field.name}_${comparator}`] = { type: `${field.getTypeName()}Distance`, - directives: deprecatedDirectives, + directives: getAttributeDeprecationDirective(deprecatedDirectives, field, comparator), }; }); continue; @@ -184,19 +150,19 @@ export function getWhereFieldsForAttributes({ // If the field is a string, add the string comparison operators if (field.typeHelper.isString() || field.typeHelper.isID()) { const stringWhereOperators: Array<{ comparator: string; typeName: string }> = [ - { comparator: "_CONTAINS", typeName: field.getInputTypeNames().where.type }, - { comparator: "_STARTS_WITH", typeName: field.getInputTypeNames().where.type }, - { comparator: "_ENDS_WITH", typeName: field.getInputTypeNames().where.type }, + { comparator: "CONTAINS", typeName: field.getInputTypeNames().where.type }, + { comparator: "STARTS_WITH", typeName: field.getInputTypeNames().where.type }, + { comparator: "ENDS_WITH", typeName: field.getInputTypeNames().where.type }, ]; Object.entries(features?.filters?.[field.getInputTypeNames().where.type] || {}).forEach( ([filter, enabled]) => { if (enabled) { if (filter === "MATCHES") { - stringWhereOperators.push({ comparator: `_${filter}`, typeName: "String" }); + stringWhereOperators.push({ comparator: filter, typeName: "String" }); } else { stringWhereOperators.push({ - comparator: `_${filter}`, + comparator: filter, typeName: field.getInputTypeNames().where.type, }); } @@ -204,10 +170,125 @@ export function getWhereFieldsForAttributes({ } ); stringWhereOperators.forEach(({ comparator, typeName }) => { - result[`${field.name}${comparator}`] = { type: typeName, directives: deprecatedDirectives }; + result[`${field.name}_${comparator}`] = { + type: typeName, + directives: getAttributeDeprecationDirective(deprecatedDirectives, field, comparator), + }; }); } } return result; } + +function getAttributeDeprecationDirective( + deprecatedDirectives: Directive[], + field: AttributeAdapter, + comparator: string +): Directive[] { + if (deprecatedDirectives.length) { + return deprecatedDirectives; + } + switch (comparator) { + case "DISTANCE": + case "LT": + case "LTE": + case "GT": + case "GTE": + case "CONTAINS": + case "MATCHES": + case "IN": + case "INCLUDES": + case "EQ": { + return [ + { + name: DEPRECATED, + args: { + reason: `Please use the relevant generic filter ${field.name}: { ${comparator.toLowerCase()}: ... }`, + }, + }, + ]; + } + case "STARTS_WITH": { + return [ + { + name: DEPRECATED, + args: { + reason: `Please use the relevant generic filter ${field.name}: { startsWith: ... }`, + }, + }, + ]; + } + case "ENDS_WITH": { + return [ + { + name: DEPRECATED, + args: { + reason: `Please use the relevant generic filter ${field.name}: { endsWith: ... }`, + }, + }, + ]; + } + default: { + throw new Error(`Unknown comparator: ${comparator}`); + } + } +} + +function addCypherRelationshipFilter({ + field, + type, + result, + deprecatedDirectives, + composer, +}: { + field: AttributeAdapter; + type: string; + result: InputTypeComposerFieldConfigMapDefinition; + deprecatedDirectives: Directive[]; + composer: SchemaComposer; +}) { + const targetName = field.annotations.cypher?.targetEntity?.name; + if (!targetName) { + throw new Error("Target entity is not defined for the cypher field"); + } + + // Relationship filters + const relationshipFiltersFields = fieldConfigsToFieldConfigMap({ + deprecatedDirectives: [], + fields: getRelationshipFilters({ + relationshipInfo: { targetName, inputTypeName: type }, + }), + }); + // this mimic the adapter RelationshipOperation field "relationshipFiltersTypeName" + const relationshipType = `${targetName}RelationshipFilters`; + + composer.getOrCreateITC(relationshipType, (itc) => { + itc.addFields(relationshipFiltersFields); + }); + + result[field.name] = { + type: relationshipType, + directives: deprecatedDirectives, + }; +} + +function addCypherRelationshipLegacyFilters({ + field, + type, + result, + deprecatedDirectives, +}: { + field: AttributeAdapter; + type: string; + result: InputTypeComposerFieldConfigMapDefinition; + deprecatedDirectives: Directive[]; +}) { + const quantifiers = ["ALL", "NONE", "SINGLE", "SOME"] as const; + for (const quantifier of quantifiers) { + result[`${field.name}_${quantifier}`] = { + type, + directives: deprecatedDirectives, + }; + } +} diff --git a/packages/graphql/src/schema/make-augmented-schema.ts b/packages/graphql/src/schema/make-augmented-schema.ts index 2664765961..d7d84948e0 100644 --- a/packages/graphql/src/schema/make-augmented-schema.ts +++ b/packages/graphql/src/schema/make-augmented-schema.ts @@ -145,6 +145,100 @@ function makeAugmentedSchema({ const generatorComposer = schemaGenerator.generate(); composer.merge(generatorComposer); + // Generates the filters for enums, which are reused + Array.from(enumTypes.values()).forEach((enumType) => { + composer.createInputTC({ + name: `${enumType.name.value}EnumScalarFilters`, + description: `${enumType.name.value} filters`, + fields: { + eq: { + type: enumType.name.value, + }, + in: { type: `[${enumType.name.value}!]` }, + }, + }); + composer.createInputTC({ + name: `${enumType.name.value}ListEnumScalarFilters`, + description: `${enumType.name.value} filters`, + fields: { + eq: { + type: `[${enumType.name.value}!]`, + }, + includes: { + type: enumType.name.value, + }, + }, + }); + }); + + // Generates the mutations for enums, which are reused + Array.from(enumTypes.values()).forEach((enumType) => { + composer.createInputTC({ + name: `${enumType.name.value}EnumScalarMutations`, + description: `${enumType.name.value} mutations`, + fields: { + set: { type: enumType.name.value }, + }, + }); + composer.createInputTC({ + name: `${enumType.name.value}ListEnumScalarMutations`, + description: `Mutations for a list for ${enumType.name.value}`, + fields: { + set: { type: `[${enumType.name.value}!]!` }, + push: { type: `[${enumType.name.value}!]!` }, + pop: { type: enumType.name.value }, + }, + }); + }); + + // Generates the filters for custom scalars + Array.from(scalarTypes.values()).forEach((enumType) => { + composer.createInputTC({ + name: `${enumType.name.value}ScalarFilters`, + description: `${enumType.name.value} filters`, + fields: { + eq: { + type: enumType.name.value, + }, + in: { type: `[${enumType.name.value}!]` }, + }, + }); + + composer.createInputTC({ + name: `${enumType.name.value}ListScalarFilters`, + description: `${enumType.name.value} filters`, + fields: { + eq: { + type: `[${enumType.name.value}!]`, + }, + includes: { + type: enumType.name.value, + }, + }, + }); + }); + + // Generates the mutations for custom scalars + Array.from(scalarTypes.values()).forEach((enumType) => { + composer.createInputTC({ + name: `${enumType.name.value}ScalarMutations`, + description: `${enumType.name.value} filters`, + fields: { + set: { type: enumType.name.value }, + }, + }); + + composer.createInputTC({ + name: `${enumType.name.value}ListScalarMutations`, + description: `Mutations for a list for ${enumType.name.value}`, + fields: { + set: { type: `[${enumType.name.value}!]!` }, + push: { type: `[${enumType.name.value}!]!` }, + pop: { type: enumType.name.value }, + }, + }); + }); + // TODO: move these to SchemaGenerator once the other types are moved (in the meantime references to object types are causing errors because they are not present in the generated schema) const pipedDefs = [ ...userDefinedObjectTypes.values(), @@ -371,6 +465,7 @@ function makeAugmentedSchema({ let parsedDoc = parse(generatedTypeDefs); const documentNames = new Set(parsedDoc.definitions.filter(definitionNodeHasName).map((x) => x.name.value)); + const resolveMethods = getResolveAndSubscriptionMethods(composer); const generatedResolveMethods: GraphQLToolsResolveMethods = {}; @@ -547,7 +642,7 @@ function generateObjectType({ augmentVectorSchema({ composer, concreteEntityAdapter, features, complexityEstimatorHelper }); withUniqueWhereInputType({ concreteEntityAdapter, composer }); withCreateInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, composer }); - withUpdateInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, composer }); + withUpdateInputType({ entityAdapter: concreteEntityAdapter, userDefinedFieldDirectives, composer, features }); withMutationResponseTypes({ concreteEntityAdapter, propagatedDirectives, composer }); const composeNode = withObjectType({ entityAdapter: concreteEntityAdapter, @@ -693,7 +788,7 @@ function generateInterfaceObjectType({ composer, }); withCreateInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer }); - withUpdateInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer }); + withUpdateInputType({ entityAdapter: interfaceEntityAdapter, userDefinedFieldDirectives, composer, features }); const composeInterface = withInterfaceType({ interfaceEntityAdapter, diff --git a/packages/graphql/src/schema/resolvers/subscriptions/where/utils/get-filtering-fn.ts b/packages/graphql/src/schema/resolvers/subscriptions/where/utils/get-filtering-fn.ts index 8ac5a6ab76..54561aa6b6 100644 --- a/packages/graphql/src/schema/resolvers/subscriptions/where/utils/get-filtering-fn.ts +++ b/packages/graphql/src/schema/resolvers/subscriptions/where/utils/get-filtering-fn.ts @@ -21,9 +21,8 @@ import type { AttributeAdapter } from "../../../../../schema-model/attribute/mod type ComparatorFn = (received: T, filtered: T, fieldMeta?: AttributeAdapter | undefined) => boolean; -const operatorCheckMap = { +const legacyOperatorCheckMap = { EQ: (received: string, filtered: string) => received == filtered, - NOT: (received: string, filtered: string) => received !== filtered, LT: (received: number | string, filtered: number) => { const parsed = typeof received === "string" ? BigInt(received) : received; @@ -45,23 +44,28 @@ const operatorCheckMap = { return parsed >= filtered; }, STARTS_WITH: (received: string, filtered: string) => received.startsWith(filtered), - NOT_STARTS_WITH: (received: string, filtered: string) => !received.startsWith(filtered), ENDS_WITH: (received: string, filtered: string) => received.endsWith(filtered), - NOT_ENDS_WITH: (received: string, filtered: string) => !received.endsWith(filtered), CONTAINS: (received: string, filtered: string) => received.includes(filtered), - NOT_CONTAINS: (received: string, filtered: string) => !received.includes(filtered), INCLUDES: (received: [string | number], filtered: string | number) => { return received.some((v) => v === filtered); }, - NOT_INCLUDES: (received: [string | number], filtered: string | number) => { - return !received.some((v) => v === filtered); - }, IN: (received: string | number, filtered: [string | number]) => { return filtered.some((v) => v === received); }, - NOT_IN: (received: string | number, filtered: [string | number]) => { - return !filtered.some((v) => v === received); - }, +}; + +const operatorCheckMap = { + ...legacyOperatorCheckMap, + eq: legacyOperatorCheckMap.EQ, + lt: legacyOperatorCheckMap.LT, + lte: legacyOperatorCheckMap.LTE, + gt: legacyOperatorCheckMap.GT, + gte: legacyOperatorCheckMap.GTE, + in: legacyOperatorCheckMap.IN, + startsWith: legacyOperatorCheckMap.STARTS_WITH, + endsWith: legacyOperatorCheckMap.ENDS_WITH, + contains: legacyOperatorCheckMap.CONTAINS, + includes: legacyOperatorCheckMap.INCLUDES, }; export function getFilteringFn( @@ -74,5 +78,9 @@ export function getFilteringFn( const operators = { ...operatorCheckMap, ...overrides }; - return operators[operator]; + const comparatorFunction = operators[operator]; + if (!comparatorFunction) { + throw new Error(`Operator ${operator} not supported`); + } + return comparatorFunction; } 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..6db512b20a 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,14 @@ 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"; - } - } + 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/schema/to-compose.ts b/packages/graphql/src/schema/to-compose.ts index 318e0784c6..4e98753b22 100644 --- a/packages/graphql/src/schema/to-compose.ts +++ b/packages/graphql/src/schema/to-compose.ts @@ -30,7 +30,10 @@ import type { Argument } from "../schema-model/argument/Argument"; import { ArgumentAdapter } from "../schema-model/argument/model-adapters/ArgumentAdapter"; import type { AttributeAdapter } from "../schema-model/attribute/model-adapters/AttributeAdapter"; import { parseValueNode } from "../schema-model/parser/parse-value-node"; -import type { InputField } from "../types"; +import type { InputField, Neo4jFeaturesSettings } from "../types"; +import { DEPRECATE_ARRAY_MUTATIONS, DEPRECATE_MATH_MUTATIONS, DEPRECATE_SET_MUTATION } from "./constants"; +import { getMutationInputFromAttributeType } from "./generation/get-mutation-input-from-attribute-type"; +import { shouldAddDeprecatedFields } from "./generation/utils"; import { idResolver } from "./resolvers/field/id"; import { numericalResolver } from "./resolvers/field/numerical"; @@ -129,26 +132,39 @@ export function concreteEntityToUpdateInputFields({ objectFields, userDefinedFieldDirectives, additionalFieldsCallbacks = [], + features, }: { objectFields: AttributeAdapter[]; userDefinedFieldDirectives: Map; additionalFieldsCallbacks: AdditionalFieldsCallback[]; + features: Neo4jFeaturesSettings | undefined; }) { let updateInputFields: InputTypeComposerFieldConfigMapDefinition = {}; for (const field of objectFields) { const newInputField: InputField = { type: field.getInputTypeNames().update.pretty, - directives: [], + directives: [DEPRECATE_SET_MUTATION(field.name)], }; const userDefinedDirectivesOnField = userDefinedFieldDirectives.get(field.name); + let userDefinedDirectives: Directive[] = []; + if (userDefinedDirectivesOnField) { - newInputField.directives = graphqlDirectivesToCompose( + userDefinedDirectives = graphqlDirectivesToCompose( userDefinedDirectivesOnField.filter((directive) => directive.name.value === DEPRECATED) ); + + newInputField.directives = userDefinedDirectives; } - updateInputFields[`${field.name}_SET`] = newInputField; + updateInputFields[field.name] = { + type: getMutationInputFromAttributeType(field), + directives: userDefinedDirectives, + }; + + if (shouldAddDeprecatedFields(features, "mutationOperations")) { + updateInputFields[`${field.name}_SET`] = newInputField; + } for (const cb of additionalFieldsCallbacks) { const additionalFields = cb(field, newInputField); @@ -162,9 +178,18 @@ export function concreteEntityToUpdateInputFields({ export function withMathOperators(): AdditionalFieldsCallback { return (attribute: AttributeAdapter, fieldDefinition: InputField): Record => { const fields: Record = {}; + if (attribute.mathModel) { for (const operation of attribute.mathModel.getMathOperations()) { - fields[operation] = fieldDefinition; + const newFieldDefinition = + typeof fieldDefinition === "string" ? { type: fieldDefinition } : { ...fieldDefinition }; + const operationNameUpperCase = operation.split("_")[1]; + if (!operationNameUpperCase) { + throw new Error(`Invalid operation: ${operation}`); + } + const newOperationName = operationNameUpperCase.toLowerCase(); + newFieldDefinition.directives = [DEPRECATE_MATH_MUTATIONS(attribute.name, newOperationName)]; + fields[operation] = newFieldDefinition; } } return fields; @@ -175,14 +200,20 @@ export function withArrayOperators(): AdditionalFieldsCallback { return (attribute: AttributeAdapter): InputTypeComposerFieldConfigMapDefinition => { const fields: InputTypeComposerFieldConfigMapDefinition = {}; if (attribute.listModel) { - fields[attribute.listModel.getPop()] = GraphQLInt; - fields[attribute.listModel.getPush()] = attribute.getInputTypeNames().update.pretty; + fields[attribute.listModel.getPop()] = { + type: GraphQLInt, + directives: [DEPRECATE_ARRAY_MUTATIONS(attribute.name, "pop")], + }; + fields[attribute.listModel.getPush()] = { + type: attribute.getInputTypeNames().update.pretty, + directives: [DEPRECATE_ARRAY_MUTATIONS(attribute.name, "push")], + }; } return fields; }; } -type AdditionalFieldsCallback = ( +export type AdditionalFieldsCallback = ( attribute: AttributeAdapter, fieldDefinition: InputField ) => Record | InputTypeComposerFieldConfigMapDefinition; diff --git a/packages/graphql/src/schema/validation/custom-rules/directive-argument-of-correct-type.ts b/packages/graphql/src/schema/validation/custom-rules/directive-argument-of-correct-type.ts deleted file mode 100644 index 582eab835a..0000000000 --- a/packages/graphql/src/schema/validation/custom-rules/directive-argument-of-correct-type.ts +++ /dev/null @@ -1,136 +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 { - ASTVisitor, - DirectiveNode, - GraphQLArgument, - ArgumentNode, - GraphQLDirective, - GraphQLSchema, -} from "graphql"; -import { coerceInputValue, valueFromASTUntyped, buildASTSchema } from "graphql"; -import type { Maybe } from "graphql/jsutils/Maybe"; -import type { SDLValidationContext } from "graphql/validation/ValidationContext"; -import { VALIDATION_ERROR_CODES } from "../utils/validation-error-codes"; -import type { AssertionResponse } from "./utils/document-validation-error"; -import { createGraphQLError } from "./utils/document-validation-error"; -import { getPathToNode } from "./utils/path-parser"; - -export function DirectiveArgumentOfCorrectType(includeAuthorizationDirectives: boolean = true) { - return function (context: SDLValidationContext): ASTVisitor { - // TODO: find a way to scope this schema instead of creating the whole document - // should only contain dynamic directives and their associated types (typeWhere + jwt payload) - let schema: GraphQLSchema | undefined; - const getSchemaFromDocument = (): GraphQLSchema => { - if (!schema) { - schema = buildASTSchema(context.getDocument(), { assumeValid: true, assumeValidSDL: true }); - } - return schema; - }; - - return { - Directive(directiveNode: DirectiveNode, _key, _parent, path, ancenstors) { - const oneOfAuthorizationDirectives = - includeAuthorizationDirectives && - ["subscriptionsAuthorization", "authorization", "authentication"].reduce( - (genericDirective, oneOfAuthorizationDirectives) => { - if ( - !genericDirective && - directiveNode.name.value - .toLowerCase() - .includes(oneOfAuthorizationDirectives.toLowerCase()) - ) { - genericDirective = oneOfAuthorizationDirectives; - } - return genericDirective; - }, - undefined - ); - const otherDirectives = ["fulltext", "relationship", "node", "customResolver", "cypher"].find( - (applicableDirectiveName) => - directiveNode.name.value.toLowerCase() === applicableDirectiveName.toLowerCase() - ); - - if (!oneOfAuthorizationDirectives && !otherDirectives) { - return; - } - - let directiveName: string; - let directiveDefinition: Maybe; - if (oneOfAuthorizationDirectives) { - directiveDefinition = getSchemaFromDocument().getDirective(directiveNode.name.value); - directiveName = oneOfAuthorizationDirectives; - } else { - directiveDefinition = context.getSchema()?.getDirective(directiveNode.name.value); - directiveName = directiveNode.name.value; - } - - if (!directiveDefinition) { - // Do not report, delegate this report to KnownDirectivesRule - return; - } - const pathToHere = [...getPathToNode(path, ancenstors)[0], `@${directiveName}`]; - for (const argument of directiveNode.arguments || []) { - const argumentDefinition = findArgumentDefinitionNodeByName( - directiveDefinition.args, - argument.name.value - ); - if (!argumentDefinition) { - return; - } - const { isValid, errorMsg, errorPath } = assertArgumentType(argument, argumentDefinition); - if (!isValid) { - context.reportError( - createGraphQLError({ - nodes: [argument, directiveNode], - path: [...pathToHere, argument.name.value, ...errorPath], - errorMsg: `Invalid argument: ${argument.name.value}, error: ${errorMsg}`, - extensions: { - exception: { code: VALIDATION_ERROR_CODES[directiveName.toUpperCase()] }, - }, - }) - ); - } - } - }, - }; - }; -} - -function findArgumentDefinitionNodeByName(args: readonly GraphQLArgument[], name: string): GraphQLArgument | undefined { - return args.find((arg) => arg.name === name); -} - -function assertArgumentType(argumentNode: ArgumentNode, inputValueDefinition: GraphQLArgument): AssertionResponse { - const argType = inputValueDefinition.type; - const argValue = valueFromASTUntyped(argumentNode.value); - - let isValid = true; - let errorMsg = ""; - let errorPath: readonly (string | number)[] = []; - - coerceInputValue(argValue, argType, (path, _invalidValue, error) => { - isValid = false; - errorMsg = error.message; - errorPath = path; - }); - - return { isValid, errorMsg, errorPath }; -} diff --git a/packages/graphql/src/schema/validation/custom-rules/utils/utils.ts b/packages/graphql/src/schema/validation/custom-rules/utils/utils.ts index 15ee9b7638..39c7699020 100644 --- a/packages/graphql/src/schema/validation/custom-rules/utils/utils.ts +++ b/packages/graphql/src/schema/validation/custom-rules/utils/utils.ts @@ -16,10 +16,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import type { ArgumentNode, EnumTypeDefinitionNode, FieldDefinitionNode, TypeNode, ValueNode } from "graphql"; -import { Kind } from "graphql"; +import type { + ArgumentNode, + EnumTypeDefinitionNode, + FieldDefinitionNode, + GraphQLArgument, + TypeNode, + ValueNode, +} from "graphql"; +import { coerceInputValue, Kind, valueFromASTUntyped } from "graphql"; import * as neo4j from "neo4j-driver"; import { parseValueNode } from "../../../../schema-model/parser/parse-value-node"; +import type { AssertionResponse } from "./document-validation-error"; export function getInnerTypeName(typeNode: TypeNode): string { if (typeNode.kind === Kind.LIST_TYPE) { @@ -86,3 +94,30 @@ export function isArrayType(traversedDef: FieldDefinitionNode) { (traversedDef.type.kind === Kind.NON_NULL_TYPE && traversedDef.type.type.kind === Kind.LIST_TYPE) ); } + +export function findArgumentDefinitionNodeByName( + args: readonly GraphQLArgument[], + name: string +): GraphQLArgument | undefined { + return args.find((arg) => arg.name === name); +} + +export function assertArgumentType( + argumentNode: ArgumentNode, + inputValueDefinition: GraphQLArgument +): AssertionResponse { + const argType = inputValueDefinition.type; + const argValue = valueFromASTUntyped(argumentNode.value); + + let isValid = true; + let errorMsg = ""; + let errorPath: ReadonlyArray = []; + + coerceInputValue(argValue, argType, (path, _invalidValue, error) => { + isValid = false; + errorMsg = error.message; + errorPath = path; + }); + + return { isValid, errorMsg, errorPath }; +} diff --git a/packages/graphql/src/schema/validation/custom-rules/directive-argument-of-correct-type.test.ts b/packages/graphql/src/schema/validation/custom-rules/validate-authorization-like-directives.test.ts similarity index 85% rename from packages/graphql/src/schema/validation/custom-rules/directive-argument-of-correct-type.test.ts rename to packages/graphql/src/schema/validation/custom-rules/validate-authorization-like-directives.test.ts index 276ed95160..f48db95d2a 100644 --- a/packages/graphql/src/schema/validation/custom-rules/directive-argument-of-correct-type.test.ts +++ b/packages/graphql/src/schema/validation/custom-rules/validate-authorization-like-directives.test.ts @@ -17,12 +17,12 @@ * limitations under the License. */ -import type { GraphQLError } from "graphql"; +import { GraphQLSchema, type GraphQLError } from "graphql"; import { gql } from "graphql-tag"; import { validateSDL } from "../validate-sdl"; -import { DirectiveArgumentOfCorrectType } from "./directive-argument-of-correct-type"; +import { ValidateAuthorizationLikeDirectives } from "./validate-authorization-like-directives"; -describe("DirectiveArgumentOfCorrectType", () => { +describe("validate-authorization-like-directives", () => { describe("for Scalar", () => { describe("for Int", () => { test("should returns no errors for valid Int", () => { @@ -34,7 +34,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(0); }); @@ -48,7 +48,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(1); expect((errors[0] as GraphQLError).message).toMatchInlineSnapshot( @@ -65,7 +65,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(1); expect((errors[0] as GraphQLError).message).toMatchInlineSnapshot( @@ -84,7 +84,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(0); }); @@ -98,7 +98,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(1); expect((errors[0] as GraphQLError).message).toMatchInlineSnapshot( @@ -115,7 +115,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(1); expect((errors[0] as GraphQLError).message).toMatchInlineSnapshot( @@ -134,7 +134,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(0); }); @@ -148,7 +148,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(1); expect((errors[0] as GraphQLError).message).toMatchInlineSnapshot( @@ -165,7 +165,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(1); expect((errors[0] as GraphQLError).message).toMatchInlineSnapshot( @@ -184,7 +184,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(0); }); @@ -198,7 +198,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(1); expect((errors[0] as GraphQLError).message).toMatchInlineSnapshot( @@ -215,7 +215,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(1); expect((errors[0] as GraphQLError).message).toMatchInlineSnapshot( @@ -240,7 +240,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(0); }); @@ -259,7 +259,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(1); expect((errors[0] as GraphQLError).message).toMatchInlineSnapshot( @@ -283,7 +283,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(0); }); @@ -302,7 +302,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(0); }); @@ -321,7 +321,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(1); expect((errors[0] as GraphQLError).message).toMatchInlineSnapshot( @@ -338,7 +338,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(1); expect((errors[0] as GraphQLError).message).toMatchInlineSnapshot( @@ -366,7 +366,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(0); }); @@ -389,7 +389,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(0); }); @@ -412,7 +412,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(1); expect((errors[0] as GraphQLError).message).toMatchInlineSnapshot( @@ -438,7 +438,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(1); expect((errors[0] as GraphQLError).message).toMatchInlineSnapshot( @@ -464,7 +464,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(1); expect((errors[0] as GraphQLError).message).toMatchInlineSnapshot( @@ -490,7 +490,7 @@ describe("DirectiveArgumentOfCorrectType", () => { name: String! } `; - const errors = validateSDL(userDocument, [DirectiveArgumentOfCorrectType()]); + const errors = validateSDL(userDocument, [ValidateAuthorizationLikeDirectives], new GraphQLSchema({})); expect(errors).toBeInstanceOf(Array); expect(errors).toHaveLength(1); expect((errors[0] as GraphQLError).message).toMatchInlineSnapshot( diff --git a/packages/graphql/src/schema/validation/custom-rules/validate-authorization-like-directives.ts b/packages/graphql/src/schema/validation/custom-rules/validate-authorization-like-directives.ts new file mode 100644 index 0000000000..4d31bc4427 --- /dev/null +++ b/packages/graphql/src/schema/validation/custom-rules/validate-authorization-like-directives.ts @@ -0,0 +1,83 @@ +/* + * 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 { ASTVisitor, DirectiveNode } from "graphql"; +import { extendSchema } from "graphql"; +import type { SDLValidationContext } from "graphql/validation/ValidationContext"; +import { VALIDATION_ERROR_CODES } from "../utils/validation-error-codes"; +import { createGraphQLError } from "./utils/document-validation-error"; +import { getPathToNode } from "./utils/path-parser"; +import { assertArgumentType, findArgumentDefinitionNodeByName } from "./utils/utils"; + +/** + * ValidateAuthorizationLikeDirectives validates the directives subscriptionsAuthorization, authorization, authentication + **/ +export function ValidateAuthorizationLikeDirectives(context: SDLValidationContext): ASTVisitor { + const validationSchema = context.getSchema(); + if (!validationSchema) { + throw new Error("Validation error: schema is not available"); + } + const schema = extendSchema(validationSchema, context.getDocument(), { assumeValid: true, assumeValidSDL: true }); + + return { + Directive(directiveNode: DirectiveNode, _key, _parent, path, ancestors) { + const authorizationLikeDirective = ["subscriptionsAuthorization", "authorization", "authentication"].find( + (authLikeDirective) => { + // find authorizationLike directive generated for validation purposes such a MovieAuthorization + // see packages/graphql/src/graphql/directives/type-dependant-directives/authorization.ts as example + return directiveNode.name.value.toLowerCase().includes(authLikeDirective.toLowerCase()); + } + ); + if (!authorizationLikeDirective) { + return; + } + + const directiveDefinition = schema.getDirective(directiveNode.name.value); + + if (!directiveDefinition) { + // Do not report, delegate this report to KnownDirectivesRule + return; + } + + const pathToHere = [...getPathToNode(path, ancestors)[0], `@${authorizationLikeDirective}`]; + for (const argument of directiveNode.arguments ?? []) { + const argumentDefinition = findArgumentDefinitionNodeByName( + directiveDefinition.args, + argument.name.value + ); + if (!argumentDefinition) { + return; // If argument name is not found, delegate to KnownArgumentNamesRule + } + const { isValid, errorMsg, errorPath } = assertArgumentType(argument, argumentDefinition); + if (!isValid) { + context.reportError( + createGraphQLError({ + nodes: [argument, directiveNode], + path: [...pathToHere, argument.name.value, ...errorPath], + errorMsg: `Invalid argument: ${argument.name.value}, error: ${errorMsg}`, + extensions: { + exception: { code: VALIDATION_ERROR_CODES[authorizationLikeDirective.toUpperCase()] }, + }, + }) + ); + } + } + }, + }; +} diff --git a/packages/graphql/src/schema/validation/custom-rules/validate-neo4j-directive-arguments-value.test.ts b/packages/graphql/src/schema/validation/custom-rules/validate-neo4j-directive-arguments-value.test.ts new file mode 100644 index 0000000000..10bcc033af --- /dev/null +++ b/packages/graphql/src/schema/validation/custom-rules/validate-neo4j-directive-arguments-value.test.ts @@ -0,0 +1,144 @@ +/* + * 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 { GraphQLError } from "graphql"; +import { GraphQLSchema } from "graphql"; +import { gql } from "graphql-tag"; +import { cypherDirective, fulltextDirective, nodeDirective } from "../../../graphql/directives"; +import { validateSDL } from "../validate-sdl"; +import { ValidateNeo4jDirectiveArgumentsValue } from "./validate-neo4j-directive-arguments-value"; + +describe("validateNeo4jDirectiveArgumentsValue", () => { + describe("node", () => { + test("should returns no errors for valid node arguments", () => { + const userDocument = gql` + type User @node(labels: ["Person"]) { + id: ID! + name: String! + } + `; + const schemaToExtend = new GraphQLSchema({ + directives: [nodeDirective], + }); + const errors = validateSDL(userDocument, [ValidateNeo4jDirectiveArgumentsValue], schemaToExtend); + expect(errors).toBeInstanceOf(Array); + expect(errors).toHaveLength(0); + }); + + test("should returns errors for invalid node arguments", () => { + const userDocument = gql` + type User @node(labels: 1) { + id: ID! + name: String! + } + `; + const schemaToExtend = new GraphQLSchema({ + directives: [nodeDirective], + }); + const errors = validateSDL(userDocument, [ValidateNeo4jDirectiveArgumentsValue], schemaToExtend); + expect(errors).toBeInstanceOf(Array); + expect(errors).toHaveLength(1); + expect((errors[0] as GraphQLError).message).toMatchInlineSnapshot( + `"Invalid argument: labels, error: String cannot represent a non string value: 1"` + ); + }); + }); + + describe("cypher", () => { + test("should returns no errors for valid cypher arguments", () => { + const userDocument = gql` + type User @node { + id: ID! + name: String! + @cypher( + statement: """ + MATCH (n:Movie) RETURN n as movie + """ + columnName: "movie" + ) + } + `; + const schemaToExtend = new GraphQLSchema({ + directives: [nodeDirective, cypherDirective], + }); + const errors = validateSDL(userDocument, [ValidateNeo4jDirectiveArgumentsValue], schemaToExtend); + expect(errors).toBeInstanceOf(Array); + expect(errors).toHaveLength(0); + }); + + test("should returns errors for invalid cypher arguments", () => { + const userDocument = gql` + type User @node { + id: ID! + name: String! + @cypher( + statement: """ + MATCH (n:Movie) RETURN n as movie + """ + columnName: 3 + ) + } + `; + const schemaToExtend = new GraphQLSchema({ + directives: [nodeDirective, cypherDirective], + }); + const errors = validateSDL(userDocument, [ValidateNeo4jDirectiveArgumentsValue], schemaToExtend); + expect(errors).toBeInstanceOf(Array); + expect(errors).toHaveLength(1); + expect((errors[0] as GraphQLError).message).toMatchInlineSnapshot( + `"Invalid argument: columnName, error: String cannot represent a non string value: 3"` + ); + }); + }); + + describe("fulltext", () => { + test("should returns no errors for valid fulltext arguments", () => { + const userDocument = gql` + type User @fulltext(indexes: [{ fields: ["id", "name"], indexName: "UserIndex" }]) { + id: ID! + name: String! + } + `; + const schemaToExtend = new GraphQLSchema({ + directives: [nodeDirective, cypherDirective, fulltextDirective], + }); + const errors = validateSDL(userDocument, [ValidateNeo4jDirectiveArgumentsValue], schemaToExtend); + expect(errors).toBeInstanceOf(Array); + expect(errors).toHaveLength(0); + }); + + test("should returns errors for invalid fulltext arguments", () => { + const userDocument = gql` + type User @fulltext(indexes: [{ fields: ["id", "name"], indexName: ["UserIndex"] }]) { + id: ID! + name: String! + } + `; + const schemaToExtend = new GraphQLSchema({ + directives: [nodeDirective, cypherDirective, fulltextDirective], + }); + const errors = validateSDL(userDocument, [ValidateNeo4jDirectiveArgumentsValue], schemaToExtend); + expect(errors).toBeInstanceOf(Array); + expect(errors).toHaveLength(1); + expect((errors[0] as GraphQLError).message).toMatchInlineSnapshot( + `"Invalid argument: indexes, error: String cannot represent a non string value: [\\"UserIndex\\"]"` + ); + }); + }); +}); diff --git a/packages/graphql/src/schema/validation/custom-rules/validate-neo4j-directive-arguments-value.ts b/packages/graphql/src/schema/validation/custom-rules/validate-neo4j-directive-arguments-value.ts new file mode 100644 index 0000000000..d7c5b4bd7f --- /dev/null +++ b/packages/graphql/src/schema/validation/custom-rules/validate-neo4j-directive-arguments-value.ts @@ -0,0 +1,89 @@ +/* + * 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 { ASTVisitor, DirectiveNode } from "graphql"; +import type { SDLValidationContext } from "graphql/validation/ValidationContext"; +import { + customResolverDirective, + cypherDirective, + fulltextDirective, + nodeDirective, + relationshipDirective, +} from "../../../graphql/directives"; +import { VALIDATION_ERROR_CODES } from "../utils/validation-error-codes"; +import { createGraphQLError } from "./utils/document-validation-error"; +import { getPathToNode } from "./utils/path-parser"; +import { assertArgumentType, findArgumentDefinitionNodeByName } from "./utils/utils"; + +export function ValidateNeo4jDirectiveArgumentsValue(context: SDLValidationContext): ASTVisitor { + const schema = context.getSchema(); + if (!schema) { + throw new Error("Validation error: schema is not available"); + } + + return { + Directive(directiveNode: DirectiveNode, _key, _parent, path, ancestors) { + const neo4jDirectiveToValidate = [ + fulltextDirective.name, + relationshipDirective.name, + nodeDirective.name, + customResolverDirective.name, + cypherDirective.name, + ].find( + (applicableDirectiveName) => + directiveNode.name.value.toLowerCase() === applicableDirectiveName.toLowerCase() + ); + + if (!neo4jDirectiveToValidate) { + return; + } + + const directiveDefinition = schema.getDirective(directiveNode.name.value); + const directiveName = directiveNode.name.value; + + if (!directiveDefinition) { + // Do not report, delegate this report to KnownDirectivesRule + return; + } + const pathToHere = [...getPathToNode(path, ancestors)[0], `@${directiveName}`]; + for (const argument of directiveNode.arguments ?? []) { + const argumentDefinition = findArgumentDefinitionNodeByName( + directiveDefinition.args, + argument.name.value + ); + if (!argumentDefinition) { + return; // If argument name is not found, delegate to KnownArgumentNamesRule + } + const { isValid, errorMsg, errorPath } = assertArgumentType(argument, argumentDefinition); + if (!isValid) { + context.reportError( + createGraphQLError({ + nodes: [argument, directiveNode], + path: [...pathToHere, argument.name.value, ...errorPath], + errorMsg: `Invalid argument: ${argument.name.value}, error: ${errorMsg}`, + extensions: { + exception: { code: VALIDATION_ERROR_CODES[directiveName.toUpperCase()] }, + }, + }) + ); + } + } + }, + }; +} diff --git a/packages/graphql/src/schema/validation/schema-validation.test.ts b/packages/graphql/src/schema/validation/schema-validation.test.ts index 0b2d95ceeb..334905178b 100644 --- a/packages/graphql/src/schema/validation/schema-validation.test.ts +++ b/packages/graphql/src/schema/validation/schema-validation.test.ts @@ -17,10 +17,9 @@ * limitations under the License. */ -import type { ASTVisitor, FieldDefinitionNode, ObjectTypeDefinitionNode } from "graphql"; -import { GraphQLError, parse } from "graphql"; +import type { ObjectTypeDefinitionNode } from "graphql"; +import { parse } from "graphql"; import { gql } from "graphql-tag"; -import type { SDLValidationContext } from "graphql/validation/ValidationContext"; import { NoErrorThrownError, getError } from "../../../tests/utils/get-error"; import { Subgraph } from "../../classes/Subgraph"; import { generateModel } from "../../schema-model/generate-model"; @@ -33,14 +32,14 @@ describe("schema validation", () => { // TODO: authentication describe("JWT Payload", () => { test("should not returns errors when is correctly used", () => { - const jwtType = ` - type MyJWT @jwt { + const jwtType = /* GraphQL */ ` + type MyJWT @jwt { myClaim: String } `; const userDocument = gql` ${jwtType} - type User @authorization(filter: [{ where: { jwt: { myClaim_EQ: "something" } } }]) @node { + type User @authorization(filter: [{ where: { jwt: { myClaim: { eq: "something" } } } }]) @node { id: ID! name: String! } @@ -58,8 +57,8 @@ describe("schema validation", () => { }); test("should not returns errors when is correctly used together with node", () => { - const jwtType = ` - type MyJWT @jwt { + const jwtType = /* GraphQL */ ` + type MyJWT @jwt { myClaim: String } `; @@ -87,8 +86,8 @@ describe("schema validation", () => { }); test("should return errors when jwt field is not found", () => { - const jwtType = ` - type MyJWT @jwt { + const jwtType = /* GraphQL */ ` + type MyJWT @jwt { myClaim: String } `; @@ -3646,65 +3645,6 @@ describe("schema validation", () => { }); }); - describe("validate using custom rules", () => { - test("should not returns errors when is correctly used", () => { - const userDocument = gql` - type User @node { - id: ID! - name: String! - } - `; - - const schemaModel = generateModel(userDocument); - const { typeDefs: augmentedDocument } = makeAugmentedSchema({ - document: userDocument, - schemaModel, - complexityEstimatorHelper: new ComplexityEstimatorHelper(false), - }); - - const executeValidate = () => - validateUserDefinition({ - userDocument, - augmentedDocument, - additionalDirectives: [], - additionalTypes: [], - rules: [noKeanuFields], - }); - expect(executeValidate).not.toThrow(); - }); - test("should returns errors when is not correctly used", () => { - const userDocument = gql` - type User @node { - id: ID! - keanu: String! - } - `; - - const schemaModel = generateModel(userDocument); - const { typeDefs: augmentedDocument } = makeAugmentedSchema({ - document: userDocument, - schemaModel, - complexityEstimatorHelper: new ComplexityEstimatorHelper(false), - }); - - const executeValidate = () => - validateUserDefinition({ - userDocument, - augmentedDocument, - additionalDirectives: [], - additionalTypes: [], - rules: [noKeanuFields], - }); - - const errors = getError(executeValidate); - expect(errors).toHaveLength(2); - expect(errors[0]).not.toBeInstanceOf(NoErrorThrownError); - expect(errors[0]).toHaveProperty("message", "Field cannot be named keanu"); - expect(errors[1]).not.toBeInstanceOf(NoErrorThrownError); - expect(errors[1]).toHaveProperty("message", "Field cannot be named keanu"); - }); - }); - describe("input validation", () => { describe("on OBJECT", () => { describe("correct usage", () => { @@ -4040,13 +3980,3 @@ describe("schema validation", () => { }); }); }); - -function noKeanuFields(context: SDLValidationContext): ASTVisitor { - return { - FieldDefinition(node: FieldDefinitionNode) { - if (node.name.value === "keanu") { - context.reportError(new GraphQLError("Field cannot be named keanu")); - } - }, - }; -} diff --git a/packages/graphql/src/schema/validation/schema-validation.ts b/packages/graphql/src/schema/validation/schema-validation.ts index da2e916ae7..946c3a3a9e 100644 --- a/packages/graphql/src/schema/validation/schema-validation.ts +++ b/packages/graphql/src/schema/validation/schema-validation.ts @@ -21,17 +21,43 @@ import type { DefinitionNode, DocumentNode, GraphQLDirective, + GraphQLInputObjectType, GraphQLNamedType, ObjectTypeDefinitionNode, } from "graphql"; import { GraphQLSchema, specifiedDirectives, visit } from "graphql"; -import type { SDLValidationRule } from "graphql/validation/ValidationContext"; import { specifiedSDLRules } from "graphql/validation/specifiedRules"; import { createAuthenticationDirectiveDefinition } from "../../graphql/directives/type-dependant-directives/authentication"; import { getStaticAuthorizationDefinitions } from "../../graphql/directives/type-dependant-directives/get-static-auth-definitions"; +import { + BigIntListFilters, + BigIntScalarFilters, +} from "../../graphql/input-objects/generic-operators/BigIntScalarFilters"; +import { + BooleanListFilters, + BooleanScalarFilters, +} from "../../graphql/input-objects/generic-operators/BooleanScalarFilters"; +import { + CartesianPointFilters, + CartesianPointListFilters, +} from "../../graphql/input-objects/generic-operators/CartesianPointFilters"; +import { DateListFilters, DateScalarFilters } from "../../graphql/input-objects/generic-operators/DateScalarFilters"; +import { DateTimeScalarFilters } from "../../graphql/input-objects/generic-operators/DateTimeScalarFilters"; +import { DurationScalarFilters } from "../../graphql/input-objects/generic-operators/DurationScalarFilters"; +import { FloatListFilters, FloatScalarFilters } from "../../graphql/input-objects/generic-operators/FloatScalarFilters"; +import { getIDScalarFilters, IDListFilters } from "../../graphql/input-objects/generic-operators/IDScalarFilters"; +import { IntListFilters, IntScalarFilters } from "../../graphql/input-objects/generic-operators/IntScalarFilters"; +import { LocalTimeScalarFilters } from "../../graphql/input-objects/generic-operators/LocalTimeScalarFilters"; +import { PointFilters, PointListFilters } from "../../graphql/input-objects/generic-operators/PointFilters"; +import { + getStringScalarFilters, + StringListFilters, +} from "../../graphql/input-objects/generic-operators/StringScalarFilters"; +import { TimeScalarFilters } from "../../graphql/input-objects/generic-operators/TimeScalarFilters"; +import type { Neo4jFeaturesSettings } from "../../types"; import { EnricherContext } from "./EnricherContext"; -import { DirectiveArgumentOfCorrectType } from "./custom-rules/directive-argument-of-correct-type"; import { makeReplaceWildcardVisitor } from "./custom-rules/replace-wildcard-value"; +import { ValidateAuthorizationLikeDirectives } from "./custom-rules/validate-authorization-like-directives"; import { authenticationDirectiveEnricher } from "./enrichers/authentication"; import { authorizationDefinitionsEnricher, authorizationDirectiveEnricher } from "./enrichers/authorization"; import { @@ -82,25 +108,50 @@ export function validateUserDefinition({ augmentedDocument, additionalDirectives = [], additionalTypes = [], - rules, jwt, + features, }: { userDocument: DocumentNode; augmentedDocument: DocumentNode; additionalDirectives?: Array; additionalTypes?: Array; - rules?: readonly SDLValidationRule[]; jwt?: ObjectTypeDefinitionNode; + features?: Neo4jFeaturesSettings; }): void { - rules = rules ? rules : [...specifiedSDLRules, DirectiveArgumentOfCorrectType()]; + const rules = [...specifiedSDLRules, ValidateAuthorizationLikeDirectives]; let validationDocument = makeValidationDocument(userDocument, augmentedDocument, jwt); - + const genericFiltersName: GraphQLInputObjectType[] = [ + BooleanScalarFilters, + BooleanListFilters, + getIDScalarFilters(features), + IDListFilters, + getStringScalarFilters(features), + StringListFilters, + FloatScalarFilters, + FloatListFilters, + IntScalarFilters, + IntListFilters, + BigIntScalarFilters, + BigIntListFilters, + TimeScalarFilters, + DateTimeScalarFilters, + DateScalarFilters, + DateListFilters, + DurationScalarFilters, + LocalTimeScalarFilters, + PointFilters, + PointListFilters, + CartesianPointFilters, + CartesianPointListFilters, + ]; const schemaToExtend = new GraphQLSchema({ directives: [...specifiedDirectives, ...additionalDirectives], - types: [...additionalTypes], + types: [...genericFiltersName, ...additionalTypes], }); const replaceWildcardValue = makeReplaceWildcardVisitor({ jwt, schema: schemaToExtend }); + + validationDocument = removeDuplicateTypes(validationDocument, schemaToExtend.getTypeMap()); validationDocument = visit(validationDocument, replaceWildcardValue()); const errors = validateSDL(validationDocument, rules, schemaToExtend); @@ -108,3 +159,18 @@ export function validateUserDefinition({ throw errors; } } + +function removeDuplicateTypes(doc: DocumentNode, extraTypes: Record): DocumentNode { + return { + ...doc, + // Remove duplicate types generated by genericFiltersName + definitions: doc.definitions.filter((def) => { + if (def["name"] !== undefined) { + if (extraTypes[(def as any).name.value]) { + return false; + } + } + return true; + }), + }; +} diff --git a/packages/graphql/src/schema/validation/validate-document.ts b/packages/graphql/src/schema/validation/validate-document.ts index 73860293c9..8f63559074 100644 --- a/packages/graphql/src/schema/validation/validate-document.ts +++ b/packages/graphql/src/schema/validation/validate-document.ts @@ -46,7 +46,6 @@ import { Point } from "../../graphql/objects/Point"; import * as scalars from "../../graphql/scalars"; import type { Neo4jFeaturesSettings } from "../../types"; import { isRootType } from "../../utils/is-root-type"; -import { DirectiveArgumentOfCorrectType } from "./custom-rules/directive-argument-of-correct-type"; import { directiveIsValid } from "./custom-rules/directives/valid-directive"; import { ValidDirectiveAtFieldLocation } from "./custom-rules/directives/valid-directive-field-location"; import { ErrorIfSingleRelationships } from "./custom-rules/error-single-relationships"; @@ -63,6 +62,7 @@ import { import { ValidFieldTypes } from "./custom-rules/valid-types/valid-field-types"; import { ValidListInNodeType } from "./custom-rules/valid-types/valid-list-in-node-type"; import { ValidObjectType } from "./custom-rules/valid-types/valid-object-type"; +import { ValidateNeo4jDirectiveArgumentsValue } from "./custom-rules/validate-neo4j-directive-arguments-value"; import { WarnIfAuthorizationFeatureDisabled } from "./custom-rules/warnings/authorization-feature-disabled"; import { WarnIfAMaxLimitCanBeBypassedThroughInterface } from "./custom-rules/warnings/limit-max-can-be-bypassed"; import { WarnObjectFieldsWithoutResolver } from "./custom-rules/warnings/object-fields-without-resolver"; @@ -222,7 +222,7 @@ function runValidationRulesOnFilteredDocument({ ReservedTypeNames, ValidObjectType, ValidDirectiveInheritance, - DirectiveArgumentOfCorrectType(false), + ValidateNeo4jDirectiveArgumentsValue, WarnIfAuthorizationFeatureDisabled(features?.authorization), ErrorIfSingleRelationships, WarnIfAMaxLimitCanBeBypassedThroughInterface(), diff --git a/packages/graphql/src/translate/authorization/utils/filter-by-values.ts b/packages/graphql/src/translate/authorization/utils/filter-by-values.ts index 1b64d0a339..fec3bdeb2a 100644 --- a/packages/graphql/src/translate/authorization/utils/filter-by-values.ts +++ b/packages/graphql/src/translate/authorization/utils/filter-by-values.ts @@ -44,13 +44,21 @@ export function filterByValues( } } else { const { fieldName, operator } = parseFilterProperty(k); + if (!operator) { + return filterByValuesOnGenericOperator({ + fieldName, + receivedValues, + jwtClaims, + value: v as Record, + }); + } const receivedValue = getReceivedValue({ fieldName, receivedValues, jwtClaims }); if (!receivedValue) { return false; } - const checkFilterPasses = getFilteringFn(operator); - if (!checkFilterPasses(receivedValue, v)) { + const filteringFn = getFilteringFn(operator); + if (!filteringFn(receivedValue, v)) { return false; } } @@ -58,6 +66,32 @@ export function filterByValues( return true; } +function filterByValuesOnGenericOperator({ + fieldName, + receivedValues, + jwtClaims, + value, +}: { + fieldName: string; + receivedValues: Record; + jwtClaims?: Map; + value: Record; +}): boolean { + const predicates = Object.entries(value).map(([k, v]) => { + const receivedValue = getReceivedValue({ fieldName, receivedValues, jwtClaims }); + if (!receivedValue) { + return false; + } + const filteringFn = getFilteringFn(k); + + if (!filteringFn(receivedValue, v)) { + return false; + } + return true; + }); + return multipleConditionsAggregationMap.AND(predicates); +} + function getReceivedValue({ fieldName, receivedValues, diff --git a/packages/graphql/src/translate/create-set-relationship-properties.ts b/packages/graphql/src/translate/create-set-relationship-properties.ts index 3d88ed0703..62d8492c51 100644 --- a/packages/graphql/src/translate/create-set-relationship-properties.ts +++ b/packages/graphql/src/translate/create-set-relationship-properties.ts @@ -34,6 +34,7 @@ export function createSetRelationshipProperties({ callbackBucket, parameterPrefix, parameterNotation, + isUpdateOperation = false, }: { properties: Record>; varName: string; @@ -44,6 +45,7 @@ export function createSetRelationshipProperties({ callbackBucket: CallbackBucket; parameterPrefix: string; parameterNotation: "." | "_"; + isUpdateOperation?: boolean; }): [string, Record] | undefined { // setting properties on the edge of an Interface relationship // the input can contain other properties than the one applicable for this concrete entity relationship field @@ -59,6 +61,7 @@ export function createSetRelationshipProperties({ callbackBucket, parameterPrefix: `${parameterPrefix}${parameterNotation}${relationship.properties}`, parameterNotation, + isUpdateOperation, }); } return; @@ -72,6 +75,7 @@ export function createSetRelationshipProperties({ callbackBucket, parameterPrefix, parameterNotation, + isUpdateOperation, }); } @@ -84,6 +88,7 @@ function createSetRelationshipPropertiesForProperties({ callbackBucket, parameterPrefix, parameterNotation, + isUpdateOperation, }: { properties: Record; varName: string; @@ -93,6 +98,7 @@ function createSetRelationshipPropertiesForProperties({ callbackBucket: CallbackBucket; parameterPrefix: string; parameterNotation: "." | "_"; + isUpdateOperation: boolean; }): [string, Record] { assertNonAmbiguousUpdate(relationship, properties); const strs: string[] = []; @@ -112,6 +118,7 @@ function createSetRelationshipPropertiesForProperties({ varName, value, withVars, + isUpdateOperation, }); strs.push(mutationFieldStatements); params[param] = value; diff --git a/packages/graphql/src/translate/create-update-and-params.test.ts b/packages/graphql/src/translate/create-update-and-params.test.ts index bad09e8b5d..42e83d1e26 100644 --- a/packages/graphql/src/translate/create-update-and-params.test.ts +++ b/packages/graphql/src/translate/create-update-and-params.test.ts @@ -17,16 +17,16 @@ * limitations under the License. */ -import createUpdateAndParams from "./create-update-and-params"; -import { CallbackBucket } from "../classes/CallbackBucket"; -import type { BaseField } from "../types"; -import { trimmer } from "../utils"; -import { NodeBuilder } from "../../tests/utils/builders/node-builder"; import { ContextBuilder } from "../../tests/utils/builders/context-builder"; +import { NodeBuilder } from "../../tests/utils/builders/node-builder"; +import { CallbackBucket } from "../classes/CallbackBucket"; import { Neo4jGraphQLSchemaModel } from "../schema-model/Neo4jGraphQLSchemaModel"; -import { ConcreteEntity } from "../schema-model/entity/ConcreteEntity"; import { Attribute } from "../schema-model/attribute/Attribute"; import { GraphQLBuiltInScalarType, ScalarType } from "../schema-model/attribute/AttributeType"; +import { ConcreteEntity } from "../schema-model/entity/ConcreteEntity"; +import type { BaseField } from "../types"; +import { trimmer } from "../utils"; +import createUpdateAndParams from "./create-update-and-params"; describe("createUpdateAndParams", () => { test("should return the correct update and params", () => { @@ -96,7 +96,7 @@ describe("createUpdateAndParams", () => { }).instance(); const result = createUpdateAndParams({ - updateInput: { id: "new" }, + updateInput: { id_SET: "new" }, node, context, varName: "this", @@ -108,12 +108,12 @@ describe("createUpdateAndParams", () => { expect(trimmer(result[0])).toEqual( trimmer(` - SET this.id = $this_update_id + SET this.id = $this_update_id_SET `) ); expect(result[1]).toMatchObject({ - this_update_id: "new", + this_update_id_SET: "new", }); }); }); diff --git a/packages/graphql/src/translate/create-update-and-params.ts b/packages/graphql/src/translate/create-update-and-params.ts index c98397b000..8e80f506c9 100644 --- a/packages/graphql/src/translate/create-update-and-params.ts +++ b/packages/graphql/src/translate/create-update-and-params.ts @@ -275,6 +275,7 @@ export default function createUpdateAndParams({ relationField.union ? `.${refNode.name}` : "" }${relationField.typeMeta.array ? `[${index}]` : ``}.update.edge`, parameterNotation: ".", + isUpdateOperation: true, }); let setProperties; if (res) { @@ -537,6 +538,7 @@ export default function createUpdateAndParams({ varName, value, withVars, + isUpdateOperation: true, }); res.strs.push(mutationFieldStatements); diff --git a/packages/graphql/src/translate/queryAST/ast/filters/ConnectionFilter.ts b/packages/graphql/src/translate/queryAST/ast/filters/ConnectionFilter.ts index 1e1aa53656..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 = isNot; - 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/CypherRelationshipFilter.ts b/packages/graphql/src/translate/queryAST/ast/filters/CypherRelationshipFilter.ts index f5e831b34a..49b8469b27 100644 --- a/packages/graphql/src/translate/queryAST/ast/filters/CypherRelationshipFilter.ts +++ b/packages/graphql/src/translate/queryAST/ast/filters/CypherRelationshipFilter.ts @@ -31,25 +31,21 @@ export class CypherRelationshipFilter extends Filter { private selection: CustomCypherSelection; private operator: FilterOperator; private targetNodeFilters: Filter[] = []; - private isNot: boolean; constructor({ selection, attribute, operator, - isNot, returnVariable, }: { selection: CustomCypherSelection; attribute: AttributeAdapter; operator: RelationshipWhereOperator; - isNot: boolean; returnVariable: Cypher.Node; }) { super(); this.selection = selection; this.attribute = attribute; - this.isNot = isNot; this.operator = operator; this.returnVariable = returnVariable; } @@ -63,7 +59,7 @@ export class CypherRelationshipFilter 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[] { @@ -77,10 +73,7 @@ export class CypherRelationshipFilter 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 { @@ -108,13 +101,4 @@ export class CypherRelationshipFilter extends Filter { } } } - - private wrapInNotIfNeeded(predicate: Cypher.Predicate): Cypher.Predicate { - // TODO: Remove check for NONE when isNot is removed - if (this.isNot && this.operator !== "NONE") { - return Cypher.not(predicate); - } - - return predicate; - } } diff --git a/packages/graphql/src/translate/queryAST/ast/filters/Filter.ts b/packages/graphql/src/translate/queryAST/ast/filters/Filter.ts index 201a5b2316..606c2e3738 100644 --- a/packages/graphql/src/translate/queryAST/ast/filters/Filter.ts +++ b/packages/graphql/src/translate/queryAST/ast/filters/Filter.ts @@ -30,19 +30,21 @@ export type RelationshipWhereOperator = "ALL" | "NONE" | "SINGLE" | "SOME"; export type FilterOperator = | "EQ" - | "NOT" | NumericalWhereOperator | SpatialWhereOperator | StringWhereOperator - | `NOT_${StringWhereOperator}` | RegexWhereOperator | ArrayWhereOperator - | `NOT_${ArrayWhereOperator}` | RelationshipWhereOperator; 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 cdd75fac80..d89e82a48a 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; } @@ -70,7 +66,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() @@ -94,7 +90,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({ @@ -184,9 +182,7 @@ export class RelationshipFilter extends Filter { const subqueriesPredicate = Cypher.and(...subqueriesFilters); - // NOTE: NONE is SOME + isNot - // TODO: move to wrapInNullIfNeeded in getPredicate - const comparator = this.isNot ? Cypher.false : Cypher.true; + const comparator = this.operator === "NONE" ? Cypher.false : Cypher.true; this.subqueryPredicate = Cypher.eq(returnVar, comparator); const withAfterSubqueries = new Cypher.With("*"); @@ -263,11 +259,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": @@ -275,48 +267,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 { - 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, @@ -327,9 +283,7 @@ export class RelationshipFilter extends Filter { }); const predicate = this.createRelationshipOperation(pattern, nestedContext); - if (predicate) { - return this.wrapInNotIfNeeded(predicate); - } + return predicate; } protected getSingleRelationshipOperation({ @@ -382,25 +336,15 @@ 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, - }); - } - return new Cypher.Exists(match.where(innerPredicate)); + match.where(innerPredicate); } - return new Cypher.Exists(match); + 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; - } } 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/AuthRelationshipFilter.ts b/packages/graphql/src/translate/queryAST/ast/filters/authorization-filters/AuthRelationshipFilter.ts index 0c0f06b2ee..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 @@ -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({ @@ -44,9 +40,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,15 +49,11 @@ 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; - const useExist = queryASTContext.neo4jGraphQLContext.neo4jDatabaseInfo?.gte("5.0"); + if (!innerPredicate) { + return; + } 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 @@ -78,18 +68,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)); - 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/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..3f3cea8841 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 @@ -21,7 +21,6 @@ import Cypher from "@neo4j/cypher-builder"; import type { AttributeAdapter } from "../../../../../schema-model/attribute/model-adapters/AttributeAdapter"; import { InterfaceEntityAdapter } from "../../../../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import type { RelationshipAdapter } from "../../../../../schema-model/relationship/model-adapters/RelationshipAdapter"; -import { hasTarget } from "../../../utils/context-has-target"; import { createComparisonOperation } from "../../../utils/create-comparison-operator"; import type { QueryASTContext } from "../../QueryASTContext"; import type { QueryASTNode } from "../../QueryASTNode"; @@ -34,7 +33,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 +40,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 +53,6 @@ export class PropertyFilter extends Filter { this.relationship = relationship; this.comparisonValue = comparisonValue; this.operator = operator; - this.isNot = isNot; this.attachedTo = attachedTo ?? "node"; } @@ -66,19 +61,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 { @@ -106,7 +99,9 @@ export class PropertyFilter extends Filter { queryASTContext: QueryASTContext, concreteLabelsToAttributeAlias: [string[], string][] ): Cypher.Case { - if (!hasTarget(queryASTContext)) throw new Error("No parent node found!"); + if (!queryASTContext.hasTarget()) { + throw new Error("No parent node found!"); + } const aliasesCase = new Cypher.Case(); for (const [labels, databaseName] of concreteLabelsToAttributeAlias) { aliasesCase @@ -119,7 +114,9 @@ export class PropertyFilter extends Filter { private getPropertyRef(queryASTContext: QueryASTContext): Cypher.Property { if (this.attachedTo === "node") { - if (!hasTarget(queryASTContext)) throw new Error("No parent node found!"); + if (!queryASTContext.hasTarget()) { + throw new Error("No parent node found!"); + } return queryASTContext.target.property(this.attribute.databaseName); } else if (this.attachedTo === "relationship" && queryASTContext.relationship) { return queryASTContext.relationship.property(this.attribute.databaseName); @@ -153,17 +150,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 c365aed93b..a376d13764 100644 --- a/packages/graphql/src/translate/queryAST/factory/AuthFilterFactory.ts +++ b/packages/graphql/src/translate/queryAST/factory/AuthFilterFactory.ts @@ -29,8 +29,9 @@ import type { Neo4jGraphQLTranslationContext } from "../../../types/neo4j-graphq 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"; @@ -90,7 +91,7 @@ export class AuthFilterFactory extends FilterFactory { where: GraphQLWhereArg, context: Neo4jGraphQLTranslationContext ): Filter[] { - return Object.entries(where).map(([key, value]) => { + return Object.entries(where).flatMap(([key, value]) => { if (isLogicalOperator(key)) { const nestedFilters = asArray(value).flatMap((v) => { return this.createJWTFilters(jwtPayload, v, context); @@ -101,7 +102,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}`); } @@ -118,12 +119,24 @@ export class AuthFilterFactory extends FilterFactory { target = jwtPayload.property(...paths); } + if (!operator) { + return this.wrapMultipleFiltersInLogical(this.getGenericJWTFilters(value, target)); + } + return new JWTFilter({ + operator: operator, + JWTClaim: target, + comparisonValue: value, + }); + }); + } + private getGenericJWTFilters(genericOperator: Record, target: Cypher.Property): JWTFilter[] { + return Object.entries(genericOperator).map(([key, value]): JWTFilter => { + const operator = this.parseGenericOperator(key); return new JWTFilter({ - operator: operator || "EQ", + operator, JWTClaim: target, comparisonValue: value, - isNot, }); }); } @@ -132,19 +145,15 @@ 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 { - const filterOperator = operator || "EQ"; - const isCypherVariable = comparisonValue instanceof Cypher.Variable || comparisonValue instanceof Cypher.Property || @@ -160,9 +169,26 @@ 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`); } + // path for generic filters input, in v8 it will be the only path + if (!operator && attribute.typeHelper.isList()) { + const genericFilters = Object.entries(comparisonValue as any).flatMap(([quantifier, predicate]) => { + const legacyOperator = this.convertRelationshipOperatorToLegacyOperator(quantifier); + return this.createCypherRelationshipFilter({ + where: predicate as any, + selection, + target: entityAdapter, + operator: legacyOperator, + attribute, + }); + }); + return new LogicalFilter({ + operation: "AND", + filters: genericFilters, + }); + } return new LogicalFilter({ operation: "AND", @@ -170,10 +196,7 @@ export class AuthFilterFactory extends FilterFactory { where: comparisonValue as GraphQLWhereArg, selection, target: entityAdapter, - filterOps: { - isNot, - operator, - }, + operator, attribute, }), }); @@ -184,7 +207,7 @@ export class AuthFilterFactory extends FilterFactory { selection, attribute, comparisonValue: comparisonValue, - operator: filterOperator, + operator: operator ?? "EQ", checkIsNotNull: true, }); } @@ -195,18 +218,19 @@ export class AuthFilterFactory extends FilterFactory { selection, attribute, comparisonValue: comparisonValueParam, - operator: filterOperator, + operator: operator ?? "EQ", }); } - + if (!operator) { + throw new Error(`Operator is required for property filter`); + } // This is probably not needed, but avoid changing the cypher if (typeof comparisonValue === "boolean") { return new ParamPropertyFilter({ attribute, relationship, comparisonValue: new Cypher.Param(comparisonValue), - isNot, - operator: filterOperator, + operator, attachedTo, }); } @@ -216,8 +240,7 @@ export class AuthFilterFactory extends FilterFactory { attribute, relationship, comparisonValue: comparisonValue, - isNot, - operator: filterOperator, + operator, attachedTo, }); } else { @@ -226,8 +249,7 @@ export class AuthFilterFactory extends FilterFactory { attribute, relationship, comparisonValue: comparisonValue, - isNot, - operator: filterOperator, + operator, attachedTo, }); } @@ -235,8 +257,7 @@ export class AuthFilterFactory extends FilterFactory { attribute, relationship, comparisonValue: new Cypher.Param(comparisonValue), - isNot, - operator: filterOperator, + operator, attachedTo, }); } @@ -245,7 +266,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 +274,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 43e6cfa214..bc7194abc0 100644 --- a/packages/graphql/src/translate/queryAST/factory/FilterFactory.ts +++ b/packages/graphql/src/translate/queryAST/factory/FilterFactory.ts @@ -32,7 +32,7 @@ import { ConnectionFilter } from "../ast/filters/ConnectionFilter"; import { CypherOneToOneRelationshipFilter } from "../ast/filters/CypherOneToOneRelationshipFilter"; import { CypherRelationshipFilter } from "../ast/filters/CypherRelationshipFilter"; 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"; @@ -48,9 +48,15 @@ import { CustomCypherSelection } from "../ast/selection/CustomCypherSelection"; import { getConcreteEntities } from "../utils/get-concrete-entities"; import { isConcreteEntity } from "../utils/is-concrete-entity"; 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, + type AggregationLogicalOperator, + type AggregationOperator, +} from "./parsers/parse-where-field"; type AggregateWhereInput = { count: number; @@ -71,7 +77,8 @@ export class FilterFactory { private createConnectionFilter( relationship: RelationshipAdapter, where: ConnectionWhereArg, - filterOps: { isNot: boolean; operator: RelationshipWhereOperator | undefined } + + operator: RelationshipWhereOperator ): Filter[] { if ( isInterfaceEntity(relationship.target) && @@ -80,8 +87,7 @@ export class FilterFactory { const connectionFilter = this.createConnectionFilterTreeNode({ relationship: relationship, target: relationship.target, - isNot: filterOps.isNot, - operator: filterOps.operator, + operator, }); const filters = this.createConnectionPredicates({ rel: relationship, entity: relationship.target, where }); connectionFilter.addFilters(filters); @@ -99,8 +105,7 @@ export class FilterFactory { const connectionFilter = this.createConnectionFilterTreeNode({ relationship: relationship, target: concreteEntity, - isNot: filterOps.isNot, - operator: filterOps.operator, + operator, }); const filters = this.createConnectionPredicates({ @@ -112,7 +117,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); } @@ -143,11 +148,11 @@ 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, @@ -172,15 +177,11 @@ export class FilterFactory { attribute, comparisonValue, operator, - isNot, }: { attribute: AttributeAdapter; comparisonValue: GraphQLWhereArg; operator: FilterOperator | undefined; - isNot: boolean; }): Filter | Filter[] { - const filterOperator = operator || "EQ"; - const selection = new CustomCypherSelection({ operationField: attribute, rawArguments: {}, @@ -190,18 +191,29 @@ 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`); } + // path for generic filters input, in v8 it will be the only path + if (!operator && attribute.typeHelper.isList()) { + const genericFilters = Object.entries(comparisonValue).flatMap(([quantifier, predicate]) => { + const legacyOperator = this.convertRelationshipOperatorToLegacyOperator(quantifier); + return this.createCypherRelationshipFilter({ + where: predicate, + selection, + target: entityAdapter, + operator: legacyOperator, + attribute, + }); + }); + return this.wrapMultipleFiltersInLogical(genericFilters); + } return this.createCypherRelationshipFilter({ where: comparisonValue, selection, target: entityAdapter, - filterOps: { - isNot, - operator, - }, + operator: operator ?? "SOME", attribute, }); } @@ -212,7 +224,7 @@ export class FilterFactory { selection, attribute, comparisonValue: comparisonValueParam, - operator: filterOperator, + operator: operator ?? "EQ", }); } @@ -221,33 +233,30 @@ 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"; - if (attribute.annotations.cypher) { return this.createCypherFilter({ attribute, comparisonValue, operator, - isNot, }); } - + // Implicit _EQ filters are removed but the argument "operator" can still be undefined in some cases, for instance: + // Cypher 1:1 relationship filters as they are stored as Attribute. + // Federation Subgraph resolver, _entities field implementation is using the FilterFactory { "__typename": "Product", "upc": "abc123"}. + operator = operator ?? "EQ"; if (attribute.typeHelper.isDuration()) { return new DurationFilter({ attribute, comparisonValue, - isNot, - operator: filterOperator, + operator, attachedTo, }); } @@ -255,8 +264,7 @@ export class FilterFactory { return new PointFilter({ attribute, comparisonValue, - isNot, - operator: filterOperator, + operator, attachedTo, }); } @@ -265,8 +273,7 @@ export class FilterFactory { attribute, relationship, comparisonValue, - isNot, - operator: filterOperator, + operator, attachedTo, }); } @@ -274,7 +281,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: @@ -285,8 +292,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[] = []; @@ -294,8 +299,7 @@ export class FilterFactory { const relationshipFilter = this.createRelationshipFilterTreeNode({ relationship, target: concreteEntity, - isNot, - operator: filterOps.operator || "SOME", + operator: operator ?? "SOME", }); if (!isNull) { @@ -306,7 +310,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); } @@ -314,13 +318,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[] { /** @@ -332,7 +336,7 @@ export class FilterFactory { if (!isNull && Object.keys(where).length === 0) { return []; } - + // TODO the below logic is unnecessary, Cypher relationship are not supported for Composite Entities const filteredEntities = getConcreteEntities(target, where); const filters: (CypherOneToOneRelationshipFilter | CypherRelationshipFilter)[] = []; for (const concreteEntity of filteredEntities) { @@ -340,9 +344,8 @@ export class FilterFactory { const options = { selection, - isNot: filterOps.isNot, isNull, - operator: filterOps.operator || "SOME", + operator: operator ?? "SOME", attribute, returnVariable, }; @@ -359,7 +362,7 @@ export class FilterFactory { filters.push(filter); } - const logicalOp = this.getLogicalOperatorForRelatedNodeFilters(target, filterOps.operator); + const logicalOp = this.getLogicalOperatorForRelatedNodeFilters(target, operator); return this.wrapMultipleFiltersInLogical(filters, logicalOp); } @@ -367,7 +370,6 @@ export class FilterFactory { protected createCypherOneToOneRelationshipFilterTreeNode(options: { selection: CustomCypherSelection; attribute: AttributeAdapter; - isNot: boolean; isNull: boolean; operator: RelationshipWhereOperator; returnVariable: Cypher.Node; @@ -379,7 +381,6 @@ export class FilterFactory { protected createCypherRelationshipFilterTreeNode(options: { selection: CustomCypherSelection; attribute: AttributeAdapter; - isNot: boolean; isNull: boolean; operator: RelationshipWhereOperator; returnVariable: Cypher.Node; @@ -391,7 +392,6 @@ export class FilterFactory { protected createRelationshipFilterTreeNode(options: { relationship: RelationshipAdapter; target: ConcreteEntityAdapter | InterfaceEntityAdapter; - isNot: boolean; operator: RelationshipWhereOperator; }): RelationshipFilter { return new RelationshipFilter(options); @@ -401,8 +401,7 @@ export class FilterFactory { protected createConnectionFilterTreeNode(options: { relationship: RelationshipAdapter; target: ConcreteEntityAdapter | InterfaceEntityAdapter; - isNot: boolean; - operator: RelationshipWhereOperator | undefined; + operator: RelationshipWhereOperator; }): ConnectionFilter { return new ConnectionFilter(options); } @@ -420,58 +419,9 @@ export class FilterFactory { }): Filter[] { const filters = filterTruthy( Object.entries(whereFields).flatMap(([key, value]): Filter | Filter[] | undefined => { - const valueAsArray = asArray(value); - if (isLogicalOperator(key)) { - const nestedFilters = valueAsArray.flatMap((nestedWhere) => { - return this.createInterfaceNodeFilters({ entity, targetEntity, whereFields: nestedWhere }); - }); - return new LogicalFilter({ - operation: key, - filters: nestedFilters, - }); - } - if (key === "typename_IN") { - const acceptedEntities = entity.concreteEntities.filter((concreteEntity) => { - return valueAsArray.some((typenameFilterValue) => typenameFilterValue === concreteEntity.name); - }); - return new TypenameFilter(acceptedEntities); - } - - const { fieldName, operator, isNot, isConnection, isAggregate } = parseWhereField(key); - const relationshipDeclaration = entity.findRelationshipDeclarations(fieldName); - if (targetEntity && relationshipDeclaration) { - const relationship = relationshipDeclaration.relationshipImplementations.find( - (r) => r.source.name === targetEntity.name - ); - if (!relationship) { - throw new Error(`Relationship ${fieldName} not found`); - } - return this.createRelatedNodeFilters({ - relationship, - value, - operator, - isNot, - isConnection, - isAggregate, - }); - } - - const attribute = entity.findAttribute(fieldName); - - if (!attribute) { - throw new Error(`Attribute ${fieldName} not found`); - } - - return this.createPropertyFilter({ - attribute, - relationship, - comparisonValue: value, - isNot, - operator, - }); + return this.parseEntryFilter({ entity, key, value, targetEntity, relationship }); }) ); - return this.wrapMultipleFiltersInLogical(filters); } @@ -482,88 +432,274 @@ export class FilterFactory { if (isUnionEntity(entity)) { return []; } - const filters = filterTruthy( Object.entries(whereFields).flatMap(([key, value]): Filter | Filter[] | undefined => { - const valueAsArray = asArray(value); - if (isLogicalOperator(key)) { - const nestedFilters = valueAsArray.flatMap((nestedWhere) => { - return this.createNodeFilters(entity, nestedWhere); - }); - return new LogicalFilter({ - operation: key, - filters: nestedFilters, - }); - } + return this.parseEntryFilter({ entity, key, value }); + }) + ); + return this.wrapMultipleFiltersInLogical(filters); + } - const { fieldName, operator, isNot, isConnection, isAggregate } = parseWhereField(key); + private parseEntryFilter({ + entity, + key, + value, + targetEntity, + relationship, + }: { + entity: ConcreteEntityAdapter | InterfaceEntityAdapter; + key: string; + value: any; + targetEntity?: ConcreteEntityAdapter; + relationship?: RelationshipAdapter; + }): Filter | Filter[] { + const valueAsArray = asArray(value); + if (isLogicalOperator(key)) { + const nestedFilters = valueAsArray.flatMap((nestedWhere) => { + const nestedOfNestedFilters = Object.entries(nestedWhere).flatMap(([nestedKey, nestedValue]) => { + return asArray( + this.parseEntryFilter({ + entity, + key: nestedKey, + value: nestedValue, + targetEntity, + relationship, + }) + ); + }); - const relationship = entity.findRelationship(fieldName); + return this.wrapMultipleFiltersInLogical(nestedOfNestedFilters); + }); + return new LogicalFilter({ + operation: key, + filters: nestedFilters, + }); + } + const { fieldName, operator, isConnection, isAggregate } = parseWhereField(key); + if (isConcreteEntity(entity)) { + const relationship = entity.findRelationship(fieldName); - if (relationship) { - return this.createRelatedNodeFilters({ - relationship, - value, - operator, - isNot, - isConnection, - isAggregate, - }); + if (relationship) { + return this.createRelatedNodeFilters({ + relationship, + value, + operator, + isConnection, + isAggregate, + }); + } + } else { + const relationshipDeclaration = entity.findRelationshipDeclarations(fieldName); + if (targetEntity && relationshipDeclaration) { + const relationship = relationshipDeclaration.relationshipImplementations.find( + (r) => r.source.name === targetEntity.name + ); + if (!relationship) { + throw new Error(`Relationship ${fieldName} not found`); } + return this.createRelatedNodeFilters({ + relationship, + value, + operator, + isConnection, + isAggregate, + }); + } + if (key === "typename") { + const acceptedEntities = entity.concreteEntities.filter((concreteEntity) => { + return valueAsArray.some((typenameFilterValue) => typenameFilterValue === concreteEntity.name); + }); + return new TypenameFilter(acceptedEntities); + } + } - const attribute = entity.findAttribute(fieldName); + const attribute = entity.findAttribute(fieldName); - if (!attribute) { - if (fieldName === "id" && entity.globalIdField) { - return this.createRelayIdPropertyFilter(entity, isNot, operator, value); - } + if (!isInterfaceEntity(entity) && !attribute) { + if (fieldName === "id" && entity.globalIdField) { + return this.createRelayIdPropertyFilter(entity, operator, value); + } + } + if (!attribute) { + throw new Error(`Attribute ${fieldName} not found`); + } - throw new Error(`Attribute ${fieldName} not found`); - } + // This is a bit hacky, basically skipping cypher fields and federation strings being passed to filterFactory + if (!operator && !attribute.annotations.cypher?.targetEntity && typeof value === "object") { + return this.parseGenericFilters(entity, fieldName, value, relationship); + } - return this.createPropertyFilter({ - attribute, - comparisonValue: value, - isNot, - operator, - }); - }) - ); + return this.createPropertyFilter({ + attribute, + comparisonValue: value, + operator: operator, + relationship, + }); + } - return this.wrapMultipleFiltersInLogical(filters); + private parseGenericFilters( + entity: ConcreteEntityAdapter | RelationshipAdapter | InterfaceEntityAdapter, + fieldName: string, + value: Record, + relationship?: RelationshipAdapter + ): Filter | Filter[] { + const genericFilters = Object.entries(value).flatMap((filterInput) => { + return this.parseGenericFilter(entity, fieldName, filterInput, relationship); + }); + return this.wrapMultipleFiltersInLogical(genericFilters); + } + + private parseGenericFilter( + entity: ConcreteEntityAdapter | RelationshipAdapter | InterfaceEntityAdapter, + fieldName: string, + filterInput: [string, any], + relationship?: RelationshipAdapter + ): Filter | Filter[] { + const [rawOperator, value] = filterInput; + if (isLogicalOperator(rawOperator)) { + const nestedFilters = asArray(value).flatMap((nestedWhere) => { + return this.parseGenericFilter(entity, fieldName, nestedWhere, relationship); + }); + return new LogicalFilter({ + operation: rawOperator, + filters: nestedFilters, + }); + } + + if (rawOperator === "distance") { + // Converts new distance filter into the old one to be parsed the same as deprecated syntax + const desugaredInput = this.desugarGenericDistanceOperations(value); + return this.parseGenericFilters(entity, fieldName, desugaredInput, relationship); + } + + const operator = this.parseGenericOperator(rawOperator); + + const attribute = entity.findAttribute(fieldName); + + if (!attribute) { + if (isRelationshipEntity(entity) || isInterfaceEntity(entity)) { + throw new Error("Transpilation error: Expected concrete entity"); + } + if (fieldName === "id" && entity.globalIdField) { + return this.createRelayIdPropertyFilter(entity, operator, value); + } + throw new Error(`Attribute ${fieldName} not found`); + } + const attachedTo = isRelationshipEntity(entity) ? "relationship" : "node"; + const filters = this.createPropertyFilter({ + attribute, + comparisonValue: value, + operator, + attachedTo, + relationship, + }); + return this.wrapMultipleFiltersInLogical(asArray(filters)); + } + + protected parseGenericOperator(key: string): FilterOperator { + // we convert them to the previous format to keep the same translation logic + switch (key) { + case "eq": + return "EQ"; + case "in": + return "IN"; + case "lt": + return "LT"; + case "lte": + return "LTE"; + case "greaterThan": + case "gt": + return "GT"; + case "gte": + return "GTE"; + case "contains": + return "CONTAINS"; + case "startsWith": + return "STARTS_WITH"; + case "endsWith": + return "ENDS_WITH"; + case "matches": + return "MATCHES"; + case "includes": + return "INCLUDES"; + case "distance_eq": // Used for distance -> eq + return "DISTANCE"; + default: + throw new Error(`Invalid operator ${key}`); + } + } + private parseGenericOperatorForAggregation(key: string): AggregationLogicalOperator { + // we convert them to the previous format to keep the same translation logic + switch (key) { + case "eq": + return "EQUAL"; + case "lt": + return "LT"; + case "lte": + return "LTE"; + case "gt": + return "GT"; + case "gte": + return "GTE"; + + default: + throw new Error(`Invalid operator ${key}`); + } + } + + protected 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, + isConnection, isAggregate, }: { relationship: RelationshipAdapter; - value: any; + value: Record; operator: FilterOperator | undefined; - isNot: boolean; + isConnection: boolean; isAggregate: boolean; }): Filter | Filter[] { if (isAggregate) { return this.createAggregationFilter(relationship, value as AggregateWhereInput); } - if (operator && !isRelationshipOperator(operator)) { + if (!operator) { + const genericFilters = Object.entries(value).flatMap(([quantifier, predicate]) => { + const legacyOperator = this.convertRelationshipOperatorToLegacyOperator(quantifier); + return this.createRelatedNodeFilters({ + relationship, + value: predicate, + operator: legacyOperator, + isConnection, + isAggregate, + }); + }); + return this.wrapMultipleFiltersInLogical(genericFilters); + } + + if (operator && !isLegacyRelationshipOperator(operator)) { 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( @@ -583,8 +719,8 @@ export class FilterFactory { private createRelayIdPropertyFilter( entity: ConcreteEntityAdapter, - isNot: boolean, - operator: FilterOperator | undefined, + + operator: FilterOperator | undefined = "EQ", value: string ): Filter | Filter[] { const relayIdData = fromGlobalId(value); @@ -609,7 +745,6 @@ export class FilterFactory { return this.createPropertyFilter({ attribute: idAttribute, comparisonValue: id as unknown as GraphQLWhereArg, - isNot, operator, }); } @@ -625,19 +760,23 @@ export class FilterFactory { filters: nestedFilters, }); } - const { fieldName, operator, isNot } = parseWhereField(key); + const { fieldName, operator } = parseWhereField(key); + const attribute = relationship.findAttribute(fieldName); if (!attribute) { + // @declareRelationship path. if (fieldName === relationship.propertiesTypeName) { return this.createEdgeFilters(relationship, value); } return; } + if (!operator) { + return this.parseGenericFilters(relationship, fieldName, value); + } return this.createPropertyFilter({ attribute, comparisonValue: value, - isNot, operator, attachedTo: "relationship", }); @@ -663,13 +802,22 @@ export class FilterFactory { }); return [logicalFilter]; } - const { fieldName, operator, isNot } = parseWhereField(key); + const { fieldName, operator } = parseWhereField(key); - const filterOperator = operator ?? "EQ"; if (fieldName === "count") { + if (!operator) { + return Object.entries(value).map(([key, value]) => { + const operator = this.parseGenericOperator(key); + + return new CountFilter({ + operator: operator, + comparisonValue: value, + }); + }); + } + const countFilter = new CountFilter({ - operator: filterOperator, - isNot, + operator: operator ?? "EQ", comparisonValue: value, }); return [countFilter]; @@ -707,18 +855,55 @@ export class FilterFactory { entity: ConcreteEntityAdapter | RelationshipAdapter | InterfaceEntityAdapter, relationship?: RelationshipAdapter ): Array { - const filters = Object.entries(where).map(([key, value]) => { + const filters = Object.entries(where).flatMap(([key, value]) => { if (isLogicalOperator(key)) { - return this.createAggregateLogicalFilter(key, value, entity, relationship); + const filters = asArray(value).flatMap((nestedWhere) => { + return this.createAggregationNodeFilters(nestedWhere, entity, relationship); + }); + return new LogicalFilter({ + operation: key, + filters, + }); } // NOTE: if aggregationOperator is undefined, maybe we could return a normal PropertyFilter instead const { fieldName, logicalOperator, aggregationOperator } = parseAggregationWhereFields(key); const attr = entity.findAttribute(fieldName); - if (!attr) throw new Error(`Attribute ${fieldName} not found`); - + if (!attr) { + throw new Error(`Attribute ${fieldName} not found`); + } const attachedTo = entity instanceof RelationshipAdapter ? "relationship" : "node"; + if (!aggregationOperator) { + const filters = Object.entries(value).flatMap(([aggregationOperator, value]) => { + const parsedAggregationOperation = this.parseGenericAggregationOperator(aggregationOperator); + + // NOTE: this part is duplicate of the code used for non-generic operators + return Object.entries(value as Record).map(([operator, value]) => { + const parsedOperator = this.parseGenericOperatorForAggregation(operator); + if (attr.typeHelper.isDuration()) { + return new AggregationDurationFilter({ + attribute: attr, + comparisonValue: value, + logicalOperator: parsedOperator || "EQUAL", + aggregationOperator: parsedAggregationOperation, + attachedTo, + }); + } + + return new AggregationPropertyFilter({ + attribute: attr, + relationship, + comparisonValue: value, + logicalOperator: parsedOperator || "EQUAL", + aggregationOperator: parsedAggregationOperation, + attachedTo, + }); + }); + }); + return this.wrapMultipleFiltersInLogical(filters); + } + if (attr.typeHelper.isDuration()) { return new AggregationDurationFilter({ attribute: attr, @@ -743,7 +928,7 @@ export class FilterFactory { } /** Returns an array of 0 or 1 elements with the filters wrapped using a logical operator if needed */ - private wrapMultipleFiltersInLogical( + protected wrapMultipleFiltersInLogical( filters: F[], logicalOp: "AND" | "OR" | "XOR" = "AND" ): [F | LogicalFilter] | [] { @@ -763,21 +948,6 @@ export class FilterFactory { return []; } - private createAggregateLogicalFilter( - operation: "OR" | "AND" | "NOT", - where: GraphQLWhereArg[] | GraphQLWhereArg, - entity: ConcreteEntityAdapter | RelationshipAdapter | InterfaceEntityAdapter, - relationship?: RelationshipAdapter - ): LogicalFilter { - const filters = asArray(where).flatMap((nestedWhere) => { - return this.createAggregationNodeFilters(nestedWhere, entity, relationship); - }); - return new LogicalFilter({ - operation, - filters, - }); - } - // This method identifies if it's possible to achieve MATCH (n)-[r]->(m) WHERE m:Movie Or m:Series rather than MATCH (n)-[r]->(m:Movie) Or MATCH (n)-[r]->(m:Series) // When filters contain a nested relationship filter this is no longer achievable as the relationship definition is not shared between each concrete entity. // For context check TCK test packages/graphql/tests/tck/issues/2709.test.ts --> "should not use a node label so it covers all nodes implementing the interface for connection rel". @@ -786,7 +956,7 @@ export class FilterFactory { entity: InterfaceEntityAdapter ): boolean { if (where.node) { - const containsUnoptimizableFields = Object.keys(where.node).some((field) => { + const containsUnOptimizableFields = Object.keys(where.node).some((field) => { const { fieldName, isAggregate, isConnection } = parseWhereField(field); if (isAggregate || isConnection) { return true; @@ -797,8 +967,53 @@ export class FilterFactory { } return false; }); - return !containsUnoptimizableFields; + return !containsUnOptimizableFields; } return true; } + + /** Converts new distance operator into traditional operator **/ + private desugarGenericDistanceOperations(distance: Record & { from: any }): Record { + const point = distance.from; + const targetPoint: Record = {}; + + // eslint-disable-next-line prefer-const + for (let [key, value] of Object.entries(distance)) { + if (key !== "from") { + // We need this fake operator to differentiate distance from point eq in the + // desugaring process. Not needed in other operators because they are always distance based + if (key === "eq") { + key = "distance_eq"; + } + targetPoint[key] = { + distance: value, + point, + }; + } + } + return targetPoint; + } + + private parseGenericAggregationOperator(key: string): AggregationOperator { + // we convert them to the previous format to keep the same translation logic + switch (key) { + case "averageLength": + case "average": + return "AVERAGE"; + case "shortestLength": + case "shortest": + return "SHORTEST"; + case "longestLength": + case "longest": + return "LONGEST"; + case "min": + return "MIN"; + case "max": + return "MAX"; + case "sum": + return "SUM"; + default: + throw new Error(`Invalid aggregation operator ${key}`); + } + } } 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 dd68c2dab7..7893b0b115 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,20 +17,19 @@ * 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; }; - +// This regex is only valid for the non generic operators const whereRegEx = - /(?\w*\.)?(?[_A-Za-z]\w*?)(?Connection)?(?Aggregate)?(?:_(?NOT|NOT_IN|IN|NOT_INCLUDES|INCLUDES|MATCHES|NOT_CONTAINS|CONTAINS|NOT_STARTS_WITH|STARTS_WITH|NOT_ENDS_WITH|ENDS_WITH|EQ|LT|LTE|GT|GTE|DISTANCE|ALL|NONE|SINGLE|SOME))?$/; + /(?\w*\.)?(?[_A-Za-z]\w*?)(?Connection)?(?Aggregate)?(?:_(?IN|INCLUDES|MATCHES|CONTAINS|STARTS_WITH|ENDS_WITH|EQ|LT|LTE|GT|GTE|DISTANCE|ALL|NONE|SINGLE|SOME))?$/; export function parseWhereField(field: string): WhereRegexGroups { const match = whereRegEx.exec(field); @@ -43,48 +42,17 @@ 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; - } - } + const operator = match?.groups?.operator as FilterOperator | undefined; 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))?$/; diff --git a/packages/graphql/src/translate/utils/get-mutation-field-statements.ts b/packages/graphql/src/translate/utils/get-mutation-field-statements.ts index e2f2355a76..4effb42d14 100644 --- a/packages/graphql/src/translate/utils/get-mutation-field-statements.ts +++ b/packages/graphql/src/translate/utils/get-mutation-field-statements.ts @@ -17,7 +17,7 @@ * limitations under the License. */ -import type { Node, Relationship } from "../../classes"; +import { Neo4jGraphQLError, type Node, type Relationship } from "../../classes"; import { SPATIAL_TYPES } from "../../constants"; import mapToDbProperty from "../../utils/map-to-db-property"; import { buildMathStatements, matchMathField, mathDescriptorBuilder } from "./math"; @@ -36,6 +36,7 @@ export function getMutationFieldStatements({ varName, value, withVars, + isUpdateOperation = false, }: { nodeOrRel: Node | Relationship; param: string; @@ -43,16 +44,29 @@ export function getMutationFieldStatements({ varName: string; value: any; withVars: string[]; + isUpdateOperation?: boolean; }): string { const strs: string[] = []; const { settableField, operator } = parseMutableField(nodeOrRel, key); + if (!operator && isUpdateOperation) { + const result = getMutationFieldStatementsForGenericOperator({ + nodeOrRel, + param, + key, + varName, + operations: value, + withVars, + }); + return result; + } + if (settableField) { const dbFieldName = mapToDbProperty(nodeOrRel, settableField.fieldName); if (settableField.typeMeta.required && value === null) { throw new Error(`Cannot set non-nullable field ${nodeOrRel.name}.${settableField.fieldName} to null`); } - switch (operator) { + switch (operator ?? "SET") { case "SET": { const isSpatial = SPATIAL_TYPES.includes(settableField.typeMeta.name); if (isSpatial) { @@ -100,3 +114,66 @@ export function getMutationFieldStatements({ } return strs.join("\n"); } + +// Converts generic operator into cypher statements using the deprecated syntax as intermediate step +function getMutationFieldStatementsForGenericOperator({ + nodeOrRel, + param, + key, + varName, + operations, + withVars, +}: { + nodeOrRel: Node | Relationship; + param: string; + key: string; + varName: string; + operations: any; + withVars: string[]; +}): string { + if (Object.entries(operations).length > 1) { + throw new Neo4jGraphQLError( + `Conflicting modification of field ${key}: ${Object.keys(operations) + .map((n) => `[[${n}]]`) + .join(", ")} on type ${nodeOrRel.name}` + ); + } + + return Object.entries(operations) + .map(([operator, value]) => { + return getMutationFieldStatements({ + nodeOrRel, + param: `${param}.${operator}`, + key: `${key}_${newOperatorToDeprecated(operator)}`, + varName, + withVars, + value, + }); + }) + .join("\n"); +} + +function newOperatorToDeprecated(op: string): string { + switch (op) { + case "set": + return "SET"; + case "increment": + return "INCREMENT"; + case "decrement": + return "DECREMENT"; + case "add": + return "ADD"; + case "subtract": + return "SUBTRACT"; + case "divide": + return "DIVIDE"; + case "multiply": + return "MULTIPLY"; + case "push": + return "PUSH"; + case "pop": + return "POP"; + default: + throw new Error(`Unknown generic mutation operator ${op}`); + } +} diff --git a/packages/graphql/src/translate/utils/parse-mutable-field.ts b/packages/graphql/src/translate/utils/parse-mutable-field.ts index 6242633866..0501ed8134 100644 --- a/packages/graphql/src/translate/utils/parse-mutable-field.ts +++ b/packages/graphql/src/translate/utils/parse-mutable-field.ts @@ -25,12 +25,12 @@ import { parseMutationField } from "../queryAST/factory/parsers/parse-mutation-f export function parseMutableField( nodeOrRel: Node | Relationship, key: string -): { settableField: MutableField; operator: MutationOperator } { +): { settableField: MutableField; operator: MutationOperator | undefined } { const { fieldName, operator } = parseMutationField(key); const field = nodeOrRel.mutableFields.find((x) => x.fieldName === fieldName); if (field) { - return { settableField: field, operator: operator ?? "SET" }; + return { settableField: field, operator: operator }; } throw new Error(`Transpile error: field ${key} not found`); diff --git a/packages/graphql/src/types/index.ts b/packages/graphql/src/types/index.ts index f4bb39ebbe..2bf76fdb7a 100644 --- a/packages/graphql/src/types/index.ts +++ b/packages/graphql/src/types/index.ts @@ -446,7 +446,13 @@ export type Neo4jFeaturesSettings = { * * NOTE: this will not remove user defined deprecated fields **/ - excludeDeprecatedFields?: Record; + + excludeDeprecatedFields?: { + mutationOperations?: boolean; + aggregationFilters?: boolean; + relationshipFilters?: boolean; + attributeFilters?: boolean; + }; vector?: Neo4jVectorSettings; limitRequired?: boolean; complexityEstimators?: boolean; diff --git a/packages/graphql/tests/e2e/subscriptions/authorization/global-authentication.e2e.test.ts b/packages/graphql/tests/e2e/subscriptions/authorization/global-authentication.e2e.test.ts index 1d34f822ed..4259a81c61 100644 --- a/packages/graphql/tests/e2e/subscriptions/authorization/global-authentication.e2e.test.ts +++ b/packages/graphql/tests/e2e/subscriptions/authorization/global-authentication.e2e.test.ts @@ -31,7 +31,7 @@ describe("Subscription global authentication", () => { const secret = "secret"; const typeMovie = testHelper.createUniqueType("Movie"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${typeMovie} @node { title: String! } @@ -80,7 +80,7 @@ describe("Subscription global authentication", () => { test("global authentication for wsClient", async () => { wsClient = new WebSocketTestClient(server.wsPath); - await wsClient.subscribe(` + await wsClient.subscribe(/* GraphQL */ ` subscription { ${typeMovie.operations.subscribe.created} { ${typeMovie.operations.subscribe.payload.created} { @@ -100,7 +100,7 @@ describe("Subscription global authentication", () => { test("global authentication for supertest client", async () => { wsClient = new WebSocketTestClient(server.wsPath, jwtToken); - await wsClient.subscribe(` + await wsClient.subscribe(/* GraphQL */ ` subscription { ${typeMovie.operations.subscribe.created} { ${typeMovie.operations.subscribe.payload.created} { @@ -155,7 +155,7 @@ describe("Subscription global authentication", () => { test("global authentication for wsClient", async () => { wsClient = new WebSocketTestClient(server.wsPath, "Bearer xxx.invalidtoken.xxx"); - await wsClient.subscribe(` + await wsClient.subscribe(/* GraphQL */ ` subscription { ${typeMovie.operations.subscribe.created} { ${typeMovie.operations.subscribe.payload.created} { @@ -175,7 +175,7 @@ describe("Subscription global authentication", () => { test("global authentication for supertest client", async () => { wsClient = new WebSocketTestClient(server.wsPath, jwtToken); - await wsClient.subscribe(` + await wsClient.subscribe(/* GraphQL */ ` subscription { ${typeMovie.operations.subscribe.created} { ${typeMovie.operations.subscribe.payload.created} { @@ -230,7 +230,7 @@ describe("Subscription global authentication", () => { test("global authentication wsClient and supertest client", async () => { wsClient = new WebSocketTestClient(server.wsPath, jwtToken); - await wsClient.subscribe(` + await wsClient.subscribe(/* GraphQL */ ` subscription { ${typeMovie.operations.subscribe.created} { ${typeMovie.operations.subscribe.payload.created} { @@ -266,7 +266,7 @@ describe("Subscription global authentication", () => { .post("") .set("authorization", clientJwtToken) .send({ - query: ` + query: /* GraphQL */ ` mutation { ${typeMovie.operations.create}(input: [{ title: "${title}" }]) { ${typeMovie.plural} { diff --git a/packages/graphql/tests/integration/aggregations/top-level/alias.int.test.ts b/packages/graphql/tests/integration/aggregations/top-level/alias.int.test.ts index a8367a9959..d22ba73ef5 100644 --- a/packages/graphql/tests/integration/aggregations/top-level/alias.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/top-level/alias.int.test.ts @@ -69,10 +69,6 @@ describe("aggregations-top_level-alias", () => { { ${typeMovie.operations.aggregate}(where: { testString_EQ: "${testString}" }) { _count: count - _id: id { - _shortest: shortest - _longest: longest - } _title: title { _shortest: shortest _longest: longest @@ -96,10 +92,6 @@ describe("aggregations-top_level-alias", () => { expect((gqlResult.data as any)[typeMovie.operations.aggregate]).toEqual({ _count: 4, - _id: { - _shortest: "1", - _longest: "4444", - }, _title: { _shortest: "1", _longest: "4444", diff --git a/packages/graphql/tests/integration/aggregations/top-level/authorization.int.test.ts b/packages/graphql/tests/integration/aggregations/top-level/authorization.int.test.ts index 39fcf7bd52..8caa5ae18c 100644 --- a/packages/graphql/tests/integration/aggregations/top-level/authorization.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/top-level/authorization.int.test.ts @@ -183,60 +183,6 @@ describe("aggregations-top_level authorization", () => { expect((gqlResult.errors as any[])[0].message).toBe("Forbidden"); }); - test("should throw when invalid allow when aggregating a ID field", async () => { - const typeDefs = /* GraphQL */ ` - type Movie @node { - id: ID - director: [Person!]! @relationship(type: "DIRECTED", direction: IN) - someId: ID - @authorization( - validate: [{ when: BEFORE, where: { node: { director_SINGLE: { id_EQ: "$jwt.sub" } } } }] - ) - } - - type Person @node { - id: ID - } - `; - - const movieId = generate({ - charset: "alphabetic", - }); - - const userId = generate({ - charset: "alphabetic", - }); - - const query = ` - { - moviesAggregate(where: {id_EQ: "${movieId}"}) { - someId { - shortest - longest - } - } - } - `; - - await testHelper.initNeo4jGraphQL({ - typeDefs, - features: { - authorization: { - key: secret, - }, - }, - }); - - await testHelper.executeCypher(` - CREATE (:Person {id: "${userId}"})-[:DIRECTED]->(:Movie {id: "${movieId}", someId: "some-random-string"}) - `); - - const token = createBearerToken(secret, { sub: "invalid" }); - - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); - - expect((gqlResult.errors as any[])[0].message).toBe("Forbidden"); - }); test("should throw when invalid allow when aggregating a String field", async () => { const typeDefs = /* GraphQL */ ` diff --git a/packages/graphql/tests/integration/aggregations/top-level/id.int.test.ts b/packages/graphql/tests/integration/aggregations/top-level/id.int.test.ts deleted file mode 100644 index c7c2fe3063..0000000000 --- a/packages/graphql/tests/integration/aggregations/top-level/id.int.test.ts +++ /dev/null @@ -1,174 +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 { generate } from "randomstring"; -import type { UniqueType } from "../../../utils/graphql-types"; -import { TestHelper } from "../../../utils/tests-helper"; - -describe("aggregations-top_level-id", () => { - const testHelper = new TestHelper(); - let Movie: UniqueType; - - beforeEach(async () => { - Movie = testHelper.createUniqueType("Movie"); - const typeDefs = ` - type ${Movie} @node { - testId: ID - id: ID - } - `; - - await testHelper.initNeo4jGraphQL({ typeDefs }); - }); - - afterEach(async () => { - await testHelper.close(); - }); - - test("should return the shortest of node properties", async () => { - const id = generate({ - charset: "alphabetic", - readable: true, - }); - - await testHelper.executeCypher( - ` - CREATE (:${Movie} {testId: $id, id: "1"}) - CREATE (:${Movie} {testId: $id, id: "22"}) - CREATE (:${Movie} {testId: $id, id: "333"}) - CREATE (:${Movie} {testId: $id, id: "4444"}) - `, - { - id, - } - ); - - const query = ` - { - ${Movie.operations.aggregate}(where: {testId_EQ: "${id}"}) { - id { - shortest - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - if (gqlResult.errors) { - console.log(JSON.stringify(gqlResult.errors, null, 2)); - } - - expect(gqlResult.errors).toBeUndefined(); - - expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ - id: { - shortest: "1", - }, - }); - }); - - test("should return the longest of node properties", async () => { - const id = generate({ - charset: "alphabetic", - readable: true, - }); - - await testHelper.executeCypher( - ` - CREATE (:${Movie} {testId: $id, id: "1"}) - CREATE (:${Movie} {testId: $id, id: "22"}) - CREATE (:${Movie} {testId: $id, id: "333"}) - CREATE (:${Movie} {testId: $id, id: "4444"}) - `, - { - id, - } - ); - - const query = ` - { - ${Movie.operations.aggregate}(where: {testId_EQ: "${id}"}) { - id { - longest - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - if (gqlResult.errors) { - console.log(JSON.stringify(gqlResult.errors, null, 2)); - } - - expect(gqlResult.errors).toBeUndefined(); - - expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ - id: { - longest: "4444", - }, - }); - }); - - test("should return the shortest and longest of node properties", async () => { - const id = generate({ - charset: "alphabetic", - readable: true, - }); - - await testHelper.executeCypher( - ` - CREATE (:${Movie} {testId: $id, id: "1"}) - CREATE (:${Movie} {testId: $id, id: "22"}) - CREATE (:${Movie} {testId: $id, id: "333"}) - CREATE (:${Movie} {testId: $id, id: "4444"}) - `, - { - id, - } - ); - - const query = ` - { - ${Movie.operations.aggregate}(where: {testId_EQ: "${id}"}) { - id { - shortest - longest - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - if (gqlResult.errors) { - console.log(JSON.stringify(gqlResult.errors, null, 2)); - } - - expect(gqlResult.errors).toBeUndefined(); - - expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ - id: { - shortest: "1", - longest: "4444", - }, - }); - }); -}); diff --git a/packages/graphql/tests/integration/aggregations/top-level/many.int.test.ts b/packages/graphql/tests/integration/aggregations/top-level/many.int.test.ts index 547b379cde..66509be954 100644 --- a/packages/graphql/tests/integration/aggregations/top-level/many.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/top-level/many.int.test.ts @@ -68,10 +68,6 @@ describe("aggregations-top_level-many", () => { const query = ` { ${typeMovie.operations.aggregate}(where: { testId_EQ: "${testId}" }) { - id { - shortest - longest - } title { shortest longest @@ -98,10 +94,6 @@ describe("aggregations-top_level-many", () => { expect(gqlResult.errors).toBeUndefined(); expect((gqlResult.data as any)[typeMovie.operations.aggregate]).toEqual({ - id: { - shortest: "1", - longest: "4444", - }, title: { shortest: "1", longest: "4444", diff --git a/packages/graphql/tests/integration/aggregations/where/AND-OR-operations.int.test.ts b/packages/graphql/tests/integration/aggregations/where/AND-OR-operations.int.test.ts index d74146234d..4925f4df03 100644 --- a/packages/graphql/tests/integration/aggregations/where/AND-OR-operations.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/where/AND-OR-operations.int.test.ts @@ -79,9 +79,9 @@ describe("Nested within AND/OR", () => { query { ${postType.plural}(where: { likesAggregate: { - count_EQ: 3 + count: { eq: 3 } node: { - testString_SHORTEST_LENGTH_EQUAL: 3 + testString: { shortestLength: { eq: 3 } } } } }) { @@ -108,10 +108,10 @@ describe("Nested within AND/OR", () => { ${postType.plural}(where: { likesAggregate: { OR: [ - { count_EQ: 3 } + { count: {eq: 3 } } { node: { - testString_SHORTEST_LENGTH_EQUAL: 3 + testString: { shortestLength: { eq: 3 } } } } ] @@ -149,10 +149,10 @@ describe("Nested within AND/OR", () => { ${postType.plural}(where: { likesAggregate: { AND: [ - { count_EQ: 3 } + { count: { eq: 3 } } { node: { - testString_SHORTEST_LENGTH_EQUAL: 3 + testString: {shortestLength: {eq: 3} } } } ] @@ -181,17 +181,17 @@ describe("Nested within AND/OR", () => { ${postType.plural}(where: { likesAggregate: { AND: [ - { count_LTE: 2 } + { count: { lte: 2 } } { AND: [ { node: { - testString_SHORTEST_LENGTH_LT: 4 + testString: {shortestLength: {lt: 4} } } } { node: { - testString_SHORTEST_LENGTH_GT: 2 + testString: {shortestLength: { gt: 2 } } } } ] @@ -230,12 +230,12 @@ describe("Nested within AND/OR", () => { AND: [ { node: { - NOT: { testString_SHORTEST_LENGTH_GT: 4 } + NOT: { testString: {shortestLength: { gt: 4 } } } } } { node: { - testString_SHORTEST_LENGTH_GT: 2 + testString: {shortestLength: { gt: 2 } } } } ] @@ -269,17 +269,17 @@ describe("Nested within AND/OR", () => { ${postType.plural}(where: { likesAggregate: { OR: [ - { count_LTE: 2 } + { count: { lte: 2 } } { OR: [ { node: { - testString_SHORTEST_LENGTH_LT: 4 + testString: {shortestLength: {lt: 4} } } } { node: { - testString_SHORTEST_LENGTH_GT: 20 + testString: {shortestLength: { gt: 20 } } } } ] @@ -319,17 +319,17 @@ describe("Nested within AND/OR", () => { ${postType.plural}(where: { likesAggregate: { AND: [ - { count_LTE: 2 } + { count: { lte: 2 } } { OR: [ { node: { - testString_SHORTEST_LENGTH_LT: 4 + testString: {shortestLength: {lt: 4} } } } { node: { - testString_SHORTEST_LENGTH_GT: 20 + testString: {shortestLength: { gt: 20 } } } } ] @@ -368,12 +368,12 @@ describe("Nested within AND/OR", () => { OR: [ { node: { - NOT: { testString_SHORTEST_LENGTH_GT: 4 } + NOT: { testString: {shortestLength: { gt: 4 } } } } } { node: { - testString_SHORTEST_LENGTH_GT: 20 + testString: {shortestLength: { gt: 20 } } } } ] @@ -412,12 +412,12 @@ describe("Nested within AND/OR", () => { AND: [ { node: { - testString_SHORTEST_LENGTH_LT: 4 + testString: {shortestLength: {lt: 4} } } } { node: { - testString_SHORTEST_LENGTH_GT: 2 + testString: {shortestLength: { gt: 2 } } } } ] diff --git a/packages/graphql/tests/integration/aggregations/where/count.int.test.ts b/packages/graphql/tests/integration/aggregations/where/count.int.test.ts index 9e38469720..31ea26d993 100644 --- a/packages/graphql/tests/integration/aggregations/where/count.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/where/count.int.test.ts @@ -62,7 +62,7 @@ describe("aggregations-where-count", () => { const query = /* GraphQL */ ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count_EQ: 1 } }) { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count: {eq: 1 } } }) { testString likes { testString @@ -102,7 +102,7 @@ describe("aggregations-where-count", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count_LT: 1 } }) { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count: { lt: 1 } } }) { testString likes { testString @@ -142,7 +142,7 @@ describe("aggregations-where-count", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count_LTE: 1 } }) { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count: { lte: 1 } } }) { testString likes { testString @@ -187,7 +187,7 @@ describe("aggregations-where-count", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count_GT: 1 } }) { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count: { gt: 1 } } }) { testString likes { testString @@ -227,7 +227,7 @@ describe("aggregations-where-count", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count_GTE: 1 } }) { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count: { gte: 1 } } }) { testString likes { testString @@ -305,7 +305,7 @@ describe("aggregations-where-count interface relationships of concrete types", const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count_EQ: 1 } }) { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count: {eq: 1 } } }) { testString likes { testString @@ -345,7 +345,7 @@ describe("aggregations-where-count interface relationships of concrete types", const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count_LT: 1 } }) { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count: { lt: 1 } } }) { testString likes { testString @@ -385,7 +385,7 @@ describe("aggregations-where-count interface relationships of concrete types", const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count_LTE: 1 } }) { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count: { lte: 1 } } }) { testString likes { testString @@ -430,7 +430,7 @@ describe("aggregations-where-count interface relationships of concrete types", const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count_GT: 1 } }) { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count: { gt: 1 } } }) { testString likes { testString @@ -470,7 +470,7 @@ describe("aggregations-where-count interface relationships of concrete types", const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count_GTE: 1 } }) { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count: { gte: 1 } } }) { testString likes { testString diff --git a/packages/graphql/tests/integration/aggregations/where/edge/int.int.test.ts b/packages/graphql/tests/integration/aggregations/where/edge/int.int.test.ts index 95d3b907a3..c6cec2d414 100644 --- a/packages/graphql/tests/integration/aggregations/where/edge/int.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/where/edge/int.int.test.ts @@ -76,7 +76,7 @@ describe("aggregations-where-edge-int", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { someInt_AVERAGE_EQUAL: ${avg} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}" }, likesAggregate: { edge: { someInt: { average: { eq: ${avg} } } } } }) { testString likes { testString @@ -115,7 +115,7 @@ describe("aggregations-where-edge-int", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { someInt_AVERAGE_GT: ${avgGT} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}" }, likesAggregate: { edge: { someInt: {average: {gt: ${avgGT} } } } } }) { testString likes { testString @@ -153,7 +153,7 @@ describe("aggregations-where-edge-int", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { someInt_AVERAGE_GTE: ${avg} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}" }, likesAggregate: { edge: { someInt: {average: {gte: ${avg} } } } } }) { testString likes { testString @@ -191,7 +191,7 @@ describe("aggregations-where-edge-int", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { someInt_AVERAGE_LT: ${avgLT} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}" }, likesAggregate: { edge: { someInt: {average: {lt: ${avgLT} } } } } }) { testString likes { testString @@ -229,7 +229,7 @@ describe("aggregations-where-edge-int", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { someInt_AVERAGE_LTE: ${avg} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}" }, likesAggregate: { edge: { someInt: {average: {lte: ${avg} } } } } }) { testString likes { testString @@ -273,7 +273,7 @@ describe("aggregations-where-edge-int", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { someInt_SUM_EQUAL: ${sum} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}" }, likesAggregate: { edge: { someInt: {sum: {eq: ${sum} } } } } }) { testString likes { testString diff --git a/packages/graphql/tests/integration/aggregations/where/edge/string.int.test.ts b/packages/graphql/tests/integration/aggregations/where/edge/string.int.test.ts index 044c4c1b30..ff67c25a6f 100644 --- a/packages/graphql/tests/integration/aggregations/where/edge/string.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/where/edge/string.int.test.ts @@ -86,7 +86,7 @@ describe("aggregations-where-edge-string", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_SHORTEST_LENGTH_EQUAL: ${shortestTestString.length} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}" }, likesAggregate: { edge: { testString: { shortestLength: { eq: ${shortestTestString.length} } } } } }) { testString likes { testString @@ -145,7 +145,7 @@ describe("aggregations-where-edge-string", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_LONGEST_LENGTH_EQUAL: ${longestTestString.length} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}" }, likesAggregate: { edge: { testString: { longestLength: {eq: ${longestTestString.length} } } } }}) { testString likes { testString @@ -209,7 +209,7 @@ describe("aggregations-where-edge-string", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_AVERAGE_LENGTH_EQUAL: ${avg} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}" }, likesAggregate: { edge: { testString: { averageLength: {eq: ${avg} } } } } }) { testString likes { testString @@ -270,7 +270,7 @@ describe("aggregations-where-edge-string", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_AVERAGE_LENGTH_GT: ${avgGT} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}" }, likesAggregate: { edge: { testString: { averageLength: { gt: ${avgGT} } } } } }) { testString likes { testString @@ -330,7 +330,7 @@ describe("aggregations-where-edge-string", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_AVERAGE_LENGTH_GTE: ${avg} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}" }, likesAggregate: { edge: { testString: {averageLength: { gte: ${avg} } } } } }) { testString likes { testString @@ -391,7 +391,7 @@ describe("aggregations-where-edge-string", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_AVERAGE_LENGTH_LT: ${avgLT} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}" }, likesAggregate: { edge: { testString: { averageLength: { lt: ${avgLT} } } } } }) { testString likes { testString @@ -451,7 +451,7 @@ describe("aggregations-where-edge-string", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_AVERAGE_LENGTH_LTE: ${avg} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}" }, likesAggregate: { edge: { testString: { averageLength: { lte: ${avg} } } } } }) { testString likes { testString @@ -550,7 +550,7 @@ describe("aggregations-where-edge-string interface relationships of concrete typ const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_SHORTEST_LENGTH_EQUAL: ${shortestTestString.length} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}" }, likesAggregate: { edge: { testString_SHORTEST_LENGTH_EQUAL: ${shortestTestString.length} } } }) { testString likes { testString @@ -575,44 +575,41 @@ describe("aggregations-where-edge-string interface relationships of concrete typ ]); }); - - test( - "should return posts where the LONGEST edge like String is EQUAL to", - async () => { - const testString = generate({ - charset: "alphabetic", - readable: true, - }); - - const shortestTestString = generate({ - charset: "alphabetic", - readable: true, - length: 10, - }); - - const testString2 = generate({ - charset: "alphabetic", - readable: true, - length: 11, - }); - - const longestTestString = generate({ - charset: "alphabetic", - readable: true, - length: 12, - }); - - await testHelper.executeCypher( - ` + test("should return posts where the LONGEST edge like String is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const shortestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const longestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + await testHelper.executeCypher( + ` CREATE (:${Post} {testString: "${testString}"})<-[:LIKES { testString: "${shortestTestString}" }]-(:${User} {testString: "${shortestTestString}"}) CREATE (:${Post} {testString: "${testString}"})<-[:LIKES { testString: "${testString2}" }]-(:${User} {testString: "${testString2}"}) CREATE (:${Post} {testString: "${testString}"})<-[:LIKES { testString: "${longestTestString}" }]-(:${User} {testString: "${longestTestString}"}) ` - ); + ); - const query = ` + const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_LONGEST_LENGTH_EQUAL: ${longestTestString.length} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}" }, likesAggregate: { edge: { testString_LONGEST_LENGTH_EQUAL: ${longestTestString.length} } } }) { testString likes { testString @@ -621,66 +618,62 @@ describe("aggregations-where-edge-string interface relationships of concrete typ } `; - const gqlResult = await testHelper.executeGraphQL(query); - - if (gqlResult.errors) { - console.log(JSON.stringify(gqlResult.errors, null, 2)); - } + const gqlResult = await testHelper.executeGraphQL(query); - expect(gqlResult.errors).toBeUndefined(); + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } - expect((gqlResult.data as any)[Post.plural]).toEqual([ - { - testString, - likes: [{ testString: longestTestString }], - }, - ]); - } - ); + expect(gqlResult.errors).toBeUndefined(); + expect((gqlResult.data as any)[Post.plural]).toEqual([ + { + testString, + likes: [{ testString: longestTestString }], + }, + ]); + }); describe("AVERAGE", () => { - test( - "should return posts where the %s of edge like Strings is EQUAL to", - async () => { - const testString = generate({ - charset: "alphabetic", - readable: true, - }); - - const testString1 = generate({ - charset: "alphabetic", - readable: true, - length: 10, - }); - - const testString2 = generate({ - charset: "alphabetic", - readable: true, - length: 11, - }); - - const testString3 = generate({ - charset: "alphabetic", - readable: true, - length: 12, - }); - - const avg = (10 + 11 + 12) / 3; - - await testHelper.executeCypher( - ` + test("should return posts where the %s of edge like Strings is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + + await testHelper.executeCypher( + ` CREATE (p:${Post} {testString: "${testString}"}) CREATE(p)<-[:LIKES { testString: "${testString1}" }]-(:${User} {testString: "${testString}"}) CREATE(p)<-[:LIKES { testString: "${testString2}" }]-(:${User} {testString: "${testString}"}) CREATE(p)<-[:LIKES { testString: "${testString3}" }]-(:${User} {testString: "${testString}"}) CREATE (:${Post} {testString: "${testString}"}) ` - ); + ); - const query = ` + const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_AVERAGE_LENGTH_EQUAL: ${avg} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}" }, likesAggregate: { edge: { testString: { averageLength: { eq: ${avg} } } } } }) { testString likes { testString @@ -689,19 +682,18 @@ describe("aggregations-where-edge-string interface relationships of concrete typ } `; - const gqlResult = await testHelper.executeGraphQL(query); + const gqlResult = await testHelper.executeGraphQL(query); - if (gqlResult.errors) { - console.log(JSON.stringify(gqlResult.errors, null, 2)); - } + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } - expect(gqlResult.errors).toBeUndefined(); + expect(gqlResult.errors).toBeUndefined(); - const [post] = (gqlResult.data as any)[Post.plural] as any[]; - expect(post.testString).toEqual(testString); - expect(post.likes).toHaveLength(3); - } - ); + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); test("should return posts where the average of edge like Strings is GT than", async () => { const testString = generate({ @@ -742,7 +734,7 @@ describe("aggregations-where-edge-string interface relationships of concrete typ const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_AVERAGE_LENGTH_GT: ${avgGT} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}" }, likesAggregate: { edge: { testString: { averageLength: { gt: ${avgGT} } } } } }) { testString likes { testString @@ -802,7 +794,7 @@ describe("aggregations-where-edge-string interface relationships of concrete typ const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_AVERAGE_LENGTH_GTE: ${avg} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}" }, likesAggregate: { edge: { testString: { averageLength: { gte: ${avg} } } } } }) { testString likes { testString @@ -863,7 +855,7 @@ describe("aggregations-where-edge-string interface relationships of concrete typ const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_AVERAGE_LENGTH_LT: ${avgLT} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}" }, likesAggregate: { edge: { testString: { averageLength: { lt: ${avgLT} } } } } }) { testString likes { testString @@ -923,7 +915,7 @@ describe("aggregations-where-edge-string interface relationships of concrete typ const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_AVERAGE_LENGTH_LTE: ${avg} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}" }, likesAggregate: { edge: { testString: { averageLength: { lte: ${avg} } } } } }) { testString likes { testString diff --git a/packages/graphql/tests/integration/aggregations/where/node/int-connections.int.test.ts b/packages/graphql/tests/integration/aggregations/where/node/int-connections.int.test.ts index 3ba3b497d9..c95e49df22 100644 --- a/packages/graphql/tests/integration/aggregations/where/node/int-connections.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/where/node/int-connections.int.test.ts @@ -73,7 +73,7 @@ describe("aggregations-where-node-int - connections", () => { const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_EQUAL: ${avg} } } }) { + ${Post.operations.connection}(where: { testString: {eq: "${testString}"}, likesAggregate: { node: { someInt: { average: { eq: ${avg} } } } } }) { edges { node { testString @@ -117,7 +117,7 @@ describe("aggregations-where-node-int - connections", () => { const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_GT: ${avgGT} } } }) { + ${Post.operations.connection}(where: { testString: {eq: "${testString}"}, likesAggregate: { node: { someInt: { average: { gt: ${avgGT} } } } } }) { edges { node { testString @@ -160,7 +160,7 @@ describe("aggregations-where-node-int - connections", () => { const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_GTE: ${avg} } } }) { + ${Post.operations.connection}(where: { testString: {eq: "${testString}"}, likesAggregate: { node: { someInt: { average: { gte: ${avg} } } } } }) { edges { node { testString @@ -204,7 +204,7 @@ describe("aggregations-where-node-int - connections", () => { const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_LT: ${avgLT} } } }) { + ${Post.operations.connection}(where: { testString: {eq: "${testString}"}, likesAggregate: { node: { someInt: { average: { lt: ${avgLT} } } } } }) { edges { node { testString @@ -247,7 +247,7 @@ describe("aggregations-where-node-int - connections", () => { const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_LTE: ${avg} } } }) { + ${Post.operations.connection}(where: { testString: {eq: "${testString}"}, likesAggregate: { node: { someInt: { average: { lte: ${avg} } } } } }) { edges { node { testString @@ -296,7 +296,7 @@ describe("aggregations-where-node-int - connections", () => { const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_SUM_EQUAL: ${sum} } } }) { + ${Post.operations.connection}(where: { testString: {eq: "${testString}"}, likesAggregate: { node: { someInt: { sum: {eq: ${sum} } } } } }) { edges { node { testString @@ -385,7 +385,7 @@ describe("aggregations-where-node-int - connections - interface relationships of const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_EQUAL: ${avg} } } }) { + ${Post.operations.connection}(where: { testString: {eq: "${testString}"}, likesAggregate: { node: { someInt: { average: { eq: ${avg} } } } } }) { edges { node { testString @@ -429,7 +429,7 @@ describe("aggregations-where-node-int - connections - interface relationships of const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_GT: ${avgGT} } } }) { + ${Post.operations.connection}(where: { testString: {eq: "${testString}"}, likesAggregate: { node: { someInt: { average: { gt: ${avgGT} } } } } }) { edges { node { testString @@ -472,7 +472,7 @@ describe("aggregations-where-node-int - connections - interface relationships of const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_GTE: ${avg} } } }) { + ${Post.operations.connection}(where: { testString: {eq: "${testString}"}, likesAggregate: { node: { someInt: { average: { gte: ${avg} } } } } }) { edges { node { testString @@ -516,7 +516,7 @@ describe("aggregations-where-node-int - connections - interface relationships of const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_LT: ${avgLT} } } }) { + ${Post.operations.connection}(where: { testString: {eq: "${testString}"}, likesAggregate: { node: { someInt: { average: { lt: ${avgLT} } } } } }) { edges { node { testString @@ -559,7 +559,7 @@ describe("aggregations-where-node-int - connections - interface relationships of const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_LTE: ${avg} } } }) { + ${Post.operations.connection}(where: { testString: {eq: "${testString}"}, likesAggregate: { node: { someInt: { average: { lte: ${avg} } } } } }) { edges { node { testString @@ -608,7 +608,7 @@ describe("aggregations-where-node-int - connections - interface relationships of const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_SUM_EQUAL: ${sum} } } }) { + ${Post.operations.connection}(where: { testString: {eq: "${testString}"}, likesAggregate: { node: { someInt: { sum: {eq: ${sum} } } } } }) { edges { node { testString diff --git a/packages/graphql/tests/integration/aggregations/where/node/int.int.test.ts b/packages/graphql/tests/integration/aggregations/where/node/int.int.test.ts index fb7b3d20e4..22c815d56a 100644 --- a/packages/graphql/tests/integration/aggregations/where/node/int.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/where/node/int.int.test.ts @@ -85,7 +85,7 @@ describe("aggregations-where-node-int", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_EQUAL: ${avg} } } }) { + ${Post.plural}(where: { testString: {eq: "${testString}" }, likesAggregate: { node: { someInt: { average: {eq: ${avg} } } } } }) { testString likes { testString @@ -124,7 +124,7 @@ describe("aggregations-where-node-int", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_GT: ${avgGT} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}" }, likesAggregate: { node: { someInt: {average: { gt: ${avgGT} } } } } }) { testString likes { testString @@ -163,7 +163,7 @@ describe("aggregations-where-node-int", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_GTE: ${avg} } } }) { + ${Post.plural}(where: { testString: {eq: "${testString}"}, likesAggregate: { node: { someInt: { average: {gte: ${avg} } } } } }) { testString likes { testString @@ -203,7 +203,7 @@ describe("aggregations-where-node-int", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_LT: ${avgLT} } } }) { + ${Post.plural}(where: { testString: {eq: "${testString}"}, likesAggregate: { node: { someInt: {average: { lt: ${avgLT} } } } } }) { testString likes { testString @@ -242,7 +242,7 @@ describe("aggregations-where-node-int", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_LTE: ${avg} } } }) { + ${Post.plural}(where: { testString: {eq: "${testString}"}, likesAggregate: { node: { someInt: {average: { lte: ${avg} } } } } }) { testString likes { testString @@ -286,7 +286,7 @@ describe("aggregations-where-node-int", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_SUM_EQUAL: ${sum} } } }) { + ${Post.plural}(where: { testString: {eq:"${testString}"}, likesAggregate: { node: { someInt: {sum: {eq: ${sum} } } } } }) { testString likes { testString @@ -370,7 +370,7 @@ describe("aggregations-where-node-int interface relationships of concrete types" const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_EQUAL: ${avg} } } }) { + ${Post.plural}(where: { testString: {eq: "${testString}"}, likesAggregate: { node: { someInt: { average: {eq: ${avg} } } } } }) { testString likes { testString @@ -410,7 +410,7 @@ describe("aggregations-where-node-int interface relationships of concrete types" const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_GT: ${avgGT} } } }) { + ${Post.plural}(where: { testString: {eq: "${testString}" }, likesAggregate: { node: { someInt: {average: {gt: ${avgGT} } } } } }) { testString likes { testString @@ -449,7 +449,7 @@ describe("aggregations-where-node-int interface relationships of concrete types" const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_GTE: ${avg} } } }) { + ${Post.plural}(where: { testString: {eq: "${testString}" }, likesAggregate: { node: { someInt: {average: {gte: ${avg} } } } } }) { testString likes { testString @@ -489,7 +489,7 @@ describe("aggregations-where-node-int interface relationships of concrete types" const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_LT: ${avgLT} } } }) { + ${Post.plural}(where: { testString: {eq: "${testString}"}, likesAggregate: { node: { someInt: { average: { lt: ${avgLT} } } } } }) { testString likes { testString @@ -528,7 +528,7 @@ describe("aggregations-where-node-int interface relationships of concrete types" const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_LTE: ${avg} } } }) { + ${Post.plural}(where: { testString: {eq: "${testString}"}, likesAggregate: { node: { someInt: {average: {lte: ${avg} } } } } }) { testString likes { testString @@ -573,7 +573,7 @@ describe("aggregations-where-node-int interface relationships of concrete types" const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_SUM_EQUAL: ${sum} } } }) { + ${Post.plural}(where: { testString: {eq: "${testString}"}, likesAggregate: { node: { someInt: {sum: { eq: ${sum} } } } } }) { testString likes { testString diff --git a/packages/graphql/tests/integration/aggregations/where/node/string-connections.int.test.ts b/packages/graphql/tests/integration/aggregations/where/node/string-connections.int.test.ts index 11962c0a34..ff6757dbf8 100644 --- a/packages/graphql/tests/integration/aggregations/where/node/string-connections.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/where/node/string-connections.int.test.ts @@ -82,7 +82,7 @@ describe("aggregations-where-node-string - connections", () => { const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_SHORTEST_LENGTH_EQUAL: ${shortestTestString.length} } } }) { + ${Post.operations.connection}(where: { testString: { eq: "${testString}" }, likesAggregate: { node: { testString: { shortestLength: { eq: ${shortestTestString.length} } } } } }) { edges { node { testString @@ -149,7 +149,7 @@ describe("aggregations-where-node-string - connections", () => { const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_LONGEST_LENGTH_EQUAL: ${longestTestString.length} } } }) { + ${Post.operations.connection}(where: { testString: { eq: "${testString}" }, likesAggregate: { node: { testString: { longestLength: { eq: ${longestTestString.length} } } } } }) { edges { node { testString @@ -222,7 +222,7 @@ describe("aggregations-where-node-string - connections", () => { const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_EQUAL: ${avg} } } }) { + ${Post.operations.connection}(where: { testString: { eq: "${testString}" }, likesAggregate: { node: { testString: { averageLength: { eq: ${avg} } } } } }) { edges { node { testString @@ -288,7 +288,7 @@ describe("aggregations-where-node-string - connections", () => { const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_GT: ${avgGT} } } }) { + ${Post.operations.connection}(where: { testString: { eq: "${testString}" }, likesAggregate: { node: { testString: { averageLength: { gt: ${avgGT} } } } } }) { edges { node { testString @@ -353,7 +353,7 @@ describe("aggregations-where-node-string - connections", () => { const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_GTE: ${avg} } } }) { + ${Post.operations.connection}(where: { testString: { eq: "${testString}" }, likesAggregate: { node: { testString: { averageLength: { gte: ${avg} } } } } }) { edges { node { testString @@ -419,7 +419,7 @@ describe("aggregations-where-node-string - connections", () => { const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_LT: ${avgLT} } } }) { + ${Post.operations.connection}(where: { testString: { eq: "${testString}" }, likesAggregate: { node: { testString: { averageLength: { lt: ${avgLT} } } } } }) { edges { node { testString @@ -484,7 +484,7 @@ describe("aggregations-where-node-string - connections", () => { const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_LTE: ${avg} } } }) { + ${Post.operations.connection}(where: { testString: { eq: "${testString}" }, likesAggregate: { node: { testString: { averageLength: { lte: ${avg} } } } } }) { edges { node { testString @@ -583,7 +583,7 @@ describe("aggregations-where-node-string - connections - interface relationships const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_SHORTEST_LENGTH_EQUAL: ${shortestTestString.length} } } }) { + ${Post.operations.connection}(where: { testString: { eq: "${testString}" }, likesAggregate: { node: { testString: { shortestLength: { eq: ${shortestTestString.length} } } } } }) { edges { node { testString @@ -650,7 +650,7 @@ describe("aggregations-where-node-string - connections - interface relationships const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_LONGEST_LENGTH_EQUAL: ${longestTestString.length} } } }) { + ${Post.operations.connection}(where: { testString: { eq: "${testString}" }, likesAggregate: { node: { testString: { longestLength: { eq: ${longestTestString.length} } } } } }) { edges { node { testString @@ -723,7 +723,7 @@ describe("aggregations-where-node-string - connections - interface relationships const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_EQUAL: ${avg} } } }) { + ${Post.operations.connection}(where: { testString: { eq: "${testString}" }, likesAggregate: { node: { testString: { averageLength: { eq: ${avg} } } } } }) { edges { node { testString @@ -789,7 +789,7 @@ describe("aggregations-where-node-string - connections - interface relationships const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_GT: ${avgGT} } } }) { + ${Post.operations.connection}(where: { testString: { eq: "${testString}" }, likesAggregate: { node: { testString: { averageLength: { gt: ${avgGT} } } } } }) { edges { node { testString @@ -854,7 +854,7 @@ describe("aggregations-where-node-string - connections - interface relationships const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_GTE: ${avg} } } }) { + ${Post.operations.connection}(where: { testString: { eq: "${testString}" }, likesAggregate: { node: { testString: { averageLength: { gte: ${avg} } } } } }) { edges { node { testString @@ -920,7 +920,7 @@ describe("aggregations-where-node-string - connections - interface relationships const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_LT: ${avgLT} } } }) { + ${Post.operations.connection}(where: { testString: { eq: "${testString}" }, likesAggregate: { node: { testString: { averageLength: { lt: ${avgLT} } } } } }) { edges { node { testString @@ -985,7 +985,7 @@ describe("aggregations-where-node-string - connections - interface relationships const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_LTE: ${avg} } } }) { + ${Post.operations.connection}(where: { testString: { eq: "${testString}" }, likesAggregate: { node: { testString: { averageLength: { lte: ${avg} } } } } }) { edges { node { testString @@ -1089,7 +1089,7 @@ describe("aggregations-where-node-string - connections - relationships of interf const query = ` { - ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_SHORTEST_LENGTH_EQUAL: ${shortestTestString.length} } } }) { + ${Post.operations.connection}(where: { testString: { eq: "${testString}" }, likesAggregate: { node: { testString: { shortestLength: { eq: ${shortestTestString.length} } } } } }) { edges { node { testString diff --git a/packages/graphql/tests/integration/aggregations/where/node/string.int.test.ts b/packages/graphql/tests/integration/aggregations/where/node/string.int.test.ts index 8ba9d1a565..188f53904a 100644 --- a/packages/graphql/tests/integration/aggregations/where/node/string.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/where/node/string.int.test.ts @@ -82,7 +82,7 @@ describe("aggregations-where-node-string", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_SHORTEST_LENGTH_EQUAL: ${shortestTestString.length} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}"}, likesAggregate: { node: { testString: {shortestLength: { eq: ${shortestTestString.length} } } } } }) { testString likes { testString @@ -141,7 +141,7 @@ describe("aggregations-where-node-string", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_LONGEST_LENGTH_EQUAL: ${longestTestString.length} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}"}, likesAggregate: { node: { testString: { longestLength: { eq: ${longestTestString.length} } } } } }) { testString likes { testString @@ -205,7 +205,7 @@ describe("aggregations-where-node-string", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_EQUAL: ${avg} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}"}, likesAggregate: { node: { testString: { averageLength: { eq: ${avg} } } } } }) { testString likes { testString @@ -266,7 +266,7 @@ describe("aggregations-where-node-string", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_GT: ${avgGT} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}"}, likesAggregate: { node: { testString: { averageLength: { gt: ${avgGT} } } } } }) { testString likes { testString @@ -327,7 +327,7 @@ describe("aggregations-where-node-string", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_GTE: ${avg} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}"}, likesAggregate: { node: { testString: { averageLength: { gte: ${avg} } } } } }) { testString likes { testString @@ -389,7 +389,7 @@ describe("aggregations-where-node-string", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_LT: ${avgLT} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}"}, likesAggregate: { node: { testString: { averageLength: { lt: ${avgLT} } } } } }) { testString likes { testString @@ -450,7 +450,7 @@ describe("aggregations-where-node-string", () => { const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_LTE: ${avg} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}"}, likesAggregate: { node: { testString: { averageLength: { lte: ${avg} } } } } }) { testString likes { testString @@ -545,7 +545,7 @@ describe("aggregations-where-node-string interface relationships of concrete typ const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_SHORTEST_LENGTH_EQUAL: ${shortestTestString.length} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}"}, likesAggregate: { node: { testString: {shortestLength: { eq: ${shortestTestString.length} } } } } }) { testString likes { testString @@ -606,7 +606,7 @@ describe("aggregations-where-node-string interface relationships of concrete typ const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_LONGEST_LENGTH_EQUAL: ${longestTestString.length} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}"}, likesAggregate: { node: { testString: { longestLength: { eq: ${longestTestString.length} } } } } }) { testString likes { testString @@ -672,7 +672,7 @@ describe("aggregations-where-node-string interface relationships of concrete typ const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_EQUAL: ${avg} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}"}, likesAggregate: { node: { testString: { averageLength: { eq: ${avg} } } } } }) { testString likes { testString @@ -734,7 +734,7 @@ describe("aggregations-where-node-string interface relationships of concrete typ const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_GT: ${avgGT} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}"}, likesAggregate: { node: { testString: { averageLength: { gt: ${avgGT} } } } } }) { testString likes { testString @@ -795,7 +795,7 @@ describe("aggregations-where-node-string interface relationships of concrete typ const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_GTE: ${avg} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}"}, likesAggregate: { node: { testString: { averageLength: { gte: ${avg} } } } } }) { testString likes { testString @@ -857,7 +857,7 @@ describe("aggregations-where-node-string interface relationships of concrete typ const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_LT: ${avgLT} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}"}, likesAggregate: { node: { testString: { averageLength: { lt: ${avgLT} } } } } }) { testString likes { testString @@ -918,7 +918,7 @@ describe("aggregations-where-node-string interface relationships of concrete typ const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_LTE: ${avg} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}"}, likesAggregate: { node: { testString: { averageLength: { lte: ${avg} } } } } }) { testString likes { testString @@ -1018,7 +1018,7 @@ describe("aggregations-where-node-string relationships of interface types", () = const query = ` { - ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_SHORTEST_LENGTH_EQUAL: ${shortestTestString.length} } } }) { + ${Post.plural}(where: { testString: { eq: "${testString}"}, likesAggregate: { node: { testString: {shortestLength: { eq: ${shortestTestString.length} } } } } }) { testString likes { testString diff --git a/packages/graphql/tests/integration/array-methods/array-pop-and-push.int.test.ts b/packages/graphql/tests/integration/array-methods/array-pop-and-push.int.test.ts index 7e3e1468fe..6c1b66d3e0 100644 --- a/packages/graphql/tests/integration/array-methods/array-pop-and-push.int.test.ts +++ b/packages/graphql/tests/integration/array-methods/array-pop-and-push.int.test.ts @@ -49,7 +49,7 @@ describe("array-pop-and-push", () => { const update = ` mutation { - ${typeMovie.operations.update} (update: { tags_PUSH: "new tag", moreTags_POP: 2 }) { + ${typeMovie.operations.update} (update: { tags: {push: "new tag" }, moreTags: {pop: 2 } }) { ${typeMovie.plural} { title tags diff --git a/packages/graphql/tests/integration/array-methods/array-pop.int.test.ts b/packages/graphql/tests/integration/array-methods/array-pop.int.test.ts index cf938192f4..1f38d460ac 100644 --- a/packages/graphql/tests/integration/array-methods/array-pop.int.test.ts +++ b/packages/graphql/tests/integration/array-methods/array-pop.int.test.ts @@ -108,7 +108,7 @@ describe("array-pop", () => { const update = ` mutation { - ${typeMovie.operations.update} (update: { tags_POP: 1 }) { + ${typeMovie.operations.update} (update: { tags: { pop: 1} }) { ${typeMovie.plural} { title tags @@ -208,7 +208,7 @@ describe("array-pop", () => { const update = ` mutation { - ${typeMovie.operations.update} (update: { tags_POP: 1 }) { + ${typeMovie.operations.update} (update: { tags: {pop: 1 } }) { ${typeMovie.plural} { title tags @@ -308,7 +308,7 @@ describe("array-pop", () => { const update = ` mutation { - ${typeMovie.operations.update} (update: { tags_POP: 2 }) { + ${typeMovie.operations.update} (update: { tags: {pop: 2 } }) { ${typeMovie.plural} { title tags @@ -421,7 +421,7 @@ describe("array-pop", () => { const update = ` mutation UpdateMovie($elementsToPop: Int!) { - ${typeMovie.operations.update} (update: { tags_POP: $elementsToPop }) { + ${typeMovie.operations.update} (update: { tags: { pop: $elementsToPop } }) { ${typeMovie.plural} { title tags { @@ -530,7 +530,7 @@ describe("array-pop", () => { const update = ` mutation UpdateMovie($elementsToPop: Int!) { - ${typeMovie.operations.update} (update: { tags_POP: $elementsToPop }) { + ${typeMovie.operations.update} (update: { tags: {pop: $elementsToPop } }) { ${typeMovie.plural} { title tags { @@ -576,7 +576,7 @@ describe("array-pop", () => { const update = ` mutation { - ${typeMovie.operations.update} (update: { tags_POP: 1, moreTags_POP: 2 }) { + ${typeMovie.operations.update} (update: { tags: {pop: 1}, moreTags: {pop: 2} }) { ${typeMovie.plural} { title tags @@ -635,7 +635,7 @@ describe("array-pop", () => { { update: { node: { - viewers_POP: $numberToPop + viewers: {pop: $numberToPop} } } } @@ -707,7 +707,7 @@ describe("array-pop", () => { { update: { edge: { - pay_POP: $numberToPop + pay: {pop: $numberToPop} } } } @@ -790,7 +790,7 @@ describe("array-pop", () => { { update: { edge: { - locations_POP: $numberToPop + locations: {pop: $numberToPop} } } } diff --git a/packages/graphql/tests/integration/delete-interface.int.test.ts b/packages/graphql/tests/integration/delete-interface.int.test.ts index afa85ac7da..1cbc298fc9 100644 --- a/packages/graphql/tests/integration/delete-interface.int.test.ts +++ b/packages/graphql/tests/integration/delete-interface.int.test.ts @@ -139,9 +139,9 @@ describe("delete interface relationships", () => { }); test("should delete one nested concrete entity", async () => { - const query = ` + const query = /* GraphQL */ ` mutation DeleteActorAndMovie($name: String, $title: String) { - ${actorType.operations.delete}(where: { name_EQ: $name }, delete: { actedIn: { where: { node: { typename_IN: [${movieType}], title_EQ: $title } } } } ) { + ${actorType.operations.delete}(where: { name: { eq: $name } }, delete: { actedIn: { where: { node: { typename: [${movieType}], title: { eq: $title} } } } } ) { nodesDeleted relationshipsDeleted } @@ -163,13 +163,13 @@ describe("delete interface relationships", () => { }); test("should delete one nested concrete entity using interface relationship fields", async () => { - const query = ` + const query = /* GraphQL */ ` mutation DeleteActorAndMovie($name1: String, $movieScreenTime1: Int) { ${actorType.operations.delete}( - where: { name_EQ: $name1 } + where: { name: { eq: $name1 } } delete: { actedIn: { - where: { edge: { screenTime_EQ: $movieScreenTime1 } } + where: { edge: { screenTime: { eq: $movieScreenTime1 } } } } } ) { @@ -194,13 +194,13 @@ describe("delete interface relationships", () => { }); test("should delete two nested concrete entity using interface relationship fields", async () => { - const query = ` + const query = /* GraphQL */ ` mutation DeleteActorAndMovie($name1: String, $movieScreenTime1: Int, $movieScreenTime2: Int) { ${actorType.operations.delete}( - where: { name_EQ: $name1 } + where: { name: { eq: $name1 } } delete: { actedIn: { - where: { edge: { OR: [ {screenTime_EQ: $movieScreenTime1 }, { screenTime_EQ: $movieScreenTime2 } ]} } + where: { edge: { OR: [ {screenTime: { eq: $movieScreenTime1 } }, { screenTime: { eq: $movieScreenTime2 } } ]} } } } ) { @@ -229,16 +229,16 @@ describe("delete interface relationships", () => { }); test("should be possible to double nested delete", async () => { - const query = ` + const query = /* GraphQL */ ` mutation DeleteActorAndMovie($name1: String, $movieTitle2: String, $name2: String) { ${actorType.operations.delete}( - where: { name_EQ: $name1 } + where: { name: { eq: $name1 } } delete: { actedIn: { - where: { node: { title_EQ: $movieTitle2 } } + where: { node: { title: { eq: $movieTitle2 }} } delete: { actors: { - where: { node: { name_EQ: $name2 } } + where: { node: { name: { eq: $name2} } } } } } diff --git a/packages/graphql/tests/integration/deprecations/aggregations/where/AND-OR-operations.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/where/AND-OR-operations.int.test.ts new file mode 100644 index 0000000000..ea8f6aeaf5 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/aggregations/where/AND-OR-operations.int.test.ts @@ -0,0 +1,456 @@ +/* + * 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("Nested within AND/OR", () => { + const testHelper = new TestHelper(); + + let userType: UniqueType; + let postType: UniqueType; + + const testString1 = "This is a test string"; + const testString2 = "anotherTestString"; + const testString3 = "SomeUserString!"; + const testString4 = "Foo"; + const testString5 = "Baa"; + const content1 = "SomeContent!"; + const content2 = "testContent"; + const content3 = "testContent3"; + const content4 = "Baz"; + const content5 = "Some more content"; + + beforeEach(async () => { + userType = testHelper.createUniqueType("User"); + postType = testHelper.createUniqueType("Post"); + + const typeDefs = ` + type ${userType.name} @node { + testString: String! + } + + type ${postType.name} @node { + content: String! + likes: [${userType.name}!]! @relationship(type: "LIKES", direction: IN) + } + `; + + await testHelper.executeCypher(` + CREATE (post1:${postType.name} { content: "${content1}" })<-[:LIKES]-(user1:${userType.name} { testString: "${testString1}" }) + CREATE (post2:${postType.name} { content: "${content2}" })<-[:LIKES]-(user2:${userType.name} { testString: "${testString2}" }) + CREATE (post3:${postType.name} { content: "${content3}" })<-[:LIKES]-(user3:${userType.name} { testString: "${testString3}" }) + CREATE (post4:${postType.name} { content: "${content4}" })<-[:LIKES]-(user4:${userType.name} { testString: "${testString4}" }) + CREATE (post5:${postType.name} { content: "${content5}" })<-[:LIKES]-(user5:${userType.name} { testString: "${testString5}" }) + MERGE (post1)<-[:LIKES]-(user2) + MERGE (post1)<-[:LIKES]-(user3) + MERGE (post2)<-[:LIKES]-(user4) + MERGE (post2)<-[:LIKES]-(user5) + MERGE (post3)<-[:LIKES]-(user1) + `); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("Implicit AND", async () => { + const query = ` + query { + ${postType.plural}(where: { + likesAggregate: { + count_EQ: 3 + node: { + testString_SHORTEST_LENGTH_EQUAL: 3 + } + } + }) { + content + } + } + `; + + const result = await testHelper.executeGraphQL(query); + + expect(result.errors).toBeFalsy(); + expect(result.data).toEqual({ + [postType.plural]: [ + { + content: content2, + }, + ], + }); + }); + + test("Top-level OR", async () => { + const query = ` + query { + ${postType.plural}(where: { + likesAggregate: { + OR: [ + { count_EQ: 3 } + { + node: { + testString_SHORTEST_LENGTH_EQUAL: 3 + } + } + ] + } + }) { + content + } + } + `; + + const result = await testHelper.executeGraphQL(query); + + expect(result.errors).toBeFalsy(); + expect(result.data).toEqual({ + [postType.plural]: expect.toIncludeSameMembers([ + { + content: content1, + }, + { + content: content2, + }, + { + content: content4, + }, + { + content: content5, + }, + ]), + }); + }); + + test("Top-level AND", async () => { + const query = ` + query { + ${postType.plural}(where: { + likesAggregate: { + AND: [ + { count_EQ: 3 } + { + node: { + testString_SHORTEST_LENGTH_EQUAL: 3 + } + } + ] + } + }) { + content + } + } + `; + + const result = await testHelper.executeGraphQL(query); + + expect(result.errors).toBeFalsy(); + expect(result.data).toEqual({ + [postType.plural]: [ + { + content: content2, + }, + ], + }); + }); + + test("AND within an AND", async () => { + const query = ` + query { + ${postType.plural}(where: { + likesAggregate: { + AND: [ + { count_LTE: 2 } + { + AND: [ + { + node: { + testString_SHORTEST_LENGTH_LT: 4 + } + } + { + node: { + testString_SHORTEST_LENGTH_GT: 2 + } + } + ] + } + ] + } + }) { + content + } + } + `; + + const result = await testHelper.executeGraphQL(query); + + expect(result.errors).toBeFalsy(); + expect(result.data).toEqual({ + [postType.plural]: expect.toIncludeSameMembers([ + { + content: content5, + }, + { + content: content4, + }, + ]), + }); + }); + + test("AND within an AND with NOT", async () => { + const query = ` + query { + ${postType.plural}(where: { + likesAggregate: { + AND: [ + { NOT: { count_GT: 2 } } + { + AND: [ + { + node: { + NOT: { testString_SHORTEST_LENGTH_GT: 4 } + } + } + { + node: { + testString_SHORTEST_LENGTH_GT: 2 + } + } + ] + } + ] + } + }) { + content + } + } + `; + + const result = await testHelper.executeGraphQL(query); + + expect(result.errors).toBeFalsy(); + expect(result.data).toEqual({ + [postType.plural]: expect.toIncludeSameMembers([ + { + content: content5, + }, + { + content: content4, + }, + ]), + }); + }); + + test("OR within an OR", async () => { + const query = ` + query { + ${postType.plural}(where: { + likesAggregate: { + OR: [ + { count_LTE: 2 } + { + OR: [ + { + node: { + testString_SHORTEST_LENGTH_LT: 4 + } + } + { + node: { + testString_SHORTEST_LENGTH_GT: 20 + } + } + ] + } + ] + } + }) { + content + } + } + `; + + const result = await testHelper.executeGraphQL(query); + + expect(result.errors).toBeFalsy(); + expect(result.data).toEqual({ + [postType.plural]: expect.toIncludeSameMembers([ + { + content: content2, + }, + { + content: content3, + }, + { + content: content4, + }, + { + content: content5, + }, + ]), + }); + }); + + test("OR within an AND", async () => { + const query = ` + query { + ${postType.plural}(where: { + likesAggregate: { + AND: [ + { count_LTE: 2 } + { + OR: [ + { + node: { + testString_SHORTEST_LENGTH_LT: 4 + } + } + { + node: { + testString_SHORTEST_LENGTH_GT: 20 + } + } + ] + } + ] + } + }) { + content + } + } + `; + + const result = await testHelper.executeGraphQL(query); + + expect(result.errors).toBeFalsy(); + expect(result.data).toEqual({ + [postType.plural]: expect.toIncludeSameMembers([ + { + content: content4, + }, + { + content: content5, + }, + ]), + }); + }); + + test("OR within an AND with NOT", async () => { + const query = ` + query { + ${postType.plural}(where: { + likesAggregate: { + AND: [ + { NOT: { count_GT: 2 } } + { + OR: [ + { + node: { + NOT: { testString_SHORTEST_LENGTH_GT: 4 } + } + } + { + node: { + testString_SHORTEST_LENGTH_GT: 20 + } + } + ] + } + ] + } + }) { + content + } + } + `; + + const result = await testHelper.executeGraphQL(query); + + expect(result.errors).toBeFalsy(); + expect(result.data).toEqual({ + [postType.plural]: expect.toIncludeSameMembers([ + { + content: content4, + }, + { + content: content5, + }, + ]), + }); + }); + + test("AND within an OR", async () => { + const query = ` + query { + ${postType.plural}(where: { + likesAggregate: { + OR: [ + { count_GTE: 2 } + { + AND: [ + { + node: { + testString_SHORTEST_LENGTH_LT: 4 + } + } + { + node: { + testString_SHORTEST_LENGTH_GT: 2 + } + } + ] + } + ] + } + }) { + content + } + } + `; + + const result = await testHelper.executeGraphQL(query); + + expect(result.errors).toBeFalsy(); + expect(result.data).toEqual({ + [postType.plural]: expect.toIncludeSameMembers([ + { + content: content1, + }, + { + content: content2, + }, + { + content: content3, + }, + { + content: content4, + }, + { + content: content5, + }, + ]), + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/where/count.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/where/count.int.test.ts new file mode 100644 index 0000000000..2999e420d1 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/aggregations/where/count.int.test.ts @@ -0,0 +1,497 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { generate } from "randomstring"; +import type { UniqueType } from "../../../../utils/graphql-types"; +import { TestHelper } from "../../../../utils/tests-helper"; + +describe("aggregations-where-count", () => { + const testHelper = new TestHelper(); + let User: UniqueType; + let Post: UniqueType; + + beforeEach(async () => { + User = testHelper.createUniqueType("User"); + Post = testHelper.createUniqueType("Post"); + + const typeDefs = /* GraphQL */ ` + type ${User} @node { + testString: String! + } + + type ${Post} @node { + testString: String! + likes: [${User}!]! @relationship(type: "LIKES", direction: IN) + } + `; + await testHelper.initNeo4jGraphQL({ typeDefs }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should return posts where the count of likes equal one", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = /* GraphQL */ ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count_EQ: 1 } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.plural]).toEqual([ + { + testString, + likes: [{ testString }], + }, + ]); + }); + + test("should return posts where the count of likes LT one", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count_LT: 1 } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.plural]).toEqual([ + { + testString, + likes: [], + }, + ]); + }); + + test("should return posts where the count of likes LTE one", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count_LTE: 1 } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.plural]).toIncludeSameMembers([ + { + testString, + likes: [{ testString }], + }, + { + testString, + likes: [], + }, + ]); + }); + + test("should return posts where the count of likes GT one, regardless of number of likes over 1", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count_GT: 1 } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.plural]).toEqual([ + { + testString, + likes: expect.toIncludeSameMembers([{ testString }, { testString }]), + }, + ]); + }); + + test("should return posts where the count of likes GT one", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count_GTE: 1 } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.plural]).toEqual([ + { + testString, + likes: [{ testString }], + }, + ]); + }); +}); + +describe("aggregations-where-count interface relationships of concrete types", () => { + let testHelper: TestHelper; + let User: UniqueType; + let Post: UniqueType; + let Person: UniqueType; + + beforeEach(async () => { + testHelper = new TestHelper(); + User = testHelper.createUniqueType("User"); + Post = testHelper.createUniqueType("Post"); + Person = testHelper.createUniqueType("Person"); + + const typeDefs = /* GraphQL */ ` + interface Human { + testString: String! + } + + type ${User} implements Human @node { + testString: String! + } + + type ${Person} implements Human @node { + testString: String! + } + + type ${Post} @node { + testString: String! + likes: [Human!]! @relationship(type: "LIKES", direction: IN) + } + `; + await testHelper.initNeo4jGraphQL({ typeDefs }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should return posts where the count of likes equal one", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count_EQ: 1 } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.plural]).toEqual([ + { + testString, + likes: [{ testString }], + }, + ]); + }); + + test("should return posts where the count of likes LT one", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count_LT: 1 } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.plural]).toEqual([ + { + testString, + likes: [], + }, + ]); + }); + + test("should return posts where the count of likes LTE one", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count_LTE: 1 } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.plural]).toIncludeSameMembers([ + { + testString, + likes: [{ testString }], + }, + { + testString, + likes: [], + }, + ]); + }); + + test("should return posts where the count of likes GT one, regardless of number of likes over 1", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count_GT: 1 } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.plural]).toEqual([ + { + testString, + likes: expect.toIncludeSameMembers([{ testString }, { testString }]), + }, + ]); + }); + + test("should return posts where the count of likes GT one", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { count_GTE: 1 } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.plural]).toEqual([ + { + testString, + likes: [{ testString }], + }, + ]); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/where/edge/int.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/where/edge/int.int.test.ts new file mode 100644 index 0000000000..3f44ad5716 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/aggregations/where/edge/int.int.test.ts @@ -0,0 +1,294 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { generate } from "randomstring"; +import type { UniqueType } from "../../../../../utils/graphql-types"; +import { TestHelper } from "../../../../../utils/tests-helper"; + +describe("aggregations-where-edge-int", () => { + const testHelper = new TestHelper(); + let User: UniqueType; + let Post: UniqueType; + + beforeEach(async () => { + User = testHelper.createUniqueType("User"); + Post = testHelper.createUniqueType("Post"); + + const typeDefs = ` + type ${User} @node { + testString: String! + } + + type ${Post} @node { + testString: String! + likes: [${User}!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") + } + + type Likes @relationshipProperties { + someInt: Int + } + `; + await testHelper.initNeo4jGraphQL({ typeDefs }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + describe("AVERAGE", () => { + const someInt1 = 1; + const someInt2 = 2; + const someInt3 = 3; + + test("should return posts where the average of a edge like Int's is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES { someInt: ${someInt1} }]-(:${User} {testString: "${testString}"}) + CREATE (p)<-[:LIKES { someInt: ${someInt2} }]-(:${User} {testString: "${testString}"}) + CREATE (p)<-[:LIKES { someInt: ${someInt3} }]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { someInt_AVERAGE_EQUAL: ${avg} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of a edge like Int's is GT than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + const avgGT = avg - 1; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES { someInt: ${someInt1} }]-(:${User} {testString: "${testString}"}) + CREATE (p)<-[:LIKES { someInt: ${someInt2} }]-(:${User} {testString: "${testString}"}) + CREATE (p)<-[:LIKES { someInt: ${someInt3} }]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { someInt_AVERAGE_GT: ${avgGT} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of a edge like Int's is GTE than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES { someInt: ${someInt1} }]-(:${User} {testString: "${testString}"}) + CREATE (p)<-[:LIKES { someInt: ${someInt2} }]-(:${User} {testString: "${testString}"}) + CREATE (p)<-[:LIKES { someInt: ${someInt3} }]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { someInt_AVERAGE_GTE: ${avg} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of a edge like Int's is LT than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + const avgLT = avg + 1; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES { someInt: ${someInt1} }]-(:${User} {testString: "${testString}"}) + CREATE (p)<-[:LIKES { someInt: ${someInt2} }]-(:${User} {testString: "${testString}"}) + CREATE (p)<-[:LIKES { someInt: ${someInt3} }]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { someInt_AVERAGE_LT: ${avgLT} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of a edge like Int's is LTE than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = someInt1 + someInt2 + someInt3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES { someInt: ${someInt1} }]-(:${User} {testString: "${testString}"}) + CREATE (p)<-[:LIKES { someInt: ${someInt2} }]-(:${User} {testString: "${testString}"}) + CREATE (p)<-[:LIKES { someInt: ${someInt3} }]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { someInt_AVERAGE_LTE: ${avg} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + }); + + describe("sum", () => { + test("should return posts where the sum of a edge like Int's is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const someInt1 = 1; + const someInt2 = 2; + const someInt3 = 3; + + const sum = someInt1 + someInt2 + someInt3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES { someInt: ${someInt1} }]-(:${User} {testString: "${testString}"}) + CREATE (p)<-[:LIKES { someInt: ${someInt2} }]-(:${User} {testString: "${testString}"}) + CREATE (p)<-[:LIKES { someInt: ${someInt3} }]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { someInt_SUM_EQUAL: ${sum} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/where/edge/string.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/where/edge/string.int.test.ts new file mode 100644 index 0000000000..acfcab9430 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/aggregations/where/edge/string.int.test.ts @@ -0,0 +1,940 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { generate } from "randomstring"; +import type { UniqueType } from "../../../../../utils/graphql-types"; +import { TestHelper } from "../../../../../utils/tests-helper"; + +describe("aggregations-where-edge-string", () => { + let testHelper: TestHelper; + let User: UniqueType; + let Post: UniqueType; + + beforeEach(async () => { + testHelper = new TestHelper(); + User = testHelper.createUniqueType("User"); + Post = testHelper.createUniqueType("Post"); + + const typeDefs = /* GraphQL */ ` + type ${User} @node { + testString: String! + } + + type ${Post} @node { + testString: String! + likes: [${User}!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") + } + + type Likes @relationshipProperties { + testString: String + } + `; + await testHelper.initNeo4jGraphQL({ typeDefs }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should return posts where the SHORTEST edge like String is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const shortestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const longestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES { testString: "${shortestTestString}" }]-(:${User} {testString: "${shortestTestString}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES { testString: "${testString2}" }]-(:${User} {testString: "${testString2}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES { testString: "${longestTestString}" }]-(:${User} {testString: "${longestTestString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_SHORTEST_LENGTH_EQUAL: ${shortestTestString.length} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.plural]).toEqual([ + { + testString, + likes: [{ testString: shortestTestString }], + }, + ]); + }); + + test("should return posts where the LONGEST edge like String is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const shortestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const longestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES { testString: "${shortestTestString}" }]-(:${User} {testString: "${shortestTestString}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES { testString: "${testString2}" }]-(:${User} {testString: "${testString2}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES { testString: "${longestTestString}" }]-(:${User} {testString: "${longestTestString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_LONGEST_LENGTH_EQUAL: ${longestTestString.length} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.plural]).toEqual([ + { + testString, + likes: [{ testString: longestTestString }], + }, + ]); + }); + + describe("AVERAGE", () => { + test("should return posts where the AVERAGE of edge like Strings is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString1}" }]-(:${User} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString2}" }]-(:${User} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString3}" }]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_AVERAGE_LENGTH_EQUAL: ${avg} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of edge like Strings is GT than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + const avgGT = avg - 1; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString1}" }]-(:${User} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString2}" }]-(:${User} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString3}" }]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_AVERAGE_LENGTH_GT: ${avgGT} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of edge like Strings is GTE than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString1}" }]-(:${User} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString2}" }]-(:${User} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString3}" }]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_AVERAGE_LENGTH_GTE: ${avg} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of edge like Strings is LT than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + const avgLT = avg + 1; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString1}" }]-(:${User} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString2}" }]-(:${User} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString3}" }]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_AVERAGE_LENGTH_LT: ${avgLT} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of edge like Strings is LTE than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString1}" }]-(:${User} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString2}" }]-(:${User} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString3}" }]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_AVERAGE_LENGTH_LTE: ${avg} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + }); +}); + +describe("aggregations-where-edge-string interface relationships of concrete types", () => { + let testHelper: TestHelper; + let User: UniqueType; + let Post: UniqueType; + let Person: UniqueType; + + beforeEach(async () => { + testHelper = new TestHelper(); + User = testHelper.createUniqueType("User"); + Post = testHelper.createUniqueType("Post"); + Person = testHelper.createUniqueType("Person"); + const typeDefs = /* GraphQL */ ` + interface Human { + testString: String! + } + + type ${User} implements Human @node { + testString: String! + } + + type ${Person} implements Human @node { + testString: String! + } + + type ${Post} @node { + testString: String! + likes: [Human!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") + someStringAlias: String @alias(property: "_someStringAlias") + } + + type Likes @relationshipProperties { + testString: String + } + `; + await testHelper.initNeo4jGraphQL({ typeDefs }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should return posts where the SHORTEST edge like String is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const shortestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const longestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES { testString: "${shortestTestString}" }]-(:${User} {testString: "${shortestTestString}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES { testString: "${testString2}" }]-(:${User} {testString: "${testString2}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES { testString: "${longestTestString}" }]-(:${User} {testString: "${longestTestString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_SHORTEST_LENGTH_EQUAL: ${shortestTestString.length} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.plural]).toEqual([ + { + testString, + likes: [{ testString: shortestTestString }], + }, + ]); + }); + + test("should return posts where the LONGEST edge like String is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const shortestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const longestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES { testString: "${shortestTestString}" }]-(:${User} {testString: "${shortestTestString}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES { testString: "${testString2}" }]-(:${User} {testString: "${testString2}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES { testString: "${longestTestString}" }]-(:${User} {testString: "${longestTestString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_LONGEST_LENGTH_EQUAL: ${longestTestString.length} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.plural]).toEqual([ + { + testString, + likes: [{ testString: longestTestString }], + }, + ]); + }); + + describe("AVERAGE", () => { + test("should return posts where the %s of edge like Strings is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString1}" }]-(:${User} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString2}" }]-(:${User} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString3}" }]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_AVERAGE_LENGTH_EQUAL: ${avg} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of edge like Strings is GT than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + const avgGT = avg - 1; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString1}" }]-(:${User} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString2}" }]-(:${User} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString3}" }]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_AVERAGE_LENGTH_GT: ${avgGT} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of edge like Strings is GTE than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString1}" }]-(:${User} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString2}" }]-(:${User} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString3}" }]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_AVERAGE_LENGTH_GTE: ${avg} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of edge like Strings is LT than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + const avgLT = avg + 1; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString1}" }]-(:${User} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString2}" }]-(:${User} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString3}" }]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_AVERAGE_LENGTH_LT: ${avgLT} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of edge like Strings is LTE than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString1}" }]-(:${User} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString2}" }]-(:${User} {testString: "${testString}"}) + CREATE(p)<-[:LIKES { testString: "${testString3}" }]-(:${User} {testString: "${testString}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { edge: { testString_AVERAGE_LENGTH_LTE: ${avg} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/where/node/int-connections.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/where/node/int-connections.int.test.ts new file mode 100644 index 0000000000..d321e1cdc3 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/aggregations/where/node/int-connections.int.test.ts @@ -0,0 +1,634 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { generate } from "randomstring"; +import type { UniqueType } from "../../../../../utils/graphql-types"; +import { TestHelper } from "../../../../../utils/tests-helper"; + +describe("aggregations-where-node-int - connections", () => { + let testHelper: TestHelper; + let User: UniqueType; + let Post: UniqueType; + + beforeEach(async () => { + testHelper = new TestHelper(); + User = testHelper.createUniqueType("User"); + Post = testHelper.createUniqueType("Post"); + const typeDefs = ` + type ${User} @node { + testString: String! + someInt: Int! + } + + type ${Post} @node { + testString: String! + likes: [${User}!]! @relationship(type: "LIKES", direction: IN) + } + `; + await testHelper.initNeo4jGraphQL({ typeDefs }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + describe("AVERAGE", () => { + const someInt1 = 1; + const someInt2 = 2; + const someInt3 = 3; + + test("should return posts where the average of like Int's is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_EQUAL: ${avg} } } }) { + edges { + node { + testString + likes { + testString + someInt + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = ((gqlResult.data as any)[Post.operations.connection] as any[])["edges"]; + expect(post.node.testString).toEqual(testString); + expect(post.node.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Int's is GT than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + const avgGT = avg - 1; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_GT: ${avgGT} } } }) { + edges { + node { + testString + likes { + testString + someInt + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = ((gqlResult.data as any)[Post.operations.connection] as any[])["edges"]; + expect(post.node.testString).toEqual(testString); + expect(post.node.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Int's is GTE than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_GTE: ${avg} } } }) { + edges { + node { + testString + likes { + testString + someInt + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = ((gqlResult.data as any)[Post.operations.connection] as any[])["edges"]; + expect(post.node.testString).toEqual(testString); + expect(post.node.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Int's is LT than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + const avgLT = avg + 1; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_LT: ${avgLT} } } }) { + edges { + node { + testString + likes { + testString + someInt + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = ((gqlResult.data as any)[Post.operations.connection] as any[])["edges"]; + expect(post.node.testString).toEqual(testString); + expect(post.node.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Int's is LTE than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_LTE: ${avg} } } }) { + edges { + node { + testString + likes { + testString + someInt + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = ((gqlResult.data as any)[Post.operations.connection] as any[])["edges"]; + expect(post.node.testString).toEqual(testString); + expect(post.node.likes).toHaveLength(3); + }); + }); + + describe("sum", () => { + test("should return posts where the sum of like Int's is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const someInt1 = 1; + const someInt2 = 2; + const someInt3 = 3; + + const sum = someInt1 + someInt2 + someInt3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_SUM_EQUAL: ${sum} } } }) { + edges { + node { + testString + likes { + testString + someInt + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = ((gqlResult.data as any)[Post.operations.connection] as any[])["edges"]; + expect(post.node.testString).toEqual(testString); + expect(post.node.likes).toHaveLength(3); + }); + }); +}); + +describe("aggregations-where-node-int - connections - interface relationships of concrete types", () => { + let testHelper: TestHelper; + let User: UniqueType; + let Post: UniqueType; + let Person: UniqueType; + + beforeEach(async () => { + testHelper = new TestHelper(); + User = testHelper.createUniqueType("User"); + Post = testHelper.createUniqueType("Post"); + Person = testHelper.createUniqueType("Person"); + + const typeDefs = ` + interface Human { + testString: String! + someInt: Int! + } + + type ${Person} implements Human @node { + testString: String! + someInt: Int! + } + type ${User} implements Human @node { + testString: String! + someInt: Int! + } + + type ${Post} @node { + testString: String! + likes: [Human!]! @relationship(type: "LIKES", direction: IN) + } + `; + await testHelper.initNeo4jGraphQL({ typeDefs }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + describe("AVERAGE", () => { + const someInt1 = 1; + const someInt2 = 2; + const someInt3 = 3; + + test("should return posts where the average of like Int's is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_EQUAL: ${avg} } } }) { + edges { + node { + testString + likes { + testString + someInt + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = ((gqlResult.data as any)[Post.operations.connection] as any[])["edges"]; + expect(post.node.testString).toEqual(testString); + expect(post.node.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Int's is GT than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + const avgGT = avg - 1; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_GT: ${avgGT} } } }) { + edges { + node { + testString + likes { + testString + someInt + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = ((gqlResult.data as any)[Post.operations.connection] as any[])["edges"]; + expect(post.node.testString).toEqual(testString); + expect(post.node.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Int's is GTE than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_GTE: ${avg} } } }) { + edges { + node { + testString + likes { + testString + someInt + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = ((gqlResult.data as any)[Post.operations.connection] as any[])["edges"]; + expect(post.node.testString).toEqual(testString); + expect(post.node.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Int's is LT than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + const avgLT = avg + 1; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_LT: ${avgLT} } } }) { + edges { + node { + testString + likes { + testString + someInt + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = ((gqlResult.data as any)[Post.operations.connection] as any[])["edges"]; + expect(post.node.testString).toEqual(testString); + expect(post.node.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Int's is LTE than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_LTE: ${avg} } } }) { + edges { + node { + testString + likes { + testString + someInt + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = ((gqlResult.data as any)[Post.operations.connection] as any[])["edges"]; + expect(post.node.testString).toEqual(testString); + expect(post.node.likes).toHaveLength(3); + }); + }); + + describe("sum", () => { + test("should return posts where the sum of like Int's is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const someInt1 = 1; + const someInt2 = 2; + const someInt3 = 3; + + const sum = someInt1 + someInt2 + someInt3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_SUM_EQUAL: ${sum} } } }) { + edges { + node { + testString + likes { + testString + someInt + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = ((gqlResult.data as any)[Post.operations.connection] as any[])["edges"]; + expect(post.node.testString).toEqual(testString); + expect(post.node.likes).toHaveLength(3); + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/where/node/int.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/where/node/int.int.test.ts new file mode 100644 index 0000000000..f94e3869b8 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/aggregations/where/node/int.int.test.ts @@ -0,0 +1,594 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { generate } from "randomstring"; +import type { UniqueType } from "../../../../../utils/graphql-types"; +import { TestHelper } from "../../../../../utils/tests-helper"; + +describe("aggregations-where-node-int", () => { + let testHelper: TestHelper; + let User: UniqueType; + let Post: UniqueType; + let Person: UniqueType; + + beforeEach(async () => { + testHelper = new TestHelper(); + User = testHelper.createUniqueType("User"); + Post = testHelper.createUniqueType("Post"); + Person = testHelper.createUniqueType("Person"); + + const typeDefs = ` + interface Human { + testString: String! + someInt: Int! + } + + type ${Person} implements Human @node { + testString: String! + someInt: Int! + } + type ${User} implements Human @node { + testString: String! + someInt: Int! + } + + type ${Post} @node { + testString: String! + likes: [Human!]! @relationship(type: "LIKES", direction: IN) + } + `; + await testHelper.initNeo4jGraphQL({ typeDefs }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + describe("AVERAGE", () => { + const someInt1 = 1; + const someInt2 = 2; + const someInt3 = 3; + + test("should return posts where the average of like Int's is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_EQUAL: ${avg} } } }) { + testString + likes { + testString + someInt + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Int's is GT than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + const avgGT = avg - 1; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_GT: ${avgGT} } } }) { + testString + likes { + testString + someInt + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Int's is GTE than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_GTE: ${avg} } } }) { + testString + likes { + testString + someInt + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Int's is LT than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + const avgLT = avg + 1; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_LT: ${avgLT} } } }) { + testString + likes { + testString + someInt + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Int's is LTE than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_LTE: ${avg} } } }) { + testString + likes { + testString + someInt + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + }); + + describe("sum", () => { + test("should return posts where the sum of like Int's is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const someInt1 = 1; + const someInt2 = 2; + const someInt3 = 3; + + const sum = someInt1 + someInt2 + someInt3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_SUM_EQUAL: ${sum} } } }) { + testString + likes { + testString + someInt + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + }); +}); + +describe("aggregations-where-node-int interface relationships of concrete types", () => { + let testHelper: TestHelper; + let User: UniqueType; + let Post: UniqueType; + let Person: UniqueType; + + beforeEach(async () => { + testHelper = new TestHelper(); + User = testHelper.createUniqueType("User"); + Post = testHelper.createUniqueType("Post"); + Person = testHelper.createUniqueType("Person"); + const typeDefs = ` + interface Human { + testString: String! + someInt: Int! + } + + type ${Person} implements Human @node { + testString: String! + someInt: Int! + } + type ${User} implements Human @node { + testString: String! + someInt: Int! + } + + type ${Post} @node { + testString: String! + likes: [Human!]! @relationship(type: "LIKES", direction: IN) + } + `; + await testHelper.initNeo4jGraphQL({ typeDefs }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + describe("AVERAGE", () => { + const someInt1 = 1; + const someInt2 = 2; + const someInt3 = 3; + + test("should return posts where the average of like Int's is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_EQUAL: ${avg} } } }) { + testString + likes { + testString + someInt + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Int's is GT than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + const avgGT = avg - 1; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_GT: ${avgGT} } } }) { + testString + likes { + testString + someInt + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Int's is GTE than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_GTE: ${avg} } } }) { + testString + likes { + testString + someInt + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Int's is LT than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + const avgLT = avg + 1; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_LT: ${avgLT} } } }) { + testString + likes { + testString + someInt + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Int's is LTE than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const avg = (someInt1 + someInt2 + someInt3) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_AVERAGE_LTE: ${avg} } } }) { + testString + likes { + testString + someInt + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + }); + + describe("sum", () => { + test("should return posts where the sum of like Int's is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const someInt1 = 1; + const someInt2 = 2; + const someInt3 = 3; + + const sum = someInt1 + someInt2 + someInt3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt1}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt2}}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString}", someInt: ${someInt3}}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { someInt_SUM_EQUAL: ${sum} } } }) { + testString + likes { + testString + someInt + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/where/node/string-connections.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/where/node/string-connections.int.test.ts new file mode 100644 index 0000000000..5e734b9823 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/aggregations/where/node/string-connections.int.test.ts @@ -0,0 +1,1122 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { generate } from "randomstring"; +import type { UniqueType } from "../../../../../utils/graphql-types"; +import { TestHelper } from "../../../../../utils/tests-helper"; + +describe("aggregations-where-node-string - connections", () => { + let testHelper: TestHelper; + let User: UniqueType; + let Post: UniqueType; + + beforeEach(async () => { + testHelper = new TestHelper(); + User = testHelper.createUniqueType("User"); + Post = testHelper.createUniqueType("Post"); + + const typeDefs = /* GraphQL */ ` + type ${User} @node { + testString: String! + } + + type ${Post} @node { + testString: String! + likes: [${User}!]! @relationship(type: "LIKES", direction: IN) + } + `; + await testHelper.initNeo4jGraphQL({ typeDefs }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should return posts where the %s like String is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const shortestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const longestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${shortestTestString}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${longestTestString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_SHORTEST_LENGTH_EQUAL: ${shortestTestString.length} } } }) { + edges { + node { + testString + likes { + testString + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.operations.connection]).toEqual({ + edges: [ + { + node: { + testString, + likes: [{ testString: shortestTestString }], + }, + }, + ], + }); + }); + + test("should return posts where the LONGEST like String is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const shortestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const longestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${shortestTestString}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${longestTestString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_LONGEST_LENGTH_EQUAL: ${longestTestString.length} } } }) { + edges { + node { + testString + likes { + testString + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.operations.connection]).toEqual({ + edges: [ + { + node: { + testString, + likes: [{ testString: longestTestString }], + }, + }, + ], + }); + }); + + describe("AVERAGE", () => { + test("should return posts where the %s of like Strings is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString1}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString3}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_EQUAL: ${avg} } } }) { + edges { + node { + testString + likes { + testString + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = ((gqlResult.data as any)[Post.operations.connection] as any[])["edges"]; + expect(post.node.testString).toEqual(testString); + expect(post.node.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Strings is GT than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + const avgGT = avg - 1; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString1}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString3}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_GT: ${avgGT} } } }) { + edges { + node { + testString + likes { + testString + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = ((gqlResult.data as any)[Post.operations.connection] as any[])["edges"]; + expect(post.node.testString).toEqual(testString); + expect(post.node.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Strings is GTE than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString1}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString3}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_GTE: ${avg} } } }) { + edges { + node { + testString + likes { + testString + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = ((gqlResult.data as any)[Post.operations.connection] as any[])["edges"]; + expect(post.node.testString).toEqual(testString); + expect(post.node.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Strings is LT than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + const avgLT = avg + 1; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString1}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString3}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_LT: ${avgLT} } } }) { + edges { + node { + testString + likes { + testString + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = ((gqlResult.data as any)[Post.operations.connection] as any[])["edges"]; + expect(post.node.testString).toEqual(testString); + expect(post.node.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Strings is LTE than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString1}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString3}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_LTE: ${avg} } } }) { + edges { + node { + testString + likes { + testString + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = ((gqlResult.data as any)[Post.operations.connection] as any[])["edges"]; + expect(post.node.testString).toEqual(testString); + expect(post.node.likes).toHaveLength(3); + }); + }); +}); + +describe("aggregations-where-node-string - connections - interface relationships of concrete types", () => { + let testHelper: TestHelper; + let User: UniqueType; + let Post: UniqueType; + let Person: UniqueType; + + beforeEach(async () => { + testHelper = new TestHelper(); + User = testHelper.createUniqueType("User"); + Post = testHelper.createUniqueType("Post"); + Person = testHelper.createUniqueType("Person"); + + const typeDefs = /* GraphQL */ ` + interface Human { + testString: String! + } + + type ${User} implements Human @node { + testString: String! + } + + type ${Person} implements Human @node { + testString: String! + } + + type ${Post} @node { + testString: String! + likes: [Human!]! @relationship(type: "LIKES", direction: IN) + } + `; + await testHelper.initNeo4jGraphQL({ typeDefs }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should return posts where the %s like String is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const shortestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const longestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${shortestTestString}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${longestTestString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_SHORTEST_LENGTH_EQUAL: ${shortestTestString.length} } } }) { + edges { + node { + testString + likes { + testString + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.operations.connection]).toEqual({ + edges: [ + { + node: { + testString, + likes: [{ testString: shortestTestString }], + }, + }, + ], + }); + }); + + test("should return posts where the LONGEST like String is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const shortestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const longestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${shortestTestString}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${longestTestString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_LONGEST_LENGTH_EQUAL: ${longestTestString.length} } } }) { + edges { + node { + testString + likes { + testString + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.operations.connection]).toEqual({ + edges: [ + { + node: { + testString, + likes: [{ testString: longestTestString }], + }, + }, + ], + }); + }); + + describe("AVERAGE", () => { + test("should return posts where the AVERAGE of like Strings is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString1}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString3}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_EQUAL: ${avg} } } }) { + edges { + node { + testString + likes { + testString + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = ((gqlResult.data as any)[Post.operations.connection] as any[])["edges"]; + expect(post.node.testString).toEqual(testString); + expect(post.node.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Strings is GT than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + const avgGT = avg - 1; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString1}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString3}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_GT: ${avgGT} } } }) { + edges { + node { + testString + likes { + testString + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = ((gqlResult.data as any)[Post.operations.connection] as any[])["edges"]; + expect(post.node.testString).toEqual(testString); + expect(post.node.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Strings is GTE than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString1}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString3}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_GTE: ${avg} } } }) { + edges { + node { + testString + likes { + testString + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = ((gqlResult.data as any)[Post.operations.connection] as any[])["edges"]; + expect(post.node.testString).toEqual(testString); + expect(post.node.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Strings is LT than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + const avgLT = avg + 1; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString1}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString3}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_LT: ${avgLT} } } }) { + edges { + node { + testString + likes { + testString + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = ((gqlResult.data as any)[Post.operations.connection] as any[])["edges"]; + expect(post.node.testString).toEqual(testString); + expect(post.node.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Strings is LTE than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString1}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString3}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_LTE: ${avg} } } }) { + edges { + node { + testString + likes { + testString + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = ((gqlResult.data as any)[Post.operations.connection] as any[])["edges"]; + expect(post.node.testString).toEqual(testString); + expect(post.node.likes).toHaveLength(3); + }); + }); +}); + +describe("aggregations-where-node-string - connections - relationships of interface types", () => { + let testHelper: TestHelper; + let User: UniqueType; + let Post: UniqueType; + let Person: UniqueType; + + beforeEach(() => { + testHelper = new TestHelper(); + User = testHelper.createUniqueType("User"); + Post = testHelper.createUniqueType("Post"); + Person = testHelper.createUniqueType("Person"); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should return posts where the SHORTEST like String is EQUAL to", async () => { + const typeDefs = /* GraphQL */ ` + interface Thing { + testString: String! + likes: [Human!]! @declareRelationship + } + + interface Human { + testString: String! + } + + type ${User} implements Human @node { + testString: String! @alias(property: "user_testString") + } + + type ${Person} implements Human @node { + testString: String! @alias(property: "person_testString") + } + + type ${Post} implements Thing @node { + testString: String! + likes: [Human!]! @relationship(type: "LIKES", direction: IN) + } + `; + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const shortestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const longestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {user_testString: "${shortestTestString}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {user_testString: "${testString2}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {user_testString: "${longestTestString}"}) + ` + ); + + const query = ` + { + ${Post.operations.connection}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_SHORTEST_LENGTH_EQUAL: ${shortestTestString.length} } } }) { + edges { + node { + testString + likes { + testString + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.operations.connection].edges).toIncludeSameMembers([ + { + node: { + testString, + likes: [{ testString: shortestTestString }], + }, + }, + ]); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/where/node/string.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/where/node/string.int.test.ts new file mode 100644 index 0000000000..76da67c4b4 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/aggregations/where/node/string.int.test.ts @@ -0,0 +1,1044 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { generate } from "randomstring"; +import type { UniqueType } from "../../../../../utils/graphql-types"; +import { TestHelper } from "../../../../../utils/tests-helper"; + +describe("aggregations-where-node-string", () => { + let testHelper: TestHelper; + let User: UniqueType; + let Post: UniqueType; + + beforeEach(async () => { + testHelper = new TestHelper(); + User = testHelper.createUniqueType("User"); + Post = testHelper.createUniqueType("Post"); + + const typeDefs = /* GraphQL */ ` + type ${User} @node { + testString: String! + } + + type ${Post} @node { + testString: String! + likes: [${User}!]! @relationship(type: "LIKES", direction: IN) + } + `; + await testHelper.initNeo4jGraphQL({ typeDefs }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should return posts where the SHORTEST like String is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const shortestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const longestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${shortestTestString}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${longestTestString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_SHORTEST_LENGTH_EQUAL: ${shortestTestString.length} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.plural]).toIncludeSameMembers([ + { + testString, + likes: [{ testString: shortestTestString }], + }, + ]); + }); + + test("should return posts where the LONGEST like String is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const shortestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const longestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${shortestTestString}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${longestTestString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_LONGEST_LENGTH_EQUAL: ${longestTestString.length} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.plural]).toIncludeSameMembers([ + { + testString, + likes: [{ testString: longestTestString }], + }, + ]); + }); + + test("should return posts where the AVERAGE of like Strings is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString1}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString3}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_EQUAL: ${avg} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Strings is GT than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + const avgGT = avg - 1; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString1}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString3}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_GT: ${avgGT} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Strings is GTE than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString1}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString3}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_GTE: ${avg} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Strings is LT than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + const avgLT = avg + 1; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString1}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString3}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_LT: ${avgLT} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Strings is LTE than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString1}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString3}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_LTE: ${avg} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); +}); + +describe("aggregations-where-node-string interface relationships of concrete types", () => { + let testHelper: TestHelper; + let User: UniqueType; + let Post: UniqueType; + let Person: UniqueType; + + beforeEach(async () => { + testHelper = new TestHelper(); + User = testHelper.createUniqueType("User"); + Post = testHelper.createUniqueType("Post"); + Person = testHelper.createUniqueType("Person"); + + const typeDefs = /* GraphQL */ ` + interface Human { + testString: String! + } + + type ${User} implements Human @node { + testString: String! + } + + type ${Person} implements Human @node { + testString: String! + } + + type ${Post} @node { + testString: String! + likes: [Human!]! @relationship(type: "LIKES", direction: IN) + } + `; + await testHelper.initNeo4jGraphQL({ typeDefs }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + describe("SHORTEST", () => { + test("should return posts where the %s like String is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const shortestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const longestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${shortestTestString}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${longestTestString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_SHORTEST_LENGTH_EQUAL: ${shortestTestString.length} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.plural]).toIncludeSameMembers([ + { + testString, + likes: [{ testString: shortestTestString }], + }, + ]); + }); + }); + + describe("LONGEST", () => { + test("should return posts where the %s like String is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const shortestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const longestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${shortestTestString}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {testString: "${longestTestString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_LONGEST_LENGTH_EQUAL: ${longestTestString.length} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.plural]).toIncludeSameMembers([ + { + testString, + likes: [{ testString: longestTestString }], + }, + ]); + }); + }); + + describe("AVERAGE", () => { + test("should return posts where the AVERAGE of like Strings is EQUAL to", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString1}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString3}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_EQUAL: ${avg} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Strings is GT than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + const avgGT = avg - 1; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString1}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString3}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_GT: ${avgGT} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Strings is GTE than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString1}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString3}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_GTE: ${avg} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Strings is LT than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + const avgLT = avg + 1; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString1}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString3}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_LT: ${avgLT} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + + test("should return posts where the average of like Strings is LTE than", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString1 = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const testString3 = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + const avg = (10 + 11 + 12) / 3; + + await testHelper.executeCypher( + ` + CREATE (p:${Post} {testString: "${testString}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString1}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString2}"}) + CREATE (p)<-[:LIKES]-(:${User} {testString: "${testString3}"}) + CREATE (:${Post} {testString: "${testString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_AVERAGE_LENGTH_LTE: ${avg} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural] as any[]; + expect(post.testString).toEqual(testString); + expect(post.likes).toHaveLength(3); + }); + }); +}); + +describe("aggregations-where-node-string relationships of interface types", () => { + let testHelper: TestHelper; + let User: UniqueType; + let Post: UniqueType; + let Person: UniqueType; + + beforeEach(() => { + testHelper = new TestHelper(); + User = testHelper.createUniqueType("User"); + Post = testHelper.createUniqueType("Post"); + Person = testHelper.createUniqueType("Person"); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should return posts where the SHORTEST like String is EQUAL to", async () => { + const typeDefs = /* GraphQL */ ` + interface Thing { + testString: String! + likes: [Human!]! @declareRelationship + } + + interface Human { + testString: String! + } + + type ${User} implements Human @node { + testString: String! @alias(property: "user_testString") + } + + type ${Person} implements Human @node { + testString: String! @alias(property: "person_testString") + } + + type ${Post} implements Thing @node { + testString: String! + likes: [Human!]! @relationship(type: "LIKES", direction: IN) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const shortestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 10, + }); + + const testString2 = generate({ + charset: "alphabetic", + readable: true, + length: 11, + }); + + const longestTestString = generate({ + charset: "alphabetic", + readable: true, + length: 12, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {user_testString: "${shortestTestString}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {user_testString: "${testString2}"}) + CREATE (:${Post} {testString: "${testString}"})<-[:LIKES]-(:${User} {user_testString: "${longestTestString}"}) + ` + ); + + const query = ` + { + ${Post.plural}(where: { testString_EQ: "${testString}", likesAggregate: { node: { testString_SHORTEST_LENGTH_EQUAL: ${shortestTestString.length} } } }) { + testString + likes { + testString + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Post.plural]).toIncludeSameMembers([ + { + testString, + likes: [{ testString: shortestTestString }], + }, + ]); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/array-pop-and-push.int.test.ts b/packages/graphql/tests/integration/deprecations/array-pop-and-push.int.test.ts new file mode 100644 index 0000000000..7e3e1468fe --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/array-pop-and-push.int.test.ts @@ -0,0 +1,80 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { gql } from "graphql-tag"; +import { generate } from "randomstring"; +import { TestHelper } from "../../utils/tests-helper"; + +describe("array-pop-and-push", () => { + const testHelper = new TestHelper(); + + beforeEach(() => {}); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should push to and pop from two different arrays in the same update", async () => { + const typeMovie = testHelper.createUniqueType("Movie"); + + const typeDefs = gql` + type ${typeMovie} @node { + title: String + tags: [String!] + moreTags: [String!] + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const movieTitle = generate({ + charset: "alphabetic", + }); + + const update = ` + mutation { + ${typeMovie.operations.update} (update: { tags_PUSH: "new tag", moreTags_POP: 2 }) { + ${typeMovie.plural} { + title + tags + moreTags + } + } + } + `; + + const cypher = ` + CREATE (m:${typeMovie} {title:$movieTitle, tags: ["abc"], moreTags: ["this", "that", "them"] }) + `; + + await testHelper.executeCypher(cypher, { movieTitle }); + + const gqlResult = await testHelper.executeGraphQL(update); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[typeMovie.operations.update][typeMovie.plural]).toEqual([ + { title: movieTitle, tags: ["abc", "new tag"], moreTags: ["this"] }, + ]); + }); +}); diff --git a/packages/graphql/tests/integration/custom-scalar-filtering.int.test.ts b/packages/graphql/tests/integration/deprecations/custom-scalar-filtering.int.test.ts similarity index 99% rename from packages/graphql/tests/integration/custom-scalar-filtering.int.test.ts rename to packages/graphql/tests/integration/deprecations/custom-scalar-filtering.int.test.ts index b920e3a855..6264c97d30 100644 --- a/packages/graphql/tests/integration/custom-scalar-filtering.int.test.ts +++ b/packages/graphql/tests/integration/deprecations/custom-scalar-filtering.int.test.ts @@ -17,7 +17,7 @@ * limitations under the License. */ -import { TestHelper } from "../utils/tests-helper"; +import { TestHelper } from "../../utils/tests-helper"; describe("Custom Scalar Filtering", () => { const testHelper = new TestHelper(); 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 new file mode 100644 index 0000000000..5304ae5505 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/advanced-filtering-deprecated.int.test.ts @@ -0,0 +1,1878 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { generate } from "randomstring"; +import type { UniqueType } from "../../../utils/graphql-types"; +import { TestHelper } from "../../../utils/tests-helper"; + +describe("Advanced Filtering - deprecated", () => { + const testHelper = new TestHelper(); + + afterEach(async () => { + await testHelper.close(); + }); + + describe.each(["ID", "String"] as const)("%s Filtering", (type) => { + test("should find Movies IN strings", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${randomType.name} @node { + property: ${type} + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const value = generate({ + readable: true, + charset: "alphabetic", + }); + + const randomValue1 = generate({ + readable: true, + charset: "alphabetic", + }); + + const randomValue2 = generate({ + readable: true, + charset: "alphabetic", + }); + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value}) + `, + { value } + ); + + const query = ` + { + ${randomType.plural}(where: { property_IN: ["${value}", "${randomValue1}", "${randomValue2}"] }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(1); + expect((gqlResult.data as any)[randomType.plural][0].property).toEqual(value); + }); + + test("should find Movies REGEX", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${randomType.name} @node { + property: ${type} + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + filters: { + [type]: { + MATCHES: true, + }, + }, + }, + }); + + const value = generate({ + readable: true, + charset: "alphabetic", + }); + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value}) + `, + { value: `${value}${value}` } + ); + + const query = ` + { + ${randomType.plural}(where: { property_MATCHES: "(?i)${value}.*" }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(1); + expect((gqlResult.data as any)[randomType.plural][0].property).toBe(`${value}${value}`); + }); + + test("should find Movies NOT string", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${randomType.name} @node { + property: ${type} + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const value = generate({ + readable: true, + charset: "alphabetic", + }); + + const randomValue1 = generate({ + readable: true, + charset: "alphabetic", + }); + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value}) + CREATE (:${randomType.name} {property: $randomValue1}) + `, + { value, randomValue1 } + ); + + const query = ` + { + ${randomType.plural}(where: { NOT: { property_EQ: "${randomValue1}" } }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(1); + + expect((gqlResult.data as any)[randomType.plural][0].property).toEqual(value); + }); + + test("should find Movies CONTAINS string", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${randomType.name} @node { + property: ${type} + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const value = generate({ + readable: true, + charset: "alphabetic", + }); + + const superValue = `${value}${value}`; + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $superValue}) + CREATE (:${randomType.name} {property: $superValue}) + CREATE (:${randomType.name} {property: $superValue}) + `, + { superValue } + ); + + const query = ` + { + ${randomType.plural}(where: { property_CONTAINS: "${value}" }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(3); + + expect((gqlResult.data as any)[randomType.plural][0].property).toEqual(superValue); + }); + + test("should find Movies STARTS_WITH string", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${randomType.name} @node { + property: ${type} + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const value = generate({ + readable: true, + charset: "alphabetic", + }); + + const superValue = `${value}${value}`; + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $superValue}) + CREATE (:${randomType.name} {property: $superValue}) + CREATE (:${randomType.name} {property: $superValue}) + `, + { superValue } + ); + + const query = ` + { + ${randomType.plural}(where: { property_STARTS_WITH: "${value}" }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(3); + + ((gqlResult.data as any)[randomType.plural] as any[]).forEach((x) => { + expect(x.property).toEqual(superValue); + }); + }); + + test("should find Movies ENDS_WITH string", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${randomType.name} @node { + property: ${type} + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const value = generate({ + readable: true, + charset: "alphabetic", + }); + + const notValue = generate({ + readable: true, + charset: "alphabetic", + }); + + const superValue = `${value}${value}`; + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value}) + CREATE (:${randomType.name} {property: $notValue}) + CREATE (:${randomType.name} {property: $superValue}) + `, + { value, notValue, superValue } + ); + + const query = ` + { + ${randomType.plural}(where: { property_ENDS_WITH: "${value}" }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(2); + }); + }); + + describe("String Filtering", () => { + test("should find Movies implicit EQ string", async () => { + const movieType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${movieType.name} @node { + title: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + }); + + const animatrix = "The Animatrix"; + const matrix = "The Matrix"; + const matrixReloaded = "The Matrix Reloaded"; + const matrixRevolutions = "The Matrix Revolutions"; + + await testHelper.executeCypher( + ` + CREATE (:${movieType.name} {title: $animatrix}) + CREATE (:${movieType.name} {title: $matrix}) + CREATE (:${movieType.name} {title: $matrixReloaded}) + CREATE (:${movieType.name} {title: $matrixRevolutions}) + `, + { animatrix, matrix, matrixReloaded, matrixRevolutions } + ); + + const query = ` + { + ${movieType.plural}(where: { title_EQ: "${matrix}" }) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[movieType.plural]).toHaveLength(1); + expect((gqlResult.data as any)[movieType.plural]).toEqual(expect.arrayContaining([{ title: matrix }])); + }); + + test("should find Movies EQ string", async () => { + const movieType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${movieType.name} @node { + title: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + }); + + const animatrix = "The Animatrix"; + const matrix = "The Matrix"; + const matrixReloaded = "The Matrix Reloaded"; + const matrixRevolutions = "The Matrix Revolutions"; + + await testHelper.executeCypher( + ` + CREATE (:${movieType.name} {title: $animatrix}) + CREATE (:${movieType.name} {title: $matrix}) + CREATE (:${movieType.name} {title: $matrixReloaded}) + CREATE (:${movieType.name} {title: $matrixRevolutions}) + `, + { animatrix, matrix, matrixReloaded, matrixRevolutions } + ); + + const query = ` + { + ${movieType.plural}(where: { title_EQ: "${matrix}" }) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[movieType.plural]).toHaveLength(1); + expect((gqlResult.data as any)[movieType.plural]).toEqual(expect.arrayContaining([{ title: matrix }])); + }); + + test("should find Movies GT string", async () => { + const movieType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${movieType.name} @node { + title: String + } + `; + + await testHelper.initNeo4jGraphQL({ + features: { + filters: { + String: { + LT: true, + GT: true, + LTE: true, + GTE: true, + }, + }, + }, + typeDefs, + }); + + const animatrix = "The Animatrix"; + const matrix = "The Matrix"; + const matrixReloaded = "The Matrix Reloaded"; + const matrixRevolutions = "The Matrix Revolutions"; + + await testHelper.executeCypher( + ` + CREATE (:${movieType.name} {title: $animatrix}) + CREATE (:${movieType.name} {title: $matrix}) + CREATE (:${movieType.name} {title: $matrixReloaded}) + CREATE (:${movieType.name} {title: $matrixRevolutions}) + `, + { animatrix, matrix, matrixReloaded, matrixRevolutions } + ); + + const query = ` + { + ${movieType.plural}(where: { title_GT: "${matrix}" }) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[movieType.plural]).toHaveLength(2); + expect((gqlResult.data as any)[movieType.plural]).toEqual( + expect.arrayContaining([{ title: matrixReloaded }, { title: matrixRevolutions }]) + ); + }); + + test("should find Movies LT string", async () => { + const movieType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${movieType.name} @node { + title: String + } + `; + + await testHelper.initNeo4jGraphQL({ + features: { + filters: { + String: { + LT: true, + GT: true, + LTE: true, + GTE: true, + }, + }, + }, + typeDefs, + }); + + const matrix = "The Matrix"; + const matrixReloaded = "The Matrix Reloaded"; + const matrixRevolutions = "The Matrix Revolutions"; + const matrixResurrections = "The Matrix Resurrections"; + + await testHelper.executeCypher( + ` + CREATE (:${movieType.name} {title: $matrix}) + CREATE (:${movieType.name} {title: $matrixReloaded}) + CREATE (:${movieType.name} {title: $matrixRevolutions}) + CREATE (:${movieType.name} {title: $matrixResurrections}) + `, + { matrix, matrixReloaded, matrixRevolutions, matrixResurrections } + ); + + const query = ` + { + ${movieType.plural}(where: { title_LT: "${matrixRevolutions}" }) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[movieType.plural]).toHaveLength(3); + expect((gqlResult.data as any)[movieType.plural]).toEqual( + expect.arrayContaining([{ title: matrix }, { title: matrixReloaded }, { title: matrixResurrections }]) + ); + }); + + test("should find Movies GTE string", async () => { + const movieType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${movieType.name} @node { + title: String + } + `; + + await testHelper.initNeo4jGraphQL({ + features: { + filters: { + String: { + LT: true, + GT: true, + LTE: true, + GTE: true, + }, + }, + }, + typeDefs, + }); + + const animatrix = "The Animatrix"; + const matrix = "The Matrix"; + const matrixReloaded = "The Matrix Reloaded"; + const matrixRevolutions = "The Matrix Revolutions"; + + await testHelper.executeCypher( + ` + CREATE (:${movieType.name} {title: $animatrix}) + CREATE (:${movieType.name} {title: $matrix}) + CREATE (:${movieType.name} {title: $matrixReloaded}) + CREATE (:${movieType.name} {title: $matrixRevolutions}) + `, + { animatrix, matrix, matrixReloaded, matrixRevolutions } + ); + + const query = ` + { + ${movieType.plural}(where: { title_GTE: "${matrix}" }) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[movieType.plural]).toHaveLength(3); + expect((gqlResult.data as any)[movieType.plural]).toEqual( + expect.arrayContaining([{ title: matrix }, { title: matrixReloaded }, { title: matrixRevolutions }]) + ); + }); + + test("should find Movies LTE string", async () => { + const movieType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${movieType.name} @node { + title: String + } + `; + + await testHelper.initNeo4jGraphQL({ + features: { + filters: { + String: { + LT: true, + GT: true, + LTE: true, + GTE: true, + }, + }, + }, + typeDefs, + }); + + const matrix = "The Matrix"; + const matrixReloaded = "The Matrix Reloaded"; + const matrixRevolutions = "The Matrix Revolutions"; + const matrixResurrections = "The Matrix Resurrections"; + + await testHelper.executeCypher( + ` + CREATE (:${movieType.name} {title: $matrix}) + CREATE (:${movieType.name} {title: $matrixReloaded}) + CREATE (:${movieType.name} {title: $matrixRevolutions}) + CREATE (:${movieType.name} {title: $matrixResurrections}) + + `, + { matrix, matrixReloaded, matrixRevolutions, matrixResurrections } + ); + + const query = ` + { + ${movieType.plural}(where: { title_LTE: "${matrixRevolutions}" }) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + if (gqlResult.errors) { + console.log(JSON.stringify(gqlResult.errors, null, 2)); + } + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[movieType.plural]).toHaveLength(4); + expect((gqlResult.data as any)[movieType.plural]).toEqual( + expect.arrayContaining([ + { title: matrix }, + { title: matrixReloaded }, + { title: matrixRevolutions }, + { title: matrixResurrections }, + ]) + ); + }); + }); + + describe.each(["Int", "Float"] as const)("%s Filtering", (type) => { + test("should find Movies NOT number", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${randomType.name} @node { + property: ${type} + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + let property: number; + + if (type === "Int") { + property = Math.floor(Math.random() * 9999); + } else { + property = Math.floor(Math.random() * 9999) + 0.5; + } + + let notProperty: number; + + if (type === "Int") { + notProperty = Math.floor(Math.random() * 9999); + } else { + notProperty = Math.floor(Math.random() * 9999) + 0.5; + } + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $property}) + CREATE (:${randomType.name} {property: $notProperty}) + `, + { property, notProperty } + ); + + const query = ` + { + ${randomType.plural}(where: { NOT: { property_EQ: ${notProperty} } }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(1); + expect((gqlResult.data as any)[randomType.plural][0].property).toEqual(property); + }); + + test("should find Movies IN numbers", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${randomType.name} @node { + property: ${type} + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + let value: number; + + if (type === "Int") { + value = Math.floor(Math.random() * 9999); + } else { + value = Math.floor(Math.random() * 9999) + 0.5; + } + + let randomValue1: number; + + if (type === "Int") { + randomValue1 = Math.floor(Math.random() * 9999); + } else { + randomValue1 = Math.floor(Math.random() * 9999) + 0.5; + } + + let randomValue2: number; + + if (type === "Int") { + randomValue2 = Math.floor(Math.random() * 9999); + } else { + randomValue2 = Math.floor(Math.random() * 9999) + 0.5; + } + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value}) + `, + { value } + ); + + const query = ` + { + ${randomType.plural}(where: { property_IN: [${value}, ${randomValue1}, ${randomValue2}] }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(1); + expect((gqlResult.data as any)[randomType.plural][0].property).toEqual(value); + }); + + test("should find Movies LT number", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${randomType.name} @node { + property: ${type} + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + let value: number; + + if (type === "Int") { + value = Math.floor(Math.random() * 9999); + } else { + value = Math.floor(Math.random() * 9999) + 0.5; + } + + const lessThanValue = value - (value + 1); + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value}) + CREATE (:${randomType.name} {property: $lessThanValue}) + `, + { value, lessThanValue } + ); + + const query = ` + { + ${randomType.plural}(where: { property_LT: ${lessThanValue + 1} }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(1); + expect((gqlResult.data as any)[randomType.plural][0].property).toEqual(lessThanValue); + }); + + test("should find Movies LTE number", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${randomType.name} @node { + property: ${type} + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + let value: number; + + if (type === "Int") { + value = Math.floor(Math.random() * 9999); + } else { + value = Math.floor(Math.random() * 9999) + 0.5; + } + + const lessThanValue = value - (value + 1); + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value}) + CREATE (:${randomType.name} {property: $lessThanValue}) + `, + { value, lessThanValue } + ); + + const query = ` + { + ${randomType.plural}(where: { property_LTE: ${value} }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(2); + }); + + test("should find Movies GT number", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${randomType.name} @node { + property: ${type} + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + let value: number; + + if (type === "Int") { + value = Math.floor(Math.random() * 9999); + } else { + value = Math.floor(Math.random() * 9999) + 0.5; + } + + const graterThanValue = value + 1; + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value}) + CREATE (:${randomType.name} {property: $graterThanValue}) + `, + { value, graterThanValue } + ); + + const query = ` + { + ${randomType.plural}(where: { property_GT: ${graterThanValue - 1} }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(1); + expect((gqlResult.data as any)[randomType.plural][0].property).toEqual(graterThanValue); + }); + + test("should find Movies GTE number", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${randomType.name} @node { + property: ${type} + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + let value: number; + + if (type === "Int") { + value = Math.floor(Math.random() * 9999); + } else { + value = Math.floor(Math.random() * 9999) + 0.5; + } + + const greaterThan = value + 1; + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value}) + CREATE (:${randomType.name} {property: $greaterThan}) + `, + { value, greaterThan } + ); + + const query = ` + { + ${randomType.plural}(where: { property_GTE: ${value} }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(2); + }); + }); + + describe("Boolean Filtering", () => { + test("should find Movies equality equality", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${randomType.name} @node { + property: Boolean + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const value = false; + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value}) + `, + { value } + ); + + const query = ` + { + ${randomType.plural}(where: { property_EQ: false }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(1); + }); + + test("should find Movies NOT boolean", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${randomType.name} @node { + property: Boolean + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const value = false; + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value}) + `, + { value } + ); + + const query = ` + { + ${randomType.plural}(where: { NOT: { property_EQ: false } }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(0); + }); + }); + + describe("Relationship/Connection Filtering", () => { + describe("equality", () => { + test("should find using relationship equality on node", 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 query = ` + { + ${randomType1.plural}(where: { ${randomType2.plural}_SOME: { id_EQ: "${relationId}" } }) { + id + ${randomType2.plural} { + id + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[randomType1.plural]).toHaveLength(1); + expect((gqlResult.data as any)[randomType1.plural][0]).toMatchObject({ + id: rootId, + [randomType2.plural]: [{ id: relationId }], + }); + }); + + test("should find using equality on node using connection", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Genre = testHelper.createUniqueType("Genre"); + + const typeDefs = ` + type ${Movie} @node { + id: ID + genres: [${Genre}!]! @relationship(type: "IN_GENRE", direction: OUT) + } + + type ${Genre} @node { + id: ID + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const movieId = generate({ + charset: "alphabetic", + }); + + const genreId = generate({ + charset: "alphabetic", + }); + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {id: $movieId})-[:IN_GENRE]->(:${Genre} {id:$genreId}) + `, + { movieId, genreId } + ); + + const query = ` + { + ${Movie.plural}(where: { genresConnection_SOME: { node: { id_EQ: "${genreId}" } } }) { + id + genres { + id + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect(gqlResult.data as any).toEqual({ + [Movie.plural]: [ + { + id: movieId, + genres: [{ id: genreId }], + }, + ], + }); + }); + + test("should find using equality on relationship using connection", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Genre = testHelper.createUniqueType("Genre"); + + const typeDefs = ` + type ${Movie} @node { + id: ID + genres: [${Genre}!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "ActedIn") + } + + type ${Genre} @node { + id: ID + } + + type ActedIn @relationshipProperties { + id: String + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const movieId = generate({ + charset: "alphabetic", + }); + + const genreId = generate({ + charset: "alphabetic", + }); + + const actedInId = generate({ + charset: "alphabetic", + }); + + await testHelper.executeCypher( + ` + CREATE (movie:${Movie} {id: $movieId})-[:IN_GENRE {id:$actedInId}]->(:${Genre} {id:$genreId}) + `, + { movieId, genreId, actedInId } + ); + + const query = ` + { + ${Movie.plural}(where: { genresConnection_SOME: { edge: { id_EQ: "${actedInId}" } } }) { + id + genres { + id + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + expect(gqlResult.data as any).toEqual({ + [Movie.plural]: [ + { + id: movieId, + genres: [{ id: genreId }], + }, + ], + }); + }); + + test("should find relationship and node property equality using connection", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Genre = testHelper.createUniqueType("Genre"); + + const typeDefs = ` + type ${Movie} @node { + id: ID + genres: [${Genre}!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "ActedIn") + } + + type ${Genre} @node { + id: ID + } + + type ActedIn @relationshipProperties { + id: String + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const movieId = generate({ + charset: "alphabetic", + }); + + const genreId = generate({ + charset: "alphabetic", + }); + + const actedInId = generate({ + charset: "alphabetic", + }); + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {id: $movieId})-[:IN_GENRE {id:$actedInId}]->(:${Genre} {id:$genreId}) + `, + { movieId, genreId, actedInId } + ); + + const query = ` + { + ${Movie.plural}(where: { genresConnection_SOME: { node: { id_EQ: "${genreId}" } edge: { id_EQ: "${actedInId}" } } }) { + id + genres { + id + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect(gqlResult.data as any).toEqual({ + [Movie.plural]: [ + { + id: movieId, + genres: [{ id: genreId }], + }, + ], + }); + }); + }); + + describe("NOT", () => { + test("should find using NOT on relationship", 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 rootId1 = generate({ + charset: "alphabetic", + }); + const rootId2 = generate({ + charset: "alphabetic", + }); + + const relationId1 = generate({ + charset: "alphabetic", + }); + const relationId2 = generate({ + charset: "alphabetic", + }); + + await testHelper.executeCypher( + ` + CREATE (root1:${randomType1.name} {id: $rootId1}) + CREATE (root2:${randomType1.name} {id: $rootId2}) + CREATE (relation1:${randomType2.name} {id: $relationId1}) + CREATE (relation2:${randomType2.name} {id: $relationId2}) + MERGE (root1)-[:IN_GENRE]->(relation1) + MERGE (root2)-[:IN_GENRE]->(relation2) + `, + { rootId1, rootId2, relationId1, relationId2 } + ); + + const query = /* GraphQL */ ` + { + ${randomType1.plural}(where: { NOT: { ${randomType2.plural}_SOME: { id_EQ: "${relationId2}" } } }) { + id + ${randomType2.plural} { + id + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[randomType1.plural]).toHaveLength(1); + expect((gqlResult.data as any)[randomType1.plural][0]).toMatchObject({ + id: rootId1, + [randomType2.plural]: [{ id: relationId1 }], + }); + }); + + test("should find using relationship properties and connections", 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, properties: "ActedIn") + } + + type ${randomType2.name} @node { + id: ID + } + + type ActedIn @relationshipProperties { + id: ID + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const rootId1 = generate({ + charset: "alphabetic", + }); + const rootId2 = generate({ + charset: "alphabetic", + }); + + const relationId1 = generate({ + charset: "alphabetic", + }); + const relationId2 = generate({ + charset: "alphabetic", + }); + const actedInId = generate({ + charset: "alphabetic", + }); + + await testHelper.executeCypher( + ` + CREATE (:${randomType1.name} {id: $rootId1})-[:IN_GENRE {id: $actedInId}]->(:${randomType2.name} {id: $relationId1}) + CREATE (:${randomType1.name} {id: $rootId2})-[:IN_GENRE {id: randomUUID()}]->(:${randomType2.name} {id: $relationId2}) + `, + { rootId1, rootId2, relationId1, relationId2, actedInId } + ); + + const query = ` + { + ${randomType1.plural}(where: { ${randomType2.plural}Connection_NONE: { edge: { id_EQ: "${actedInId}" } } }) { + id + ${randomType2.plural} { + id + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[randomType1.plural]).toHaveLength(1); + expect((gqlResult.data as any)[randomType1.plural][0]).toMatchObject({ + id: rootId2, + [randomType2.plural]: [{ id: relationId2 }], + }); + }); + }); + + describe("List Predicates", () => { + let Movie: UniqueType; + let Actor: UniqueType; + + const movies = [ + ...Array(4) + .fill(null) + .map((_, i) => ({ id: generate(), budget: (i + 1) ** 2 })), + ]; + const actors = [ + ...Array(4) + .fill(null) + .map((_, i) => ({ id: generate(), flag: i % 2 === 0 })), + ]; + + beforeEach(async () => { + Movie = testHelper.createUniqueType("Movie"); + Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = ` + type ${Movie} @node { + id: ID! @id + budget: Int! + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) + } + + type ${Actor} @node { + id: ID! @id + flag: Boolean! + actedIn: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (m1:${Movie}) SET m1 = $movies[0] + CREATE (m2:${Movie}) SET m2 = $movies[1] + CREATE (m3:${Movie}) SET m3 = $movies[2] + CREATE (m4:${Movie}) SET m4 = $movies[3] + CREATE (a1:${Actor}) SET a1 = $actors[0] + CREATE (a2:${Actor}) SET a2 = $actors[1] + CREATE (a3:${Actor}) SET a3 = $actors[2] + CREATE (a4:${Actor}) SET a4 = $actors[3] + MERGE (a1)-[:ACTED_IN]->(m1)<-[:ACTED_IN]-(a3) + MERGE (a2)-[:ACTED_IN]->(m2)<-[:ACTED_IN]-(a3) + MERGE (a2)-[:ACTED_IN]->(m3)<-[:ACTED_IN]-(a4) + MERGE (a1)-[:ACTED_IN]->(m4)<-[:ACTED_IN]-(a2) + MERGE (a3)-[:ACTED_IN]->(m4) + `, + { movies, actors } + ); + }); + + describe("on relationship", () => { + function generateQuery(predicate: "ALL" | "NONE" | "SINGLE" | "SOME") { + return /* GraphQL */ ` + query($movieIds: [ID!]!) { + ${Movie.plural}(where: { AND: [{ id_IN: $movieIds }, { actors_${predicate}: { NOT: { flag_EQ: false } } }] }) { + id + actors(where: { NOT: { flag_EQ: false } }) { + id + flag + } + } + } + `; + } + + test("ALL", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("ALL"), { + variableValues: { movieIds: movies.map(({ id }) => id) }, + }); + + expect(gqlResult.errors).toBeUndefined(); + + const gqlMovies = gqlResult.data?.[Movie.plural]; + + expect(gqlMovies).toHaveLength(1); + expect(gqlMovies).toContainEqual({ + id: movies[0]?.id, + actors: expect.toIncludeSameMembers([actors[0], actors[2]]), + }); + }); + + test("NONE", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("NONE"), { + variableValues: { movieIds: movies.map(({ id }) => id) }, + }); + + expect(gqlResult.errors).toBeUndefined(); + + const gqlMovies = gqlResult.data?.[Movie.plural]; + + expect(gqlMovies).toHaveLength(1); + expect(gqlMovies).toContainEqual({ + id: movies[2]?.id, + actors: [], + }); + }); + + test("SINGLE", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("SINGLE"), { + variableValues: { movieIds: movies.map(({ id }) => id) }, + }); + + expect(gqlResult.errors).toBeUndefined(); + + const gqlMovies = gqlResult.data?.[Movie.plural]; + + expect(gqlMovies).toHaveLength(1); + expect(gqlMovies).toContainEqual({ + id: movies[1]?.id, + actors: expect.toIncludeSameMembers([actors[2]]), + }); + }); + + test("SOME", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("SOME"), { + variableValues: { movieIds: movies.map(({ id }) => id) }, + }); + + expect(gqlResult.errors).toBeUndefined(); + + const gqlMovies = gqlResult.data?.[Movie.plural]; + + expect(gqlMovies).toHaveLength(3); + expect(gqlMovies).toContainEqual({ + id: movies[0]?.id, + actors: expect.toIncludeSameMembers([actors[0], actors[2]]), + }); + expect(gqlMovies).toContainEqual({ + id: movies[1]?.id, + actors: expect.toIncludeSameMembers([actors[2]]), + }); + expect(gqlMovies).toContainEqual({ + id: movies[3]?.id, + actors: expect.toIncludeSameMembers([actors[0], actors[2]]), + }); + }); + }); + + describe("on relationship using NOT operator", () => { + const generateQuery = (predicate: "ALL" | "NONE" | "SINGLE" | "SOME") => ` + query($movieIds: [ID!]!) { + ${Movie.plural}(where: { AND: [{ id_IN: $movieIds }, { actors_${predicate}: { NOT: { flag_EQ: false } } }] }) { + id + actors(where: { NOT: { flag_EQ: false } }) { + id + flag + } + } + } + `; + + test("ALL", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("ALL"), { + variableValues: { movieIds: movies.map(({ id }) => id) }, + }); + + expect(gqlResult.errors).toBeUndefined(); + + const gqlMovies = gqlResult.data?.[Movie.plural]; + + expect(gqlMovies).toHaveLength(1); + expect(gqlMovies).toContainEqual({ + id: movies[0]?.id, + actors: expect.toIncludeSameMembers([actors[0], actors[2]]), + }); + }); + + test("NONE", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("NONE"), { + variableValues: { movieIds: movies.map(({ id }) => id) }, + }); + + expect(gqlResult.errors).toBeUndefined(); + + const gqlMovies = gqlResult.data?.[Movie.plural]; + + expect(gqlMovies).toHaveLength(1); + expect(gqlMovies).toContainEqual({ + id: movies[2]?.id, + actors: [], + }); + }); + + test("SINGLE", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("SINGLE"), { + variableValues: { movieIds: movies.map(({ id }) => id) }, + }); + + expect(gqlResult.errors).toBeUndefined(); + + const gqlMovies = gqlResult.data?.[Movie.plural]; + + expect(gqlMovies).toHaveLength(1); + expect(gqlMovies).toContainEqual({ + id: movies[1]?.id, + actors: expect.toIncludeSameMembers([actors[2]]), + }); + }); + + test("SOME", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("SOME"), { + variableValues: { movieIds: movies.map(({ id }) => id) }, + }); + + expect(gqlResult.errors).toBeUndefined(); + + const gqlMovies = gqlResult.data?.[Movie.plural]; + + expect(gqlMovies).toHaveLength(3); + expect(gqlMovies).toContainEqual({ + id: movies[0]?.id, + actors: expect.toIncludeSameMembers([actors[0], actors[2]]), + }); + expect(gqlMovies).toContainEqual({ + id: movies[1]?.id, + actors: expect.toIncludeSameMembers([actors[2]]), + }); + expect(gqlMovies).toContainEqual({ + id: movies[3]?.id, + actors: expect.toIncludeSameMembers([actors[0], actors[2]]), + }); + }); + }); + + describe("on connection", () => { + const generateQuery = (predicate: "ALL" | "NONE" | "SINGLE" | "SOME") => /* GraphQL */ ` + query($movieIds: [ID!]!) { + ${Movie.plural}(where: { AND: [{ id_IN: $movieIds }, { actorsConnection_${predicate}: { node: { NOT: { flag_EQ: false } } }}] }) { + id + actors(where: { NOT: { flag_EQ: false } }) { + id + flag + } + } + } + `; + + test("ALL", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("ALL"), { + variableValues: { movieIds: movies.map(({ id }) => id) }, + }); + + expect(gqlResult.errors).toBeUndefined(); + + const gqlMovies = gqlResult.data?.[Movie.plural]; + + expect(gqlMovies).toHaveLength(1); + expect(gqlMovies).toContainEqual({ + id: movies[0]?.id, + actors: expect.toIncludeSameMembers([actors[0], actors[2]]), + }); + }); + + test("NONE", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("NONE"), { + variableValues: { movieIds: movies.map(({ id }) => id) }, + }); + + expect(gqlResult.errors).toBeUndefined(); + + const gqlMovies = gqlResult.data?.[Movie.plural]; + + expect(gqlMovies).toHaveLength(1); + expect(gqlMovies).toContainEqual({ + id: movies[2]?.id, + actors: [], + }); + }); + + test("SINGLE", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("SINGLE"), { + variableValues: { movieIds: movies.map(({ id }) => id) }, + }); + + expect(gqlResult.errors).toBeUndefined(); + + const gqlMovies = gqlResult.data?.[Movie.plural]; + + expect(gqlMovies).toHaveLength(1); + expect(gqlMovies).toContainEqual({ + id: movies[1]?.id, + actors: expect.toIncludeSameMembers([actors[2]]), + }); + }); + + test("SOME", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("SOME"), { + variableValues: { movieIds: movies.map(({ id }) => id) }, + }); + + expect(gqlResult.errors).toBeUndefined(); + + const gqlMovies = gqlResult.data?.[Movie.plural]; + + expect(gqlMovies).toHaveLength(3); + expect(gqlMovies).toContainEqual({ + id: movies[0]?.id, + actors: expect.toIncludeSameMembers([actors[0], actors[2]]), + }); + expect(gqlMovies).toContainEqual({ + id: movies[1]?.id, + actors: expect.toIncludeSameMembers([actors[2]]), + }); + expect(gqlMovies).toContainEqual({ + id: movies[3]?.id, + actors: expect.toIncludeSameMembers([actors[0], actors[2]]), + }); + }); + }); + + describe("on connection using NOT operator", () => { + const generateQuery = (predicate: "ALL" | "NONE" | "SINGLE" | "SOME") => ` + query($movieIds: [ID!]!) { + ${Movie.plural}(where: { AND: [{ id_IN: $movieIds }, { actorsConnection_${predicate}: { node: { NOT: { flag_EQ: false } } } }] }) { + id + actors(where: { NOT: { flag_EQ: false }}) { + id + flag + } + } + } + `; + + test("ALL", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("ALL"), { + variableValues: { movieIds: movies.map(({ id }) => id) }, + }); + + expect(gqlResult.errors).toBeUndefined(); + + const gqlMovies = gqlResult.data?.[Movie.plural]; + + expect(gqlMovies).toHaveLength(1); + expect(gqlMovies).toContainEqual({ + id: movies[0]?.id, + actors: expect.toIncludeSameMembers([actors[0], actors[2]]), + }); + }); + + test("NONE", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("NONE"), { + variableValues: { movieIds: movies.map(({ id }) => id) }, + }); + + expect(gqlResult.errors).toBeUndefined(); + + const gqlMovies = gqlResult.data?.[Movie.plural]; + + expect(gqlMovies).toHaveLength(1); + expect(gqlMovies).toContainEqual({ + id: movies[2]?.id, + actors: [], + }); + }); + + test("SINGLE", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("SINGLE"), { + variableValues: { movieIds: movies.map(({ id }) => id) }, + }); + + expect(gqlResult.errors).toBeUndefined(); + + const gqlMovies = gqlResult.data?.[Movie.plural]; + + expect(gqlMovies).toHaveLength(1); + expect(gqlMovies).toContainEqual({ + id: movies[1]?.id, + actors: expect.toIncludeSameMembers([actors[2]]), + }); + }); + + test("SOME", async () => { + const gqlResult = await testHelper.executeGraphQL(generateQuery("SOME"), { + variableValues: { movieIds: movies.map(({ id }) => id) }, + }); + + expect(gqlResult.errors).toBeUndefined(); + + const gqlMovies = gqlResult.data?.[Movie.plural]; + + expect(gqlMovies).toHaveLength(3); + expect(gqlMovies).toContainEqual({ + id: movies[0]?.id, + actors: expect.toIncludeSameMembers([actors[0], actors[2]]), + }); + expect(gqlMovies).toContainEqual({ + id: movies[1]?.id, + actors: expect.toIncludeSameMembers([actors[2]]), + }); + expect(gqlMovies).toContainEqual({ + id: movies[3]?.id, + actors: expect.toIncludeSameMembers([actors[0], actors[2]]), + }); + }); + }); + }); + }); + + describe("NULL Filtering", () => { + // TODO: split in 2 tests + test("should work for existence and non-existence", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${randomType.name} @node { + id: String! + optional: String + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const id1 = generate({ + readable: true, + charset: "alphabetic", + }); + + const id2 = generate({ + readable: true, + charset: "alphabetic", + }); + + const optionalValue = generate({ + readable: true, + charset: "alphabetic", + }); + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {id: $id1}) + CREATE (:${randomType.name} {id: $id2, optional: $optionalValue}) + `, + { id1, id2, optionalValue } + ); + + // Test NULL checking + + const nullQuery = ` + { + ${randomType.plural}(where: { optional_EQ: null }) { + id + } + } + `; + + const nullResult = await testHelper.executeGraphQL(nullQuery); + + expect(nullResult.errors).toBeUndefined(); + + expect((nullResult.data as any)[randomType.plural]).toHaveLength(1); + + expect((nullResult.data as any)[randomType.plural][0].id).toEqual(id1); + + // Test NOT NULL checking + + const notNullQuery = ` + { + ${randomType.plural}(where: { NOT: { optional_EQ: null } }) { + id + } + } + `; + + const notNullResult = await testHelper.executeGraphQL(notNullQuery); + + expect(notNullResult.errors).toBeUndefined(); + + expect((notNullResult.data as any)[randomType.plural]).toHaveLength(1); + + expect((notNullResult.data as any)[randomType.plural][0].id).toEqual(id2); + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/cypher-filtering-auth-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/cypher-filtering-auth-deprecated.int.test.ts new file mode 100644 index 0000000000..0596ff5a83 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/cypher-filtering-auth-deprecated.int.test.ts @@ -0,0 +1,503 @@ +/* + * 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 { createBearerToken } from "../../../../utils/create-bearer-token"; +import { TestHelper } from "../../../../utils/tests-helper"; + +describe("cypher directive filtering - Auth - deprecated", () => { + const testHelper = new TestHelper(); + + afterEach(async () => { + await testHelper.close(); + }); + + test("With authorization on type", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node @authorization(filter: [{ where: { node: { custom_field_EQ: "$jwt.custom_value" } } }]) { + title: String + custom_field: String + @cypher( + statement: """ + MATCH (this) + return this.custom_field AS s + """ + columnName: "s" + ) + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const token = createBearerToken("secret", { custom_value: "hello" }); + + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix", custom_field: "hello" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", custom_field: "goodbye" }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + `, + {} + ); + + const query = ` + query { + ${Movie.plural} { + title + custom_field + } + } + `; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.plural]: [ + { + title: "The Matrix", + custom_field: "hello", + }, + ], + }); + }); + + test("With authorization on @cypher field, selecting @cypher field", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + custom_field: String + @cypher( + statement: """ + MATCH (this) + RETURN this.custom_field AS s + """ + columnName: "s" + ) + @authorization(filter: [{ where: { node: { custom_field_EQ: "$jwt.custom_value" } } }]) + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const token = createBearerToken("secret", { custom_value: "hello" }); + + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix", custom_field: "hello" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", custom_field: "goodbye" }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + `, + {} + ); + + const query = ` + query { + ${Movie.plural} { + custom_field + } + } + `; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.plural]: [ + { + custom_field: "hello", + }, + ], + }); + }); + + test("With authorization on @cypher field, selecting title field", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + custom_field: String + @cypher( + statement: """ + MATCH (this) + RETURN this.custom_field AS s + """ + columnName: "s" + ) + @authorization(filter: [{ where: { node: { title_EQ: "$jwt.custom_value" } } }]) + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const token = createBearerToken("secret", { custom_value: "hello" }); + + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix", custom_field: "hello" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", custom_field: "goodbye" }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + `, + {} + ); + + const query = ` + query { + ${Movie.plural} { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.plural]: expect.toIncludeSameMembers([ + { + title: "The Matrix", + }, + { + title: "The Matrix Reloaded", + }, + ]), + }); + }); + + test("With authorization on Actor type field using nested Movie @cypher field return value", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + custom_field: String + @cypher( + statement: """ + MATCH (this) + RETURN this.custom_field AS s + """ + columnName: "s" + ) + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) + } + + type ${Actor} @node @authorization(filter: [{ where: { node: { movies_SOME: { custom_field_EQ: "$jwt.custom_value" } } } }]) { + name: String + movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const token = createBearerToken("secret", { custom_value: "hello" }); + + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix", custom_field: "hello" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", custom_field: "goodbye" }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a2:${Actor} { name: "Jada Pinkett Smith" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a2)-[:ACTED_IN]->(m2) + `, + {} + ); + + const query = ` + query { + ${Actor.plural} { + name + } + } + `; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Actor.plural]: [ + { + name: "Keanu Reeves", + }, + ], + }); + }); + + test("With authorization on a different field than the @cypher field", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String @authorization(filter: [{ where: { node: { custom_field_EQ: "$jwt.custom_value" } } }]) + custom_field: String + @cypher( + statement: """ + MATCH (this) + RETURN this.custom_field AS s + """ + columnName: "s" + ) + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const token = createBearerToken("secret", { custom_value: "hello" }); + + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix", custom_field: "hello" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", custom_field: "goodbye" }) + CREATE (m3:${Movie} { title: "The Matrix Revolutions", custom_field: "hello" }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + `, + {} + ); + + const query = ` + query { + ${Movie.plural} { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.plural]: expect.toIncludeSameMembers([ + { + title: "The Matrix", + }, + { + title: "The Matrix Revolutions", + }, + ]), + }); + }); + + test("With authorization on type using @cypher return value, with validate FAIL", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node @authorization(validate: [{ where: { node: { custom_field_EQ: "$jwt.custom_value" } } }]) { + title: String + custom_field: String + @cypher( + statement: """ + MATCH (this) + RETURN this.custom_field AS s + """ + columnName: "s" + ) + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const token = createBearerToken("secret", { custom_value: "hello" }); + + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", custom_field: "hello" }) + CREATE (m3:${Movie} { title: "The Matrix Revolutions" }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + `, + {} + ); + + const query = ` + query { + ${Movie.plural} { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toHaveLength(1); + expect(gqlResult.errors?.[0]?.message).toBe("Forbidden"); + }); + + test("With authorization on type using @cypher return value, with validate PASS", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node @authorization(validate: [{ where: { node: { custom_field_EQ: "$jwt.custom_value" } } }]) { + title: String + custom_field: String + @cypher( + statement: """ + MATCH (this) + RETURN this.custom_field AS s + """ + columnName: "s" + ) + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const token = createBearerToken("secret", { custom_value: "hello" }); + + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix", custom_field: "hello" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", custom_field: "hello" }) + CREATE (m3:${Movie} { title: "The Matrix Revolutions", custom_field: "hello" }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + `, + {} + ); + + const query = ` + query { + ${Movie.plural} { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.plural]: expect.toIncludeSameMembers([ + { + title: "The Matrix", + }, + { + title: "The Matrix Reloaded", + }, + { + title: "The Matrix Revolutions", + }, + ]), + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/cypher-filtering-list-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/cypher-filtering-list-deprecated.int.test.ts new file mode 100644 index 0000000000..0fe81bece0 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/cypher-filtering-list-deprecated.int.test.ts @@ -0,0 +1,424 @@ +/* + * 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("cypher directive filtering - List - deprecated", () => { + const testHelper = new TestHelper(); + let CustomType: UniqueType; + + beforeEach(() => { + CustomType = testHelper.createUniqueType("CustomType"); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("String List cypher field: INCLUDES", async () => { + const typeDefs = /* GraphQL */ ` + type ${CustomType} @node { + title: String + custom_cypher_list: [String] @cypher(statement: + """ + MATCH (this) + RETURN this.custom_data as list + """ + , columnName: "list") + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher(` + CREATE (:${CustomType} { title: "test", custom_data: ['a', 'b', 'c'] }) + CREATE (:${CustomType} { title: "test2", custom_data: ['d', 'e', 'f'] }) + `); + + const query = /* GraphQL */ ` + query { + ${CustomType.plural}(where: { custom_cypher_list_INCLUDES: "a" }) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [CustomType.plural]: [ + { + title: "test", + }, + ], + }); + }); + + test("Int List cypher field: INCLUDES", async () => { + const typeDefs = /* GraphQL */ ` + type ${CustomType} @node { + title: String + custom_cypher_list: [Int] @cypher(statement: + """ + MATCH (this) + RETURN this.custom_data as list + """ + , columnName: "list") + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher(` + CREATE (:${CustomType} { title: "test", custom_data: [1, 2, 3] }) + CREATE (:${CustomType} { title: "test2", custom_data: [4, 5, 6] }) + `); + + const query = /* GraphQL */ ` + query { + ${CustomType.plural}(where: { custom_cypher_list_INCLUDES: 2 }) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [CustomType.plural]: [ + { + title: "test", + }, + ], + }); + }); + + test("Float List cypher field: INCLUDES", async () => { + const typeDefs = /* GraphQL */ ` + type ${CustomType} @node { + title: String + custom_cypher_list: [Float] @cypher(statement: + """ + MATCH (this) + RETURN this.custom_data as list + """ + , columnName: "list") + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher(` + CREATE (:${CustomType} { title: "test", custom_data: [10.0, 20.0, 30.0] }) + CREATE (:${CustomType} { title: "test2", custom_data: [40.0, 50.0, 60.0] }) + `); + + const query = /* GraphQL */ ` + query { + ${CustomType.plural}(where: { custom_cypher_list_INCLUDES: 20.0 }) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [CustomType.plural]: [ + { + title: "test", + }, + ], + }); + }); + + test("Point List cypher field: INCLUDES", async () => { + const typeDefs = /* GraphQL */ ` + type ${CustomType} @node { + title: String + custom_cypher_list: [Point!] @cypher(statement: + """ + MATCH (this) + RETURN this.custom_data as list + """ + , columnName: "list") + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher(` + CREATE (:${CustomType} { title: "test", custom_data: [point({ latitude: 1, longitude: 2 }), point({ latitude: 3, longitude: 4 })] }) + CREATE (:${CustomType} { title: "test2", custom_data: [point({ latitude: 5, longitude: 6 }), point({ latitude: 7, longitude: 8 })] }) + `); + + const query = /* GraphQL */ ` + query { + ${CustomType.plural}(where: { custom_cypher_list_INCLUDES: { latitude: 1, longitude: 2 } }) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [CustomType.plural]: [ + { + title: "test", + }, + ], + }); + }); + + test("CartesianPoint List cypher field: INCLUDES", async () => { + const typeDefs = /* GraphQL */ ` + type ${CustomType} @node { + title: String + custom_cypher_list: [CartesianPoint] @cypher(statement: + """ + MATCH (this) + RETURN this.custom_data as list + """ + , columnName: "list") + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher(` + CREATE (:${CustomType} { title: "test", custom_data: [point({ x: 1, y: 2, z: 3 }), point({ x: 3, y: 4, z: 5 })] }) + CREATE (:${CustomType} { title: "test2", custom_data: [point({ x: 5, y: 6, z: 7 }), point({ x: 7, y: 8, z: 9 })] }) + `); + + const query = /* GraphQL */ ` + query { + ${CustomType.plural}(where: { custom_cypher_list_INCLUDES: { x: 1, y: 2, z: 3 } }) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [CustomType.plural]: [ + { + title: "test", + }, + ], + }); + }); + + test("DateTime List cypher field: INCLUDES", async () => { + const typeDefs = /* GraphQL */ ` + type ${CustomType} @node { + title: String + custom_cypher_list: [DateTime] @cypher(statement: + """ + MATCH (this) + RETURN this.custom_data as list + """ + , columnName: "list") + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher(` + CREATE (:${CustomType} { title: "test", custom_data: [datetime('2021-01-01T00:00:00Z'), datetime('2021-02-01T00:00:00Z')] }) + CREATE (:${CustomType} { title: "test2", custom_data: [datetime('2021-03-01T00:00:00Z'), datetime('2021-04-01T00:00:00Z')] }) + `); + + const query = /* GraphQL */ ` + query { + ${CustomType.plural}(where: { custom_cypher_list_INCLUDES: "2021-01-01T00:00:00Z" }) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [CustomType.plural]: [ + { + title: "test", + }, + ], + }); + }); + + test("LocalDateTime List cypher field: INCLUDES", async () => { + const typeDefs = /* GraphQL */ ` + type ${CustomType} @node { + title: String + custom_cypher_list: [LocalDateTime] @cypher(statement: + """ + MATCH (this) + RETURN this.custom_data as list + """ + , columnName: "list") + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher(` + CREATE (:${CustomType} { title: "test", custom_data: [localdatetime('2021-01-01T00:00:00'), localdatetime('2021-02-01T00:00:00')] }) + CREATE (:${CustomType} { title: "test2", custom_data: [localdatetime('2021-03-01T00:00:00'), localdatetime('2021-04-01T00:00:00')] }) + `); + + const query = /* GraphQL */ ` + query { + ${CustomType.plural}(where: { custom_cypher_list_INCLUDES: "2021-01-01T00:00:00" }) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [CustomType.plural]: [ + { + title: "test", + }, + ], + }); + }); + + test("Date List cypher field: INCLUDES", async () => { + const typeDefs = /* GraphQL */ ` + type ${CustomType} @node { + title: String + custom_cypher_list: [Date] @cypher(statement: + """ + MATCH (this) + RETURN this.custom_data as list + """ + , columnName: "list") + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher(` + CREATE (:${CustomType} { title: "test", custom_data: [date('2021-01-01'), date('2021-02-01')] }) + CREATE (:${CustomType} { title: "test2", custom_data: [date('2021-03-01'), date('2021-04-01')] }) + `); + + const query = /* GraphQL */ ` + query { + ${CustomType.plural}(where: { custom_cypher_list_INCLUDES: "2021-01-01" }) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [CustomType.plural]: [ + { + title: "test", + }, + ], + }); + }); + + test("Time List cypher field: INCLUDES", async () => { + const typeDefs = /* GraphQL */ ` + type ${CustomType} @node { + title: String + custom_cypher_list: [Time] @cypher(statement: + """ + MATCH (this) + RETURN this.custom_data as list + """ + , columnName: "list") + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher(` + CREATE (:${CustomType} { title: "test", custom_data: [time('12:00:00'), time('13:00:00')] }) + CREATE (:${CustomType} { title: "test2", custom_data: [time('14:00:00'), time('15:00:00')] }) + `); + + const query = /* GraphQL */ ` + query { + ${CustomType.plural}(where: { custom_cypher_list_INCLUDES: "12:00:00" }) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [CustomType.plural]: [ + { + title: "test", + }, + ], + }); + }); + + test("LocalTime List cypher field: INCLUDES", async () => { + const typeDefs = /* GraphQL */ ` + type ${CustomType} @node { + title: String + custom_cypher_list: [LocalTime] @cypher(statement: + """ + MATCH (this) + RETURN this.custom_data as list + """ + , columnName: "list") + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher(` + CREATE (:${CustomType} { title: "test", custom_data: [localtime('12:00:00'), localtime('13:00:00')] }) + CREATE (:${CustomType} { title: "test2", custom_data: [localtime('14:00:00'), localtime('15:00:00')] }) + `); + + const query = /* GraphQL */ ` + query { + ${CustomType.plural}(where: { custom_cypher_list_INCLUDES: "12:00:00" }) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [CustomType.plural]: [ + { + title: "test", + }, + ], + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/cypher-filtering-one-to-one-relationship-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/cypher-filtering-one-to-one-relationship-deprecated.int.test.ts new file mode 100644 index 0000000000..67b1102f97 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/cypher-filtering-one-to-one-relationship-deprecated.int.test.ts @@ -0,0 +1,1169 @@ +/* + * 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 { TestHelper } from "../../../../utils/tests-helper"; + +describe("cypher directive filtering - One To One Relationship - deprecated", () => { + const testHelper = new TestHelper(); + + afterEach(async () => { + await testHelper.close(); + }); + + test("1 to 1 relationship with single property filter", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + actor: ${Actor}! + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:${Actor}) + RETURN actor + """ + columnName: "actor" + ) + } + + type ${Actor} @node { + name: String + movie: ${Movie}! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded" }) + CREATE (m3:${Movie} { title: "The Matrix Revolutions" }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a)-[:ACTED_IN]->(m3) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.plural}( + where: { + actor: { + name_EQ: "Keanu Reeves" + } + } + ) { + title + actor { + name + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.plural]: expect.toIncludeSameMembers([ + { + title: "The Matrix", + actor: { + name: "Keanu Reeves", + }, + }, + { + title: "The Matrix Reloaded", + actor: { + name: "Keanu Reeves", + }, + }, + { + title: "The Matrix Revolutions", + actor: { + name: "Keanu Reeves", + }, + }, + ]), + }); + }); + + test("1 to 1 relationship with single property filter with non-deterministic result", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + actor: ${Actor}! + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:${Actor}) + RETURN actor + """ + columnName: "actor" + ) + } + + type ${Actor} @node { + name: String + movie: ${Movie}! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded" }) + CREATE (m3:${Movie} { title: "The Matrix Revolutions" }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a)-[:ACTED_IN]->(m3) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Actor.plural}( + where: { + movie: { + title_STARTS_WITH: "The Matrix" + } + } + ) { + name + movie { + title + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Actor.plural]: expect.toIncludeSameMembers([ + { + name: "Keanu Reeves", + movie: { + // The result is non-deterministic, so we can potentially match any of the movies + title: expect.toStartWith("The Matrix"), + }, + }, + ]), + }); + }); + + test("1 to 1 relationship with null filter", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + released: Int + actor: ${Actor} + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:${Actor}) + RETURN actor + """ + columnName: "actor" + ) + } + + type ${Actor} @node { + name: String + movie: ${Movie} + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix", released: 1999 }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", released: 2003 }) + CREATE (m3:${Movie} { title: "The Matrix Revolutions", released: 2003 }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.plural}( + where: { + released_EQ: 2003, + actor: null + } + ) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.plural]: expect.toIncludeSameMembers([ + { + title: "The Matrix Revolutions", + }, + ]), + }); + }); + + test("1 to 1 relationship with NOT null filter", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + released: Int + actor: ${Actor} + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:${Actor}) + RETURN actor + """ + columnName: "actor" + ) + } + + type ${Actor} @node { + name: String + movie: ${Movie} + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix", released: 1999 }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", released: 2003 }) + CREATE (m3:${Movie} { title: "The Matrix Revolutions", released: 2003 }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a2:${Actor} { name: "Jada Pinkett Smith" }) + CREATE (a2)-[:ACTED_IN]->(m3) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.plural}( + where: { AND: [{ released_IN: [2003], NOT: { actor: null } }] } + ) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.plural]: expect.toIncludeSameMembers([ + { + title: "The Matrix Reloaded", + }, + { + title: "The Matrix Revolutions", + }, + ]), + }); + }); + + test("1 to 1 relationship with auth filter on type PASS", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Person = testHelper.createUniqueType("Person"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node @authorization(filter: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) { + title: String + released: Int + directed_by: ${Person}! + @cypher( + statement: """ + MATCH (this)<-[:DIRECTED]-(director:${Person}) + RETURN director + """ + columnName: "director" + ) + } + + type ${Person} @node { + name: String + directed: ${Movie}! + @cypher( + statement: """ + MATCH (this)-[:DIRECTED]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const token = testHelper.createBearerToken("secret", { custom_value: "Lilly Wachowski" }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix", released: 1999 }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", released: 2003 }) + CREATE (a:${Person} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a5:${Person} { name: "Lilly Wachowski" }) + CREATE (a5)-[:DIRECTED]->(m) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Person.plural}(where: { directed: { title_EQ: "The Matrix" } }) { + directed { + title + directed_by { + name + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Person.plural]: [ + { + directed: { + title: "The Matrix", + directed_by: { + name: "Lilly Wachowski", + }, + }, + }, + ], + }); + }); + + test("1 to 1 relationship with auth filter on type FAIL", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Person = testHelper.createUniqueType("Person"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node @authorization(filter: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) { + title: String + released: Int + directed_by: ${Person}! + @cypher( + statement: """ + MATCH (this)<-[:DIRECTED]-(director:${Person}) + RETURN director + """ + columnName: "director" + ) + } + + type ${Person} @node { + name: String + directed: ${Movie}! + @cypher( + statement: """ + MATCH (this)-[:DIRECTED]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const token = testHelper.createBearerToken("secret", { custom_value: "Something Incorrect" }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix", released: 1999 }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", released: 2003 }) + CREATE (a:${Person} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a5:${Person} { name: "Lilly Wachowski" }) + CREATE (a5)-[:DIRECTED]->(m) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Person.plural}(where: { directed: { title_EQ: "The Matrix" } }) { + directed { + title + directed_by { + name + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeTruthy(); + }); + + test("1 to 1 relationship with auth filter on field PASS", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Person = testHelper.createUniqueType("Person"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + released: Int + directed_by: ${Person}! @authorization(filter: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) + @cypher( + statement: """ + MATCH (this)<-[:DIRECTED]-(director:${Person}) + RETURN director + """ + columnName: "director" + ) + } + + type ${Person} @node { + name: String + directed: ${Movie}! + @cypher( + statement: """ + MATCH (this)-[:DIRECTED]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const token = testHelper.createBearerToken("secret", { custom_value: "Lilly Wachowski" }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix", released: 1999 }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", released: 2003 }) + CREATE (a:${Person} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a5:${Person} { name: "Lilly Wachowski" }) + CREATE (a5)-[:DIRECTED]->(m) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Person.plural}(where: { directed: { title_EQ: "The Matrix" } }) { + directed { + title + directed_by { + name + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Person.plural]: [ + { + directed: { + title: "The Matrix", + directed_by: { + name: "Lilly Wachowski", + }, + }, + }, + ], + }); + }); + + test("1 to 1 relationship with auth filter on field FAIL", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Person = testHelper.createUniqueType("Person"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + released: Int + directed_by: ${Person}! @authorization(filter: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) + @cypher( + statement: """ + MATCH (this)<-[:DIRECTED]-(director:${Person}) + RETURN director + """ + columnName: "director" + ) + } + + type ${Person} @node { + name: String + directed: ${Movie}! + @cypher( + statement: """ + MATCH (this)-[:DIRECTED]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const token = testHelper.createBearerToken("secret", { custom_value: "Something Incorrect" }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix", released: 1999 }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", released: 2003 }) + CREATE (a:${Person} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a5:${Person} { name: "Lilly Wachowski" }) + CREATE (a5)-[:DIRECTED]->(m) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Person.plural}(where: { directed: { title_EQ: "The Matrix" } }) { + directed { + title + directed_by { + name + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeTruthy(); + }); + + test("1 to 1 relationship with auth validate type PASS", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Person = testHelper.createUniqueType("Person"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node @authorization(validate: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) { + title: String + released: Int + directed_by: ${Person}! + @cypher( + statement: """ + MATCH (this)<-[:DIRECTED]-(director:${Person}) + RETURN director + """ + columnName: "director" + ) + } + + type ${Person} @node { + name: String + directed: ${Movie}! + @cypher( + statement: """ + MATCH (this)-[:DIRECTED]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const token = testHelper.createBearerToken("secret", { custom_value: "Lilly Wachowski" }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix", released: 1999 }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", released: 2003 }) + CREATE (a:${Person} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a5:${Person} { name: "Lilly Wachowski" }) + CREATE (a5)-[:DIRECTED]->(m) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Person.plural}(where: { directed: { title_EQ: "The Matrix" } }) { + directed { + title + directed_by { + name + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Person.plural]: [ + { + directed: { + title: "The Matrix", + directed_by: { + name: "Lilly Wachowski", + }, + }, + }, + ], + }); + }); + + test("1 to 1 relationship with auth validate type FAIL", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Person = testHelper.createUniqueType("Person"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node @authorization(validate: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) { + title: String + released: Int + directed_by: ${Person}! + @cypher( + statement: """ + MATCH (this)<-[:DIRECTED]-(director:${Person}) + RETURN director + """ + columnName: "director" + ) + } + + type ${Person} @node { + name: String + directed: ${Movie}! + @cypher( + statement: """ + MATCH (this)-[:DIRECTED]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const token = testHelper.createBearerToken("secret", { custom_value: "Something Wrong" }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix", released: 1999 }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", released: 2003 }) + CREATE (a:${Person} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a5:${Person} { name: "Lilly Wachowski" }) + CREATE (a5)-[:DIRECTED]->(m) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Person.plural}(where: { directed: { title_EQ: "The Matrix" } }) { + directed { + title + directed_by { + name + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toHaveLength(1); + expect(gqlResult.errors?.[0]?.message).toBe("Forbidden"); + }); + + test("1 to 1 relationship with auth validate field PASS", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Person = testHelper.createUniqueType("Person"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + released: Int + directed_by: ${Person}! @authorization(validate: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) + @cypher( + statement: """ + MATCH (this)<-[:DIRECTED]-(director:${Person}) + RETURN director + """ + columnName: "director" + ) + } + + type ${Person} @node { + name: String + directed: ${Movie}! + @cypher( + statement: """ + MATCH (this)-[:DIRECTED]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const token = testHelper.createBearerToken("secret", { custom_value: "Lilly Wachowski" }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix", released: 1999 }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", released: 2003 }) + CREATE (a:${Person} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a5:${Person} { name: "Lilly Wachowski" }) + CREATE (a5)-[:DIRECTED]->(m) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Person.plural}(where: { directed: { title_EQ: "The Matrix" } }) { + directed { + title + directed_by { + name + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Person.plural]: [ + { + directed: { + title: "The Matrix", + directed_by: { + name: "Lilly Wachowski", + }, + }, + }, + ], + }); + }); + + test("1 to 1 relationship with auth validate field FAIL", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Person = testHelper.createUniqueType("Person"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + released: Int + directed_by: ${Person}! @authorization(validate: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) + @cypher( + statement: """ + MATCH (this)<-[:DIRECTED]-(director:${Person}) + RETURN director + """ + columnName: "director" + ) + } + + type ${Person} @node { + name: String + directed: ${Movie}! + @cypher( + statement: """ + MATCH (this)-[:DIRECTED]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const token = testHelper.createBearerToken("secret", { custom_value: "Something Wrong" }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix", released: 1999 }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", released: 2003 }) + CREATE (a:${Person} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a5:${Person} { name: "Lilly Wachowski" }) + CREATE (a5)-[:DIRECTED]->(m) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Person.plural}(where: { directed: { title_EQ: "The Matrix" } }) { + directed { + title + directed_by { + name + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toHaveLength(1); + expect(gqlResult.errors?.[0]?.message).toBe("Forbidden"); + }); + + test("1 to 1 relationship with nested selection", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Person = testHelper.createUniqueType("Person"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + released: Int + actors: [${Person}!]! @relationship(type: "ACTED_IN", direction: IN) + directed_by: ${Person}! + @cypher( + statement: """ + MATCH (this)<-[:DIRECTED]-(director:${Person}) + RETURN director + """ + columnName: "director" + ) + } + + type ${Person} @node { + name: String + movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + directed: ${Movie}! + @cypher( + statement: """ + MATCH (this)-[:DIRECTED]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix", released: 1999 }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", released: 2003 }) + CREATE (m3:${Movie} { title: "The Matrix Revolutions", released: 2003 }) + CREATE (a:${Person} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a)-[:ACTED_IN]->(m3) + CREATE (a2:${Person} { name: "Jada Pinkett Smith" }) + CREATE (a2)-[:ACTED_IN]->(m2) + CREATE (a2)-[:ACTED_IN]->(m3) + CREATE (a3:${Person} { name: "Director Person" }) + CREATE (a3)-[:DIRECTED]->(m) + CREATE (a4:${Person} { name: "Lana Wachowski" }) + CREATE (a4)-[:DIRECTED]->(m2) + CREATE (a5:${Person} { name: "Lilly Wachowski" }) + CREATE (a5)-[:DIRECTED]->(m3) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Person.plural}(where: { directed: { title_EQ: "The Matrix" } }) { + directed { + title + directed_by { + name + } + actors { + name + movies { + directed_by { + name + } + title + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Person.plural]: [ + { + directed: { + title: "The Matrix", + directed_by: { + name: "Director Person", + }, + actors: expect.toIncludeSameMembers([ + { + name: "Keanu Reeves", + movies: expect.toIncludeSameMembers([ + { + directed_by: { + name: "Director Person", + }, + title: "The Matrix", + }, + { + directed_by: { + name: "Lana Wachowski", + }, + title: "The Matrix Reloaded", + }, + { + directed_by: { + name: "Lilly Wachowski", + }, + title: "The Matrix Revolutions", + }, + ]), + }, + ]), + }, + }, + ], + }); + }); + + test("1 to 1 relationship with connection", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Person = testHelper.createUniqueType("Person"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + released: Int + actors: [${Person}!]! @relationship(type: "ACTED_IN", direction: IN) + directed_by: ${Person}! + @cypher( + statement: """ + MATCH (this)<-[:DIRECTED]-(director:${Person}) + RETURN director + """ + columnName: "director" + ) + } + + type ${Person} @node { + name: String + movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + directed: ${Movie}! + @cypher( + statement: """ + MATCH (this)-[:DIRECTED]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix", released: 1999 }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", released: 2003 }) + CREATE (m3:${Movie} { title: "The Matrix Revolutions", released: 2003 }) + CREATE (a:${Person} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a)-[:ACTED_IN]->(m3) + CREATE (a2:${Person} { name: "Jada Pinkett Smith" }) + CREATE (a2)-[:ACTED_IN]->(m2) + CREATE (a2)-[:ACTED_IN]->(m3) + CREATE (a5:${Person} { name: "Lilly Wachowski" }) + CREATE (a5)-[:DIRECTED]->(m) + CREATE (a5)-[:DIRECTED]->(m2) + CREATE (a5)-[:DIRECTED]->(m3) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.plural}(where: { directed_by: { name_EQ: "Lilly Wachowski"}, title_ENDS_WITH: "Matrix" }) { + actorsConnection { + totalCount + edges { + node { + name + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.plural]: [ + { + ["actorsConnection"]: { + totalCount: 1, + edges: [ + { + node: { + name: "Keanu Reeves", + }, + }, + ], + }, + }, + ], + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/cypher-filtering-scalar-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/cypher-filtering-scalar-deprecated.int.test.ts new file mode 100644 index 0000000000..06731599b9 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/cypher-filtering-scalar-deprecated.int.test.ts @@ -0,0 +1,288 @@ +/* + * 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("cypher directive filtering - Scalar - deprecated", () => { + let CustomType: UniqueType; + + const testHelper = new TestHelper(); + + afterEach(async () => { + await testHelper.close(); + }); + + beforeEach(() => { + CustomType = testHelper.createUniqueType("CustomType"); + }); + + test.each([ + { + title: "Int cypher field: exact match", + filter: `special_count_EQ: 1`, + }, + { + title: "Int cypher field: GT", + filter: `special_count_GT: 0`, + }, + { + title: "Int cypher field: GTE", + filter: `special_count_GTE: 1`, + }, + { + title: "Int cypher field: LT", + filter: `special_count_LT: 2`, + }, + { + title: "Int cypher field: LTE", + filter: `special_count_LTE: 2`, + }, + { + title: "Int cypher field: IN", + filter: `special_count_IN: [1, 2, 3]`, + }, + ] as const)("$title", async ({ filter }) => { + const typeDefs = /* GraphQL */ ` + type ${CustomType} @node { + title: String + special_count: Int + @cypher( + statement: """ + MATCH (m:${CustomType}) + RETURN count(m) as c + """ + columnName: "c" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher(`CREATE (m:${CustomType} { title: "test" })`, {}); + + const query = /* GraphQL */ ` + query { + ${CustomType.plural}(where: { ${filter} }) { + special_count + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [CustomType.plural]: [ + { + special_count: 1, + }, + ], + }); + }); + + test.each([ + { + title: "String cypher field: exact match", + filter: `special_word_EQ: "test"`, + }, + { + title: "String cypher field: CONTAINS", + filter: `special_word_CONTAINS: "es"`, + }, + { + title: "String cypher field: ENDS_WITH", + filter: `special_word_ENDS_WITH: "est"`, + }, + { + title: "String cypher field: STARTS_WITH", + filter: `special_word_STARTS_WITH: "tes"`, + }, + { + title: "String cypher field: IN", + filter: `special_word_IN: ["test", "test2"]`, + }, + ] as const)("$title", async ({ filter }) => { + const typeDefs = /* GraphQL */ ` + type ${CustomType} @node { + title: String + special_word: String + @cypher( + statement: """ + RETURN "test" as s + """ + columnName: "s" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher(`CREATE (m:${CustomType} { title: "test" })`, {}); + + const query = /* GraphQL */ ` + query { + ${CustomType.plural}(where: { ${filter} }) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [CustomType.plural]: [ + { + title: "test", + }, + ], + }); + }); + + test("Int cypher field AND String title field", async () => { + const typeDefs = /* GraphQL */ ` + type ${CustomType} @node { + title: String + special_count: Int + @cypher( + statement: """ + MATCH (m:${CustomType}) + RETURN count(m) as c + """ + columnName: "c" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + UNWIND [ + {title: 'CustomType One' }, + {title: 'CustomType Two' }, + {title: 'CustomType Three' } + ] AS CustomTypeData + CREATE (m:${CustomType}) + SET m = CustomTypeData; + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${CustomType.plural}(where: { special_count_GTE: 1, title_EQ: "CustomType One" }) { + special_count + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [CustomType.plural]: [ + { + special_count: 3, + }, + ], + }); + }); + + test("unmatched Int cypher field AND String title field", async () => { + const typeDefs = /* GraphQL */ ` + type ${CustomType} @node { + title: String + special_count: Int + @cypher( + statement: """ + MATCH (m:${CustomType}) + RETURN count(m) as c + """ + columnName: "c" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + UNWIND [ + {title: 'CustomType One' }, + {title: 'CustomType Two' }, + {title: 'CustomType Three' } + ] AS CustomTypeData + CREATE (m:${CustomType}) + SET m = CustomTypeData; + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${CustomType.plural}(where: { special_count_GTE: 1, title_EQ: "CustomType Unknown" }) { + special_count + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [CustomType.plural]: [], + }); + }); + + test("Int cypher field, selecting String title field", async () => { + const typeDefs = /* GraphQL */ ` + type ${CustomType} @node { + title: String + special_count: Int + @cypher( + statement: """ + MATCH (m:${CustomType}) + RETURN count(m) as c + """ + columnName: "c" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher(`CREATE (m:${CustomType} { title: "test" })`, {}); + + const query = /* GraphQL */ ` + query { + ${CustomType.plural}(where: { special_count_GTE: 1 }) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [CustomType.plural]: [ + { + title: "test", + }, + ], + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/cypher-filtering-sorting-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/cypher-filtering-sorting-deprecated.int.test.ts new file mode 100644 index 0000000000..129d510699 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/cypher-filtering-sorting-deprecated.int.test.ts @@ -0,0 +1,200 @@ +/* + * 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 { TestHelper } from "../../../../utils/tests-helper"; + +describe("cypher directive filtering - Sorting - deprecated", () => { + const testHelper = new TestHelper(); + + afterEach(async () => { + await testHelper.close(); + }); + + test("With sorting on the return value", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + custom_field: String + @cypher( + statement: """ + WITH this + RETURN this.title AS s + """ + columnName: "s" + ) + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + }); + + await testHelper.executeCypher( + ` + CREATE (m1:${Movie} { title: "The Matrix" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded" }) + CREATE (m3:${Movie} { title: "The" }) + CREATE (a1:${Actor} { name: "Keanu Reeves" }) + CREATE (a2:${Actor} { name: "Jada Pinkett Smith" }) + CREATE (a1)-[:ACTED_IN]->(m1) + CREATE (a1)-[:ACTED_IN]->(m2) + CREATE (a2)-[:ACTED_IN]->(m2) + CREATE (a1)-[:ACTED_IN]->(m3) + CREATE (a2)-[:ACTED_IN]->(m3) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.plural}( + where: { custom_field_STARTS_WITH: "The Matrix" } + sort: [{ custom_field: DESC }] + ) { + title + actors { + name + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.plural]: expect.toIncludeSameMembers([ + { + title: "The Matrix Reloaded", + actors: expect.toIncludeSameMembers([ + { + name: "Keanu Reeves", + }, + { + name: "Jada Pinkett Smith", + }, + ]), + }, + { + title: "The Matrix", + actors: [ + { + name: "Keanu Reeves", + }, + ], + }, + ]), + }); + }); + + test("With sorting on the return value of a different field", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + custom_field: String + @cypher( + statement: """ + MATCH (this) + RETURN this.custom_field AS s + """ + columnName: "s" + ) + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + }); + + await testHelper.executeCypher( + ` + CREATE (m1:${Movie} { title: "The Matrix", custom_field: "hello world!" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", custom_field: "hello world!" }) + CREATE (m3:${Movie} { title: "The Matrix Revolutions", custom_field: "goodbye world!" }) + CREATE (a1:${Actor} { name: "Keanu Reeves" }) + CREATE (a2:${Actor} { name: "Jada Pinkett Smith" }) + CREATE (a1)-[:ACTED_IN]->(m1) + CREATE (a1)-[:ACTED_IN]->(m2) + CREATE (a2)-[:ACTED_IN]->(m2) + CREATE (a1)-[:ACTED_IN]->(m3) + CREATE (a2)-[:ACTED_IN]->(m3) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.plural}( + where: { custom_field_EQ: "hello world!" } + sort: [{ title: DESC }] + ) { + title + actors { + name + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.plural]: expect.toIncludeSameMembers([ + { + title: "The Matrix Reloaded", + actors: expect.toIncludeSameMembers([ + { + name: "Keanu Reeves", + }, + { + name: "Jada Pinkett Smith", + }, + ]), + }, + { + title: "The Matrix", + actors: [ + { + name: "Keanu Reeves", + }, + ], + }, + ]), + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/cypher-filtering-temporal-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/cypher-filtering-temporal-deprecated.int.test.ts new file mode 100644 index 0000000000..7ccea12469 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/cypher-filtering-temporal-deprecated.int.test.ts @@ -0,0 +1,346 @@ +/* + * 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("cypher directive filtering - Temporal - deprecated", () => { + let CustomType: UniqueType; + + const testHelper = new TestHelper(); + + afterEach(async () => { + await testHelper.close(); + }); + + beforeEach(() => { + CustomType = testHelper.createUniqueType("CustomType"); + }); + + test("DateTime cypher field", async () => { + const typeDefs = /* GraphQL */ ` + type ${CustomType} @node { + title: String + special_time: DateTime + @cypher( + statement: """ + MATCH (this) + RETURN this.custom_data AS t + """ + columnName: "t" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (:${CustomType} { title: "test", custom_data: datetime("2024-09-03T15:30:00Z") }) + CREATE (:${CustomType} { title: "test2", custom_data: datetime("2025-09-03T15:30:00Z") }) + CREATE (:${CustomType} { title: "test3", custom_data: datetime("2023-09-03T15:30:00Z") }) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${CustomType.plural}( + where: { + special_time_GT: "2024-09-02T00:00:00Z" + } + ) { + special_time + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [CustomType.plural]: expect.toIncludeSameMembers([ + { + special_time: "2024-09-03T15:30:00.000Z", + title: "test", + }, + { + special_time: "2025-09-03T15:30:00.000Z", + title: "test2", + }, + ]), + }); + }); + + test("Duration cypher field", async () => { + const typeDefs = /* GraphQL */ ` + type ${CustomType} @node { + title: String + special_duration: Duration + @cypher( + statement: """ + MATCH (this) + RETURN this.custom_data AS d + """ + columnName: "d" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (:${CustomType} { title: "test", custom_data: duration("P14DT16H12M") }) + CREATE (:${CustomType} { title: "test2", custom_data: duration("P14DT16H13M") }) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${CustomType.plural}( + where: { + special_duration_EQ: "P14DT16H12M" + } + ) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [CustomType.plural]: [ + { + title: "test", + }, + ], + }); + }); + + test("Duration cypher field LT", async () => { + const typeDefs = /* GraphQL */ ` + type ${CustomType} @node { + title: String + special_duration: Duration + @cypher( + statement: """ + MATCH (this) + RETURN this.custom_data AS d + """ + columnName: "d" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (:${CustomType} { title: "test", custom_data: duration('P14DT16H12M') }) + CREATE (:${CustomType} { title: "test2", custom_data: duration('P14DT16H13M') }) + CREATE (:${CustomType} { title: "test3", custom_data: duration('P13DT16H13M') }) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${CustomType.plural}( + where: { + special_duration_LT: "P14DT16H13M" + } + ) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [CustomType.plural]: expect.toIncludeSameMembers([ + { + title: "test", + }, + { + title: "test3", + }, + ]), + }); + }); + + test("Duration cypher field LTE", async () => { + const typeDefs = /* GraphQL */ ` + type ${CustomType} @node { + title: String + special_duration: Duration + @cypher( + statement: """ + MATCH (this) + RETURN this.custom_data AS d + """ + columnName: "d" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (:${CustomType} { title: "test", custom_data: duration('P14DT16H12M') }) + CREATE (:${CustomType} { title: "test2", custom_data: duration('P14DT16H13M') }) + CREATE (:${CustomType} { title: "test3", custom_data: duration('P13DT16H13M') }) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${CustomType.plural}( + where: { + special_duration_LTE: "P14DT16H12M" + } + ) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [CustomType.plural]: expect.toIncludeSameMembers([ + { + title: "test", + }, + { + title: "test3", + }, + ]), + }); + }); + + test("Duration cypher field GT", async () => { + const typeDefs = /* GraphQL */ ` + type ${CustomType} @node { + title: String + special_duration: Duration + @cypher( + statement: """ + MATCH (this) + RETURN this.custom_data AS d + """ + columnName: "d" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (:${CustomType} { title: "test", custom_data: duration('P14DT16H12M') }) + CREATE (:${CustomType} { title: "test2", custom_data: duration('P14DT16H13M') }) + CREATE (:${CustomType} { title: "test3", custom_data: duration('P13DT16H13M') }) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${CustomType.plural}( + where: { + special_duration_GT: "P14DT16H11M" + } + ) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [CustomType.plural]: expect.toIncludeSameMembers([ + { + title: "test", + }, + { + title: "test2", + }, + ]), + }); + }); + + test("Duration cypher field GTE", async () => { + const typeDefs = /* GraphQL */ ` + type ${CustomType} @node { + title: String + special_duration: Duration + @cypher( + statement: """ + MATCH (this) + RETURN this.custom_data AS d + """ + columnName: "d" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (:${CustomType} { title: "test", custom_data: duration('P14DT16H12M') }) + CREATE (:${CustomType} { title: "test2", custom_data: duration('P14DT16H13M') }) + CREATE (:${CustomType} { title: "test3", custom_data: duration('P13DT16H13M') }) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${CustomType.plural}( + where: { + special_duration_GTE: "P14DT16H12M" + } + ) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [CustomType.plural]: expect.toIncludeSameMembers([ + { + title: "test", + }, + { + title: "test2", + }, + ]), + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/relationships/cypher-filtering-relationship-auth-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/relationships/cypher-filtering-relationship-auth-deprecated.int.test.ts new file mode 100644 index 0000000000..1cb9b22978 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/relationships/cypher-filtering-relationship-auth-deprecated.int.test.ts @@ -0,0 +1,384 @@ +/* + * 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 { TestHelper } from "../../../../../utils/tests-helper"; + +describe("cypher directive filtering - relationship auth filter -deprecated", () => { + const testHelper = new TestHelper(); + + afterEach(async () => { + await testHelper.close(); + }); + + test("relationship with auth filter on type PASS", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node @authorization(filter: [{ where: { node: { actors_SOME: { name_EQ: "$jwt.custom_value" } } } }]) { + title: String + rating: Float + actors: [${Actor}!]! + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:${Actor}) + RETURN actor + """ + columnName: "actor" + ) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const token = testHelper.createBearerToken("secret", { custom_value: "Jada Pinkett Smith" }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix", rating: 10.0 }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", rating: 8.0 }) + CREATE (m3:${Movie} { title: "The Matrix Revolutions", rating: 6.0 }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a)-[:ACTED_IN]->(m3) + CREATE (a2:${Actor} { name: "Carrie-Anne Moss" }) + CREATE (a2)-[:ACTED_IN]->(m) + CREATE (a2)-[:ACTED_IN]->(m2) + CREATE (a2)-[:ACTED_IN]->(m3) + CREATE (a3:${Actor} { name: "Jada Pinkett Smith" }) + CREATE (a3)-[:ACTED_IN]->(m2) + CREATE (a3)-[:ACTED_IN]->(m3) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.operations.connection}( + where: { + rating_GT: 7.0 + } + ) { + edges { + node { + title + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.operations.connection]: { + edges: expect.toIncludeSameMembers([ + { + node: { + title: "The Matrix Reloaded", + }, + }, + ]), + }, + }); + }); + + test("relationship with auth filter on type FAIL", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node @authorization(filter: [{ where: { node: { actors_SOME: { name_EQ: "$jwt.custom_value" } } } }]) { + title: String + rating: Float + actors: [${Actor}!]! + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:${Actor}) + RETURN actor + """ + columnName: "actor" + ) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const token = testHelper.createBearerToken("secret", { custom_value: "Something Incorrect" }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix", rating: 10.0 }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", rating: 8.0 }) + CREATE (m3:${Movie} { title: "The Matrix Revolutions", rating: 6.0 }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a)-[:ACTED_IN]->(m3) + CREATE (a2:${Actor} { name: "Carrie-Anne Moss" }) + CREATE (a2)-[:ACTED_IN]->(m) + CREATE (a2)-[:ACTED_IN]->(m2) + CREATE (a2)-[:ACTED_IN]->(m3) + CREATE (a3:${Actor} { name: "Jada Pinkett Smith" }) + CREATE (a3)-[:ACTED_IN]->(m2) + CREATE (a3)-[:ACTED_IN]->(m3) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.operations.connection}( + where: { + rating_GT: 7.0 + } + ) { + edges { + node { + title + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.operations.connection]: { + edges: [], + }, + }); + }); + + test("relationship with auth validate on type PASS", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node @authorization(validate: [{ where: { node: { actors_SOME: { name_EQ: "$jwt.custom_value" } } } }]) { + title: String + rating: Float + actors: [${Actor}!]! + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:${Actor}) + RETURN actor + """ + columnName: "actor" + ) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const token = testHelper.createBearerToken("secret", { custom_value: "Jada Pinkett Smith" }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix", rating: 10.0 }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", rating: 8.0 }) + CREATE (m3:${Movie} { title: "The Matrix Revolutions", rating: 6.0 }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a)-[:ACTED_IN]->(m3) + CREATE (a2:${Actor} { name: "Carrie-Anne Moss" }) + CREATE (a2)-[:ACTED_IN]->(m) + CREATE (a2)-[:ACTED_IN]->(m2) + CREATE (a2)-[:ACTED_IN]->(m3) + CREATE (a3:${Actor} { name: "Jada Pinkett Smith" }) + CREATE (a3)-[:ACTED_IN]->(m2) + CREATE (a3)-[:ACTED_IN]->(m3) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.operations.connection}( + where: { + rating_LT: 7.0 + } + ) { + edges { + node { + title + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.operations.connection]: { + edges: expect.toIncludeSameMembers([ + { + node: { + title: "The Matrix Revolutions", + }, + }, + ]), + }, + }); + }); + + test("relationship with auth validate on type FAIL", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node @authorization(validate: [{ where: { node: { actors_SOME: { name_EQ: "$jwt.custom_value" } } } }]) { + title: String + rating: Float + actors: [${Actor}!]! + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:${Actor}) + RETURN actor + """ + columnName: "actor" + ) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const token = testHelper.createBearerToken("secret", { custom_value: "Jada Pinkett Smith" }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix", rating: 10.0 }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded", rating: 8.0 }) + CREATE (m3:${Movie} { title: "The Matrix Revolutions", rating: 6.0 }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a)-[:ACTED_IN]->(m3) + CREATE (a2:${Actor} { name: "Carrie-Anne Moss" }) + CREATE (a2)-[:ACTED_IN]->(m) + CREATE (a2)-[:ACTED_IN]->(m2) + CREATE (a2)-[:ACTED_IN]->(m3) + CREATE (a3:${Actor} { name: "Jada Pinkett Smith" }) + CREATE (a3)-[:ACTED_IN]->(m2) + CREATE (a3)-[:ACTED_IN]->(m3) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.operations.connection}( + where: { + rating_GT: 7.0 + } + ) { + edges { + node { + title + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toHaveLength(1); + expect(gqlResult.errors?.[0]?.message).toBe("Forbidden"); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/relationships/cypher-filtering-relationship-connection-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/relationships/cypher-filtering-relationship-connection-deprecated.int.test.ts new file mode 100644 index 0000000000..ce254f7f24 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/relationships/cypher-filtering-relationship-connection-deprecated.int.test.ts @@ -0,0 +1,630 @@ +/* + * 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 { TestHelper } from "../../../../../utils/tests-helper"; + +describe("Connection API - cypher directive filtering - Relationship - deprecated", () => { + const testHelper = new TestHelper(); + + afterEach(async () => { + await testHelper.close(); + }); + + test("Connection API - relationship with single property filter NOT", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + actors: [${Actor}!]! + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:${Actor}) + RETURN actor + """ + columnName: "actor" + ) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded" }) + CREATE (m3:${Movie} { title: "The Matrix Revolutions" }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a)-[:ACTED_IN]->(m3) + CREATE (a2:${Actor} { name: "Carrie-Anne Moss" }) + CREATE (a2)-[:ACTED_IN]->(m) + CREATE (a2)-[:ACTED_IN]->(m2) + CREATE (a2)-[:ACTED_IN]->(m3) + CREATE (a3:${Actor} { name: "Jada Pinkett Smith" }) + CREATE (a3)-[:ACTED_IN]->(m2) + CREATE (a3)-[:ACTED_IN]->(m3) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.operations.connection}( + where: { + NOT: { + actors_SOME: { + name_EQ: "Jada Pinkett Smith" + } + } + } + ) { + edges { + node { + title + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.operations.connection]: { + edges: expect.toIncludeSameMembers([ + { + node: { title: "The Matrix" }, + }, + ]), + }, + }); + }); + + test("Connection API - relationship with single property filter ALL", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + actors: [${Actor}!]! + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:${Actor}) + RETURN actor + """ + columnName: "actor" + ) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded" }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a2:${Actor} { name: "Carrie-Anne Moss" }) + CREATE (a2)-[:ACTED_IN]->(m) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.operations.connection}( + where: { + actors_ALL: { + name_EQ: "Keanu Reeves" + } + } + ) { + edges { + node { + title + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.operations.connection]: { + edges: expect.toIncludeSameMembers([ + { + node: { + title: "The Matrix Reloaded", + }, + }, + ]), + }, + }); + }); + + test("Connection API - relationship with single property filter SINGLE", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + actors: [${Actor}!]! + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:${Actor}) + RETURN actor + """ + columnName: "actor" + ) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded" }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a2:${Actor} { name: "Carrie-Anne Moss" }) + CREATE (a2)-[:ACTED_IN]->(m) + CREATE (a2)-[:ACTED_IN]->(m2) + CREATE (a3:${Actor} { name: "Carrie-Anne Moss" }) + CREATE (a3)-[:ACTED_IN]->(m) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.operations.connection}( + where: { + actors_SINGLE: { + name_EQ: "Carrie-Anne Moss" + } + } + ) { + edges { + node { + title + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.operations.connection]: { + edges: expect.toIncludeSameMembers([ + { + node: { + title: "The Matrix Reloaded", + }, + }, + ]), + }, + }); + }); + + test("Connection API - relationship with single property filter SOME", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + actors: [${Actor}!]! + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:${Actor}) + RETURN actor + """ + columnName: "actor" + ) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded" }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a2:${Actor} { name: "Carrie-Anne Moss" }) + CREATE (a2)-[:ACTED_IN]->(m) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.operations.connection}( + where: { + actors_SOME: { + name_EQ: "Keanu Reeves" + } + } + ) { + edges { + node { + title + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.operations.connection]: { + edges: expect.toIncludeSameMembers([ + { + node: { + title: "The Matrix", + }, + }, + { + node: { + title: "The Matrix Reloaded", + }, + }, + ]), + }, + }); + }); + + test("Connection API - relationship with single property filter SOME with sort", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + actors: [${Actor}!]! + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:${Actor}) + RETURN actor + """ + columnName: "actor" + ) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded" }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a2:${Actor} { name: "Carrie-Anne Moss" }) + CREATE (a2)-[:ACTED_IN]->(m) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.operations.connection}( + where: { + actors_SOME: { + name_EQ: "Keanu Reeves" + } + } + sort: { + title: DESC + } + ) { + edges { + node { + title + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.operations.connection]: { + edges: [ + { + node: { + title: "The Matrix Reloaded", + }, + }, + { + node: { + title: "The Matrix", + }, + }, + ], + }, + }); + }); + + test("Connection API - relationship with single property filter NONE", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + actors: [${Actor}!]! + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:${Actor}) + RETURN actor + """ + columnName: "actor" + ) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded" }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a2:${Actor} { name: "Carrie-Anne Moss" }) + CREATE (a2)-[:ACTED_IN]->(m2) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.operations.connection}( + where: { + actors_NONE: { + name_EQ: "Keanu Reeves" + } + } + ) { + edges { + node { + title + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.operations.connection]: { + edges: expect.toIncludeSameMembers([ + { + node: { + title: "The Matrix Reloaded", + }, + }, + ]), + }, + }); + }); + + test("relationship with multiple property filters", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + const Genre = testHelper.createUniqueType("Genre"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + genres: [${Genre}!]! + @cypher( + statement: """ + MATCH (this)-[:IN_GENRE]->(g:${Genre}) + RETURN g + """ + columnName: "g" + ) + actors: [${Actor}!]! + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:${Actor}) + RETURN actor + """ + columnName: "actor" + ) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + + type ${Genre} @node { + name: String + movies: [${Movie}!]! + @cypher( + statement: """ + MATCH (this)<-[:IN_GENRE]-(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (g:${Genre} { name: "Action" }) + CREATE (g2:${Genre} { name: "Romance" }) + CREATE (m:${Movie} { title: "The Matrix" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded" }) + CREATE (m3:${Movie} { title: "The Matrix Revolutions" }) + CREATE (m4:${Movie} { title: "A different movie" }) + CREATE (m)-[:IN_GENRE]->(g) + CREATE (m2)-[:IN_GENRE]->(g) + CREATE (m3)-[:IN_GENRE]->(g) + CREATE (m4)-[:IN_GENRE]->(g2) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a)-[:ACTED_IN]->(m3) + CREATE (a2:${Actor} { name: "Carrie-Anne Moss" }) + CREATE (a2)-[:ACTED_IN]->(m) + CREATE (a2)-[:ACTED_IN]->(m2) + CREATE (a2)-[:ACTED_IN]->(m3) + CREATE (a3:${Actor} { name: "Jada Pinkett Smith" }) + CREATE (a3)-[:ACTED_IN]->(m2) + CREATE (a3)-[:ACTED_IN]->(m3) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.operations.connection}( + where: { + OR: [ + { actors_SOME: { name_EQ: "Jada Pinkett Smith" } }, + { genres_SOME: { name_EQ: "Romance" } } + ] + } + ) + { + edges { + node { + title + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.operations.connection]: { + edges: expect.toIncludeSameMembers([ + { node: { title: "A different movie" } }, + { node: { title: "The Matrix Reloaded" } }, + { node: { title: "The Matrix Revolutions" } }, + ]), + }, + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/relationships/cypher-filtering-relationship-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/relationships/cypher-filtering-relationship-deprecated.int.test.ts new file mode 100644 index 0000000000..7f93ca9608 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/cypher/relationships/cypher-filtering-relationship-deprecated.int.test.ts @@ -0,0 +1,504 @@ +/* + * 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 { TestHelper } from "../../../../../utils/tests-helper"; + +describe("cypher directive filtering - Relationship - deprecated", () => { + const testHelper = new TestHelper(); + + afterEach(async () => { + await testHelper.close(); + }); + + test("relationship with single property filter NOT", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + actors: [${Actor}!]! + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:${Actor}) + RETURN actor + """ + columnName: "actor" + ) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded" }) + CREATE (m3:${Movie} { title: "The Matrix Revolutions" }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a)-[:ACTED_IN]->(m3) + CREATE (a2:${Actor} { name: "Carrie-Anne Moss" }) + CREATE (a2)-[:ACTED_IN]->(m) + CREATE (a2)-[:ACTED_IN]->(m2) + CREATE (a2)-[:ACTED_IN]->(m3) + CREATE (a3:${Actor} { name: "Jada Pinkett Smith" }) + CREATE (a3)-[:ACTED_IN]->(m2) + CREATE (a3)-[:ACTED_IN]->(m3) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.plural}( + where: { + NOT: { + actors_SOME: { + name_EQ: "Jada Pinkett Smith" + } + } + } + ) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.plural]: expect.toIncludeSameMembers([ + { + title: "The Matrix", + }, + ]), + }); + }); + + test("relationship with single property filter ALL", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + actors: [${Actor}!]! + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:${Actor}) + RETURN actor + """ + columnName: "actor" + ) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded" }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a2:${Actor} { name: "Carrie-Anne Moss" }) + CREATE (a2)-[:ACTED_IN]->(m) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.plural}( + where: { + actors_ALL: { + name_EQ: "Keanu Reeves" + } + } + ) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.plural]: expect.toIncludeSameMembers([ + { + title: "The Matrix Reloaded", + }, + ]), + }); + }); + + test("relationship with single property filter SINGLE", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + actors: [${Actor}!]! + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:${Actor}) + RETURN actor + """ + columnName: "actor" + ) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded" }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a2:${Actor} { name: "Carrie-Anne Moss" }) + CREATE (a2)-[:ACTED_IN]->(m) + CREATE (a2)-[:ACTED_IN]->(m2) + CREATE (a3:${Actor} { name: "Carrie-Anne Moss" }) + CREATE (a3)-[:ACTED_IN]->(m) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.plural}( + where: { + actors_SINGLE: { + name_EQ: "Carrie-Anne Moss" + } + } + ) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.plural]: expect.toIncludeSameMembers([ + { + title: "The Matrix Reloaded", + }, + ]), + }); + }); + + test("relationship with single property filter SOME", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + actors: [${Actor}!]! + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:${Actor}) + RETURN actor + """ + columnName: "actor" + ) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded" }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a2:${Actor} { name: "Carrie-Anne Moss" }) + CREATE (a2)-[:ACTED_IN]->(m) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.plural}( + where: { + actors_SOME: { + name_EQ: "Keanu Reeves" + } + } + ) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.plural]: expect.toIncludeSameMembers([ + { + title: "The Matrix", + }, + { + title: "The Matrix Reloaded", + }, + ]), + }); + }); + + test("relationship with single property filter NONE", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + actors: [${Actor}!]! + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:${Actor}) + RETURN actor + """ + columnName: "actor" + ) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { title: "The Matrix" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded" }) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a2:${Actor} { name: "Carrie-Anne Moss" }) + CREATE (a2)-[:ACTED_IN]->(m2) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.plural}( + where: { + actors_NONE: { + name_EQ: "Keanu Reeves" + } + } + ) { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.plural]: expect.toIncludeSameMembers([ + { + title: "The Matrix Reloaded", + }, + ]), + }); + }); + + test("relationship with multiple property filters", async () => { + const Movie = testHelper.createUniqueType("Movie"); + const Actor = testHelper.createUniqueType("Actor"); + const Genre = testHelper.createUniqueType("Genre"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + title: String + genres: [${Genre}!]! + @cypher( + statement: """ + MATCH (this)-[:IN_GENRE]->(g:${Genre}) + RETURN g + """ + columnName: "g" + ) + actors: [${Actor}!]! + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:${Actor}) + RETURN actor + """ + columnName: "actor" + ) + } + + type ${Actor} @node { + name: String + movies: [${Movie}!]! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + + type ${Genre} @node { + name: String + movies: [${Movie}!]! + @cypher( + statement: """ + MATCH (this)<-[:IN_GENRE]-(movie:${Movie}) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + await testHelper.executeCypher( + ` + CREATE (g:${Genre} { name: "Action" }) + CREATE (g2:${Genre} { name: "Romance" }) + CREATE (m:${Movie} { title: "The Matrix" }) + CREATE (m2:${Movie} { title: "The Matrix Reloaded" }) + CREATE (m3:${Movie} { title: "The Matrix Revolutions" }) + CREATE (m4:${Movie} { title: "A different movie" }) + CREATE (m)-[:IN_GENRE]->(g) + CREATE (m2)-[:IN_GENRE]->(g) + CREATE (m3)-[:IN_GENRE]->(g) + CREATE (m4)-[:IN_GENRE]->(g2) + CREATE (a:${Actor} { name: "Keanu Reeves" }) + CREATE (a)-[:ACTED_IN]->(m) + CREATE (a)-[:ACTED_IN]->(m2) + CREATE (a)-[:ACTED_IN]->(m3) + CREATE (a2:${Actor} { name: "Carrie-Anne Moss" }) + CREATE (a2)-[:ACTED_IN]->(m) + CREATE (a2)-[:ACTED_IN]->(m2) + CREATE (a2)-[:ACTED_IN]->(m3) + CREATE (a3:${Actor} { name: "Jada Pinkett Smith" }) + CREATE (a3)-[:ACTED_IN]->(m2) + CREATE (a3)-[:ACTED_IN]->(m3) + `, + {} + ); + + const query = /* GraphQL */ ` + query { + ${Movie.plural}( + where: { + OR: [ + { actors_SOME: { name_EQ: "Jada Pinkett Smith" } }, + { genres_SOME: { name_EQ: "Romance" } } + ] + } + ) + { + title + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult?.data).toEqual({ + [Movie.plural]: expect.toIncludeSameMembers([ + { + title: "A different movie", + }, + { + title: "The Matrix Reloaded", + }, + { + title: "The Matrix Revolutions", + }, + ]), + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/interface-filtering-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/interface-filtering-deprecated.int.test.ts new file mode 100644 index 0000000000..d2efcaa7fc --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/interface-filtering-deprecated.int.test.ts @@ -0,0 +1,151 @@ +/* + * 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 { createBearerToken } from "../../../utils/create-bearer-token"; +import { TestHelper } from "../../../utils/tests-helper"; + +describe("Interface filtering - deprecated", () => { + const secret = "the-secret"; + + const testHelper = new TestHelper(); + let typeDefs: string; + + const Movie = testHelper.createUniqueType("Movie"); + const Series = testHelper.createUniqueType("Series"); + const Actor = testHelper.createUniqueType("Actor"); + + beforeAll(async () => { + typeDefs = /* GraphQL */ ` + interface Show { + title: String! + actors: [${Actor}!]! @declareRelationship + } + + type ${Movie} implements Show @limit(default: 3, max: 10) @node { + title: String! + cost: Float + runtime: Int + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") + } + + type ${Series} implements Show @node { + title: String! + episodes: Int + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") + } + + type ${Actor} @node { + name: String! + actedIn: [Show!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") + } + + type ActedIn @relationshipProperties { + screenTime: Int + } + `; + + await testHelper.executeCypher(` + CREATE(m:${Movie} { title: "The Office" }) + CREATE(m2:${Movie}{ title: "The Office 2" }) + CREATE(m3:${Movie}{ title: "NOT The Office 2" }) + CREATE(s1:${Series}{ title: "The Office 2" }) + CREATE(s2:${Series}{ title: "NOT The Office" }) + CREATE(a:${Actor} {name: "Keanu"}) + MERGE(a)-[:ACTED_IN]->(m) + MERGE(a)-[:ACTED_IN]->(m2) + MERGE(a)-[:ACTED_IN]->(m3) + MERGE(a)-[:ACTED_IN]->(s1) + MERGE(a)-[:ACTED_IN]->(s2) + + `); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + }); + + afterAll(async () => { + await testHelper.close(); + }); + + test("allow for logical filters on top-level interfaces", async () => { + const query = ` + query actedInWhere { + shows(where: { OR: [{ title_EQ: "The Office" }, { title_EQ: "The Office 2" }] }) { + title + } + } + `; + + const token = createBearerToken(secret, {}); + const queryResult = await testHelper.executeGraphQLWithToken(query, token); + expect(queryResult.errors).toBeUndefined(); + expect(queryResult.data).toEqual({ + shows: expect.toIncludeSameMembers([ + { + title: "The Office", + }, + { + title: "The Office 2", + }, + { + title: "The Office 2", + }, + ]), + }); + }); + + test("allow for logical filters on nested-level interfaces", async () => { + const query = ` + query actedInWhere { + ${Actor.plural} { + actedIn(where: { OR: [{ title_EQ: "The Office" }, { title_EQ: "The Office 2" }] }) { + title + } + } + } + `; + + const token = createBearerToken(secret, {}); + const queryResult = await testHelper.executeGraphQLWithToken(query, token); + expect(queryResult.errors).toBeUndefined(); + expect(queryResult.data).toEqual({ + [Actor.plural]: [ + { + actedIn: expect.toIncludeSameMembers([ + { + title: "The Office", + }, + { + title: "The Office 2", + }, + { + title: "The Office 2", + }, + ]), + }, + ], + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/is-authenticated-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/is-authenticated-deprecated.int.test.ts new file mode 100644 index 0000000000..ccc966cc0d --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/is-authenticated-deprecated.int.test.ts @@ -0,0 +1,3395 @@ +/* + * 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 { IncomingMessage } from "http"; +import { Socket } from "net"; +import { generate } from "randomstring"; +import { createBearerToken } from "../../../utils/create-bearer-token"; +import type { UniqueType } from "../../../utils/graphql-types"; +import { TestHelper } from "../../../utils/tests-helper"; + +describe("auth/is-authenticated deprecated", () => { + const testHelper = new TestHelper(); + + let Product: UniqueType; + let User: UniqueType; + let Post: UniqueType; + + const secret = "secret"; + + beforeEach(async () => { + Product = testHelper.createUniqueType("Product"); + User = testHelper.createUniqueType("User"); + Post = testHelper.createUniqueType("Post"); + await testHelper.executeCypher( + `CREATE(p:${Product} {id: "1", name: "Marvin"}) + CREATE(u:${User} {id: "1", password: "dontpanic42", name: "Arthur"}) + ` + ); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + describe("read", () => { + test("should throw if not authenticated type definition", async () => { + const typeDefs = ` + type ${Product} @authentication(operations: [READ]) @node { + id: ID + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = ` + { + ${Product.plural} { + id + } + } + `; + + const token = "not valid token"; + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should not throw if authenticated type definition", async () => { + const typeDefs = ` + type ${Product} @authentication(operations: [READ]) @node { + id: ID + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = ` + { + ${Product.plural} { + id + } + } + `; + + const token = createBearerToken(secret, { roles: ["super-admin", "admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should not throw if authenticated with correct role type definition", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + type ${Product} @authentication(operations: [READ], jwt: { roles_INCLUDES: "admin" }) @node { + id: ID + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = ` + { + ${Product.plural} { + id + } + } + `; + + const token = createBearerToken(secret, { roles: ["super-admin", "admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should throw if authenticated with incorrect role type definition", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + type ${Product} @authentication(operations: [READ], jwt: { roles_INCLUDES: "admin" }) @node { + id: ID + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = ` + { + ${Product.plural} { + id + } + } + `; + + const token = createBearerToken(secret, { roles: ["super-admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if not authenticated on field definition", async () => { + const typeDefs = ` + type ${User} @node { + id: ID + password: String @authentication(operations: [READ]) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = ` + { + ${User.plural} { + password + } + } + `; + + const token = "not valid token"; + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + }); + + describe("create", () => { + test("should not throw if authenticated on type definition", async () => { + const typeDefs = ` + type ${User} @authentication(operations: [CREATE]) @node { + id: ID + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = ` + mutation { + ${User.operations.create}(input: [{ id: "1" }]) { + ${User.plural} { + id + } + } + } + `; + + const token = createBearerToken(secret, { roles: ["super-admin", "admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should not throw if authenticated with correct role on type definition", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${User} @authentication(operations: [CREATE], jwt: {roles_INCLUDES: "admin"}) @node { + id: ID + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = ` + mutation { + ${User.operations.create}(input: [{ id: "1" }]) { + ${User.plural} { + id + } + } + } + `; + + const token = createBearerToken(secret, { roles: ["super-admin", "admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should throw if not authenticated on type definition", async () => { + const typeDefs = ` + type ${User} @authentication(operations: [CREATE]) @node { + id: ID + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = ` + mutation { + ${User.operations.create}(input: [{ id: "1" }]) { + ${User.plural} { + id + } + } + } + `; + + const token = "not valid token"; + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if authenticated with incorrect role type definition", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + type ${User} @authentication(operations: [CREATE], jwt: { roles_INCLUDES: "admin" }) @node { + id: ID + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = ` + mutation { + ${User.operations.create}(input: [{ id: "1" }]) { + ${User.plural} { + id + } + } + } + `; + + const token = createBearerToken(secret, { roles: ["not-an-admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if not authenticated on nested create type", async () => { + const typeDefs = ` + type ${User} @node { + id: ID + name: String + products: [${Product}!]! @relationship(type: "HAS_PRODUCT", direction: OUT) + } + + type ${Product} @authentication(operations: [CREATE]) @node { + id: ID + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = ` + mutation { + ${User.operations.create}(input: [{ id: "1", products: { create: [{ node: { id: "5" } }] } }]) { + ${User.plural} { + id + } + } + } + `; + + const token = "not valid token"; + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if authenticated with incorrect role on nested create type", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${User} @node { + id: ID + name: String + products: [${Product}!]! @relationship(type: "HAS_PRODUCT", direction: OUT) + } + + type ${Product} @authentication(operations: [CREATE], jwt: { roles_INCLUDES: "admin" }) @node { + id: ID + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = ` + mutation { + ${User.operations.create}(input: [{ id: "1", products: { create: [{ node: { id: "5" } }] } }]) { + ${User.plural} { + id + } + } + } + `; + + const token = createBearerToken(secret, { roles: ["not-an-admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if authenticated with incorrect role on nested create type - not unwind-create", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${User} @node { + id: ID + name: String + products: [${Product}!]! @relationship(type: "HAS_PRODUCT", direction: OUT) + } + + type ${Product} @authentication(operations: [CREATE], jwt: { roles_INCLUDES: "admin" }) @node { + id: ID + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = ` + mutation { + ${User.operations.create}(input: [{ id: "1", products: { create: [{ node: { id: "5" } }] } }]) { + ${User.plural} { + id + } + } + } + `; + + const token = createBearerToken(secret, { roles: ["not-an-admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should not throw if authenticated on field definition", async () => { + const typeDefs = ` + type ${User} @node { + id: ID + password: String @authentication(operations: [CREATE]) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { authorization: { key: secret } }, + }); + + const query = ` + mutation { + ${User.operations.create}(input: [{ password: "1" }]) { + ${User.plural} { + password + } + } + } + `; + + const token = createBearerToken(secret, { roles: ["super-admin", "admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + test("should not throw if authenticated with correct role on field definition", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${User} @node { + id: ID + password: String @authentication(operations: [CREATE], jwt: {roles_INCLUDES: "admin"}) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { authorization: { key: secret } }, + }); + + const query = ` + mutation { + ${User.operations.create}(input: [{ password: "1" }]) { + ${User.plural} { + password + } + } + } + `; + + const token = createBearerToken(secret, { roles: ["super-admin", "admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should throw if not authenticated on field definition", async () => { + const typeDefs = ` + type ${User} @node { + id: ID + password: String @authentication(operations: [CREATE]) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { authorization: { key: secret } }, + }); + + const query = ` + mutation { + ${User.operations.create}(input: [{ password: "1" }]) { + ${User.plural} { + password + } + } + } + `; + + const token = "not valid token"; + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if authenticated with incorrect role on field definition", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${User} @node { + id: ID + password: String @authentication(operations: [CREATE], jwt: { roles_INCLUDES: "admin" }) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { authorization: { key: secret } }, + }); + + const query = ` + mutation { + ${User.operations.create}(input: [{ password: "1" }]) { + ${User.plural} { + password + } + } + } + `; + + const token = createBearerToken(secret, { roles: ["not-an-admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if authenticated with incorrect role on field definition - not unwind-create", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${User} @node { + id: ID + password: String @authentication(operations: [CREATE], jwt: { roles_INCLUDES: "admin" }) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { authorization: { key: secret } }, + }); + + const query = ` + mutation { + ${User.operations.create}(input: [{ password: "1" }]) { + ${User.plural} { + password + } + } + } + `; + + const token = createBearerToken(secret, { roles: ["not-an-admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if not authenticated on nested create field", async () => { + const typeDefs = ` + type ${User} @node { + id: ID + name: String + products: [${Product}!]! @relationship(type: "HAS_PRODUCT", direction: OUT) + } + + type ${Product} @node { + id: ID @authentication(operations: [CREATE]) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = ` + mutation { + ${User.operations.create}(input: [{ id: "1", products: { create: [{ node: { id: "5" } }] } }]) { + ${User.plural} { + id + } + } + } + `; + + const token = "not valid token"; + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if authenticated with incorrect role on nested create field", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${User} @node { + id: ID + name: String + products: [${Product}!]! @relationship(type: "HAS_PRODUCT", direction: OUT) + } + + type ${Product} @node { + id: ID @authentication(operations: [CREATE], jwt: { roles_INCLUDES: "admin" }) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = ` + mutation { + ${User.operations.create}(input: [{ id: "1", products: { create: [{ node: { id: "5" } }] } }]) { + ${User.plural} { + id + } + } + } + `; + + const token = createBearerToken(secret, { roles: ["not-an-admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if authenticated with incorrect role on nested create field - not unwind-create", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${User} @node { + id: ID + name: String + products: [${Product}!]! @relationship(type: "HAS_PRODUCT", direction: OUT) + } + + type ${Product} @node { + id: ID @authentication(operations: [CREATE], jwt: { roles_INCLUDES: "admin" }) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = ` + mutation { + ${User.operations.create}(input: [{ id: "1", products: { create: [{ node: { id: "5" } }] } }]) { + ${User.plural} { + id + } + } + } + `; + + const token = createBearerToken(secret, { roles: ["not-an-admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + }); + + describe("update", () => { + test("should not throw if authenticated on type definition", async () => { + const typeDefs = /* GraphQL */ ` + type ${User} @authentication(operations: [UPDATE]) @node { + id: ID + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(update: { id_SET: "1" }) { + ${User.plural} { + id + } + } + } + `; + + const token = createBearerToken(secret, { roles: ["super-admin", "admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should not throw if authenticated with correct role on type definition", async () => { + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${User} @authentication(operations: [UPDATE], jwt: {roles_INCLUDES: "admin"}) @node { + id: ID + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(update: { id_SET: "1" }) { + ${User.plural} { + id + } + } + } + `; + + const token = createBearerToken(secret, { roles: ["super-admin", "admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should throw if not authenticated on type definition", async () => { + const typeDefs = /* GraphQL */ ` + type ${User} @authentication(operations: [UPDATE]) @node { + id: ID + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(update: { id_SET: "1" }) { + ${User.plural} { + id + } + } + } + `; + + const token = "not valid token"; + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if authenticated with incorrect role on type definition", async () => { + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + type ${User} @authentication(operations: [UPDATE], jwt: { roles_INCLUDES: "admin" }) @node { + id: ID + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(update: { id_SET: "1" }) { + ${User.plural} { + id + } + } + } + `; + + const token = createBearerToken(secret, { roles: ["not-an-admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should not throw if authenticated on field definition", async () => { + const typeDefs = /* GraphQL */ ` + type ${User} @node { + id: ID + password: String @authentication(operations: [UPDATE]) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(update: { id_SET: "1" }) { + ${User.plural} { + id + } + } + } + `; + + const token = createBearerToken(secret, { roles: ["super-admin", "admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should not throw if authenticated with correct role on field definition", async () => { + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${User} @node { + id: ID + password: String @authentication(operations: [UPDATE], jwt: {roles_INCLUDES: "admin"}) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(update: { id_SET: "1" }) { + ${User.plural} { + id + } + } + } + `; + + const token = createBearerToken(secret, { roles: ["super-admin", "admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should throw if not authenticated on field definition", async () => { + const typeDefs = /* GraphQL */ ` + type ${User} @node { + id: ID + password: String @authentication(operations: [UPDATE]) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(update: { password_SET: "1" }) { + ${User.plural} { + password + } + } + } + `; + + const token = "not valid token"; + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if authenticated with incorrect role on field definition", async () => { + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + type ${User} @node { + id: ID + password: String @authentication(operations: [UPDATE], jwt: { roles_INCLUDES: "admin" }) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(update: { password_SET: "1" }) { + ${User.plural} { + password + } + } + } + `; + + const token = createBearerToken(secret, { roles: ["not-an-admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + }); + + describe("connect", () => { + test("should not throw if authenticated", async () => { + const Post = testHelper.createUniqueType("Post"); + + const typeDefs = /* GraphQL */ ` + type ${Post} @node { + id: String + content: String + } + + type ${User} @node { + id: ID + name: String + password: String + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + extend type ${User} + @authentication(operations: [CREATE_RELATIONSHIP]) + + extend type ${Post} @authentication(operations: [CREATE_RELATIONSHIP]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.plural} { + id + } + } + } + `; + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + CREATE (:${Post} {id: "${postId}"}) + `); + + const token = createBearerToken(secret, { roles: ["super-admin", "admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should not throw if authenticated with correct role", async () => { + const Post = testHelper.createUniqueType("Post"); + + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${Post} @node { + id: String + content: String + } + + type ${User} @node { + id: ID + name: String + password: String + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + extend type ${User} + @authentication(operations: [CREATE_RELATIONSHIP], jwt: {roles_INCLUDES:"admin"}) + + extend type ${Post} @authentication(operations: [CREATE_RELATIONSHIP]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.plural} { + id + } + } + } + `; + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + CREATE (:${Post} {id: "${postId}"}) + `); + + const token = createBearerToken(secret, { roles: ["super-admin", "admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should not throw if authenticated with correct role at nested level", async () => { + const Post = testHelper.createUniqueType("Post"); + + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${Post} @node { + id: String + content: String + } + + type ${User} @node { + id: ID + name: String + password: String + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + extend type ${Post} @authentication(operations: [CREATE_RELATIONSHIP], jwt: {roles_INCLUDES:"admin"}) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.plural} { + id + } + } + } + `; + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + CREATE (:${Post} {id: "${postId}"}) + `); + + const token = createBearerToken(secret, { roles: ["super-admin", "admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should throw if not authenticated", async () => { + const Post = testHelper.createUniqueType("Post"); + + const typeDefs = /* GraphQL */ ` + type ${Post} @node { + id: String + content: String + } + + type ${User} @node { + id: ID + name: String + password: String + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + extend type ${User} + @authentication(operations: [CREATE_RELATIONSHIP]) + + extend type ${Post} @authentication(operations: [CREATE_RELATIONSHIP]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.plural} { + id + } + } + } + `; + + // missing super-admin + const token = "not valid token"; + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + CREATE (:${Post} {id: "${postId}"}) + `); + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if not authenticated at nested level", async () => { + const Post = testHelper.createUniqueType("Post"); + + const typeDefs = /* GraphQL */ ` + type ${Post} @node { + id: String + content: String + } + + type ${User} @node { + id: ID + name: String + password: String + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + extend type ${Post} @authentication(operations: [CREATE_RELATIONSHIP]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.plural} { + id + } + } + } + `; + + // missing super-admin + const token = "not valid token"; + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + CREATE (:${Post} {id: "${postId}"}) + `); + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if authenticated with incorrect roles", async () => { + const Post = testHelper.createUniqueType("Post"); + + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${Post} @node { + id: String + content: String + } + + type ${User} @node { + id: ID + name: String + password: String + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + extend type ${User} + @authentication(operations: [CREATE_RELATIONSHIP], jwt: { roles_INCLUDES: "admin" }) + + extend type ${Post} @authentication(operations: [CREATE_RELATIONSHIP]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.plural} { + id + } + } + } + `; + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + CREATE (:${Post} {id: "${postId}"}) + `); + + const token = createBearerToken(secret, { roles: ["not-an-admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if authenticated with incorrect roles at nested level", async () => { + const Post = testHelper.createUniqueType("Post"); + + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${Post} @node { + id: String + content: String + } + + type ${User} @node { + id: ID + name: String + password: String + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + extend type ${Post} @authentication(operations: [CREATE_RELATIONSHIP], jwt: { roles_INCLUDES: "admin" }) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.plural} { + id + } + } + } + `; + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + CREATE (:${Post} {id: "${postId}"}) + `); + + const token = createBearerToken(secret, { roles: ["not-an-admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + }); + + describe("disconnect", () => { + test("should not throw if authenticated", async () => { + const Post = testHelper.createUniqueType("Post"); + + const typeDefs = /* GraphLQ */ ` + type ${Post} @node { + id: String + content: String + } + + type ${User} @node { + id: ID + name: String + password: String + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + extend type ${User} + @authentication(operations: [DELETE_RELATIONSHIP]) + + extend type ${Post} @authentication(operations: [DELETE_RELATIONSHIP]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphLQ */ ` + mutation { + ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.plural} { + id + } + } + } + `; + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + CREATE (:${Post} {id: "${postId}"}) + `); + + const token = createBearerToken(secret, { roles: ["super-admin", "admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should not throw if authenticated with correct role", async () => { + const Post = testHelper.createUniqueType("Post"); + + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${Post} @node { + id: String + content: String + } + + type ${User} @node { + id: ID + name: String + password: String + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + extend type ${User} + @authentication(operations: [DELETE_RELATIONSHIP], jwt: {roles_INCLUDES:"admin"}) + + extend type ${Post} @authentication(operations: [DELETE_RELATIONSHIP]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.plural} { + id + } + } + } + `; + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + CREATE (:${Post} {id: "${postId}"}) + `); + + const token = createBearerToken(secret, { roles: ["super-admin", "admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should not throw if authenticated with correct role at nested level", async () => { + const Post = testHelper.createUniqueType("Post"); + + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${Post} @node { + id: String + content: String + } + + type ${User} @node { + id: ID + name: String + password: String + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + extend type ${Post} @authentication(operations: [DELETE_RELATIONSHIP], jwt: {roles_INCLUDES:"admin"}) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.plural} { + id + } + } + } + `; + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + CREATE (:${Post} {id: "${postId}"}) + `); + + const token = createBearerToken(secret, { roles: ["super-admin", "admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should throw if not authenticated", async () => { + const Post = testHelper.createUniqueType("Post"); + + const typeDefs = /* GraphQL */ ` + type ${Post} @node { + id: String + content: String + } + + type ${User} @node { + id: ID + name: String + password: String + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + extend type ${User} + @authentication(operations: [DELETE_RELATIONSHIP]) + + extend type ${Post} @authentication(operations: [DELETE_RELATIONSHIP]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.plural} { + id + } + } + } + `; + + // missing super-admin + const token = "not valid token"; + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + CREATE (:${Post} {id: "${postId}"}) + `); + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if not authenticated at nested level", async () => { + const Post = testHelper.createUniqueType("Post"); + + const typeDefs = /* GraphQL */ ` + type ${Post} @node { + id: String + content: String + } + + type ${User} @node { + id: ID + name: String + password: String + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + extend type ${Post} @authentication(operations: [DELETE_RELATIONSHIP]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.plural} { + id + } + } + } + `; + + // missing super-admin + const token = "not valid token"; + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + CREATE (:${Post} {id: "${postId}"}) + `); + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if authenticated with incorrect roles", async () => { + const Post = testHelper.createUniqueType("Post"); + + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${Post} @node { + id: String + content: String + } + + type ${User} @node { + id: ID + name: String + password: String + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + extend type ${User} + @authentication(operations: [DELETE_RELATIONSHIP], jwt: { roles_INCLUDES: "admin" }) + + extend type ${Post} @authentication(operations: [DELETE_RELATIONSHIP]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.plural} { + id + } + } + } + `; + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + CREATE (:${Post} {id: "${postId}"}) + `); + + const token = createBearerToken(secret, { roles: ["not-an-admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if authenticated with incorrect roles at nested level", async () => { + const Post = testHelper.createUniqueType("Post"); + + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${Post} @node { + id: String + content: String + } + + type ${User} @node { + id: ID + name: String + password: String + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + extend type ${Post} @authentication(operations: [DELETE_RELATIONSHIP], jwt: { roles_INCLUDES: "admin" }) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.plural} { + id + } + } + } + `; + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + CREATE (:${Post} {id: "${postId}"}) + `); + + const token = createBearerToken(secret, { roles: ["not-an-admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + }); + + describe("delete", () => { + test("should not throw if authenticated on type definition", async () => { + const typeDefs = /* GraphQL */ ` + type ${User} @authentication(operations: [DELETE]) @node { + id: ID + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.delete} { + nodesDeleted + } + } + `; + + const token = createBearerToken(secret, { roles: ["super-admin", "admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should not throw if authenticated with correct role on type definition", async () => { + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${User} @authentication(operations: [DELETE], jwt: {roles_INCLUDES: "admin"}) @node { + id: ID + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.delete} { + nodesDeleted + } + } + `; + + const token = createBearerToken(secret, { roles: ["super-admin", "admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should throw if not authenticated on type definition", async () => { + const typeDefs = /* GraphQL */ ` + type ${User} @authentication(operations: [DELETE]) @node { + id: ID + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.delete} { + nodesDeleted + } + } + `; + + const token = "not valid token"; + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if not authenticated on type definition (with nested delete)", async () => { + const typeDefs = /* GraphQL */ ` + type ${User} @node { + id: ID + name: String + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + type ${Post} @node @authentication(operations: [DELETE]) { + id: ID + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.delete}(where: {id_EQ: "${userId}"}, delete:{ posts: {where:{node: { id_EQ: "${postId}"}}} }) { + nodesDeleted + } + } + `; + + const token = "not valid token"; + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"})-[:HAS_POST]->(:Post {id: "${postId}"}) + `); + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if authenticated with incorrect roles on type definition", async () => { + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${User} @authentication(operations: [DELETE], jwt: { roles_INCLUDES: "admin" }) @node { + id: ID + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.delete} { + nodesDeleted + } + } + `; + + const token = createBearerToken(secret, { roles: ["not-an-admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if authenticated with incorrect roles on type definition (with nested delete)", async () => { + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${User} @node { + id: ID + name: String + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + type ${Post} @node @authentication(operations: [DELETE], jwt: { roles_INCLUDES: "admin" }) { + id: ID + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.delete}(where: {id_EQ: "${userId}"}, delete:{posts: {where:{node: { id_EQ: "${postId}"}}} }) { + nodesDeleted + } + } + `; + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"})-[:HAS_POST]->(:Post {id: "${postId}"}) + `); + + const token = createBearerToken(secret, { roles: ["not-an-admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if not authenticated on type definition (with nested delete) on field", async () => { + const typeDefs = /* GraphQL */ ` + type ${User} @node { + id: ID + name: String + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + type ${Post} @node @authentication(operations: [DELETE]) { + id: ID + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.delete}(where: {id_EQ: "${userId}"}, delete:{ posts: {where:{node: { id_EQ: "${postId}"}}} }) { + nodesDeleted + } + } + `; + + const token = "not valid token"; + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"})-[:HAS_POST]->(:${Post} {id: "${postId}"}) + `); + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + }); + + describe("custom-resolvers", () => { + test("should not throw if authenticated on custom Query with @cypher", async () => { + const typeDefs = /* GraphQL */ ` + type ${User} @mutation(operations: []) @query(read: false, aggregate: false) @node { + id: ID + name: String + } + + type Query { + users: [${User}] @cypher(statement: "MATCH (u:${User}) RETURN u", columnName: "u") @authentication + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + query { + users { + id + } + } + `; + + const token = createBearerToken(secret, { roles: ["super-admin", "admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should not throw if authenticated with correct roles on custom Query with @cypher", async () => { + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${User} @mutation(operations: []) @query(read: false, aggregate: false) @node { + id: ID + name: String + } + + type Query { + users: [${User}] @cypher(statement: "MATCH (u:${User}) RETURN u", columnName: "u") @authentication(jwt: {roles_INCLUDES: "admin"}) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + query { + users { + id + } + } + `; + + const token = createBearerToken(secret, { roles: ["super-admin", "admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should throw if not authenticated on custom Query with @cypher", async () => { + const typeDefs = /* GraphQL */ ` + type ${User} @mutation(operations: []) @query(read: false, aggregate: false) @node { + id: ID + name: String + } + + type Query { + users: [${User}] @cypher(statement: "MATCH (u:${User}) RETURN u", columnName: "u") @authentication + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + query { + users { + id + } + } + `; + + const token = "not valid token"; + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if authenticated with incorrect role on custom Query with @cypher", async () => { + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${User} @mutation(operations: []) @query(read: false, aggregate: false) @node { + id: ID + name: String + } + + type Query { + users: [${User}] @cypher(statement: "MATCH (u:${User}) RETURN u", columnName: "u") @authentication(jwt: {roles_INCLUDES: "admin"}) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + query { + users { + id + } + } + `; + + const token = createBearerToken(secret, { roles: ["not-an-admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should not throw if authenticated on custom Mutation with @cypher", async () => { + const typeDefs = /* GraphQL */ ` + type ${User} @node { + id: ID + name: String + } + + type Mutation { + createUser: ${User} @cypher(statement: "CREATE (u:${User}) RETURN u", columnName: "u") @authentication + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + createUser { + id + } + } + `; + + const token = createBearerToken(secret, { roles: ["super-admin", "admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should not throw if authenticated with correct role on custom Mutation with @cypher", async () => { + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${User} @node { + id: ID + name: String + } + + type Mutation { + createUser: ${User} @cypher(statement: "CREATE (u:${User}) RETURN u", columnName: "u") @authentication(jwt: {roles_INCLUDES: "admin"}) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + createUser { + id + } + } + `; + + const token = createBearerToken(secret, { roles: ["super-admin", "admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should throw if not authenticated on custom Mutation with @cypher", async () => { + const typeDefs = /* GraphQL */ ` + type ${User} @node { + id: ID + name: String + } + + type Mutation { + createUser: ${User} @cypher(statement: "CREATE (u:${User}) RETURN u", columnName: "u") @authentication + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + createUser { + id + } + } + `; + + const token = "not valid token"; + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if authenticated with incorrect role on custom Mutation with @cypher", async () => { + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${User} @node { + id: ID + name: String + } + + type Mutation { + createUser: ${User} @cypher(statement: "CREATE (u:${User}) RETURN u", columnName: "u") @authentication(jwt: {roles_INCLUDES: "admin"}) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + mutation { + createUser { + id + } + } + `; + + const token = createBearerToken(secret, { roles: ["not-an-admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should not throw if authenticated on Field definition @cypher", async () => { + const History = testHelper.createUniqueType("History"); + + const typeDefs = /* GraphQL */ ` + type ${History} @node { + url: String + } + + type ${User} @node { + id: ID + history: [${History}] + @cypher(statement: "MATCH (this)-[:HAS_HISTORY]->(h:${History}) RETURN h", columnName: "h") + @authentication(operations: [READ]) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + { + ${User.plural} { + history { + url + } + } + } + `; + + const token = createBearerToken(secret, { roles: ["not-an-admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should not throw if authenticated with correct role on Field definition @cypher", async () => { + const History = testHelper.createUniqueType("History"); + + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${History} @node { + url: String + } + + type ${User} @node { + id: ID + history: [${History}] + @cypher(statement: "MATCH (this)-[:HAS_HISTORY]->(h:${History}) RETURN h", columnName: "h") + @authentication(operations: [READ], jwt: {roles_INCLUDES: "admin"}) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + { + ${User.plural} { + history { + url + } + } + } + `; + + const token = createBearerToken(secret, { roles: ["admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + + test("should throw if not authenticated on Field definition @cypher", async () => { + const History = testHelper.createUniqueType("History"); + + const typeDefs = /* GraphQL */ ` + type ${History} @node { + url: String + } + + type ${User} @node { + id: ID + history: [${History}] + @cypher(statement: "MATCH (this)-[:HAS_HISTORY]->(h:${History}) RETURN h", columnName: "h") + @authentication(operations: [READ]) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + { + ${User.plural} { + history { + url + } + } + } + `; + + const token = "not valid token"; + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if authenticated with incorrect role on Field definition @cypher", async () => { + const History = testHelper.createUniqueType("History"); + + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${History} @node { + url: String + } + + type ${User} @node { + id: ID + history: [${History}] + @cypher(statement: "MATCH (this)-[:HAS_HISTORY]->(h:${History}) RETURN h", columnName: "h") + @authentication(operations: [READ], jwt: {roles_INCLUDES: "admin"}) + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + { + ${User.plural} { + history { + url + } + } + } + `; + + const token = createBearerToken(secret, { roles: ["not-an-admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should not throw if decoded JWT passed in context", async () => { + const typeDefs = /* GraphQL */ ` + type ${Product} @authentication(operations: [READ]) @node { + id: ID + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + { + ${Product.plural} { + id + } + } + `; + + const jwt = { + sub: "1234567890", + name: "John Doe", + iat: 1516239022, + }; + + const gqlResult = await testHelper.executeGraphQL(query, { + contextValue: { jwt }, + }); + + expect(gqlResult.errors).toBeFalsy(); + }); + + test("should not throw if decoded JWT passed in context matches claim", async () => { + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + name: String! + } + + type ${Product} @authentication(operations: [READ], jwt: {name_STARTS_WITH: "John"}) @node { + id: ID + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + { + ${Product.plural} { + id + } + } + `; + + const jwt = { + sub: "1234567890", + name: "John Doe", + iat: 1516239022, + }; + + const gqlResult = await testHelper.executeGraphQL(query, { + contextValue: { jwt }, + }); + + expect(gqlResult.errors).toBeFalsy(); + }); + + test("should throw if decoded JWT passed in context does not matches claim", async () => { + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + name: String! + } + + type ${Product} @authentication(operations: [READ], jwt: {name_STARTS_WITH: "Doe"}) @node { + id: ID + name: String + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + const query = /* GraphQL */ ` + { + ${Product.plural} { + id + } + } + `; + + const jwt = { + sub: "1234567890", + name: "John Doe", + iat: 1516239022, + }; + + const gqlResult = await testHelper.executeGraphQL(query, { + contextValue: { jwt }, + }); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + }); + + describe("schema", () => { + describe("read", () => { + beforeEach(async () => { + const typeDefs = /* GraphQL */ ` + type ${Product} @node { + id: ID + name: String + } + extend schema @authentication(operations: [READ]) + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + }); + + test("should throw if not authenticated type definition", async () => { + const query = /* GraphQL */ ` + { + ${Product.plural} { + id + } + } + `; + + const token = "not valid token"; + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should not throw if authenticated type definition", async () => { + const query = /* GraphQL */ ` + { + ${Product.plural} { + id + } + } + `; + + const token = createBearerToken(secret); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + }); + describe("create", () => { + beforeEach(async () => { + const typeDefs = /* GraphQL */ ` + type ${User} @node { + id: ID + name: String + } + extend schema @authentication(operations: [CREATE]) + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + }); + + test("should throw if not authenticated type definition", async () => { + const query = /* GraphQL */ ` + mutation { + ${User.operations.create}(input: [{ id: "1" }]) { + ${User.plural} { + id + } + } + } + `; + + const token = "not valid token"; + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should not throw if authenticated type definition", async () => { + const query = /* GraphQL */ ` + mutation { + ${User.operations.create}(input: [{ id: "1" }]) { + ${User.plural} { + id + } + } + } + `; + + const token = createBearerToken(secret); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + }); + describe("update", () => { + beforeEach(async () => { + const typeDefs = /* GraphQL */ ` + type ${User} @node { + id: ID + name: String + } + extend schema @authentication(operations: [UPDATE]) + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + }); + + test("should throw if not authenticated type definition", async () => { + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(update: { id_SET: "1" }) { + ${User.plural} { + id + } + } + } + `; + + const token = "not valid token"; + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should not throw if authenticated type definition", async () => { + const query = ` + mutation { + ${User.operations.update}(update: { id_SET: "1" }) { + ${User.plural} { + id + } + } + } + `; + + const token = createBearerToken(secret); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + }); + describe("connect", () => { + let Post: UniqueType; + + beforeEach(async () => { + Post = testHelper.createUniqueType("Post"); + + const typeDefs = ` + type ${Post} @node { + id: String + content: String + } + + type ${User} @node { + id: ID + name: String + password: String + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + extend schema @authentication(operations: [CREATE_RELATIONSHIP]) + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + }); + + test("should throw if not authenticated type definition", async () => { + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + const query = ` + mutation { + ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.plural} { + id + } + } + } + `; + + const token = "not valid token"; + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + CREATE (:${Post} {id: "${postId}"}) + `); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should not throw if authenticated type definition", async () => { + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + const query = ` + mutation { + ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.plural} { + id + } + } + } + `; + + const token = createBearerToken(secret); + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + CREATE (:${Post} {id: "${postId}"}) + `); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + }); + + describe("disconnect", () => { + let Post: UniqueType; + + beforeEach(async () => { + Post = testHelper.createUniqueType("Post"); + + const typeDefs = ` + type ${Post} @node { + id: String + content: String + } + + type ${User} @node { + id: ID + name: String + password: String + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + extend schema @authentication(operations: [DELETE_RELATIONSHIP]) + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + }); + + test("should throw if not authenticated type definition", async () => { + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + const query = ` + mutation { + ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.plural} { + id + } + } + } + `; + + const token = "not valid token"; + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + CREATE (:${Post} {id: "${postId}"}) + `); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should not throw if authenticated type definition", async () => { + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + const query = ` + mutation { + ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.plural} { + id + } + } + } + `; + + const token = createBearerToken(secret); + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + CREATE (:${Post} {id: "${postId}"}) + `); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + }); + describe("delete", () => { + beforeEach(async () => { + const typeDefs = ` + type ${User} @node { + id: ID + name: String + } + extend schema @authentication(operations: [DELETE]) + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + }); + + test("should throw if not authenticated type definition", async () => { + const query = ` + mutation { + ${User.operations.delete} { + nodesDeleted + } + } + `; + + const token = "not valid token"; + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should not throw if authenticated type definition", async () => { + const query = ` + mutation { + ${User.operations.delete} { + nodesDeleted + } + } + `; + + const token = createBearerToken(secret); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + }); + describe("custom-resolvers", () => { + beforeEach(async () => { + const typeDefs = ` + type ${User} @node { + id: ID + name: String + } + type Query { + allUsers: [${User}] @cypher(statement: "MATCH (u:${User}) RETURN u", columnName: "u") + } + extend schema @authentication + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + }); + + test("should throw if not authenticated type definition", async () => { + const query = ` + query { + allUsers { + id + } + } + `; + + const token = "not valid token"; + + const socket = new Socket({ readable: true }); + const req = new IncomingMessage(socket); + req.headers.authorization = `Bearer ${token}`; + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should not throw if authenticated type definition", async () => { + const query = ` + query { + allUsers { + id + } + } + `; + + const token = createBearerToken(secret); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + }); + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/object-path-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/object-path-deprecated.int.test.ts new file mode 100644 index 0000000000..b74fd55475 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/object-path-deprecated.int.test.ts @@ -0,0 +1,250 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { generate } from "randomstring"; +import { createBearerToken } from "../../../utils/create-bearer-token"; +import type { UniqueType } from "../../../utils/graphql-types"; +import { TestHelper } from "../../../utils/tests-helper"; + +describe("auth/object-path - deprecated", () => { + const testHelper = new TestHelper(); + const secret = "secret"; + let User: UniqueType; + let Post: UniqueType; + + beforeEach(() => { + User = testHelper.createUniqueType("User"); + Post = testHelper.createUniqueType("Post"); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should use object path with allow", async () => { + const typeDefs = ` + type JWTPayload @jwt { + nestedSub: String! @jwtClaim(path: "nested.object.path.sub") + } + + type ${User} @node { + id: ID + } + + extend type ${User} @authorization(validate: [{ when: [BEFORE], operations: [READ], where: { node: { id_EQ: "$jwt.nestedSub" } } }]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const query = ` + { + ${User.plural}(where: {id_EQ: "${userId}"}) { + id + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + `); + + const token = createBearerToken(secret, { + nested: { + object: { + path: { + sub: userId, + }, + }, + }, + }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + + const [user] = (gqlResult.data as any)[User.plural]; + expect(user).toEqual({ id: userId }); + }); + + test("should use $context value plucking on auth", async () => { + const typeDefs = ` + type ${User} @node { + id: ID + } + + type ${Post} @node { + id: ID + creator: [${User}!]! @relationship(type: "HAS_POST", direction: IN) + } + + extend type ${Post} @node @authorization(validate: [{ when: [BEFORE], operations: [READ], where: { node: { creator_SINGLE: { id_EQ: "$context.userId" } } } }]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + const query = ` + { + ${Post.plural}(where: {id_EQ: "${postId}"}) { + id + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"})-[:HAS_POST]->(:${Post} {id: "${postId}"}) + `); + + const token = createBearerToken(secret); + + const gqlResult = await testHelper.executeGraphQL(query, { + contextValue: { token, userId }, + }); + + expect(gqlResult.errors).toBeUndefined(); + + const [post] = (gqlResult.data as any)[Post.plural]; + expect(post).toEqual({ id: postId }); + }); + + test("should use object path with roles", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! @jwtClaim(path: "https://github\\\\.com/claims.https://github\\\\.com/claims/roles") + } + + type ${User} @node { + id: ID + } + + extend type ${User} @authorization(validate: [{ when: [BEFORE], operations: [READ], where: { jwt: { roles_INCLUDES: "admin" } } }]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const query = ` + { + ${User.plural}(where: {id_EQ: "${userId}"}) { + id + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + `); + + const token = createBearerToken(secret, { + "https://github.com/claims": { "https://github.com/claims/roles": ["admin"] }, + }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + const [user] = (gqlResult.data as any)[User.plural]; + + expect(user).toEqual({ id: userId }); + }); + + test("should use object path with JWT endpoint", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${User} @node { + id: ID + } + + extend type ${User} @authorization(validate: [{ when: [BEFORE], operations: [READ], where: { jwt: { roles_INCLUDES: "admin" } } }]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const query = ` + { + ${User.plural}(where: {id_EQ: "${userId}"}) { + id + } + } + `; + + // Pass the well-known JWKS Endpoint + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: { + url: "https://www.YOUR_DOMAIN.com/.well-known/jwks.json", + }, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + `); + + // Not a valid JWT since signature shall never match + const token = createBearerToken(secret); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + // Since we don't have a valid JWKS Endpoint, we will always get an error validating our JWKS + expect((gqlResult.errors as any[])[0].message).toBe("Forbidden"); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/roles-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/roles-deprecated.int.test.ts new file mode 100644 index 0000000000..f9ba82cda9 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/roles-deprecated.int.test.ts @@ -0,0 +1,1002 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { generate } from "randomstring"; +import { createBearerToken } from "../../../utils/create-bearer-token"; +import type { UniqueType } from "../../../utils/graphql-types"; +import { TestHelper } from "../../../utils/tests-helper"; + +describe("auth/roles - deprecated", () => { + const testHelper = new TestHelper(); + const secret = "secret"; + + let typeUser: UniqueType; + let typeProduct: UniqueType; + let typePost: UniqueType; + let typeHistory: UniqueType; + + beforeEach(async () => { + typeUser = testHelper.createUniqueType("User"); + typeProduct = testHelper.createUniqueType("Product"); + typePost = testHelper.createUniqueType("Post"); + typeHistory = testHelper.createUniqueType("History"); + + await testHelper.executeCypher( + ` + CREATE (:${typeProduct} { name: 'p1', id:123 }) + CREATE (:${typeUser} { id: 1234, password:'dontpanic' }) + ` + ); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + describe("read", () => { + test("should throw if missing role on type definition", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${typeProduct} @authorization(validate: [{ + when: [BEFORE], + operations: [READ], + where: { jwt: { roles_INCLUDES: "admin" } } + }]) @node { + id: ID + name: String + } + `; + + const query = ` + { + ${typeProduct.plural} { + id + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const token = createBearerToken(secret); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Forbidden"); + }); + + test("should throw if missing role on field definition", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${typeUser} @node { + id: ID + password: String @authorization(validate: [{ + when: [BEFORE], + operations: [READ], + where: { jwt: { roles_INCLUDES: "admin" } } + }]) + } + `; + + const query = ` + { + ${typeUser.plural} { + password + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const token = createBearerToken(secret); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Forbidden"); + }); + + test("Read Node & Cypher Field", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${typeHistory} @node { + url: String @authorization(validate: [{ + when: [BEFORE], + operations: [READ], + where: { jwt: { roles_INCLUDES: "super-admin" } } + }]) + } + type ${typeUser} @node { + id: ID + name: String + password: String + } + + extend type ${typeUser} + @authorization(validate: [{ + when: [BEFORE], + operations: [READ, CREATE, UPDATE, CREATE_RELATIONSHIP, DELETE_RELATIONSHIP, DELETE], + where: { jwt: { roles_INCLUDES: "admin" } } + }]) + + extend type ${typeUser} { + history: [${typeHistory}] + @cypher(statement: "MATCH (this)-[:HAS_HISTORY]->(h:${typeHistory}) RETURN h", columnName: "h") + @authorization(validate: [{ + when: [BEFORE], + operations: [READ], + where: { jwt: { roles_INCLUDES: "super-admin" } } + }]) + } + `; + + const query = ` + { + ${typeUser.plural} { + history { + url + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + await testHelper.executeCypher(` + MATCH (u:${typeUser} { id: 1234 }) + CREATE(h:${typeHistory} { url: 'http://some.url' })<-[:HAS_HISTORY]-(u) + `); + + const token = createBearerToken(secret, { sub: "super_admin", roles: ["admin", "super-admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + expect(gqlResult.data).toEqual({ + [typeUser.plural]: [ + { + history: [ + { + url: "http://some.url", + }, + ], + }, + ], + }); + }); + + // This tests reproduces the security issue related to authorization without match #195 + // eslint-disable-next-line jest/no-disabled-tests + test.skip("should throw if missing role on type definition and no nodes are matched", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + + type NotANode @authorization(validate: [{ + when: [BEFORE], + operations: [READ], + where: { jwt: { roles_INCLUDES: "admin" } } + }]) { + name: String + } + `; + + const query = ` + { + notANodes { + name + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const token = createBearerToken(secret); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Forbidden"); + }); + }); + + describe("create", () => { + test("should throw if missing role on type definition", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${typeUser} @authorization(validate: [{ + when: [AFTER], + operations: [CREATE], + where: { jwt: { roles_INCLUDES: "admin" } } + }]) @node { + id: ID + name: String + } + `; + + const query = ` + mutation { + ${typeUser.operations.create}(input: [{ id: "1" }]) { + ${typeUser.plural} { + id + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const token = createBearerToken(secret); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Forbidden"); + }); + + test("should throw if missing role on field definition", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${typeUser} @node { + id: ID + password: String @authorization(validate: [{ + when: [AFTER], + operations: [CREATE], + where: { jwt: { roles_INCLUDES: "admin" } } + }]) + } + `; + + const query = ` + mutation { + ${typeUser.operations.create}(input: [{ password: "1" }]) { + ${typeUser.plural} { + password + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const token = createBearerToken(secret); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Forbidden"); + }); + + test("should not throw if missing role on field definition if is not specified in the request", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${typeUser} @node { + id: ID + password: String @authorization(validate: [{ + when: [AFTER], + operations: [CREATE], + where: { jwt: { roles_INCLUDES: "admin" } } + }]) + } + `; + + const query = ` + mutation { + ${typeUser.operations.create}(input: [{ id: "1" }]) { + ${typeUser.plural} { + password + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const token = createBearerToken(secret); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeFalsy(); + }); + }); + + describe("update", () => { + test("should throw if missing role on type definition", async () => { + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${typeUser} @authorization(validate: [{ + when: [BEFORE], + operations: [UPDATE], + where: { jwt: { roles_INCLUDES: "admin" } } + }]) @node{ + id: ID + name: String + } + `; + + const query = /* GraphQL */ ` + mutation { + ${typeUser.operations.update}(update: { id_SET: "1" }) { + ${typeUser.plural} { + id + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const token = createBearerToken(secret); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Forbidden"); + }); + + test("should throw if missing role on field definition", async () => { + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${typeUser} @node { + id: ID + password: String @authorization(validate: [{ + when: [BEFORE], + operations: [UPDATE], + where: { jwt: { roles_INCLUDES: "admin" } } + }]) + } + `; + + const query = /* GraphQL */ ` + mutation { + ${typeUser.operations.update}(update: { password_SET: "1" }) { + ${typeUser.plural} { + password + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const token = createBearerToken(secret); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Forbidden"); + }); + }); + + describe("connect", () => { + test("should throw if missing role", async () => { + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${typePost} @node { + id: String + content: String + } + + type ${typeUser} @node { + id: ID + name: String + password: String + posts: [${typePost}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + extend type ${typeUser} + @authorization(validate: [{ + when: [BEFORE], + operations: [CREATE_RELATIONSHIP], + where: { jwt: { roles_INCLUDES: "admin" } } + }]) + + extend type ${typePost} @authorization(validate: [{ + when: [BEFORE], + operations: [CREATE_RELATIONSHIP], + where: { jwt: { roles_INCLUDES: "super-admin" } } + }]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation { + ${typeUser.operations.update}(update: { id_SET: "${userId}", posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${typeUser.plural} { + id + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:${typeUser} {id: "${userId}"}) + CREATE (:${typePost} {id: "${postId}"}) + `); + // missing super-admin + const token = createBearerToken(secret, { roles: ["admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Forbidden"); + }); + }); + + describe("disconnect", () => { + test("should throw if missing role", async () => { + const typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${typePost} @node { + id: String + content: String + } + + type ${typeUser} @node { + id: ID + name: String + password: String + posts: [${typePost}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + extend type ${typeUser} + @authorization(validate: [{ + when: [BEFORE], + operations: [DELETE_RELATIONSHIP], + where: { jwt: { roles_INCLUDES: "admin" } } + }]) + + extend type ${typePost} @authorization(validate: [{ + when: [BEFORE], + operations: [DELETE_RELATIONSHIP], + where: { jwt: { roles_INCLUDES: "super-admin" } } + }]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation { + ${typeUser.operations.update}(update: { id_SET: "${userId}", posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${typeUser.plural} { + id + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:${typeUser} {id: "${userId}"}) + CREATE (:${typePost} {id: "${userId}"}) + `); + // missing super-admin + const token = createBearerToken(secret, { roles: ["admin"] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Forbidden"); + }); + }); + + describe("delete", () => { + test("should throw if missing role on type definition", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${typeUser} @node @authorization(validate: [{ + when: [BEFORE], + operations: [DELETE], + where: { jwt: { roles_INCLUDES: "admin" } } + }]) { + id: ID + name: String + } + `; + + const query = ` + mutation { + ${typeUser.operations.delete} { + nodesDeleted + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const token = createBearerToken(secret, { roles: [] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Forbidden"); + }); + + test("should throw if missing role on type definition (with nested delete)", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${typeUser} @node { + id: ID + name: String + posts: [${typePost}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + type ${typePost} @node @authorization(validate: [{ + when: [BEFORE], + operations: [DELETE], + where: { jwt: { roles_INCLUDES: "admin" } } + }]) { + id: ID + name: String + } + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const postId = generate({ + charset: "alphabetic", + }); + + const query = ` + mutation { + ${typeUser.operations.delete}(where: {id_EQ: "${userId}"}, delete:{posts: {where:{node: { id_EQ: "${postId}"}}}}) { + nodesDeleted + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:${typeUser} {id: "${userId}"})-[:HAS_POST]->(:${typePost} {id: "${postId}"}) + `); + + const token = createBearerToken(secret, { roles: [] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Forbidden"); + }); + }); + + // TODO: Move these checks into JavaScript! Fun! + describe("custom-resolvers", () => { + test("should throw if missing role on custom Query with @cypher", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${typeUser} @mutation(operations: []) @query(read: false, aggregate: false) @node { + id: ID + name: String + } + + type Query { + ${typeUser.plural}: [${typeUser}] @cypher(statement: "MATCH (u:${typeUser}) RETURN u AS u", columnName: "u") @authentication(jwt: {roles_INCLUDES: "admin"}) + } + `; + + const query = ` + query { + ${typeUser.plural} { + id + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const token = createBearerToken(secret, { roles: [] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if missing role on custom Mutation with @cypher", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${typeUser} @node { + id: ID + name: String + } + + type Mutation { + ${typeUser.operations.create}: ${typeUser} @cypher(statement: "CREATE (u:${typeUser}) RETURN u AS u", columnName: "u") @authentication(jwt: {roles_INCLUDES: "admin"}) + } + `; + + const query = ` + mutation { + ${typeUser.operations.create} { + id + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const token = createBearerToken(secret, { roles: [] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); + }); + + test("should throw if missing role on Field definition @cypher", async () => { + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! + } + + type ${typeHistory} @node { + url: String + } + + type ${typeUser} @node { + id: ID + history: [${typeHistory}] + @cypher(statement: "MATCH (this)-[:HAS_HISTORY]->(h:${typeHistory}) RETURN h AS h", columnName: "h") + @authorization(validate: [{ + when: [BEFORE], + where: { jwt: { roles_INCLUDES: "admin" } } + }]) + } + `; + + const query = ` + { + ${typeUser.plural} { + history { + url + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const token = createBearerToken(secret, { roles: [] }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Forbidden"); + }); + }); + + describe("combining roles with where", () => { + test("combines where with roles", async () => { + const type = testHelper.createUniqueType("User"); + + const typeDefs = ` + type JWTPayload @jwt { + id: String! + roles: [String!]! + } + + type ${type.name} @node { + id: ID + name: String + password: String + } + + extend type ${type.name} + @authorization( + filter: [ + { + where: { node: { id_EQ: "$jwt.id" }, jwt: { roles_INCLUDES: "user" } } + }, + { + where: { jwt: { roles_INCLUDES: "admin" } } + } + ] + ) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const userId2 = generate({ + charset: "alphabetic", + }); + + const query = ` + query { + ${type.plural} { + id + name + password + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:${type.name} {id: "${userId}", name: "User1", password: "password" }) + CREATE (:${type.name} {id: "${userId2}", name: "User2", password: "password" }) + `); + // request with role "user" - should only return details of user + const userToken = createBearerToken(secret, { roles: ["user"], id: userId }); + + const gqlResultUser = await testHelper.executeGraphQLWithToken(query, userToken); + + expect(gqlResultUser.data).toEqual({ + [type.plural]: [{ id: userId, name: "User1", password: "password" }], + }); + + // request with role "admin" - should return all users + const adminToken = createBearerToken(secret, { roles: ["admin"], id: userId2 }); + + const gqlResultAdmin = await testHelper.executeGraphQLWithToken(query, adminToken); + + expect(gqlResultAdmin.data).toEqual({ + [type.plural]: expect.toIncludeSameMembers([ + { id: userId, name: "User1", password: "password" }, + { id: userId2, name: "User2", password: "password" }, + ]), + }); + }); + }); + + describe("rolesPath with dots", () => { + test("can read role from path containing dots", async () => { + const type = testHelper.createUniqueType("User"); + + const typeDefs = ` + type JWTPayload @jwt { + roles: [String!]! @jwtClaim(path: "https://auth0\\\\.mysite\\\\.com/claims.https://auth0\\\\.mysite\\\\.com/claims/roles") + } + + type ${type.name} @node { + id: ID + name: String + password: String + } + + extend type ${type.name} + @authorization( + validate: [ + { + when: [BEFORE], + where: { jwt: { roles_INCLUDES: "admin" } } + } + ] + ) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const query = ` + query { + ${type.plural} { + id + name + password + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:${type.name} {id: "${userId}", name: "User1", password: "password" }) + `); + // request without role "admin" - should return all users + const nonAdminToken = createBearerToken(secret, { + "https://auth0.mysite.com/claims": { "https://auth0.mysite.com/claims/roles": ["user"] }, + id: userId, + }); + + const gqlResultUser = await testHelper.executeGraphQLWithToken(query, nonAdminToken); + + expect((gqlResultUser.errors as any[])[0].message).toBe("Forbidden"); + + // request with role "admin" - should return all users + const adminToken = createBearerToken(secret, { + "https://auth0.mysite.com/claims": { "https://auth0.mysite.com/claims/roles": ["admin"] }, + id: userId, + }); + + const gqlResultAdmin = await testHelper.executeGraphQLWithToken(query, adminToken); + + expect(gqlResultAdmin.data).toEqual({ + [type.plural]: [{ id: userId, name: "User1", password: "password" }], + }); + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/type-narrowing-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/type-narrowing-deprecated.int.test.ts new file mode 100644 index 0000000000..4761aba3d3 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/type-narrowing-deprecated.int.test.ts @@ -0,0 +1,1456 @@ +/* + * 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("type narrowing - simple case - deprecated", () => { + const testHelper = new TestHelper(); + + let Movie: UniqueType; + let AmatureProduction: UniqueType; + let Actor: UniqueType; + let UntrainedPerson: UniqueType; + + beforeEach(async () => { + Movie = testHelper.createUniqueType("Movie"); + AmatureProduction = testHelper.createUniqueType("AmatureProduction"); + Actor = testHelper.createUniqueType("Actor"); + UntrainedPerson = testHelper.createUniqueType("UntrainedPerson"); + + const typeDefs = /* GraphQL */ ` + interface Production { + title: String! + actors: [Person!]! @declareRelationship + } + + type ${Movie} implements Production @node { + title: String! + runtime: Int! + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") + } + + type ${AmatureProduction} implements Production @node { + title: String! + episodeCount: Int! + actors: [${UntrainedPerson}!]! @relationship(type: "ACTED_IN", direction: IN, properties: "AppearsIn") + } + + type ActedIn @relationshipProperties { + screenTime: Int! + } + + type AppearsIn @relationshipProperties { + sceneNr: Int! + } + + interface Person { + name: String! + actedIn: [Production!]! @declareRelationship + } + + type ${Actor} implements Person @node { + name: String! + moviesCnt: Int! + actedIn: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") + } + + type ${UntrainedPerson} implements Person @node { + name: String! + age: Int! + actedIn: [${AmatureProduction}!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "AppearsIn") + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("get narrowed connection field", async () => { + const actorName = "actor1"; + const untrainedPersonName = "anyone"; + + const movieTitle = "movie1"; + const movieTitle2 = "movie2"; + const movieRuntime = 63563; + const movieScreenTime = 42699; + + const amatureProductionTitle = "amature"; + const seriesEpisodes = 88310; + const seriesScreenTime = 40968; + const sceneNr = 92937; + + const query = /* GraphQL */ ` + query Productions { + productions { + title + actorsConnection { + edges { + node { + name + ... on ${Actor} { + moviesCnt + } + ... on ${UntrainedPerson} { + age + } + } + properties { + ... on ActedIn { + screenTime + } + ... on AppearsIn { + sceneNr + } + } + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (a:${Actor} { name: $actorName, moviesCnt: 1 }) + CREATE (up:${UntrainedPerson} { name: $untrainedPersonName, age: 20 }) + CREATE (m:${Movie} { title: $movieTitle, runtime:$movieRuntime }) + CREATE (m2:${Movie} { title: $movieTitle2, runtime:$movieRuntime }) + CREATE (a)-[:ACTED_IN { screenTime: $movieScreenTime }]->(m) + CREATE (a)-[:ACTED_IN { screenTime: $movieScreenTime }]->(m2) + CREATE (up)-[:ACTED_IN { sceneNr: $sceneNr }]->(m2) + CREATE (up)-[:ACTED_IN { sceneNr: $sceneNr, screenTime: $seriesScreenTime }]->(:${AmatureProduction} { title: $amatureProductionTitle, episodeCount: $seriesEpisodes }) + `, + { + actorName, + untrainedPersonName, + movieTitle, + movieTitle2, + movieRuntime, + movieScreenTime, + seriesEpisodes, + seriesScreenTime, + amatureProductionTitle, + sceneNr, + } + ); + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult.data?.["productions"]).toIncludeSameMembers([ + { + title: movieTitle, + actorsConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + name: actorName, + moviesCnt: 1, + }, + properties: { + screenTime: movieScreenTime, + }, + }, + ]), + }, + }, + { + title: movieTitle2, + actorsConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + name: actorName, + moviesCnt: 1, + }, + properties: { + screenTime: movieScreenTime, + }, + }, + ]), + }, + }, + { + title: amatureProductionTitle, + actorsConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + name: untrainedPersonName, + age: 20, + }, + properties: { + sceneNr, + }, + }, + ]), + }, + }, + ]); + }); + + test("get narrowed connection field nested for one narrowed type", async () => { + const actorName = "actor1"; + const untrainedPersonName = "anyone"; + + const movieTitle = "movie1"; + const movieTitle2 = "movie2"; + const movieRuntime = 41886; + const movieScreenTime = 72079; + + const amatureProductionTitle = "amature"; + const seriesEpisodes = 34992; + const seriesScreenTime = 43724; + const sceneNr = 96768; + + const query = /* GraphQL */ ` + query Productions { + productions { + title + actorsConnection { + edges { + node { + name + ... on ${Actor} { + moviesCnt + actedInConnection { + edges { + node { + title + ... on ${Movie} { + runtime + } + } + properties { + ... on ActedIn { + screenTime + } + } + } + } + } + ... on ${UntrainedPerson} { + age + } + } + properties { + ... on ActedIn { + screenTime + } + ... on AppearsIn { + sceneNr + } + } + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (a:${Actor} { name: $actorName, moviesCnt: 1 }) + CREATE (up:${UntrainedPerson} { name: $untrainedPersonName, age: 20 }) + CREATE (m:${Movie} { title: $movieTitle, runtime:$movieRuntime }) + CREATE (m2:${Movie} { title: $movieTitle2, runtime:$movieRuntime }) + CREATE (a)-[:ACTED_IN { screenTime: $movieScreenTime }]->(m) + CREATE (a)-[:ACTED_IN { screenTime: $movieScreenTime }]->(m2) + CREATE (up)-[:ACTED_IN { sceneNr: $sceneNr }]->(m2) + CREATE (up)-[:ACTED_IN { sceneNr: $sceneNr, screenTime: $seriesScreenTime }]->(:${AmatureProduction} { title: $amatureProductionTitle, episodeCount: $seriesEpisodes }) + `, + { + actorName, + untrainedPersonName, + movieTitle, + movieTitle2, + movieRuntime, + movieScreenTime, + seriesEpisodes, + seriesScreenTime, + amatureProductionTitle, + sceneNr, + } + ); + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult.data?.["productions"]).toIncludeSameMembers([ + { + title: movieTitle, + actorsConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + name: actorName, + moviesCnt: 1, + actedInConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + title: movieTitle, + runtime: movieRuntime, + }, + properties: { + screenTime: movieScreenTime, + }, + }, + { + node: { + title: movieTitle2, + runtime: movieRuntime, + }, + properties: { + screenTime: movieScreenTime, + }, + }, + ]), + }, + }, + properties: { + screenTime: movieScreenTime, + }, + }, + ]), + }, + }, + { + title: movieTitle2, + actorsConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + name: actorName, + moviesCnt: 1, + actedInConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + title: movieTitle, + runtime: movieRuntime, + }, + properties: { + screenTime: movieScreenTime, + }, + }, + { + node: { + title: movieTitle2, + runtime: movieRuntime, + }, + properties: { + screenTime: movieScreenTime, + }, + }, + ]), + }, + }, + properties: { + screenTime: movieScreenTime, + }, + }, + ]), + }, + }, + { + title: amatureProductionTitle, + actorsConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + name: untrainedPersonName, + age: 20, + }, + properties: { + sceneNr, + }, + }, + ]), + }, + }, + ]); + }); + + test("get narrowed connection field nested for the other narrowed type", async () => { + const actorName = "actor1"; + const untrainedPersonName = "anyone"; + + const movieTitle = "movie1"; + const movieTitle2 = "movie2"; + const movieRuntime = 12527; + const movieScreenTime = 41858; + + const amatureProductionTitle = "amature"; + const seriesEpisodes = 65818; + const seriesScreenTime = 67600; + const sceneNr = 88992; + + const query = /* GraphQL */ ` + query Productions { + productions { + title + actorsConnection { + edges { + node { + name + ... on ${Actor} { + moviesCnt + } + ... on ${UntrainedPerson} { + age + actedInConnection { + edges { + node { + title + ... on ${Movie} { + runtime + } + ... on ${AmatureProduction} { + episodeCount + } + } + properties { + ... on ActedIn { + screenTime + } + ... on AppearsIn { + sceneNr + } + } + } + } + } + } + properties { + ... on ActedIn { + screenTime + } + ... on AppearsIn { + sceneNr + } + } + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (a:${Actor} { name: $actorName, moviesCnt: 1 }) + CREATE (up:${UntrainedPerson} { name: $untrainedPersonName, age: 20 }) + CREATE (m:${Movie} { title: $movieTitle, runtime:$movieRuntime }) + CREATE (m2:${Movie} { title: $movieTitle2, runtime:$movieRuntime }) + CREATE (a)-[:ACTED_IN { screenTime: $movieScreenTime }]->(m) + CREATE (a)-[:ACTED_IN { screenTime: $movieScreenTime }]->(m2) + CREATE (up)-[:ACTED_IN { sceneNr: $sceneNr }]->(m2) + CREATE (up)-[:ACTED_IN { sceneNr: $sceneNr, screenTime: $seriesScreenTime }]->(:${AmatureProduction} { title: $amatureProductionTitle, episodeCount: $seriesEpisodes }) + `, + { + actorName, + untrainedPersonName, + movieTitle, + movieTitle2, + movieRuntime, + movieScreenTime, + seriesEpisodes, + seriesScreenTime, + amatureProductionTitle, + sceneNr, + } + ); + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult.data?.["productions"]).toIncludeSameMembers([ + { + title: movieTitle, + actorsConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + name: actorName, + moviesCnt: 1, + }, + properties: { + screenTime: movieScreenTime, + }, + }, + ]), + }, + }, + { + title: movieTitle2, + actorsConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + name: actorName, + moviesCnt: 1, + }, + properties: { + screenTime: movieScreenTime, + }, + }, + ]), + }, + }, + { + title: amatureProductionTitle, + actorsConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + name: untrainedPersonName, + age: 20, + actedInConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + title: amatureProductionTitle, + episodeCount: seriesEpisodes, + }, + properties: { + sceneNr, + }, + }, + ]), + }, + }, + properties: { + sceneNr, + }, + }, + ]), + }, + }, + ]); + }); + + test("get narrowed connection field + filter on edge top level", async () => { + const actorName = "actor1"; + const untrainedPersonName = "anyone"; + + const movieTitle = "movie1"; + const movieTitle2 = "movie2"; + const movieRuntime = 17297; + const movieScreenTime = 33241; + + const amatureProductionTitle = "amature"; + const seriesEpisodes = 1345; + const seriesScreenTime = 17269; + const sceneNr = 9176; + + const query = /* GraphQL */ ` + query People { + people(where: { actedInConnection_SOME: { edge: { ActedIn: { screenTime_EQ: ${movieScreenTime} }, AppearsIn: { sceneNr_EQ: ${sceneNr} } } } }) { + name + actedInConnection { + edges { + node { + title + ... on ${Movie} { + runtime + } + ... on ${AmatureProduction} { + episodeCount + } + } + properties { + ... on ActedIn { + screenTime + } + ... on AppearsIn { + sceneNr + } + } + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (a:${Actor} { name: $actorName, moviesCnt: 1 }) + CREATE (up:${UntrainedPerson} { name: $untrainedPersonName, age: 20 }) + CREATE (m:${Movie} { title: $movieTitle, runtime:$movieRuntime }) + CREATE (m2:${Movie} { title: $movieTitle2, runtime:$movieRuntime }) + CREATE (m3:${AmatureProduction} { title: $amatureProductionTitle, episodeCount: $seriesEpisodes }) + CREATE (a)-[:ACTED_IN { screenTime: $movieScreenTime }]->(m) + CREATE (a)-[:ACTED_IN { screenTime: $movieScreenTime }]->(m2) + CREATE (up)-[:ACTED_IN { sceneNr: $sceneNr, screenTime: $seriesScreenTime }]->(m3) + `, + { + actorName, + untrainedPersonName, + movieTitle, + movieTitle2, + movieRuntime, + movieScreenTime, + seriesEpisodes, + seriesScreenTime, + amatureProductionTitle, + sceneNr, + } + ); + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult.data?.["people"]).toEqual( + expect.arrayContaining([ + { + name: actorName, + actedInConnection: { + edges: expect.arrayContaining([ + { + node: { + title: movieTitle2, + runtime: movieRuntime, + }, + properties: { + screenTime: movieScreenTime, + }, + }, + { + node: { + title: movieTitle, + runtime: movieRuntime, + }, + properties: { + screenTime: movieScreenTime, + }, + }, + ]), + }, + }, + { + name: untrainedPersonName, + actedInConnection: { + edges: expect.arrayContaining([ + { + node: { + title: amatureProductionTitle, + episodeCount: seriesEpisodes, + }, + properties: { + sceneNr, + }, + }, + ]), + }, + }, + ]) + ); + }); + + test("get narrowed connection field + filter on node top level", async () => { + const actorName = "actor1"; + const untrainedPersonName = "anyone"; + + const movieTitle = "movie1"; + const movieTitle2 = "movie2"; + const movieRuntime = 69186; + const movieScreenTime = 33869; + + const amatureProductionTitle = "amature"; + const seriesEpisodes = 88178; + const seriesScreenTime = 41685; + const sceneNr = 20583; + + const query = /* GraphQL */ ` + query People { + people(where: { actedInConnection_SOME: { node: { OR: [ { title_EQ: "${movieTitle}" }, { title_EQ: "${amatureProductionTitle}" }] } } }) { + name + actedInConnection { + edges { + node { + title + ... on ${Movie} { + runtime + } + ... on ${AmatureProduction} { + episodeCount + } + } + properties { + ... on ActedIn { + screenTime + } + ... on AppearsIn { + sceneNr + } + } + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (a:${Actor} { name: $actorName, moviesCnt: 1 }) + CREATE (up:${UntrainedPerson} { name: $untrainedPersonName, age: 20 }) + CREATE (m:${Movie} { title: $movieTitle, runtime:$movieRuntime }) + CREATE (m2:${Movie} { title: $movieTitle2, runtime:$movieRuntime }) + CREATE (a)-[:ACTED_IN { screenTime: $movieScreenTime }]->(m) + CREATE (a)-[:ACTED_IN { screenTime: $movieScreenTime }]->(m2) + CREATE (up)-[:ACTED_IN { sceneNr: $sceneNr, screenTime: $seriesScreenTime }]->(:${AmatureProduction} { title: $amatureProductionTitle, episodeCount: $seriesEpisodes }) + `, + { + actorName, + untrainedPersonName, + movieTitle, + movieTitle2, + movieRuntime, + movieScreenTime, + seriesEpisodes, + seriesScreenTime, + amatureProductionTitle, + sceneNr, + } + ); + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult.data?.["people"]).toEqual([ + { + name: actorName, + actedInConnection: { + edges: expect.arrayContaining([ + { + node: { + title: movieTitle, + runtime: movieRuntime, + }, + properties: { + screenTime: movieScreenTime, + }, + }, + { + node: { + title: movieTitle2, + runtime: movieRuntime, + }, + properties: { + screenTime: movieScreenTime, + }, + }, + ]), + }, + }, + { + name: untrainedPersonName, + actedInConnection: { + edges: expect.arrayContaining([ + { + node: { + title: amatureProductionTitle, + episodeCount: seriesEpisodes, + }, + properties: { + sceneNr: sceneNr, + }, + }, + ]), + }, + }, + ]); + }); + + test("get narrowed connection field + filter on edge nested - only one possible propertiesTypeName", async () => { + const actorName = "actor1"; + const untrainedPersonName = "anyone"; + + const movieTitle = "movie1"; + const movieTitle2 = "movie2"; + const movieRuntime = 80494; + const movieScreenTime = 34409; + const movieScreenTime2 = 12485; + + const amatureProductionTitle = "amature"; + const seriesEpisodes = 79217; + const seriesScreenTime = 60447; + const sceneNr = 85423; + + const query = /* GraphQL */ ` + query People { + people { + name + actedInConnection { + edges { + node { + title + actorsConnection(where: { edge: { ActedIn: {screenTime_EQ: ${movieScreenTime2}}, AppearsIn: {} } }) { + edges { + node { + name + ... on ${Actor} { + moviesCnt + } + ... on ${UntrainedPerson} { + age + } + } + properties { + ... on ActedIn { + screenTime + } + ... on AppearsIn { + sceneNr + } + } + } + } + } + properties { + ... on ActedIn { + screenTime + } + ... on AppearsIn { + sceneNr + } + } + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (a:${Actor} { name: $actorName, moviesCnt: 1 }) + CREATE (up:${UntrainedPerson} { name: $untrainedPersonName, age: 20 }) + CREATE (m:${Movie} { title: $movieTitle, runtime:$movieRuntime }) + CREATE (m2:${Movie} { title: $movieTitle2, runtime:$movieRuntime }) + CREATE (a)-[:ACTED_IN { screenTime: $movieScreenTime }]->(m) + CREATE (a)-[:ACTED_IN { screenTime: $movieScreenTime2 }]->(m2) + CREATE (up)-[:ACTED_IN { sceneNr: $sceneNr }]->(m2) + CREATE (up)-[:ACTED_IN { sceneNr: $sceneNr, screenTime: $seriesScreenTime }]->(:${AmatureProduction} { title: $amatureProductionTitle, episodeCount: $seriesEpisodes }) + `, + { + actorName, + untrainedPersonName, + movieTitle, + movieTitle2, + movieRuntime, + movieScreenTime, + movieScreenTime2, + seriesEpisodes, + seriesScreenTime, + amatureProductionTitle, + sceneNr, + } + ); + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult.data?.["people"]).toIncludeSameMembers([ + { + name: actorName, + actedInConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + title: movieTitle, + actorsConnection: { + edges: [], + }, + }, + properties: { + screenTime: movieScreenTime, + }, + }, + { + node: { + title: movieTitle2, + actorsConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + name: actorName, + moviesCnt: 1, + }, + properties: { + screenTime: movieScreenTime2, + }, + }, + ]), + }, + }, + properties: { + screenTime: movieScreenTime2, + }, + }, + ]), + }, + }, + { + name: untrainedPersonName, + actedInConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + title: amatureProductionTitle, + actorsConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + name: untrainedPersonName, + age: 20, + }, + properties: { + sceneNr, + }, + }, + ]), + }, + }, + properties: { + sceneNr, + }, + }, + ]), + }, + }, + ]); + }); + + test("get narrowed connection field + filter on edge nested - other possible propertiesTypeName", async () => { + const actorName = "actor1"; + const untrainedPersonName = "anyone"; + + const movieTitle = "movie1"; + const movieTitle2 = "movie2"; + const movieRuntime = 49337; + const movieScreenTime = 80113; + const movieScreenTime2 = 5407; + + const amatureProductionTitle = "amature"; + const seriesEpisodes = 189; + const seriesScreenTime = 22550; + const sceneNr = 40154; + + const query = /* GraphQL */ ` + query People { + people { + name + actedInConnection { + edges { + node { + title + actorsConnection(where: { edge: { AppearsIn: { NOT: { sceneNr_EQ: ${sceneNr} } } } }) { + edges { + node { + name + ... on ${Actor} { + moviesCnt + } + ... on ${UntrainedPerson} { + age + } + } + properties { + ... on ActedIn { + screenTime + } + ... on AppearsIn { + sceneNr + } + } + } + } + } + properties { + ... on ActedIn { + screenTime + } + ... on AppearsIn { + sceneNr + } + } + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (a:${Actor} { name: $actorName, moviesCnt: 1 }) + CREATE (up:${UntrainedPerson} { name: $untrainedPersonName, age: 20 }) + CREATE (m:${Movie} { title: $movieTitle, runtime:$movieRuntime }) + CREATE (m2:${Movie} { title: $movieTitle2, runtime:$movieRuntime }) + CREATE (a)-[:ACTED_IN { screenTime: $movieScreenTime }]->(m) + CREATE (a)-[:ACTED_IN { screenTime: $movieScreenTime2 }]->(m2) + CREATE (up)-[:ACTED_IN { sceneNr: $sceneNr }]->(m2) + CREATE (up)-[:ACTED_IN { sceneNr: $sceneNr, screenTime: $seriesScreenTime }]->(:${AmatureProduction} { title: $amatureProductionTitle, episodeCount: $seriesEpisodes }) + `, + { + actorName, + untrainedPersonName, + movieTitle, + movieTitle2, + movieRuntime, + movieScreenTime, + movieScreenTime2, + seriesEpisodes, + seriesScreenTime, + amatureProductionTitle, + sceneNr, + } + ); + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult.data?.["people"]).toIncludeSameMembers([ + { + name: actorName, + actedInConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + title: movieTitle, + actorsConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + name: actorName, + moviesCnt: 1, + }, + properties: { + screenTime: movieScreenTime, + }, + }, + ]), + }, + }, + properties: { + screenTime: movieScreenTime, + }, + }, + { + node: { + title: movieTitle2, + actorsConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + name: actorName, + moviesCnt: 1, + }, + properties: { + screenTime: movieScreenTime2, + }, + }, + ]), + }, + }, + properties: { + screenTime: movieScreenTime2, + }, + }, + ]), + }, + }, + { + name: untrainedPersonName, + actedInConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + title: amatureProductionTitle, + actorsConnection: { + edges: [], + }, + }, + properties: { + sceneNr, + }, + }, + ]), + }, + }, + ]); + }); + + test("get narrowed connection field + filter on edge nested - all possible propertiesTypeName", async () => { + const actorName = "actor1"; + const untrainedPersonName = "anyone"; + + const movieTitle = "movie1"; + const movieTitle2 = "movie2"; + const movieRuntime = 12169; + const movieScreenTime = 33584; + const movieScreenTime2 = 98332; + + const amatureProductionTitle = "amature"; + const seriesEpisodes = 80053; + const seriesScreenTime = 98561; + const sceneNr = 21219; + + const query = /* GraphQL */ ` + query People { + people { + name + actedInConnection { + edges { + node { + title + actorsConnection(where: { edge: { ActedIn: { NOT: { screenTime_EQ: ${movieScreenTime} } }, AppearsIn: { NOT: { sceneNr_EQ: ${sceneNr} } } } }) { + edges { + node { + name + ... on ${Actor} { + moviesCnt + } + ... on ${UntrainedPerson} { + age + } + } + properties { + ... on ActedIn { + screenTime + } + ... on AppearsIn { + sceneNr + } + } + } + } + } + properties { + ... on ActedIn { + screenTime + } + ... on AppearsIn { + sceneNr + } + } + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (a:${Actor} { name: $actorName, moviesCnt: 1 }) + CREATE (up:${UntrainedPerson} { name: $untrainedPersonName, age: 20 }) + CREATE (m:${Movie} { title: $movieTitle, runtime:$movieRuntime }) + CREATE (m2:${Movie} { title: $movieTitle2, runtime:$movieRuntime }) + CREATE (a)-[:ACTED_IN { screenTime: $movieScreenTime }]->(m) + CREATE (a)-[:ACTED_IN { screenTime: $movieScreenTime2 }]->(m2) + CREATE (up)-[:ACTED_IN { sceneNr: $sceneNr }]->(m2) + CREATE (up)-[:ACTED_IN { sceneNr: $sceneNr, screenTime: $seriesScreenTime }]->(:${AmatureProduction} { title: $amatureProductionTitle, episodeCount: $seriesEpisodes }) + `, + { + actorName, + untrainedPersonName, + movieTitle, + movieTitle2, + movieRuntime, + movieScreenTime, + movieScreenTime2, + seriesEpisodes, + seriesScreenTime, + amatureProductionTitle, + sceneNr, + } + ); + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult.data?.["people"]).toIncludeSameMembers([ + { + name: actorName, + actedInConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + title: movieTitle, + actorsConnection: { + edges: [], + }, + }, + properties: { + screenTime: movieScreenTime, + }, + }, + { + node: { + title: movieTitle2, + actorsConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + name: actorName, + moviesCnt: 1, + }, + properties: { + screenTime: movieScreenTime2, + }, + }, + ]), + }, + }, + properties: { + screenTime: movieScreenTime2, + }, + }, + ]), + }, + }, + { + name: untrainedPersonName, + actedInConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + title: amatureProductionTitle, + actorsConnection: { + edges: [], + }, + }, + properties: { + sceneNr, + }, + }, + ]), + }, + }, + ]); + }); + + test("concrete.interfaceConnection edge filter works for the correct propertiesTypeName", async () => { + const actorName = "actor1"; + const untrainedPersonName = "anyone"; + + const movieTitle = "movie1"; + const movieTitle2 = "movie2"; + const movieRuntime = 39883; + const movieScreenTime = 64889; + const movieScreenTime2 = 82496; + + const amatureProductionTitle = "amature"; + const seriesEpisodes = 42968; + const seriesScreenTime = 64469; + const sceneNr = 2621; + + const query = /* GraphQL */ ` + query Actors { + ${Actor.plural} { + name + actedInConnection(where: { edge: { ActedIn: { screenTime_EQ: ${movieScreenTime} } } }) { + edges { + node { + title + ... on ${Movie} { + runtime + } + ... on ${AmatureProduction} { + episodeCount + } + } + properties { + ... on ActedIn { + screenTime + } + ... on AppearsIn { + sceneNr + } + } + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (a:${Actor} { name: $actorName, moviesCnt: 1 }) + CREATE (up:${UntrainedPerson} { name: $untrainedPersonName, age: 20 }) + CREATE (m:${Movie} { title: $movieTitle, runtime:$movieRuntime }) + CREATE (m2:${Movie} { title: $movieTitle2, runtime:$movieRuntime }) + CREATE (a)-[:ACTED_IN { screenTime: $movieScreenTime }]->(m) + CREATE (a)-[:ACTED_IN { screenTime: $movieScreenTime2 }]->(m2) + CREATE (up)-[:ACTED_IN { sceneNr: $sceneNr }]->(m2) + CREATE (up)-[:ACTED_IN { sceneNr: $sceneNr, screenTime: $seriesScreenTime }]->(:${AmatureProduction} { title: $amatureProductionTitle, episodeCount: $seriesEpisodes }) + `, + { + actorName, + untrainedPersonName, + movieTitle, + movieTitle2, + movieRuntime, + movieScreenTime, + movieScreenTime2, + seriesEpisodes, + seriesScreenTime, + amatureProductionTitle, + sceneNr, + } + ); + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult.data?.[Actor.plural]).toIncludeSameMembers([ + { + name: actorName, + actedInConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + title: movieTitle, + runtime: movieRuntime, + }, + properties: { + screenTime: movieScreenTime, + }, + }, + ]), + }, + }, + ]); + }); + + test("concrete.interfaceConnection edge filter ignores the incorrect propertiesTypeName (Person.actedIn can have AppearsIn properties but Actor.actedIn can only have ActedIn)", async () => { + const actorName = "actor1"; + const untrainedPersonName = "anyone"; + + const movieTitle = "movie1"; + const movieTitle2 = "movie2"; + const movieRuntime = 67705; + const movieScreenTime = 88223; + const movieScreenTime2 = 91931; + + const amatureProductionTitle = "amature"; + const seriesEpisodes = 16632; + const seriesScreenTime = 39594; + const sceneNr = 76405; + + const query = /* GraphQL */ ` + query Actors { + ${Actor.plural} { + name + actedInConnection(where: { edge: { AppearsIn: { sceneNr_EQ: 0 } } }) { + edges { + node { + title + ... on ${Movie} { + runtime + } + ... on ${AmatureProduction} { + episodeCount + } + } + properties { + ... on ActedIn { + screenTime + } + ... on AppearsIn { + sceneNr + } + } + } + } + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (a:${Actor} { name: $actorName, moviesCnt: 1 }) + CREATE (up:${UntrainedPerson} { name: $untrainedPersonName, age: 20 }) + CREATE (m:${Movie} { title: $movieTitle, runtime:$movieRuntime }) + CREATE (m2:${Movie} { title: $movieTitle2, runtime:$movieRuntime }) + CREATE (a)-[:ACTED_IN { screenTime: $movieScreenTime }]->(m) + CREATE (a)-[:ACTED_IN { screenTime: $movieScreenTime2 }]->(m2) + CREATE (up)-[:ACTED_IN { sceneNr: $sceneNr }]->(m2) + CREATE (up)-[:ACTED_IN { sceneNr: $sceneNr, screenTime: $seriesScreenTime }]->(:${AmatureProduction} { title: $amatureProductionTitle, episodeCount: $seriesEpisodes }) + `, + { + actorName, + untrainedPersonName, + movieTitle, + movieTitle2, + movieRuntime, + movieScreenTime, + movieScreenTime2, + seriesEpisodes, + seriesScreenTime, + amatureProductionTitle, + sceneNr, + } + ); + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult.data?.[Actor.plural]).toIncludeSameMembers([ + { + name: actorName, + actedInConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + title: movieTitle, + runtime: movieRuntime, + }, + properties: { + screenTime: movieScreenTime, + }, + }, + { + node: { + title: movieTitle2, + runtime: movieRuntime, + }, + properties: { + screenTime: movieScreenTime2, + }, + }, + ]), + }, + }, + ]); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/type-narrowing-nested-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/type-narrowing-nested-deprecated.int.test.ts new file mode 100644 index 0000000000..da442ec54b --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/type-narrowing-nested-deprecated.int.test.ts @@ -0,0 +1,587 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { gql } from "graphql-tag"; +import type { UniqueType } from "../../../utils/graphql-types"; +import { TestHelper } from "../../../utils/tests-helper"; + +describe("type narrowing nested connections - deprecated", () => { + const testHelper = new TestHelper(); + let gqlQuery: string; + + let Movie: UniqueType; + let AmatureProduction: UniqueType; + let Actor: UniqueType; + let UntrainedPerson: UniqueType; + + let actorName: string; + let untrainedPersonName: string; + let movieTitle: string; + let movieTitle2: string; + let movieRuntime: number; + let movieScreenTime: number; + let amatureProductionTitle: string; + let seriesEpisodes: number; + let seriesScreenTime: number; + let sceneNr: number; + + beforeEach(async () => { + actorName = "actor1"; + untrainedPersonName = "anyone"; + movieTitle = "movie1"; + movieTitle2 = "movie2"; + movieRuntime = 99105; + movieScreenTime = 87653; + amatureProductionTitle = "amature"; + seriesEpisodes = 607; + seriesScreenTime = 73385; + sceneNr = 16220; + + Movie = testHelper.createUniqueType("Movie"); + AmatureProduction = testHelper.createUniqueType("AmatureProduction"); + Actor = testHelper.createUniqueType("Actor"); + UntrainedPerson = testHelper.createUniqueType("UntrainedPerson"); + + await testHelper.executeCypher( + ` + CREATE (a:${Actor} { name: $actorName, moviesCnt: 1 }) + CREATE (up:${UntrainedPerson} { name: $untrainedPersonName, age: 20 }) + CREATE (m:${Movie} { title: $movieTitle, runtime:$movieRuntime }) + CREATE (m2:${Movie} { title: $movieTitle2, runtime:$movieRuntime }) + CREATE (a)-[:ACTED_IN { screenTime: $movieScreenTime }]->(m) + CREATE (a)-[:ACTED_IN { screenTime: $movieScreenTime }]->(m2) + CREATE (up)-[:ACTED_IN { sceneNr: $sceneNr }]->(m2) + CREATE (up)-[:ACTED_IN { sceneNr: $sceneNr, screenTime: $seriesScreenTime }]->(:${AmatureProduction} { title: $amatureProductionTitle, episodeCount: $seriesEpisodes }) + `, + { + actorName, + untrainedPersonName, + movieTitle, + movieTitle2, + movieRuntime, + movieScreenTime, + seriesEpisodes, + seriesScreenTime, + amatureProductionTitle, + sceneNr, + } + ); + + gqlQuery = /* GraphQL */ ` + query Productions { + productions { + title + actorsConnection { + edges { + node { + name + actedInConnection { + edges { + node { + title + ... on ${Movie} { + runtime + } + ... on ${AmatureProduction} { + episodeCount + } + } + properties { + ... on ActedIn { + screenTime + } + ... on AppearsIn { + sceneNr + } + } + } + } + ... on ${Actor} { + moviesCnt + } + ... on ${UntrainedPerson} { + age + } + } + properties { + ... on ActedIn { + screenTime + } + + } + } + } + } + } + `; + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("connection field has relationship to one narrowed type only", async () => { + const typeDefs = gql` + interface Production { + title: String! + actors: [Person!]! @declareRelationship + } + + type ${Movie} implements Production @node { + title: String! + runtime: Int! + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") + } + + type ${AmatureProduction} implements Production @node { + title: String! + episodeCount: Int! + actors: [${UntrainedPerson}!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") + } + + type ActedIn @relationshipProperties { + screenTime: Int! + } + + type AppearsIn @relationshipProperties { + sceneNr: Int! + } + + interface Person { + name: String! + actedIn: [Production!]! @declareRelationship + } + + type ${Actor} implements Person @node { + name: String! + moviesCnt: Int! + actedIn: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") + } + + type ${UntrainedPerson} implements Person @node { + name: String! + age: Int! + actedIn: [${AmatureProduction}!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "AppearsIn") + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + }); + + const gqlResult = await testHelper.executeGraphQL(gqlQuery); + + expect(gqlResult.errors).toBeFalsy(); + expect( + (gqlResult.data?.["productions"] as any).find((r) => r.title === amatureProductionTitle).actorsConnection + .edges + ).toIncludeSameMembers([ + { + node: { + name: untrainedPersonName, + age: 20, + actedInConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + title: amatureProductionTitle, + episodeCount: seriesEpisodes, + }, + properties: { + sceneNr, + }, + }, + ]), + }, + }, + properties: { + screenTime: seriesScreenTime, + }, + }, + ]); + }); + test("connection field has relationship to the other one narrowed type only", async () => { + const typeDefs = gql` + interface Production { + title: String! + actors: [Person!]! @declareRelationship + } + + type ${Movie} implements Production @node { + title: String! + runtime: Int! + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") + } + + type ${AmatureProduction} implements Production @node { + title: String! + episodeCount: Int! + actors: [${UntrainedPerson}!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") + } + + type ActedIn @relationshipProperties { + screenTime: Int! + } + + type AppearsIn @relationshipProperties { + sceneNr: Int! + } + + interface Person { + name: String! + actedIn: [Production!]! @declareRelationship + } + + type ${Actor} implements Person @node { + name: String! + moviesCnt: Int! + actedIn: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") + } + + type ${UntrainedPerson} implements Person @node { + name: String! + age: Int! + actedIn: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "AppearsIn") + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + }); + + const gqlResult = await testHelper.executeGraphQL(gqlQuery); + + expect(gqlResult.errors).toBeFalsy(); + expect( + (gqlResult.data?.["productions"] as any).find((r) => r.title === amatureProductionTitle).actorsConnection + .edges + ).toIncludeSameMembers([ + { + node: { + name: untrainedPersonName, + age: 20, + actedInConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + title: movieTitle2, + runtime: movieRuntime, + }, + properties: { + sceneNr, + }, + }, + ]), + }, + }, + properties: { + screenTime: seriesScreenTime, + }, + }, + ]); + }); + test("connection field has relationship to interface directly", async () => { + const typeDefs = gql` + interface Production { + title: String! + actors: [Person!]! @declareRelationship + } + + type ${Movie} implements Production @node { + title: String! + runtime: Int! + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") + } + + type ${AmatureProduction} implements Production @node { + title: String! + episodeCount: Int! + actors: [${UntrainedPerson}!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") + } + + type ActedIn @relationshipProperties { + screenTime: Int! + } + + type AppearsIn @relationshipProperties { + sceneNr: Int! + } + + interface Person { + name: String! + actedIn: [Production!]! @declareRelationship + } + + type ${Actor} implements Person @node { + name: String! + moviesCnt: Int! + actedIn: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") + } + + type ${UntrainedPerson} implements Person @node { + name: String! + age: Int! + actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "AppearsIn") + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + }); + + const gqlResult = await testHelper.executeGraphQL(gqlQuery); + + expect(gqlResult.errors).toBeFalsy(); + expect( + (gqlResult.data?.["productions"] as any).find((r) => r.title === amatureProductionTitle).actorsConnection + .edges + ).toIncludeSameMembers([ + { + node: { + name: untrainedPersonName, + age: 20, + actedInConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + title: movieTitle2, + runtime: movieRuntime, + }, + properties: { + sceneNr, + }, + }, + { + node: { + title: amatureProductionTitle, + episodeCount: seriesEpisodes, + }, + properties: { + sceneNr, + }, + }, + ]), + }, + }, + properties: { + screenTime: seriesScreenTime, + }, + }, + ]); + }); + test("concrete.interfaceConnection edge filter works for the correct propertiesTypeName", async () => { + const typeDefs = gql` + interface Production { + title: String! + actors: [Person!]! @declareRelationship + } + + type ${Movie} implements Production @node { + title: String! + runtime: Int! + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") + } + + type ${AmatureProduction} implements Production @node { + title: String! + episodeCount: Int! + actors: [${UntrainedPerson}!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") + } + + type ActedIn @relationshipProperties { + screenTime: Int! + } + + type AppearsIn @relationshipProperties { + sceneNr: Int! + } + + interface Person { + name: String! + actedIn: [Production!]! @declareRelationship + } + + type ${Actor} implements Person @node { + name: String! + moviesCnt: Int! + actedIn: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") + } + + type ${UntrainedPerson} implements Person @node { + name: String! + age: Int! + actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "AppearsIn") + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + }); + + const filterQuery = /* GraphQL */ ` + query UntrainedPeople { + ${UntrainedPerson.plural} { + name + actedInConnection(where: { edge: { AppearsIn: { sceneNr_EQ: 0 } } }) { + edges { + node { + title + ... on ${Movie} { + runtime + } + ... on ${AmatureProduction} { + episodeCount + } + } + properties { + ... on ActedIn { + screenTime + } + ... on AppearsIn { + sceneNr + } + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(filterQuery); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult.data?.[UntrainedPerson.plural]).toIncludeSameMembers([ + { + name: untrainedPersonName, + actedInConnection: { + edges: [], + }, + }, + ]); + }); + test("concrete.interfaceConnection edge filter ignores the incorrect propertiesTypeName (Person.actedIn can have ActedIn properties but UntrainedPerson.actedIn can only have AppearsIn)", async () => { + const typeDefs = gql` + interface Production { + title: String! + actors: [Person!]! @declareRelationship + } + + type ${Movie} implements Production @node { + title: String! + runtime: Int! + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") + } + + type ${AmatureProduction} implements Production @node { + title: String! + episodeCount: Int! + actors: [${UntrainedPerson}!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") + } + + type ActedIn @relationshipProperties { + screenTime: Int! + } + + type AppearsIn @relationshipProperties { + sceneNr: Int! + } + + interface Person { + name: String! + actedIn: [Production!]! @declareRelationship + } + + type ${Actor} implements Person @node { + name: String! + moviesCnt: Int! + actedIn: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") + } + + type ${UntrainedPerson} implements Person @node { + name: String! + age: Int! + actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "AppearsIn") + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + }); + + const filterQuery = /* GraphQL */ ` + query UntrainedPeople { + ${UntrainedPerson.plural} { + name + actedInConnection(where: { edge: { AppearsIn: { sceneNr_EQ: ${sceneNr} }, ActedIn: {screenTime_EQ: ${movieScreenTime}} } }) { + edges { + node { + title + ... on ${Movie} { + runtime + } + ... on ${AmatureProduction} { + episodeCount + } + } + properties { + ... on ActedIn { + screenTime + } + ... on AppearsIn { + sceneNr + } + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(filterQuery); + + expect(gqlResult.errors).toBeFalsy(); + expect(gqlResult.data?.[UntrainedPerson.plural]).toIncludeSameMembers([ + { + name: untrainedPersonName, + actedInConnection: { + edges: expect.toIncludeSameMembers([ + { + node: { + title: amatureProductionTitle, + episodeCount: seriesEpisodes, + }, + properties: { + sceneNr, + }, + }, + { + node: { + title: movieTitle2, + runtime: movieRuntime, + }, + properties: { + sceneNr, + }, + }, + ]), + }, + }, + ]); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/types/points-array-filter-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/types/points-array-filter-deprecated.int.test.ts new file mode 100644 index 0000000000..037352af5a --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/types/points-array-filter-deprecated.int.test.ts @@ -0,0 +1,159 @@ +/* + * 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("[Point] - deprecated filter - deprecated", () => { + const testHelper = new TestHelper(); + let Route: UniqueType; + + beforeEach(async () => { + Route = testHelper.createUniqueType("Route"); + const typeDefs = /* GraphQL */ ` + type ${Route} @node { + id: String! + waypoints: [Point!]! + } + `; + await testHelper.initNeo4jGraphQL({ typeDefs }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("enables query of a node with multiple wgs-84 points", async () => { + // Create test data and prepare for testing + const id = "25c4676e-1e38-4b1b-b156-6a7e28c8013e"; + const waypoints = [...new Array(9)].map(() => ({ + longitude: parseFloat("34.1879"), + latitude: parseFloat("30.5402"), + })); + + await testHelper.executeCypher( + ` + CALL { + CREATE (r:${Route}) + SET r.id = $id + SET r.waypoints = [p in $waypoints | point(p)] + RETURN r + } + + RETURN r { .id, .waypoints } AS r + `, + { id, waypoints } + ); + + // Test for equality + const routesQuery = /* GraphQL */ ` + query Routes($waypoints: [PointInput!]) { + ${Route.plural}(where: { waypoints_EQ: $waypoints }) { + id + waypoints { + latitude + longitude + height + crs + } + } + } + `; + + const routesResult = await testHelper.executeGraphQL(routesQuery, { variableValues: { waypoints } }); + + expect(routesResult.errors).toBeFalsy(); + expect((routesResult.data as any)[Route.plural][0]).toEqual({ + id, + waypoints: waypoints.map((waypoint) => ({ ...waypoint, height: null, crs: "wgs-84" })), + }); + + // Test INCLUDES functionality + const routesIncludesQuery = /* GraphQL */ ` + query RoutesIncludes($waypoint: PointInput) { + ${Route.plural}(where: { waypoints_INCLUDES: $waypoint }) { + id + waypoints { + latitude + longitude + height + crs + } + } + } + `; + + const routesIncludesResult = await testHelper.executeGraphQL(routesIncludesQuery, { + variableValues: { waypoint: waypoints[0] }, + }); + + expect(routesIncludesResult.errors).toBeFalsy(); + expect((routesIncludesResult.data as any)[Route.plural][0]).toEqual({ + id, + waypoints: waypoints.map((waypoint) => ({ ...waypoint, height: null, crs: "wgs-84" })), + }); + }); + + test("enables query of a node with multiple wgs-84-3d points", async () => { + const id = "dd320626-cc23-4938-9f33-ba624a3a3e8d"; + const waypoints = [...new Array(7)].map(() => ({ + longitude: parseFloat("146.1568"), + latitude: parseFloat("-54.6132"), + height: 0.03157347836531699, + })); + + await testHelper.executeCypher( + ` + CALL { + CREATE (r:${Route}) + SET r.id = $id + SET r.waypoints = [p in $waypoints | point(p)] + RETURN r + } + + RETURN r { .id, .waypoints } AS r + `, + { id, waypoints } + ); + + const routesQuery = /* GraphQL */ ` + query Routes($id: String!) { + ${Route.plural}(where: { id_EQ: $id }) { + id + waypoints { + latitude + longitude + height + crs + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(routesQuery, { + variableValues: { id }, + }); + + expect(gqlResult.errors).toBeFalsy(); + expect((gqlResult.data as any)[Route.plural][0]).toEqual({ + id, + waypoints: waypoints.map((waypoint) => ({ ...waypoint, crs: "wgs-84-3d" })), + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/types/types-filters-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/types/types-filters-deprecated.int.test.ts new file mode 100644 index 0000000000..724e703ac2 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/types/types-filters-deprecated.int.test.ts @@ -0,0 +1,362 @@ +import neo4jDriver from "neo4j-driver"; +import { generate } from "randomstring"; +import { parseDuration } from "../../../../../src/graphql/scalars/Duration"; +import type { UniqueType } from "../../../../utils/graphql-types"; +import { TestHelper } from "../../../../utils/tests-helper"; + +describe("types filtering - deprecated", () => { + const testHelper = new TestHelper(); + let Movie: UniqueType; + let File: UniqueType; + + beforeEach(() => { + Movie = testHelper.createUniqueType("Movie"); + File = testHelper.createUniqueType("File"); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should find a movie (with a Date) - deprecated", async () => { + const typeDefs = /* GraphQL */ ` + type ${Movie.name} @node { + date: Date + } + `; + + const date = new Date(); + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const query = /* GraphQL */ ` + query { + ${Movie.plural}(where: { date_EQ: "${date.toISOString()}" }) { + date + } + } + `; + + const nDate = neo4jDriver.types.Date.fromStandardDate(date); + + await testHelper.executeCypher( + ` + CREATE (m:${Movie.name}) + SET m.date = $nDate + `, + { nDate } + ); + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect((gqlResult.data as any)[Movie.plural][0]).toEqual({ + date: date.toISOString().split("T")[0], + }); + }); + + test("should find a movie (with a DateTime) - deprecated", async () => { + const typeDefs = /* GraphQL */ ` + type ${Movie.name} @node { + datetime: DateTime + } + `; + + const date = new Date(); + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const query = ` + query { + ${Movie.plural}(where: { datetime_EQ: "${date.toISOString()}" }) { + datetime + } + } + `; + + const nDateTime = neo4jDriver.types.DateTime.fromStandardDate(date); + + await testHelper.executeCypher( + ` + CREATE (m:${Movie.name}) + SET m.datetime = $nDateTime + `, + { nDateTime } + ); + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect((gqlResult.data as any)[Movie.plural][0]).toEqual({ datetime: date.toISOString() }); + }); + + test("should find a movie (with a DateTime created with a timezone) - deprecated", async () => { + const typeDefs = /* GraphQL */ ` + type ${Movie.name} @node { + name: String + datetime: DateTime + } + `; + + const date = new Date(); + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const query = /* GraphQL */ ` + query { + ${Movie.plural}(where: { name_EQ: "${Movie.name}" }) { + datetime + } + } + `; + + await testHelper.executeCypher(` + CREATE (m:${Movie.name}) + SET m.name = "${Movie.name}" + SET m.datetime = datetime("${date.toISOString().replace("Z", "[Etc/UTC]")}") + `); + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + expect((gqlResult.data as any)[Movie.plural][0]).toEqual({ datetime: date.toISOString() }); + }); + + test("should filter based on duration equality - deprecated", async () => { + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + id: ID! + duration: Duration! + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const id = generate({ readable: false }); + const days = 4; + const duration = `P${days}D`; + const parsedDuration = parseDuration(duration); + const neo4jDuration = new neo4jDriver.types.Duration(0, days, 0, 0); + + await testHelper.executeCypher( + ` + CREATE (movie:${Movie}) + SET movie = $movie + `, + { movie: { id, duration: neo4jDuration } } + ); + + const query = /* GraphQL */ ` + query ($id: ID!, $duration: Duration!) { + ${Movie.plural}(where: { id_EQ: $id, duration_EQ: $duration }) { + id + duration + } + } + `; + + const graphqlResult = await testHelper.executeGraphQL(query, { + variableValues: { id, duration }, + }); + + expect(graphqlResult.errors).toBeFalsy(); + + const graphqlMovie: { id: string; duration: string } = (graphqlResult.data as any)[Movie.plural][0]; + expect(graphqlMovie).toBeDefined(); + expect(graphqlMovie.id).toEqual(id); + expect(parseDuration(graphqlMovie.duration)).toStrictEqual(parsedDuration); + }); + + test.each(["LT", "LTE", "GT", "GTE"])( + "should filter based on duration comparison, for filter: %s - deprecated", + async (filter) => { + const typeDefs = ` + type ${Movie} @node { + id: ID! + duration: Duration! + } + `; + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const longId = generate({ readable: false }); + const long = "P2Y"; + const parsedLong = parseDuration(long); + const neo4jLong = new neo4jDriver.types.Duration( + parsedLong.months, + parsedLong.days, + parsedLong.seconds, + parsedLong.nanoseconds + ); + + const mediumId = generate({ readable: false }); + const medium = "P2M"; + const parsedMedium = parseDuration(medium); + const neo4jMedium = new neo4jDriver.types.Duration( + parsedMedium.months, + parsedMedium.days, + parsedMedium.seconds, + parsedMedium.nanoseconds + ); + + const shortId = generate({ readable: false }); + const short = "P2D"; + const parsedShort = parseDuration(short); + const neo4jShort = new neo4jDriver.types.Duration( + parsedShort.months, + parsedShort.days, + parsedShort.seconds, + parsedShort.nanoseconds + ); + + await testHelper.executeCypher( + ` + CREATE (long:${Movie}) + SET long = $long + CREATE (medium:${Movie}) + SET medium = $medium + CREATE (short:${Movie}) + SET short = $short + `, + { + long: { id: longId, duration: neo4jLong }, + medium: { id: mediumId, duration: neo4jMedium }, + short: { id: shortId, duration: neo4jShort }, + } + ); + + const query = /* GraphQL */ ` + query ($where: ${Movie.name}Where!) { + ${Movie.plural}(where: $where, sort: [{ duration: ASC }]) { + id + duration + } + } + `; + + const graphqlResult = await testHelper.executeGraphQL(query, { + variableValues: { + where: { id_IN: [longId, mediumId, shortId], [`duration_${filter}`]: medium }, + }, + }); + + expect(graphqlResult.errors).toBeUndefined(); + + const graphqlMovies: { id: string; duration: string }[] = (graphqlResult.data as any)[Movie.plural]; + expect(graphqlMovies).toBeDefined(); + + /* eslint-disable jest/no-conditional-expect */ + if (filter === "LT") { + expect(graphqlMovies).toHaveLength(1); + expect(graphqlMovies[0]?.id).toBe(shortId); + expect(parseDuration(graphqlMovies[0]?.duration as string)).toStrictEqual(parsedShort); + } + + if (filter === "LTE") { + expect(graphqlMovies).toHaveLength(2); + expect(graphqlMovies[0]?.id).toBe(shortId); + expect(parseDuration(graphqlMovies[0]?.duration as string)).toStrictEqual(parsedShort); + + expect(graphqlMovies[1]?.id).toBe(mediumId); + expect(parseDuration(graphqlMovies[1]?.duration as string)).toStrictEqual(parsedMedium); + } + + if (filter === "GT") { + expect(graphqlMovies).toHaveLength(1); + expect(graphqlMovies[0]?.id).toBe(longId); + expect(parseDuration(graphqlMovies[0]?.duration as string)).toStrictEqual(parsedLong); + } + + if (filter === "GTE") { + expect(graphqlMovies).toHaveLength(2); + expect(graphqlMovies[0]?.id).toBe(mediumId); + expect(parseDuration(graphqlMovies[0]?.duration as string)).toStrictEqual(parsedMedium); + + expect(graphqlMovies[1]?.id).toBe(longId); + expect(parseDuration(graphqlMovies[1]?.duration as string)).toStrictEqual(parsedLong); + } + /* eslint-enable jest/no-conditional-expect */ + } + ); + + test("BigInt should work returning a BigInt property - deprecated", async () => { + const name = generate({ + charset: "alphabetic", + }); + + const typeDefs = ` + type ${File} @node { + name: String! + size: BigInt! @cypher(statement: """ + RETURN 9223372036854775807 as result + """, columnName:"result") + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const query = ` + query { + ${File.plural}(where: { name_EQ: "${name}" }) { + name + size + } + } + `; + + await testHelper.executeCypher(` + CREATE (f:${File}) + SET f.name = "${name}" + `); + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeFalsy(); + + expect(gqlResult?.data).toEqual({ + [File.plural]: [ + { + name, + size: "9223372036854775807", + }, + ], + }); + }); + + test("float should return normal JS number if the value isInt - deprecated filter", async () => { + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + id: String + fakeFloat: Float! @cypher(statement: """ + RETURN 12345 as result + """, columnName: "result") + } + + + `; + + const id = generate({ + charset: "alphabetic", + }); + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const query = /* GraphQL */ ` + query { + ${Movie.plural}(where: { id_EQ: "${id}" }){ + fakeFloat + } + } + `; + + await testHelper.executeCypher( + ` + CREATE (m:${Movie} { id: "${id}" }) + `, + {} + ); + const gqlResult = await testHelper.executeGraphQL(query, {}); + + expect(gqlResult.errors).toBeFalsy(); + expect((gqlResult.data as any)[Movie.plural][0].fakeFloat).toBe(12345); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/types/types-localdatetime-filter-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/types/types-localdatetime-filter-deprecated.int.test.ts new file mode 100644 index 0000000000..bb549fb55f --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/types/types-localdatetime-filter-deprecated.int.test.ts @@ -0,0 +1,194 @@ +/* + * 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 neo4jDriver from "neo4j-driver"; +import { generate } from "randomstring"; +import { parseLocalDateTime } from "../../../../../src/graphql/scalars/LocalDateTime"; +import type { UniqueType } from "../../../../utils/graphql-types"; +import { TestHelper } from "../../../../utils/tests-helper"; + +describe("LocalDateTime - deprecated filters", () => { + const testHelper = new TestHelper(); + let Movie: UniqueType; + + beforeEach(async () => { + Movie = testHelper.createUniqueType("Movie"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + id: ID! + localDT: LocalDateTime + localDTs: [LocalDateTime!] + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should filter based on localDT equality", async () => { + const id = generate({ readable: false }); + const date = new Date("2024-09-17T11:49:48.322Z"); + const localDT = date.toISOString().split("Z")[0]; + const neo4jLocalDateTime = neo4jDriver.types.LocalDateTime.fromStandardDate(date); + const parsedLocalDateTime = parseLocalDateTime(localDT); + + await testHelper.executeCypher( + ` + CREATE (movie:${Movie}) + SET movie = $movie + `, + { movie: { id, localDT: neo4jLocalDateTime } } + ); + + const query = /* GraphQL */ ` + query ($localDT: LocalDateTime!) { + ${Movie.plural}(where: { localDT_EQ: $localDT }) { + id + localDT + } + } + `; + + const graphqlResult = await testHelper.executeGraphQL(query, { + variableValues: { localDT }, + }); + + expect(graphqlResult.errors).toBeFalsy(); + + const graphqlMovie: { id: string; localDT: string } = (graphqlResult.data as any)[Movie.plural][0]; + expect(graphqlMovie).toBeDefined(); + expect(graphqlMovie.id).toEqual(id); + expect(parseLocalDateTime(graphqlMovie.localDT)).toStrictEqual(parsedLocalDateTime); + }); + test.each(["LT", "LTE", "GT", "GTE"])( + "should filter based on localDT comparison, for filter %s", + async (filter) => { + const futureId = generate({ readable: false }); + const future = "2025-02-18T18:10:55.462Z".split("Z")[0]; + const parsedFuture = parseLocalDateTime(future); + const neo4jFuture = new neo4jDriver.types.LocalDateTime( + parsedFuture.year, + parsedFuture.month, + parsedFuture.day, + parsedFuture.hour, + parsedFuture.minute, + parsedFuture.second, + parsedFuture.nanosecond + ); + + const presentId = generate({ readable: false }); + const present = new Date().toISOString().split("Z")[0]; + const parsedPresent = parseLocalDateTime(present); + const neo4jPresent = new neo4jDriver.types.LocalDateTime( + parsedPresent.year, + parsedPresent.month, + parsedPresent.day, + parsedPresent.hour, + parsedPresent.minute, + parsedPresent.second, + parsedPresent.nanosecond + ); + + const pastId = generate({ readable: false }); + const past = "2022-08-29T10:21:43.108Z".split("Z")[0]; + const parsedPast = parseLocalDateTime(past); + const neo4jPast = new neo4jDriver.types.LocalDateTime( + parsedPast.year, + parsedPast.month, + parsedPast.day, + parsedPast.hour, + parsedPast.minute, + parsedPast.second, + parsedPast.nanosecond + ); + + await testHelper.executeCypher( + ` + CREATE (future:${Movie}) + SET future = $future + CREATE (present:${Movie}) + SET present = $present + CREATE (past:${Movie}) + SET past = $past + `, + { + future: { id: futureId, localDT: neo4jFuture }, + present: { id: presentId, localDT: neo4jPresent }, + past: { id: pastId, localDT: neo4jPast }, + } + ); + + const query = /* GraphQL */ ` + query ($where: ${Movie.name}Where!) { + ${Movie.plural}(where: $where, sort: [{ localDT: ASC }]) { + id + localDT + } + } + `; + + const graphqlResult = await testHelper.executeGraphQL(query, { + variableValues: { + where: { id_IN: [futureId, presentId, pastId], [`localDT_${filter}`]: present }, + }, + }); + + expect(graphqlResult.errors).toBeUndefined(); + + const graphqlMovies: { id: string; localDT: string }[] = (graphqlResult.data as any)[Movie.plural]; + expect(graphqlMovies).toBeDefined(); + + /* eslint-disable jest/no-conditional-expect */ + if (filter === "LT") { + expect(graphqlMovies).toHaveLength(1); + expect(graphqlMovies[0]?.id).toBe(pastId); + expect(parseLocalDateTime(graphqlMovies[0]?.localDT)).toStrictEqual(parsedPast); + } + + if (filter === "LTE") { + expect(graphqlMovies).toHaveLength(2); + expect(graphqlMovies[0]?.id).toBe(pastId); + expect(parseLocalDateTime(graphqlMovies[0]?.localDT)).toStrictEqual(parsedPast); + + expect(graphqlMovies[1]?.id).toBe(presentId); + expect(parseLocalDateTime(graphqlMovies[1]?.localDT)).toStrictEqual(parsedPresent); + } + + if (filter === "GT") { + expect(graphqlMovies).toHaveLength(1); + expect(graphqlMovies[0]?.id).toBe(futureId); + expect(parseLocalDateTime(graphqlMovies[0]?.localDT)).toStrictEqual(parsedFuture); + } + + if (filter === "GTE") { + expect(graphqlMovies).toHaveLength(2); + expect(graphqlMovies[0]?.id).toBe(presentId); + expect(parseLocalDateTime(graphqlMovies[0]?.localDT)).toStrictEqual(parsedPresent); + + expect(graphqlMovies[1]?.id).toBe(futureId); + expect(parseLocalDateTime(graphqlMovies[1]?.localDT)).toStrictEqual(parsedFuture); + } + /* eslint-enable jest/no-conditional-expect */ + } + ); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/types/types-localtime-filter-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/types/types-localtime-filter-deprecated.int.test.ts new file mode 100644 index 0000000000..30d6bb1011 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/types/types-localtime-filter-deprecated.int.test.ts @@ -0,0 +1,182 @@ +/* + * 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 neo4jDriver from "neo4j-driver"; +import { generate } from "randomstring"; +import { parseLocalTime } from "../../../../../src/graphql/scalars/LocalTime"; +import type { UniqueType } from "../../../../utils/graphql-types"; +import { TestHelper } from "../../../../utils/tests-helper"; + +describe("LocalTime - deprecated filters", () => { + const testHelper = new TestHelper(); + let Movie: UniqueType; + + beforeEach(async () => { + Movie = testHelper.createUniqueType("Movie"); + + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + id: ID! + time: LocalTime + times: [LocalTime!] + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should filter based on time equality", async () => { + const id = generate({ readable: false }); + const date = new Date("2024-09-17T11:49:48.322Z"); + const time = date.toISOString().split("T")[1]?.split("Z")[0]; + const neo4jTime = neo4jDriver.types.LocalTime.fromStandardDate(date); + const parsedTime = parseLocalTime(time); + + await testHelper.executeCypher( + ` + CREATE (movie:${Movie}) + SET movie = $movie + `, + { movie: { id, time: neo4jTime } } + ); + + const query = /* GraphQL */ ` + query ($time: LocalTime!) { + ${Movie.plural}(where: { time_EQ: $time }) { + id + time + } + } + `; + + const graphqlResult = await testHelper.executeGraphQL(query, { + variableValues: { id, time }, + }); + + expect(graphqlResult.errors).toBeFalsy(); + + const graphqlMovie: { id: string; time: string } = (graphqlResult.data as any)[Movie.plural][0]; + expect(graphqlMovie).toBeDefined(); + expect(graphqlMovie.id).toEqual(id); + expect(parseLocalTime(graphqlMovie.time)).toStrictEqual(parsedTime); + }); + test.each(["LT", "LTE", "GT", "GTE"])("should filter based on time comparison, for filter %s", async (filter) => { + const futureId = generate({ readable: false }); + const future = "13:00:00"; + const parsedFuture = parseLocalTime(future); + const neo4jFuture = new neo4jDriver.types.LocalTime( + parsedFuture.hour, + parsedFuture.minute, + parsedFuture.second, + parsedFuture.nanosecond + ); + + const presentId = generate({ readable: false }); + const present = "12:00:00"; + const parsedPresent = parseLocalTime(present); + const neo4jPresent = new neo4jDriver.types.LocalTime( + parsedPresent.hour, + parsedPresent.minute, + parsedPresent.second, + parsedPresent.nanosecond + ); + + const pastId = generate({ readable: false }); + const past = "11:00:00"; + const parsedPast = parseLocalTime(past); + const neo4jPast = new neo4jDriver.types.LocalTime( + parsedPast.hour, + parsedPast.minute, + parsedPast.second, + parsedPast.nanosecond + ); + + await testHelper.executeCypher( + ` + CREATE (future:${Movie}) + SET future = $future + CREATE (present:${Movie}) + SET present = $present + CREATE (past:${Movie}) + SET past = $past + `, + { + future: { id: futureId, time: neo4jFuture }, + present: { id: presentId, time: neo4jPresent }, + past: { id: pastId, time: neo4jPast }, + } + ); + + const query = /* GraphQL */ ` + query ($where: ${Movie.name}Where!) { + ${Movie.plural}(where: $where, sort: [{ time: ASC }]) { + id + time + } + } + `; + + const graphqlResult = await testHelper.executeGraphQL(query, { + variableValues: { + where: { id_IN: [futureId, presentId, pastId], [`time_${filter}`]: present }, + }, + }); + + expect(graphqlResult.errors).toBeUndefined(); + + const graphqlMovies: { id: string; time: string }[] = (graphqlResult.data as any)[Movie.plural]; + expect(graphqlMovies).toBeDefined(); + + /* eslint-disable jest/no-conditional-expect */ + if (filter === "LT") { + expect(graphqlMovies).toHaveLength(1); + expect(graphqlMovies[0]?.id).toBe(pastId); + expect(parseLocalTime(graphqlMovies[0]?.time)).toStrictEqual(parsedPast); + } + + if (filter === "LTE") { + expect(graphqlMovies).toHaveLength(2); + expect(graphqlMovies[0]?.id).toBe(pastId); + expect(parseLocalTime(graphqlMovies[0]?.time)).toStrictEqual(parsedPast); + + expect(graphqlMovies[1]?.id).toBe(presentId); + expect(parseLocalTime(graphqlMovies[1]?.time)).toStrictEqual(parsedPresent); + } + + if (filter === "GT") { + expect(graphqlMovies).toHaveLength(1); + expect(graphqlMovies[0]?.id).toBe(futureId); + expect(parseLocalTime(graphqlMovies[0]?.time)).toStrictEqual(parsedFuture); + } + + if (filter === "GTE") { + expect(graphqlMovies).toHaveLength(2); + expect(graphqlMovies[0]?.id).toBe(presentId); + expect(parseLocalTime(graphqlMovies[0]?.time)).toStrictEqual(parsedPresent); + + expect(graphqlMovies[1]?.id).toBe(futureId); + expect(parseLocalTime(graphqlMovies[1]?.time)).toStrictEqual(parsedFuture); + } + /* eslint-enable jest/no-conditional-expect */ + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/types/types-point-cartesian-filter-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/types/types-point-cartesian-filter-deprecated.int.test.ts new file mode 100644 index 0000000000..9dba0f1d8b --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/types/types-point-cartesian-filter-deprecated.int.test.ts @@ -0,0 +1,268 @@ +/* + * 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 { int } from "neo4j-driver"; +import type { UniqueType } from "../../../../utils/graphql-types"; +import { TestHelper } from "../../../../utils/tests-helper"; + +describe("CartesianPoint", () => { + const testHelper = new TestHelper(); + + let Part: UniqueType; + + beforeEach(async () => { + Part = testHelper.createUniqueType("Part"); + const typeDefs = /* GraphQL */ ` + type ${Part} @node { + serial: String! + location: CartesianPoint! + } + `; + await testHelper.initNeo4jGraphQL({ typeDefs }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("enables update of a node with a cartesian point", async () => { + const serial = "f5e40cae-f839-4ec3-a12b-45da40e8de7f"; + const x = 0.9797746981494129; + const y = 0.6287962510250509; + const newY = 0.8291290057823062; + + const beforeResult = await testHelper.executeCypher(` + CALL { + CREATE (p:${Part}) + SET p.serial = "${serial}" + SET p.location = point({x: ${x}, y: ${y}}) + RETURN p + } + + RETURN p { .serial, .location } AS p + `); + + expect((beforeResult.records[0] as any).toObject().p.location.x).toEqual(x); + expect((beforeResult.records[0] as any).toObject().p.location.y).toEqual(y); + + const update = /* GraphQL */ ` + mutation UpdateParts($serial: String!, $x: Float!, $y: Float!) { + ${Part.operations.update}(where: { serial_EQ: $serial }, update: { location_SET: { x: $x, y: $y } }) { + ${Part.plural} { + serial + location { + x + y + z + crs + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(update, { + variableValues: { serial, x, y: newY }, + }); + + expect(gqlResult.errors).toBeFalsy(); + expect((gqlResult.data as any)[Part.operations.update][Part.plural][0]).toEqual({ + serial, + location: { + x, + y: newY, + z: null, + crs: "cartesian", + }, + }); + + const result = await testHelper.executeCypher(` + MATCH (p:${Part} {serial: "${serial}"}) + RETURN p { .serial, .location} as p + `); + + expect((result.records[0] as any).toObject().p.location.x).toEqual(x); + expect((result.records[0] as any).toObject().p.location.y).toEqual(newY); + expect((result.records[0] as any).toObject().p.location.srid).toEqual(int(7203)); + }); + + test("enables update of a node with a cartesian-3d point", async () => { + const serial = "ff4af64d-90f6-4f74-ad65-13dce16502bc"; + const x = 0.954262402607128; + const y = 0.9950293721631169; + const z = 0.30888770753517747; + const newY = 0.8628286835737526; + + const beforeResult = await testHelper.executeCypher(` + CALL { + CREATE (p:${Part}) + SET p.serial = "${serial}" + SET p.location = point({x: ${x}, y: ${y}, z: ${z}}) + RETURN p + } + + RETURN p { .serial, .location } AS p + `); + + expect((beforeResult.records[0] as any).toObject().p.location.x).toEqual(x); + expect((beforeResult.records[0] as any).toObject().p.location.y).toEqual(y); + expect((beforeResult.records[0] as any).toObject().p.location.z).toEqual(z); + + const update = /* GraphQL */ ` + mutation UpdateParts($serial: String!, $x: Float!, $y: Float!, $z: Float!) { + ${Part.operations.update}(where: { serial_EQ: $serial }, update: { location_SET: { x: $x, y: $y, z: $z } }) { + ${Part.plural} { + serial + location { + x + y + z + crs + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(update, { + variableValues: { serial, x, y: newY, z }, + }); + + expect(gqlResult.errors).toBeFalsy(); + expect((gqlResult.data as any)[Part.operations.update][Part.plural][0]).toEqual({ + serial, + location: { + x, + y: newY, + z, + crs: "cartesian-3d", + }, + }); + + const result = await testHelper.executeCypher(` + MATCH (p:${Part} {serial: "${serial}"}) + RETURN p { .serial, .location} as p + `); + + expect((result.records[0] as any).toObject().p.location.x).toEqual(x); + expect((result.records[0] as any).toObject().p.location.y).toEqual(newY); + expect((result.records[0] as any).toObject().p.location.z).toEqual(z); + expect((result.records[0] as any).toObject().p.location.srid).toEqual(int(9157)); + }); + + test("enables query of a node with a cartesian point", async () => { + const serial = "bf92efbc-6c15-40ac-9cd5-8ab95fa4da90"; + const x = 0.2800768264569342; + const y = 0.6105434170458466; + + const result = await testHelper.executeCypher(` + CALL { + CREATE (p:${Part}) + SET p.serial = "${serial}" + SET p.location = point({x: ${x}, y: ${y}}) + RETURN p + } + + RETURN p { .id, .location } AS p + `); + + expect((result.records[0] as any).toObject().p.location.x).toEqual(x); + expect((result.records[0] as any).toObject().p.location.y).toEqual(y); + + const partsQuery = /* GraphQL */ ` + query Parts($serial: String!) { + ${Part.plural}(where: { serial_EQ: $serial }) { + serial + location { + x + y + z + crs + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(partsQuery, { + variableValues: { serial }, + }); + + expect(gqlResult.errors).toBeFalsy(); + expect((gqlResult.data as any)[Part.plural][0]).toEqual({ + serial, + location: { + x, + y, + z: null, + crs: "cartesian", + }, + }); + }); + + test("enables query of a node with a cartesian-3d point", async () => { + const serial = "c7715adc-9c9c-45ff-b4ed-6cb20bb044ad"; + const x = 0.9446345162577927; + const y = 0.7858678111806512; + const z = 0.4248296618461609; + + const result = await testHelper.executeCypher(` + CALL { + CREATE (p:${Part}) + SET p.serial = "${serial}" + SET p.location = point({x: ${x}, y: ${y}, z: ${z}}) + RETURN p + } + + RETURN p { .id, .location } AS p + `); + + expect((result.records[0] as any).toObject().p.location.x).toEqual(x); + expect((result.records[0] as any).toObject().p.location.y).toEqual(y); + expect((result.records[0] as any).toObject().p.location.z).toEqual(z); + + const partsQuery = /* GraphQL */ ` + query Parts($serial: String!) { + ${Part.plural}(where: { serial_EQ: $serial }) { + serial + location { + x + y + z + crs + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(partsQuery, { + variableValues: { serial }, + }); + + expect(gqlResult.errors).toBeFalsy(); + expect((gqlResult.data as any)[Part.plural][0]).toEqual({ + serial, + location: { + x, + y, + z, + crs: "cartesian-3d", + }, + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/types/types-point-filter-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/types/types-point-filter-deprecated.int.test.ts new file mode 100644 index 0000000000..c4e1330ecb --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/types/types-point-filter-deprecated.int.test.ts @@ -0,0 +1,411 @@ +/* + * 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 { int } from "neo4j-driver"; +import type { UniqueType } from "../../../../utils/graphql-types"; +import { TestHelper } from "../../../../utils/tests-helper"; + +describe("Point - deprecated", () => { + const testHelper = new TestHelper(); + + let Photograph: UniqueType; + + beforeEach(async () => { + Photograph = testHelper.createUniqueType("Photograph"); + + const typeDefs = /* GraphQL */ ` + type ${Photograph} @node { + id: String! + size: Int! + location: Point! + } + + type Query { + custom: String! + } + `; + // Dummy custom resolvers to validate fix for https://github.com/neo4j/graphql/issues/278 + const resolvers = { + Query: { + custom: () => "hello", + }, + }; + await testHelper.initNeo4jGraphQL({ typeDefs, resolvers }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("enables update of a node with a wgs-84 point", async () => { + const id = "09132bb0-504a-407c-9096-6d945695dc89"; + const size = 95026; + const longitude = parseFloat("117.5113"); + const latitude = parseFloat("9.5509"); + const newLatitude = parseFloat("10.6116"); + + const beforeResult = await testHelper.executeCypher(` + CALL { + CREATE (p:${Photograph}) + SET p.id = "${id}" + SET p.size = ${size} + SET p.location = point({longitude: ${longitude}, latitude: ${latitude}}) + RETURN p + } + + RETURN p { .id, .size, .location } AS p + `); + + expect((beforeResult.records[0] as any).toObject().p.location.x).toEqual(longitude); + expect((beforeResult.records[0] as any).toObject().p.location.y).toEqual(latitude); + + const update = /* GraphQL */ ` + mutation UpdatePhotographs($id: String!, $longitude: Float!, $latitude: Float!) { + ${Photograph.operations.update}( + where: { id_EQ: $id } + update: { location_SET: { longitude: $longitude, latitude: $latitude } } + ) { + ${Photograph.plural} { + id + size + location { + latitude + longitude + height + crs + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(update, { + variableValues: { id, longitude, latitude: newLatitude }, + }); + expect(gqlResult.errors).toBeFalsy(); + expect((gqlResult.data as any)[Photograph.operations.update][Photograph.plural][0]).toEqual({ + id, + size, + location: { + latitude: newLatitude, + longitude, + height: null, + crs: "wgs-84", + }, + }); + + const result = await testHelper.executeCypher(` + MATCH (p:${Photograph} {id: "${id}"}) + RETURN p { .id, .size, .location} as p + `); + + expect((result.records[0] as any)?.toObject().p.location.x).toEqual(longitude); + expect((result.records[0] as any)?.toObject().p.location.y).toEqual(newLatitude); + expect((result.records[0] as any)?.toObject().p.location.srid).toEqual(int(4326)); + }); + + test("enables update of a node with a wgs-84-3d point", async () => { + const id = "3b3170d8-03ed-43be-ae02-876a4233e2c7"; + const size = 55312; + const longitude = parseFloat("102.1785"); + const latitude = parseFloat("78.8688"); + const height = 0.9209601751063019; + const newLatitude = parseFloat("71.2271"); + + const beforeResult = await testHelper.executeCypher(` + CALL { + CREATE (p:${Photograph}) + SET p.id = "${id}" + SET p.size = ${size} + SET p.location = point({longitude: ${longitude}, latitude: ${latitude}, height: ${height}}) + RETURN p + } + + RETURN p { .id, .size, .location } AS p + `); + + expect((beforeResult.records[0] as any).toObject().p.location.x).toEqual(longitude); + expect((beforeResult.records[0] as any).toObject().p.location.y).toEqual(latitude); + expect((beforeResult.records[0] as any).toObject().p.location.z).toEqual(height); + + const update = /* GraphQL */ ` + mutation UpdatePhotographs($id: String!, $longitude: Float!, $latitude: Float!, $height: Float!) { + ${Photograph.operations.update}( + where: { id_EQ: $id } + update: { location_SET: { longitude: $longitude, latitude: $latitude, height: $height } } + ) { + ${Photograph.plural} { + id + size + location { + latitude + longitude + height + crs + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(update, { + variableValues: { id, longitude, latitude: newLatitude, height }, + }); + + expect(gqlResult.errors).toBeFalsy(); + expect((gqlResult.data as any)[Photograph.operations.update][Photograph.plural][0]).toEqual({ + id, + size, + location: { + latitude: newLatitude, + longitude, + height, + crs: "wgs-84-3d", + }, + }); + + const result = await testHelper.executeCypher(` + MATCH (p:${Photograph} {id: "${id}"}) + RETURN p { .id, .size, .location} as p + `); + + expect((result.records[0] as any).toObject().p.location.x).toEqual(longitude); + expect((result.records[0] as any).toObject().p.location.y).toEqual(newLatitude); + expect((result.records[0] as any).toObject().p.location.z).toEqual(height); + expect((result.records[0] as any).toObject().p.location.srid).toEqual(int(4979)); + }); + + test("enables query of a node with a wgs-84 point", async () => { + // Create node + const id = "f8a5a58a-7380-4a39-9103-07a2c0528d8e"; + const size = 31364; + const longitude = parseFloat("62.5196"); + const latitude = parseFloat("-41.1021"); + + const result = await testHelper.executeCypher(` + CALL { + CREATE (p:${Photograph}) + SET p.id = "${id}" + SET p.size = ${size} + SET p.location = point({longitude: ${longitude}, latitude: ${latitude}}) + RETURN p + } + + RETURN p { .id, .size, .location } AS p + `); + + expect((result.records[0] as any).toObject().p.location.x).toEqual(longitude); + expect((result.records[0] as any).toObject().p.location.y).toEqual(latitude); + + // Test equality + const photographsEqualsQuery = /* GraphQL */ ` + query Photographs($longitude: Float!, $latitude: Float!) { + ${Photograph.plural}(where: { location_EQ: { longitude: $longitude, latitude: $latitude } }) { + id + size + location { + latitude + longitude + height + crs + } + } + } + `; + + const equalsResult = await testHelper.executeGraphQL(photographsEqualsQuery, { + variableValues: { longitude, latitude }, + }); + + expect(equalsResult.errors).toBeFalsy(); + expect((equalsResult.data as any)[Photograph.plural][0]).toEqual({ + id, + size, + location: { + latitude, + longitude, + height: null, + crs: "wgs-84", + }, + }); + + // Test IN functionality + const photographsInQuery = /* GraphQL */ ` + query Photographs($locations: [PointInput!]) { + ${Photograph.plural}(where: { location_IN: $locations }) { + id + size + location { + latitude + longitude + height + crs + } + } + } + `; + + const inResult = await testHelper.executeGraphQL(photographsInQuery, { + variableValues: { + locations: [ + { longitude, latitude }, + { + longitude: parseFloat("-156.8208"), + latitude: parseFloat("64.9108"), + }, + ], + }, + }); + + expect(inResult.errors).toBeFalsy(); + expect((inResult.data as any)[Photograph.plural]).toContainEqual({ + id, + size, + location: { + latitude, + longitude, + height: null, + crs: "wgs-84", + }, + }); + + // Test less than + const photographsLessThanQuery = /* GraphQL */ ` + query Photographs($longitude: Float!, $latitude: Float!) { + ${Photograph.plural}( + where: { location_LT: { point: { longitude: $longitude, latitude: $latitude }, distance: 1000000 } } + ) { + id + size + location { + latitude + longitude + height + crs + } + } + } + `; + + const lessThanResult = await testHelper.executeGraphQL(photographsLessThanQuery, { + variableValues: { longitude, latitude: latitude + 1 }, + }); + + expect(lessThanResult.errors).toBeFalsy(); + expect((lessThanResult.data as any)[Photograph.plural]).toContainEqual({ + id, + size, + location: { + latitude, + longitude, + height: null, + crs: "wgs-84", + }, + }); + + // Test greater than + const photographsGreaterThanQuery = /* GraphQL */ ` + query Photographs($longitude: Float!, $latitude: Float!) { + ${Photograph.plural}( + where: { location_GT: { point: { longitude: $longitude, latitude: $latitude }, distance: 1 } } + ) { + id + size + location { + latitude + longitude + height + crs + } + } + } + `; + + const greaterThanResult = await testHelper.executeGraphQL(photographsGreaterThanQuery, { + variableValues: { longitude, latitude: latitude + 1 }, + }); + + expect(greaterThanResult.errors).toBeFalsy(); + expect((greaterThanResult.data as any)[Photograph.plural]).toContainEqual({ + id, + size, + location: { + latitude, + longitude, + height: null, + crs: "wgs-84", + }, + }); + }); + + test("enables query for equality of a node with a wgs-84-3d point", async () => { + const id = "3019fe82-5231-4103-8662-39c1fcc7d50c"; + const size = 99119; + const longitude = parseFloat("125.6358"); + const latitude = parseFloat("-7.2045"); + const height = 0.6950517320074141; + + const result = await testHelper.executeCypher(` + CALL { + CREATE (p:${Photograph}) + SET p.id = "${id}" + SET p.size = ${size} + SET p.location = point({longitude: ${longitude}, latitude: ${latitude}, height: ${height}}) + RETURN p + } + + RETURN p { .id, .size, .location } AS p + `); + + expect((result.records[0] as any).toObject().p.location.x).toEqual(longitude); + expect((result.records[0] as any).toObject().p.location.y).toEqual(latitude); + expect((result.records[0] as any).toObject().p.location.z).toEqual(height); + + const photographsQuery = /* GraphQL */ ` + query Photographs($longitude: Float!, $latitude: Float!, $height: Float) { + ${Photograph.plural}(where: { location_EQ: { longitude: $longitude, latitude: $latitude, height: $height } }) { + id + size + location { + latitude + longitude + height + crs + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(photographsQuery, { + variableValues: { longitude, latitude, height }, + }); + + expect(gqlResult.errors).toBeFalsy(); + expect((gqlResult.data as any)[Photograph.plural][0]).toEqual({ + id, + size, + location: { + latitude, + longitude, + height, + crs: "wgs-84-3d", + }, + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/types/types-time-filter-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/types/types-time-filter-deprecated.int.test.ts new file mode 100644 index 0000000000..14680d3b34 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/types/types-time-filter-deprecated.int.test.ts @@ -0,0 +1,196 @@ +/* + * 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 { Time } from "neo4j-driver"; +import { generate } from "randomstring"; +import { parseTime } from "../../../../../src/graphql/scalars/Time"; +import type { UniqueType } from "../../../../utils/graphql-types"; +import { TestHelper } from "../../../../utils/tests-helper"; + +describe("Time - deprecated filters", () => { + const testHelper = new TestHelper(); + + let Movie: UniqueType; + + beforeEach(() => { + Movie = testHelper.createUniqueType("Movie"); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should filter based on time equality", async () => { + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + id: ID! + time: Time! + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const id = generate({ readable: false }); + const date = new Date("2024-02-17T11:49:48.322Z"); + const time = date.toISOString().split("T")[1]; + const neo4jTime = Time.fromStandardDate(date); + const parsedTime = parseTime(time); + + await testHelper.executeCypher( + ` + CREATE (movie:${Movie}) + SET movie = $movie + `, + { movie: { id, time: neo4jTime } } + ); + + const query = /* GraphQL */ ` + query ($time: Time!) { + ${Movie.plural}(where: { time_EQ: $time }) { + id + time + } + } + `; + + const graphqlResult = await testHelper.executeGraphQL(query, { variableValues: { time } }); + + expect(graphqlResult.errors).toBeFalsy(); + + const graphqlMovie: { id: string; time: string } = (graphqlResult.data as any)[Movie.plural][0]; + expect(graphqlMovie).toBeDefined(); + expect(graphqlMovie.id).toEqual(id); + expect(parseTime(graphqlMovie.time)).toStrictEqual(parsedTime); + }); + + test.each(["LT", "LTE", "GT", "GTE"])("should filter based on time comparison for filter: %s", async (filter) => { + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + id: ID! + time: Time! + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const futureId = generate({ readable: false }); + const future = "13:00:00"; + const parsedFuture = parseTime(future); + const neo4jFuture = new Time( + parsedFuture.hour, + parsedFuture.minute, + parsedFuture.second, + parsedFuture.nanosecond, + parsedFuture.timeZoneOffsetSeconds + ); + + const presentId = generate({ readable: false }); + const present = "12:00:00"; + const parsedPresent = parseTime(present); + const neo4jPresent = new Time( + parsedPresent.hour, + parsedPresent.minute, + parsedPresent.second, + parsedPresent.nanosecond, + parsedPresent.timeZoneOffsetSeconds + ); + + const pastId = generate({ readable: false }); + const past = "11:00:00"; + const parsedPast = parseTime(past); + const neo4jPast = new Time( + parsedPast.hour, + parsedPast.minute, + parsedPast.second, + parsedPast.nanosecond, + parsedPast.timeZoneOffsetSeconds + ); + + await testHelper.executeCypher( + ` + CREATE (future:${Movie}) + SET future = $future + CREATE (present:${Movie}) + SET present = $present + CREATE (past:${Movie}) + SET past = $past + `, + { + future: { id: futureId, time: neo4jFuture }, + present: { id: presentId, time: neo4jPresent }, + past: { id: pastId, time: neo4jPast }, + } + ); + + const query = /* GraphQL */ ` + query ($where: ${Movie.name}Where!) { + ${Movie.plural}( + where: $where + sort: [{ time: ASC }] + ) { + id + time + } + } + `; + + const graphqlResult = await testHelper.executeGraphQL(query, { + variableValues: { + where: { id_IN: [futureId, presentId, pastId], [`time_${filter}`]: present }, + }, + }); + + expect(graphqlResult.errors).toBeUndefined(); + + const graphqlMovies: { id: string; time: string }[] = (graphqlResult.data as any)[Movie.plural]; + expect(graphqlMovies).toBeDefined(); + + /* eslint-disable jest/no-conditional-expect */ + if (filter === "LT") { + expect(graphqlMovies).toHaveLength(1); + expect(graphqlMovies[0]?.id).toBe(pastId); + expect(parseTime(graphqlMovies[0]?.time)).toStrictEqual(parsedPast); + } + + if (filter === "LTE") { + expect(graphqlMovies).toHaveLength(2); + expect(graphqlMovies[0]?.id).toBe(pastId); + expect(parseTime(graphqlMovies[0]?.time)).toStrictEqual(parsedPast); + + expect(graphqlMovies[1]?.id).toBe(presentId); + expect(parseTime(graphqlMovies[1]?.time)).toStrictEqual(parsedPresent); + } + + if (filter === "GT") { + expect(graphqlMovies).toHaveLength(1); + expect(graphqlMovies[0]?.id).toBe(futureId); + expect(parseTime(graphqlMovies[0]?.time)).toStrictEqual(parsedFuture); + } + + if (filter === "GTE") { + expect(graphqlMovies).toHaveLength(2); + expect(graphqlMovies[0]?.id).toBe(presentId); + expect(parseTime(graphqlMovies[0]?.time)).toStrictEqual(parsedPresent); + + expect(graphqlMovies[1]?.id).toBe(futureId); + expect(parseTime(graphqlMovies[1]?.time)).toStrictEqual(parsedFuture); + } + /* eslint-enable jest/no-conditional-expect */ + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/types/types-update-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/types/types-update-deprecated.int.test.ts new file mode 100644 index 0000000000..071db862e4 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/types/types-update-deprecated.int.test.ts @@ -0,0 +1,149 @@ +/* + * 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 neo4jDriver from "neo4j-driver"; +import { generate } from "randomstring"; +import { parseDuration } from "../../../../../src/graphql/scalars/Duration"; +import type { UniqueType } from "../../../../utils/graphql-types"; +import { TestHelper } from "../../../../utils/tests-helper"; + +describe("Date", () => { + const testHelper = new TestHelper(); + let Movie: UniqueType; + + beforeEach(() => { + Movie = testHelper.createUniqueType("Movie"); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should update a movie (with a Date)", async () => { + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + id: ID + date: Date + } + `; + + const date = new Date(); + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const id = generate({ + charset: "alphabetic", + }); + + const create = /* GraphQL */ ` + mutation { + ${ + Movie.operations.update + }(where: { id_EQ: "${id}"}, update: { date_SET: "${date.toISOString()}" }) { + ${Movie.plural} { + id + date + } + } + } + `; + + await testHelper.executeCypher(` + CREATE (m:${Movie} {id: "${id}"}) + `); + + const gqlResult = await testHelper.executeGraphQL(create); + + expect(gqlResult.errors).toBeFalsy(); + + const result = await testHelper.executeCypher(` + MATCH (m:${Movie} {id: "${id}"}) + RETURN m {.id, .date} as m + `); + + const movie: { + id: string; + date: typeof neo4jDriver.types.Date; + } = (result.records[0] as any).toObject().m; + + expect(movie.id).toEqual(id); + expect(movie.date.toString()).toEqual(date.toISOString().split("T")[0]); + }); + + test("should update a movie (with a Duration)", async () => { + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + id: ID! + duration: Duration + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const id = generate({ readable: false }); + const duration = "-P5Y6M"; + const parsedDuration = parseDuration(duration); + + await testHelper.executeCypher( + ` + CREATE (movie:${Movie}) + SET movie = $movie + `, + { movie: { id } } + ); + + const mutation = /* GraphQL */ ` + mutation ($id: ID!, $duration: Duration) { + ${Movie.operations.update}(where: { id_EQ: $id }, update: { duration_SET: $duration }) { + ${Movie.plural} { + id + duration + } + } + } + `; + + const graphqlResult = await testHelper.executeGraphQL(mutation, { + variableValues: { id, duration }, + }); + + expect(graphqlResult.errors).toBeFalsy(); + + const graphqlMovie: { id: string; duration: string } = (graphqlResult.data as any)[Movie.operations.update][ + Movie.plural + ][0]; + expect(graphqlMovie).toBeDefined(); + expect(graphqlMovie.id).toEqual(id); + expect(parseDuration(graphqlMovie.duration)).toStrictEqual(parsedDuration); + + const neo4jResult = await testHelper.executeCypher( + ` + MATCH (movie:${Movie} {id: $id}) + RETURN movie {.id, .duration} as movie + `, + { id } + ); + + const neo4jMovie: { id: string; duration: { toString(): string } } = neo4jResult.records[0]?.toObject().movie; + expect(neo4jMovie).toBeDefined(); + expect(neo4jMovie.id).toEqual(id); + expect(neo4jDriver.isDuration(neo4jMovie.duration)).toBe(true); + expect(parseDuration(neo4jMovie.duration.toString())).toStrictEqual(parsedDuration); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/generic-filtering/where-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/generic-filtering/where-deprecated.int.test.ts new file mode 100644 index 0000000000..2dba534257 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/generic-filtering/where-deprecated.int.test.ts @@ -0,0 +1,723 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { generate } from "randomstring"; +import { createBearerToken } from "../../../utils/create-bearer-token"; +import type { UniqueType } from "../../../utils/graphql-types"; +import { TestHelper } from "../../../utils/tests-helper"; + +describe("auth/where - deprecated", () => { + const testHelper = new TestHelper(); + const secret = "secret"; + let User: UniqueType; + let Post: UniqueType; + + beforeEach(() => { + User = testHelper.createUniqueType("User"); + Post = testHelper.createUniqueType("Post"); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + describe("read", () => { + test("should add $jwt.id to where and return user", async () => { + const typeDefs = ` + type ${User} @node { + id: ID + } + + extend type ${User} @authorization(filter: [{ operations: [READ], where: { node: { id_EQ: "$jwt.sub" } } }]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const query = ` + { + ${User.plural} { + id + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + CREATE (:${User} {id: "anotherUser"}) + `); + + const token = createBearerToken(secret, { sub: userId }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + + const users = (gqlResult.data as any)[User.plural] as any[]; + expect(users).toEqual([{ id: userId }]); + }); + + test("should add $jwt.id to where on a relationship", async () => { + const typeDefs = ` + type ${User} @node { + id: ID + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + type ${Post} @node { + id: ID + creator: [${User}!]! @relationship(type: "HAS_POST", direction: IN) + } + + extend type ${Post} @authorization(filter: [{ operations: [READ], where: { node: { creator_SINGLE: { id_EQ: "$jwt.sub" } } } }]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const postId1 = generate({ + charset: "alphabetic", + }); + const postId2 = generate({ + charset: "alphabetic", + }); + + const query = ` + { + ${Post.plural} { + id + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (u:${User} {id: "${userId}"}) + CREATE (p1:${Post} {id: "${postId1}"}) + CREATE (p2:${Post} {id: "${postId2}"}) + MERGE (u)-[:HAS_POST]->(p1) + MERGE (u)-[:HAS_POST]->(p2) + `); + + const token = createBearerToken(secret, { sub: userId }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + + const posts = (gqlResult.data as any)[Post.plural] as any[]; + expect(posts).toHaveLength(2); + const post1 = posts.find((x) => x.id === postId1); + expect(post1).toBeTruthy(); + const post2 = posts.find((x) => x.id === postId2); + expect(post2).toBeTruthy(); + }); + + test("should add $jwt.id to where on a relationship(using connection)", async () => { + const typeDefs = ` + type ${User} @node { + id: ID + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + type ${Post} @node { + id: ID + creator: [${User}!]! @relationship(type: "HAS_POST", direction: IN) + } + + extend type ${Post} @authorization(filter: [{ operations: [READ], where: { node: { creator_SINGLE: { id_EQ: "$jwt.sub" } } } }]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const postId1 = generate({ + charset: "alphabetic", + }); + const postId2 = generate({ + charset: "alphabetic", + }); + const randomPostId = generate({ + charset: "alphabetic", + }); + + const query = ` + { + ${User.plural}(where: { id_EQ: "${userId}" }) { + postsConnection { + edges { + node { + id + } + } + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (u:${User} {id: "${userId}"}) + CREATE (p1:${Post} {id: "${postId1}"}) + CREATE (p2:${Post} {id: "${postId2}"}) + CREATE (:${Post} {id: "${randomPostId}"}) + MERGE (u)-[:HAS_POST]->(p1) + MERGE (u)-[:HAS_POST]->(p2) + `); + + const token = createBearerToken(secret, { sub: userId }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + + const posts = (gqlResult.data as any)[User.plural][0].postsConnection as { + edges: { node: { id: string } }[]; + }; + expect(posts.edges).toHaveLength(2); + const post1 = posts.edges.find((x) => x.node.id === postId1); + expect(post1).toBeTruthy(); + const post2 = posts.edges.find((x) => x.node.id === postId2); + expect(post2).toBeTruthy(); + }); + + describe("union", () => { + test("should add $jwt.id to where and return users search", async () => { + const typeDefs = ` + union Content = ${Post} + + type ${User} @node { + id: ID + content: [Content!]! @relationship(type: "HAS_CONTENT", direction: OUT) + } + + type ${Post} @node { + id: ID + creator: [${User}!]! @relationship(type: "HAS_CONTENT", direction: IN) + } + + extend type ${Post} @authorization(filter: [{ operations: [READ], where: { node: { creator_SINGLE: { id_EQ: "$jwt.sub" } } } }]) + extend type ${User} @authorization(filter: [{ operations: [READ], where: { node: { id_EQ: "$jwt.sub" } } }]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const postId1 = generate({ + charset: "alphabetic", + }); + const postId2 = generate({ + charset: "alphabetic", + }); + + const query = ` + { + ${User.plural} { + content { + ... on ${Post} { + id + } + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (u:${User} {id: "${userId}"}) + CREATE (p1:${Post} {id: "${postId1}"}) + CREATE (p2:${Post} {id: "${postId2}"}) + MERGE (u)-[:HAS_CONTENT]->(p1) + MERGE (u)-[:HAS_CONTENT]->(p2) + `); + + const token = createBearerToken(secret, { sub: userId }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + expect(gqlResult.errors).toBeUndefined(); + const posts = (gqlResult.data as any)[User.plural][0].content as any[]; + expect(posts).toHaveLength(2); + const post1 = posts.find((x) => x.id === postId1); + expect(post1).toBeTruthy(); + const post2 = posts.find((x) => x.id === postId2); + expect(post2).toBeTruthy(); + }); + }); + + test("should add $jwt.id to where and return users search(using connections)", async () => { + const typeDefs = ` + union Content = ${Post} + + type ${User} @node { + id: ID + content: [Content!]! @relationship(type: "HAS_CONTENT", direction: OUT) + } + + type ${Post} @node { + id: ID + creator: [${User}!]! @relationship(type: "HAS_CONTENT", direction: IN) + } + + extend type ${Post} @authorization(filter: [{ operations: [READ], where: { node: { creator_SINGLE: { id_EQ: "$jwt.sub" } } } }]) + extend type ${User} @authorization(filter: [{ operations: [READ], where: { node: { id_EQ: "$jwt.sub" } } }]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const postId1 = generate({ + charset: "alphabetic", + }); + const postId2 = generate({ + charset: "alphabetic", + }); + + const query = ` + { + ${User.plural} { + contentConnection { + edges { + node { + ... on ${Post} { + id + } + } + } + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (u:${User} {id: "${userId}"}) + CREATE (p1:${Post} {id: "${postId1}"}) + CREATE (p2:${Post} {id: "${postId2}"}) + CREATE (:${Post} {id: randomUUID()}) + MERGE (u)-[:HAS_CONTENT]->(p1) + MERGE (u)-[:HAS_CONTENT]->(p2) + `); + + const token = createBearerToken(secret, { sub: userId }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + expect(gqlResult.errors).toBeUndefined(); + const posts = (gqlResult.data as any)[User.plural][0].contentConnection as { + edges: { node: { id: string } }[]; + }; + expect(posts.edges).toHaveLength(2); + const post1 = posts.edges.find((x) => x.node.id === postId1); + expect(post1).toBeTruthy(); + const post2 = posts.edges.find((x) => x.node.id === postId2); + expect(post2).toBeTruthy(); + }); + }); + + describe("update", () => { + test("should add $jwt.id to where", async () => { + const typeDefs = /* GraphQL */ ` + type ${User} @node { + id: ID + } + + extend type ${User} @authorization(filter: [{ operations: [UPDATE], where: { node: { id_EQ: "$jwt.sub" } } }]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + const newUserId = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation { + ${User.operations.update}(update: { id_SET: "${newUserId}" }){ + ${User.plural} { + id + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + `); + + const token = createBearerToken(secret, { sub: userId }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + + const users = (gqlResult.data as any)[User.operations.update][User.plural] as any[]; + expect(users).toEqual([{ id: newUserId }]); + }); + }); + + describe("delete", () => { + test("should add $jwt.id to where", async () => { + const typeDefs = ` + type ${User} @node { + id: ID + } + + extend type ${User} @authorization(filter: [{ operations: [DELETE], where: { node: { id_EQ: "$jwt.sub" } } }]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const query = ` + mutation { + ${User.operations.delete}(where: { id_EQ: "${userId}" }){ + nodesDeleted + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + `); + + const token = createBearerToken(secret, { sub: userId }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + const nodesDeleted = (gqlResult.data as any)[User.operations.delete].nodesDeleted as number; + expect(nodesDeleted).toBe(1); + + const reQuery = await testHelper.executeCypher(` + MATCH (u:${User} {id: "${userId}"}) + RETURN u + `); + expect(reQuery.records).toHaveLength(0); + }); + }); + + describe("connect", () => { + test("should add jwt.id to where - update update", async () => { + const typeDefs = ` + type ${User} @node { + id: ID + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + type ${Post} @node { + id: ID + creator: [${User}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + extend type ${User} @authorization(filter: [{ operations: [UPDATE, CREATE_RELATIONSHIP], where: { node: { id_EQ: "$jwt.sub" } } }]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + const postId = generate({ + charset: "alphabetic", + }); + + const query = ` + mutation { + ${User.operations.update}(update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.plural} { + id + posts { + id + } + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + CREATE (:${Post} {id: "${postId}"}) + `); + + const token = createBearerToken(secret, { sub: userId }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + const users = (gqlResult.data as any)[User.operations.update][User.plural] as any[]; + expect(users).toEqual([{ id: userId, posts: [{ id: postId }] }]); + }); + + test("should add jwt.id to where - update connect", async () => { + const typeDefs = ` + type ${User} @node { + id: ID + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + type ${Post} @node { + id: ID + creator: [${User}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + extend type ${User} @authorization(filter: [{ operations: [UPDATE, CREATE_RELATIONSHIP], where: { node: { id_EQ: "$jwt.sub" } } }]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + const postId = generate({ + charset: "alphabetic", + }); + + const query = ` + mutation { + ${User.operations.update}(update:{posts:{connect:{where:{node:{id_EQ: "${postId}"}}}}}) { + ${User.plural} { + id + posts { + id + } + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}"}) + CREATE (:${Post} {id: "${postId}"}) + `); + + const token = createBearerToken(secret, { sub: userId }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + const users = (gqlResult.data as any)[User.operations.update][User.plural] as any[]; + expect(users).toEqual([{ id: userId, posts: [{ id: postId }] }]); + }); + }); + + describe("disconnect", () => { + test("should add $jwt.id to where (update update)", async () => { + const typeDefs = ` + type ${User} @node { + id: ID + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + type ${Post} @node { + id: ID + creator: [${User}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + extend type ${User} @authorization(filter: [{ operations: [UPDATE, DELETE_RELATIONSHIP], where: { node: { id_EQ: "$jwt.sub" } } }]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + const postId1 = generate({ + charset: "alphabetic", + }); + const postId2 = generate({ + charset: "alphabetic", + }); + + const query = ` + mutation { + ${User.operations.update}(update: { posts: { disconnect: { where: { node: { id_EQ: "${postId1}" } } } } }) { + ${User.plural} { + id + posts { + id + } + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (u:${User} {id: "${userId}"}) + CREATE (u)-[:HAS_POST]->(:${Post} {id: "${postId1}"}) + CREATE (u)-[:HAS_POST]->(:${Post} {id: "${postId2}"}) + `); + + const token = createBearerToken(secret, { sub: userId }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + const users = (gqlResult.data as any)[User.operations.update][User.plural] as any[]; + expect(users).toEqual([{ id: userId, posts: [{ id: postId2 }] }]); + }); + + test("should add $jwt.id to where (update disconnect)", async () => { + const typeDefs = ` + type ${User} @node { + id: ID + posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + type ${Post} @node { + id: ID + creator: [${User}!]! @relationship(type: "HAS_POST", direction: OUT) + } + + extend type ${User} @authorization(filter: [{ operations: [UPDATE, DELETE_RELATIONSHIP], where: { node: { id_EQ: "$jwt.sub" } } }]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + const postId1 = generate({ + charset: "alphabetic", + }); + const postId2 = generate({ + charset: "alphabetic", + }); + + const query = ` + mutation { + ${User.operations.update}(update: { posts: { disconnect: { where: {node: { id_EQ: "${postId1}"}}}}}) { + ${User.plural} { + id + posts { + id + } + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (u:${User} {id: "${userId}"}) + CREATE(u)-[:HAS_POST]->(:${Post} {id: "${postId1}"}) + CREATE(u)-[:HAS_POST]->(:${Post} {id: "${postId2}"}) + `); + + const token = createBearerToken(secret, { sub: userId }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + const users = (gqlResult.data as any)[User.operations.update][User.plural] as any[]; + expect(users).toEqual([{ id: userId, posts: [{ id: postId2 }] }]); + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/math-deprecated.int.test.ts b/packages/graphql/tests/integration/deprecations/math-deprecated.int.test.ts new file mode 100644 index 0000000000..b47e239b0a --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/math-deprecated.int.test.ts @@ -0,0 +1,687 @@ +/* + * 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 { GraphQLError } from "graphql"; +import { int } from "neo4j-driver"; +import { generate } from "randomstring"; +import { TestHelper } from "../../utils/tests-helper"; + +describe("Mathematical operations tests", () => { + const testHelper = new TestHelper(); + const largestSafeSigned32BitInteger = Number(2 ** 31 - 1); + const largestSafeSigned64BitBigInt = BigInt(2 ** 63 - 1).toString(); + + afterEach(async () => { + await testHelper.close(); + }); + + test.each([ + { initialValue: int(0), value: 5, type: "Int", operation: "INCREMENT", expected: 5 }, + { initialValue: int(10), value: 5, type: "Int", operation: "DECREMENT", expected: 5 }, + { initialValue: int(0), value: "5", type: "BigInt", operation: "INCREMENT", expected: "5" }, + { initialValue: int(10), value: "5", type: "BigInt", operation: "DECREMENT", expected: "5" }, + { initialValue: int(10), value: "-5", type: "BigInt", operation: "DECREMENT", expected: "15" }, + { initialValue: 0.0, value: 5.0, type: "Float", operation: "ADD", expected: 5.0 }, + { initialValue: 10.0, value: 5.0, type: "Float", operation: "SUBTRACT", expected: 5.0 }, + { initialValue: 10.0, value: 5.0, type: "Float", operation: "MULTIPLY", expected: 50.0 }, + { initialValue: 10.0, value: -5.0, type: "Float", operation: "MULTIPLY", expected: -50.0 }, + { initialValue: 10.0, value: 5.0, type: "Float", operation: "DIVIDE", expected: 2.0 }, + ])( + "Simple operations on numerical fields: on $type, $operation($initialValue, $value) should return $expected", + async ({ initialValue, type, value, operation, expected }) => { + const movie = testHelper.createUniqueType("Movie"); + + const typeDefs = /* GraphQL */ ` + type ${movie.name} @node { + id: ID! + viewers: ${type}! + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const id = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation($id: ID, $value: ${type}) { + ${movie.operations.update}(where: { id_EQ: $id }, update: {viewers_${operation}: $value}) { + ${movie.plural} { + id + viewers + } + } + } + `; + + // Create new movie + await testHelper.executeCypher( + ` + CREATE (:${movie.name} {id: $id, viewers: $initialViewers}) + `, + { + id, + initialViewers: initialValue, + } + ); + // Update movie + const gqlResult = await testHelper.executeGraphQL(query, { + variableValues: { id, value }, + }); + + expect(gqlResult.errors).toBeUndefined(); + expect(gqlResult?.data?.[movie.operations.update]).toEqual({ + [movie.plural]: [{ id, viewers: expected }], + }); + } + ); + + test.each([ + { + initialValue: int(largestSafeSigned32BitInteger), + value: largestSafeSigned32BitInteger, + type: "Int", + operation: "INCREMENT", + expectedError: "overflow", + }, + { + initialValue: int(largestSafeSigned64BitBigInt), + value: largestSafeSigned64BitBigInt, + type: "BigInt", + operation: "INCREMENT", + expectedError: "overflow", + }, + { + initialValue: Number.MAX_VALUE, + value: Number.MAX_VALUE, + type: "Float", + operation: "ADD", + expectedError: "overflow", + }, + { initialValue: 10.0, value: 0.0, type: "Float", operation: "DIVIDE", expectedError: "division by zero" }, + ])( + "Should raise an error in case of $expectedError on $type, initialValue: $initialValue, value: $value", + async ({ initialValue, type, value, operation, expectedError }) => { + const movie = testHelper.createUniqueType("Movie"); + const typeDefs = /* GraphQL */ ` + type ${movie.name} @node { + id: ID! + viewers: ${type}! + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const id = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation($id: ID, $value: ${type}) { + ${movie.operations.update}(where: { id_EQ: $id }, update: {viewers_${operation}: $value}) { + ${movie.plural} { + id + viewers + } + } + } + `; + + // Create new movie + await testHelper.executeCypher( + ` + CREATE (:${movie.name} {id: $id, viewers: $initialViewers}) + `, + { + id, + initialViewers: initialValue, + } + ); + // Update movie + const gqlResult = await testHelper.executeGraphQL(query, { + variableValues: { id, value }, + }); + expect(gqlResult.errors).toBeDefined(); + expect( + (gqlResult.errors as GraphQLError[]).some((el) => el.message.toLowerCase().includes(expectedError)) + ).toBeTruthy(); + const storedValue = await testHelper.executeCypher( + ` + MATCH (n:${movie.name} {id: $id}) RETURN n.viewers AS viewers + `, + { + id, + } + ); + expect(storedValue.records[0]?.get("viewers")).toEqual(initialValue); + } + ); + + test("Should raise an error if the input fields are ambiguous", async () => { + const initialViewers = int(100); + const movie = testHelper.createUniqueType("Movie"); + const typeDefs = /* GraphQL */ ` + type ${movie.name} @node { + id: ID! + viewers: Int! + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const id = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation($id: ID, $value: Int) { + ${movie.operations.update}(where: { id_EQ: $id }, update: {viewers_SET: $value, viewers_INCREMENT: $value}) { + ${movie.plural} { + id + viewers + } + } + } + `; + + // Create new movie + await testHelper.executeCypher( + ` + CREATE (:${movie.name} {id: $id, viewers: $initialViewers}) + `, + { + id, + initialViewers, + } + ); + // Update movie + const gqlResult = await testHelper.executeGraphQL(query, { + variableValues: { id, value: 10 }, + }); + + expect(gqlResult.errors).toEqual([ + new GraphQLError(`Conflicting modification of [[viewers_SET]], [[viewers_INCREMENT]] on type ${movie}`), + ]); + + const storedValue = await testHelper.executeCypher( + ` + MATCH (n:${movie.name} {id: $id}) RETURN n.viewers AS viewers + `, + { + id, + } + ); + expect(storedValue.records[0]?.get("viewers")).toEqual(initialViewers); + }); + + test("Should be possible to do multiple operations in the same mutation", async () => { + const initialViewers = int(100); + const initialLength = int(100); + const movie = testHelper.createUniqueType("Movie"); + const typeDefs = /* GraphQL */ ` + type ${movie.name} @node { + id: ID! + viewers: Int! + length: Int! + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const id = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation($id: ID, $value: Int) { + ${movie.operations.update}(where: { id_EQ: $id }, update: {length_DECREMENT: $value, viewers_INCREMENT: $value}) { + ${movie.plural} { + id + viewers + length + } + } + } + `; + + // Create new movie + await testHelper.executeCypher( + ` + CREATE (:${movie.name} {id: $id, viewers: $initialViewers, length: $initialLength}) + `, + { + id, + initialViewers, + initialLength, + } + ); + // Update movie + const gqlResult = await testHelper.executeGraphQL(query, { + variableValues: { id, value: 10 }, + }); + + expect(gqlResult.errors).toBeUndefined(); + const storedValue = await testHelper.executeCypher( + ` + MATCH (n:${movie.name} {id: $id}) RETURN n.viewers AS viewers, n.length AS length + `, + { + id, + } + ); + expect(storedValue.records[0]?.get("viewers")).toEqual(int(110)); + expect(storedValue.records[0]?.get("length")).toEqual(int(90)); + }); + + test("Should be possible to update nested nodes", async () => { + const initialViewers = int(100); + const name = "Luigino"; + const movie = testHelper.createUniqueType("Movie"); + const actor = testHelper.createUniqueType("Actor"); + const typeDefs = /* GraphQL */ ` + type ${movie.name} @node { + viewers: Int! + workers: [${actor.name}!]! @relationship(type: "WORKED_IN", direction: IN) + } + type ${actor.name} @node { + id: ID! + name: String! + worksInMovies: [${movie.name}!]! @relationship(type: "WORKED_IN", direction: OUT) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const id = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation($id: ID, $value: Int) { + ${actor.operations.update}(where: { id_EQ: $id }, + update: { + worksInMovies: [ + { + update: { + node: { + viewers_INCREMENT: $value + } + } + } + ] + } + ) { + ${actor.plural} { + name + worksInMovies { + viewers + } + } + } + } + `; + + // Create new movie + await testHelper.executeCypher( + ` + CREATE (a:${movie.name} {viewers: $initialViewers}), (b:${actor.name} {id: $id, name: $name}) WITH a,b CREATE (a)<-[worksInMovies: WORKED_IN]-(b) RETURN a, worksInMovies, b + `, + { + id, + initialViewers, + name, + } + ); + // Update movie + const gqlResult = await testHelper.executeGraphQL(query, { + variableValues: { id, value: 10 }, + }); + + expect(gqlResult.errors).toBeUndefined(); + const storedValue = await testHelper.executeCypher( + ` + MATCH (n:${actor.name} {id: $id})--(m:${movie.name}) RETURN n.name AS name, m.viewers AS viewers + `, + { + id, + } + ); + expect(storedValue.records[0]?.get("viewers")).toEqual(int(110)); + expect(storedValue.records[0]?.get("name")).toBe(name); + }); + + test("Should be possible to update nested nodes using interfaces", async () => { + const initialViewers = int(100); + const name = "Luigino"; + const movie = testHelper.createUniqueType("Movie"); + const production = testHelper.createUniqueType("Production"); + const actor = testHelper.createUniqueType("Actor"); + + const typeDefs = /* GraphQL */ ` + interface ${production.name} { + viewers: Int! + } + type ${movie.name} implements ${production.name} @node { + viewers: Int! + workers: [${actor.name}!]! @relationship(type: "WORKED_IN", direction: IN) + } + type ${actor.name} @node { + id: ID! + name: String! + worksInProductions: [${production.name}!]! @relationship(type: "WORKED_IN", direction: OUT) + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const id = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation($id: ID, $value: Int) { + ${actor.operations.update}(where: { id_EQ: $id }, + update: { + worksInProductions: [ + { + update: { + node: { + viewers_INCREMENT: $value + } + } + } + ] + } + ) { + ${actor.plural} { + name + worksInProductions { + viewers + } + } + } + } + `; + + // Create new movie + await testHelper.executeCypher( + ` + CREATE (a:${movie.name} {viewers: $initialViewers}), (b:${actor.name} {id: $id, name: $name}) WITH a,b CREATE (a)<-[worksInProductions: WORKED_IN]-(b) RETURN a, worksInProductions, b + `, + { + id, + initialViewers, + name, + } + ); + // Update movie + const gqlResult = await testHelper.executeGraphQL(query, { + variableValues: { id, value: 10 }, + }); + + expect(gqlResult.errors).toBeUndefined(); + const storedValue = await testHelper.executeCypher( + ` + MATCH (n:${actor.name} {id: $id})--(m:${movie.name}) RETURN n.name AS name, m.viewers AS viewers + `, + { + id, + } + ); + expect(storedValue.records[0]?.get("viewers")).toEqual(int(110)); + expect(storedValue.records[0]?.get("name")).toBe(name); + }); + + test("Should throws an error if the property holds Nan values", async () => { + const increment = 10; + const movie = testHelper.createUniqueType("Movie"); + const typeDefs = /* GraphQL */ ` + type ${movie.name} @node { + id: ID! + viewers: Int + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const id = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation($id: ID, $value: Int) { + ${movie.operations.update}(where: { id_EQ: $id }, update: {viewers_INCREMENT: $value}) { + ${movie.plural} { + id + viewers + } + } + } + `; + + // Create new movie + await testHelper.executeCypher( + ` + CREATE (:${movie.name} {id: $id}) + `, + { + id, + } + ); + // Update movie + const gqlResult = await testHelper.executeGraphQL(query, { + variableValues: { id, value: increment }, + }); + + expect(gqlResult.errors).toBeDefined(); + expect( + (gqlResult.errors as GraphQLError[]).some((el) => + el.message.includes(`Cannot _INCREMENT ${increment} to Nan`) + ) + ).toBeTruthy(); + const storedValue = await testHelper.executeCypher( + ` + MATCH (n:${movie.name} {id: $id}) RETURN n.viewers AS viewers + `, + { + id, + } + ); + expect(storedValue.records[0]?.get("viewers")).toBeNull(); + }); + + test("Should be possible to update relationship properties", async () => { + const initialPay = 100; + const payIncrement = 50; + const movie = testHelper.createUniqueType("Movie"); + const actor = testHelper.createUniqueType("Actor"); + const typeDefs = /* GraphQL */ ` + type ${movie.name} @node { + title: String + actors: [${actor.name}!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) + } + + type ${actor.name} @node { + id: ID! + name: String! + actedIn: [${movie.name}!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) + } + + type ActedIn @relationshipProperties { + pay: Float + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const id = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation Mutation($id: ID, $payIncrement: Float) { + ${actor.operations.update}(where: { id_EQ: $id }, update: { + actedIn: [ + { + update: { + edge: { + pay_ADD: $payIncrement + } + } + } + ] + }) { + ${actor.plural} { + name + actedIn { + title + } + actedInConnection { + edges { + properties { + pay + } + } + } + } + } + } + `; + + // Create new movie + await testHelper.executeCypher( + ` + CREATE (a:${movie.name} {title: "The Matrix"}), (b:${actor.name} {id: $id, name: "Keanu"}) WITH a,b CREATE (a)<-[actedIn: ACTED_IN{ pay: $initialPay }]-(b) RETURN a, actedIn, b + `, + { + id, + initialPay, + } + ); + // Update movie + const gqlResult = await testHelper.executeGraphQL(query, { + variableValues: { id, payIncrement }, + }); + + expect(gqlResult.errors).toBeUndefined(); + const storedValue = await testHelper.executeCypher( + ` + MATCH(b: ${actor.name}{id: $id}) -[c: ACTED_IN]-> (a: ${movie.name}) RETURN c.pay as pay + `, + { + id, + } + ); + expect(storedValue.records[0]?.get("pay")).toEqual(initialPay + payIncrement); + }); + + test("Should raise in case of ambiguous properties on relationships", async () => { + const initialPay = 100; + const payIncrement = 50; + const movie = testHelper.createUniqueType("Movie"); + const actor = testHelper.createUniqueType("Actor"); + const typeDefs = /* GraphQL */ ` + type ${movie.name} @node { + title: String + viewers: Int + actors: [${actor.name}!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) + } + + type ${actor.name} @node { + id: ID! + name: String! + actedIn: [${movie.name}!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) + } + + type ActedIn @relationshipProperties { + pay: Float + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const id = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + mutation Mutation($id: ID, $payIncrement: Float) { + ${actor.operations.update}(where: { id_EQ: $id }, update: { + actedIn: [ + { + update: { + edge: { + pay_ADD: $payIncrement + pay_SET: $payIncrement + } + } + } + ] + }) { + ${actor.plural} { + name + actedIn { + title + } + actedInConnection { + edges { + properties { + pay + } + } + } + } + } + } + + `; + + // Create new movie + await testHelper.executeCypher( + ` + CREATE (a:${movie.name} {title: "The Matrix"}), (b:${actor.name} {id: $id, name: "Keanu"}) WITH a,b CREATE (a)<-[actedIn: ACTED_IN{ pay: $initialPay }]-(b) RETURN a, actedIn, b + `, + { + id, + initialPay, + } + ); + // Update movie + const gqlResult = await testHelper.executeGraphQL(query, { + variableValues: { id, payIncrement }, + }); + + expect(gqlResult.errors).toBeDefined(); + + const relationshipType = `${movie.name}ActorsRelationship`; + expect(gqlResult.errors).toEqual([ + new GraphQLError(`Conflicting modification of [[pay_SET]], [[pay_ADD]] on type ${relationshipType}`), + ]); + const storedValue = await testHelper.executeCypher( + ` + MATCH(b: ${actor.name}{id: $id}) -[c: ACTED_IN]-> (a: ${movie.name}) RETURN c.pay as pay + `, + { + id, + } + ); + expect(storedValue.records[0]?.get("pay")).toEqual(initialPay); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/point-cartesian-array-filter.int.test.ts b/packages/graphql/tests/integration/deprecations/point-cartesian-array-filter.int.test.ts new file mode 100644 index 0000000000..6f9a0a3c1a --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/point-cartesian-array-filter.int.test.ts @@ -0,0 +1,130 @@ +/* + * 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("[CartesianPoint] - deprecated filters", () => { + const testHelper = new TestHelper(); + let Part: UniqueType; + + beforeEach(async () => { + Part = testHelper.createUniqueType("Part"); + const typeDefs = /* GraphQL */ ` + type ${Part} @node { + id: String! + locations: [CartesianPoint!]! + } + `; + await testHelper.initNeo4jGraphQL({ typeDefs }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("enables query of a node with multiple cartesian points", async () => { + const id = "5ba92bc4-95e7-4361-857c-60edcd771391"; + const locations = [...new Array(8)].map(() => ({ + x: 0.02772025833837688, + y: 0.07264417805708945, + })); + + await testHelper.executeCypher( + ` + CALL { + CREATE (r:${Part}) + SET r.id = $id + SET r.locations = [p in $locations | point(p)] + RETURN r + } + + RETURN r { .id, .locations } AS r + `, + { id, locations } + ); + + const partsQuery = /* GraphQL */ ` + query Parts($id: String!) { + ${Part.plural}(where: { id_EQ: $id }) { + id + locations { + y + x + z + crs + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(partsQuery, { variableValues: { id } }); + + expect(gqlResult.errors).toBeFalsy(); + expect((gqlResult.data as any)[Part.plural][0]).toEqual({ + id, + locations: locations.map((location) => ({ ...location, z: null, crs: "cartesian" })), + }); + }); + + test("enables query of a node with multiple cartesian-3d points", async () => { + const id = "052322ec-95e5-4b88-8a90-9f0c1df17ee3"; + const locations = [...new Array(8)].map(() => ({ + x: 0.8367510938551277, + y: 0.7110547178890556, + z: 0.9648887133225799, + })); + + await testHelper.executeCypher( + ` + CALL { + CREATE (r:${Part}) + SET r.id = $id + SET r.locations = [p in $locations | point(p)] + RETURN r + } + + RETURN r { .id, .locations } AS r + `, + { id, locations } + ); + + const partsQuery = /* GraphQL */ ` + query Parts($id: String!) { + ${Part.plural}(where: { id_EQ: $id }) { + id + locations { + y + x + z + crs + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(partsQuery, { variableValues: { id } }); + + expect(gqlResult.errors).toBeFalsy(); + expect((gqlResult.data as any)[Part.plural][0]).toEqual({ + id, + locations: locations.map((location) => ({ ...location, crs: "cartesian-3d" })), + }); + }); +}); diff --git a/packages/graphql/tests/integration/directives/authorization/is-authenticated.int.test.ts b/packages/graphql/tests/integration/directives/authorization/is-authenticated.int.test.ts index f8f6872f9a..84a125cdea 100644 --- a/packages/graphql/tests/integration/directives/authorization/is-authenticated.int.test.ts +++ b/packages/graphql/tests/integration/directives/authorization/is-authenticated.int.test.ts @@ -50,7 +50,7 @@ describe("auth/is-authenticated", () => { describe("read", () => { test("should throw if not authenticated type definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Product} @authentication(operations: [READ]) @node { id: ID name: String @@ -66,7 +66,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` { ${Product.plural} { id @@ -76,17 +76,13 @@ describe("auth/is-authenticated", () => { const token = "not valid token"; - const socket = new Socket({ readable: true }); - const req = new IncomingMessage(socket); - req.headers.authorization = `Bearer ${token}`; - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); }); test("should not throw if authenticated type definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Product} @authentication(operations: [READ]) @node { id: ID name: String @@ -102,7 +98,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` { ${Product.plural} { id @@ -118,11 +114,11 @@ describe("auth/is-authenticated", () => { }); test("should not throw if authenticated with correct role type definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } - type ${Product} @authentication(operations: [READ], jwt: { roles_INCLUDES: "admin" }) @node { + type ${Product} @authentication(operations: [READ], jwt: { roles: { includes: "admin" } }) @node { id: ID name: String } @@ -137,7 +133,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` { ${Product.plural} { id @@ -153,11 +149,12 @@ describe("auth/is-authenticated", () => { }); test("should throw if authenticated with incorrect role type definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } - type ${Product} @authentication(operations: [READ], jwt: { roles_INCLUDES: "admin" }) @node { + + type ${Product} @authentication(operations: [READ], jwt: { roles: { includes: "admin" } }) @node { id: ID name: String } @@ -172,7 +169,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` { ${Product.plural} { id @@ -188,10 +185,10 @@ describe("auth/is-authenticated", () => { }); test("should throw if not authenticated on field definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID - password: String @authentication(operations: [READ]) + password: String @authentication(operations: [READ]) } `; @@ -204,7 +201,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` { ${User.plural} { password @@ -214,10 +211,6 @@ describe("auth/is-authenticated", () => { const token = "not valid token"; - const socket = new Socket({ readable: true }); - const req = new IncomingMessage(socket); - req.headers.authorization = `Bearer ${token}`; - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); @@ -226,7 +219,7 @@ describe("auth/is-authenticated", () => { describe("create", () => { test("should not throw if authenticated on type definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @authentication(operations: [CREATE]) @node { id: ID name: String @@ -242,7 +235,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.create}(input: [{ id: "1" }]) { ${User.plural} { @@ -260,12 +253,12 @@ describe("auth/is-authenticated", () => { }); test("should not throw if authenticated with correct role on type definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } - type ${User} @authentication(operations: [CREATE], jwt: {roles_INCLUDES: "admin"}) @node { + type ${User} @authentication(operations: [CREATE], jwt: {roles: { includes: "admin" } }) @node { id: ID name: String } @@ -280,7 +273,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.create}(input: [{ id: "1" }]) { ${User.plural} { @@ -298,7 +291,7 @@ describe("auth/is-authenticated", () => { }); test("should throw if not authenticated on type definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @authentication(operations: [CREATE]) @node { id: ID name: String @@ -314,7 +307,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.create}(input: [{ id: "1" }]) { ${User.plural} { @@ -326,21 +319,17 @@ describe("auth/is-authenticated", () => { const token = "not valid token"; - const socket = new Socket({ readable: true }); - const req = new IncomingMessage(socket); - req.headers.authorization = `Bearer ${token}`; - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); }); test("should throw if authenticated with incorrect role type definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } - type ${User} @authentication(operations: [CREATE], jwt: { roles_INCLUDES: "admin" }) @node { + type ${User} @authentication(operations: [CREATE], jwt: { roles: { includes: "admin" } }) @node { id: ID name: String } @@ -355,7 +344,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.create}(input: [{ id: "1" }]) { ${User.plural} { @@ -373,7 +362,7 @@ describe("auth/is-authenticated", () => { }); test("should throw if not authenticated on nested create type", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID name: String @@ -394,7 +383,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.create}(input: [{ id: "1", products: { create: [{ node: { id: "5" } }] } }]) { ${User.plural} { @@ -406,17 +395,13 @@ describe("auth/is-authenticated", () => { const token = "not valid token"; - const socket = new Socket({ readable: true }); - const req = new IncomingMessage(socket); - req.headers.authorization = `Bearer ${token}`; - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); }); test("should throw if authenticated with incorrect role on nested create type", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -427,7 +412,7 @@ describe("auth/is-authenticated", () => { products: [${Product}!]! @relationship(type: "HAS_PRODUCT", direction: OUT) } - type ${Product} @authentication(operations: [CREATE], jwt: { roles_INCLUDES: "admin" }) @node { + type ${Product} @authentication(operations: [CREATE], jwt: { roles: { includes: "admin" } }) @node { id: ID } `; @@ -441,7 +426,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.create}(input: [{ id: "1", products: { create: [{ node: { id: "5" } }] } }]) { ${User.plural} { @@ -459,7 +444,7 @@ describe("auth/is-authenticated", () => { }); test("should throw if authenticated with incorrect role on nested create type - not unwind-create", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -470,7 +455,7 @@ describe("auth/is-authenticated", () => { products: [${Product}!]! @relationship(type: "HAS_PRODUCT", direction: OUT) } - type ${Product} @authentication(operations: [CREATE], jwt: { roles_INCLUDES: "admin" }) @node { + type ${Product} @authentication(operations: [CREATE], jwt: { roles: { includes: "admin" } }) @node { id: ID } `; @@ -484,7 +469,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.create}(input: [{ id: "1", products: { create: [{ node: { id: "5" } }] } }]) { ${User.plural} { @@ -502,7 +487,7 @@ describe("auth/is-authenticated", () => { }); test("should not throw if authenticated on field definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID password: String @authentication(operations: [CREATE]) @@ -514,7 +499,7 @@ describe("auth/is-authenticated", () => { features: { authorization: { key: secret } }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.create}(input: [{ password: "1" }]) { ${User.plural} { @@ -531,14 +516,14 @@ describe("auth/is-authenticated", () => { expect(gqlResult.errors).toBeUndefined(); }); test("should not throw if authenticated with correct role on field definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } type ${User} @node { id: ID - password: String @authentication(operations: [CREATE], jwt: {roles_INCLUDES: "admin"}) + password: String @authentication(operations: [CREATE], jwt: {roles: { includes: "admin" }}) } `; @@ -547,7 +532,7 @@ describe("auth/is-authenticated", () => { features: { authorization: { key: secret } }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.create}(input: [{ password: "1" }]) { ${User.plural} { @@ -565,10 +550,10 @@ describe("auth/is-authenticated", () => { }); test("should throw if not authenticated on field definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID - password: String @authentication(operations: [CREATE]) + password: String @authentication(operations: [CREATE]) } `; @@ -577,7 +562,7 @@ describe("auth/is-authenticated", () => { features: { authorization: { key: secret } }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.create}(input: [{ password: "1" }]) { ${User.plural} { @@ -589,24 +574,20 @@ describe("auth/is-authenticated", () => { const token = "not valid token"; - const socket = new Socket({ readable: true }); - const req = new IncomingMessage(socket); - req.headers.authorization = `Bearer ${token}`; - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); }); test("should throw if authenticated with incorrect role on field definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } type ${User} @node { id: ID - password: String @authentication(operations: [CREATE], jwt: { roles_INCLUDES: "admin" }) + password: String @authentication(operations: [CREATE], jwt: { roles: { includes: "admin" } }) } `; @@ -615,7 +596,7 @@ describe("auth/is-authenticated", () => { features: { authorization: { key: secret } }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.create}(input: [{ password: "1" }]) { ${User.plural} { @@ -633,14 +614,14 @@ describe("auth/is-authenticated", () => { }); test("should throw if authenticated with incorrect role on field definition - not unwind-create", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } type ${User} @node { id: ID - password: String @authentication(operations: [CREATE], jwt: { roles_INCLUDES: "admin" }) + password: String @authentication(operations: [CREATE], jwt: { roles: { includes: "admin" } }) } `; @@ -649,7 +630,7 @@ describe("auth/is-authenticated", () => { features: { authorization: { key: secret } }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.create}(input: [{ password: "1" }]) { ${User.plural} { @@ -667,7 +648,7 @@ describe("auth/is-authenticated", () => { }); test("should throw if not authenticated on nested create field", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID name: String @@ -675,7 +656,7 @@ describe("auth/is-authenticated", () => { } type ${Product} @node { - id: ID @authentication(operations: [CREATE]) + id: ID @authentication(operations: [CREATE]) } `; @@ -688,7 +669,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.create}(input: [{ id: "1", products: { create: [{ node: { id: "5" } }] } }]) { ${User.plural} { @@ -700,17 +681,13 @@ describe("auth/is-authenticated", () => { const token = "not valid token"; - const socket = new Socket({ readable: true }); - const req = new IncomingMessage(socket); - req.headers.authorization = `Bearer ${token}`; - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); }); test("should throw if authenticated with incorrect role on nested create field", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -722,7 +699,7 @@ describe("auth/is-authenticated", () => { } type ${Product} @node { - id: ID @authentication(operations: [CREATE], jwt: { roles_INCLUDES: "admin" }) + id: ID @authentication(operations: [CREATE], jwt: { roles: { includes: "admin" } }) } `; @@ -735,7 +712,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.create}(input: [{ id: "1", products: { create: [{ node: { id: "5" } }] } }]) { ${User.plural} { @@ -753,7 +730,7 @@ describe("auth/is-authenticated", () => { }); test("should throw if authenticated with incorrect role on nested create field - not unwind-create", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -778,7 +755,7 @@ describe("auth/is-authenticated", () => { }, }); - const query = ` + const query = /* GraphQL */ ` mutation { ${User.operations.create}(input: [{ id: "1", products: { create: [{ node: { id: "5" } }] } }]) { ${User.plural} { @@ -799,7 +776,7 @@ describe("auth/is-authenticated", () => { describe("update", () => { test("should not throw if authenticated on type definition", async () => { const typeDefs = /* GraphQL */ ` - type ${User} @authentication(operations: [UPDATE]) @node { + type ${User} @authentication(operations: [UPDATE]) @node { id: ID name: String } @@ -837,7 +814,7 @@ describe("auth/is-authenticated", () => { roles: [String!]! } - type ${User} @authentication(operations: [UPDATE], jwt: {roles_INCLUDES: "admin"}) @node { + type ${User} @authentication(operations: [UPDATE], jwt: {roles: { includes: "admin" }}) @node { id: ID name: String } @@ -871,7 +848,7 @@ describe("auth/is-authenticated", () => { test("should throw if not authenticated on type definition", async () => { const typeDefs = /* GraphQL */ ` - type ${User} @authentication(operations: [UPDATE]) @node { + type ${User} @authentication(operations: [UPDATE]) @node { id: ID name: String } @@ -898,10 +875,6 @@ describe("auth/is-authenticated", () => { const token = "not valid token"; - const socket = new Socket({ readable: true }); - const req = new IncomingMessage(socket); - req.headers.authorization = `Bearer ${token}`; - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); @@ -912,7 +885,7 @@ describe("auth/is-authenticated", () => { type JWTPayload @jwt { roles: [String!]! } - type ${User} @authentication(operations: [UPDATE], jwt: { roles_INCLUDES: "admin" }) @node { + type ${User} @authentication(operations: [UPDATE], jwt: { roles: { includes: "admin" } }) @node { id: ID name: String } @@ -986,7 +959,7 @@ describe("auth/is-authenticated", () => { type ${User} @node { id: ID - password: String @authentication(operations: [UPDATE], jwt: {roles_INCLUDES: "admin"}) + password: String @authentication(operations: [UPDATE], jwt: { roles: { includes: "admin" }}) } `; @@ -1020,7 +993,7 @@ describe("auth/is-authenticated", () => { const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID - password: String @authentication(operations: [UPDATE]) + password: String @authentication(operations: [UPDATE]) } `; @@ -1045,10 +1018,6 @@ describe("auth/is-authenticated", () => { const token = "not valid token"; - const socket = new Socket({ readable: true }); - const req = new IncomingMessage(socket); - req.headers.authorization = `Bearer ${token}`; - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); @@ -1061,7 +1030,7 @@ describe("auth/is-authenticated", () => { } type ${User} @node { id: ID - password: String @authentication(operations: [UPDATE], jwt: { roles_INCLUDES: "admin" }) + password: String @authentication(operations: [UPDATE], jwt: { roles: { includes: "admin" } }) } `; @@ -1134,7 +1103,7 @@ describe("auth/is-authenticated", () => { const query = /* GraphQL */ ` mutation { - ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.operations.update}(where: { id: { eq: "${userId}" } }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { ${User.plural} { id } @@ -1175,7 +1144,7 @@ describe("auth/is-authenticated", () => { } extend type ${User} - @authentication(operations: [CREATE_RELATIONSHIP], jwt: {roles_INCLUDES:"admin"}) + @authentication(operations: [CREATE_RELATIONSHIP], jwt: {roles: { includes: "admin" }}) extend type ${Post} @authentication(operations: [CREATE_RELATIONSHIP]) `; @@ -1199,7 +1168,7 @@ describe("auth/is-authenticated", () => { const query = /* GraphQL */ ` mutation { - ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.operations.update}(where: { id: { eq: "${userId}" } }, update: { posts: { connect: { where: { node: { id: { eq: "${postId}" } } } } } }) { ${User.plural} { id } @@ -1261,7 +1230,7 @@ describe("auth/is-authenticated", () => { const query = /* GraphQL */ ` mutation { - ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.operations.update}(where: { id: { eq: "${userId}" } }, update: { posts: { connect: { where: { node: { id: { eq: "${postId}" } } } } } }) { ${User.plural} { id } @@ -1322,7 +1291,7 @@ describe("auth/is-authenticated", () => { const query = /* GraphQL */ ` mutation { - ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.operations.update}(where: { id: { eq: "${userId}" } }, update: { posts: { connect: { where: { node: { id: { eq: "${postId}" } } } } } }) { ${User.plural} { id } @@ -1338,10 +1307,6 @@ describe("auth/is-authenticated", () => { CREATE (:${Post} {id: "${postId}"}) `); - const socket = new Socket({ readable: true }); - const req = new IncomingMessage(socket); - req.headers.authorization = `Bearer ${token}`; - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); @@ -1385,7 +1350,7 @@ describe("auth/is-authenticated", () => { const query = /* GraphQL */ ` mutation { - ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.operations.update}(where: { id: { eq: "${userId}" } }, update: { posts: { connect: { where: { node: { id: { eq: "${postId}" } } } } } }) { ${User.plural} { id } @@ -1401,10 +1366,6 @@ describe("auth/is-authenticated", () => { CREATE (:${Post} {id: "${postId}"}) `); - const socket = new Socket({ readable: true }); - const req = new IncomingMessage(socket); - req.headers.authorization = `Bearer ${token}`; - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); @@ -1431,7 +1392,7 @@ describe("auth/is-authenticated", () => { } extend type ${User} - @authentication(operations: [CREATE_RELATIONSHIP], jwt: { roles_INCLUDES: "admin" }) + @authentication(operations: [CREATE_RELATIONSHIP], jwt: { roles: { includes: "admin" } }) extend type ${Post} @authentication(operations: [CREATE_RELATIONSHIP]) `; @@ -1455,7 +1416,7 @@ describe("auth/is-authenticated", () => { const query = /* GraphQL */ ` mutation { - ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.operations.update}(where: { id: { eq: "${userId}" } }, update: { posts: { connect: { where: { node: { id: { eq: "${postId}" } } } } } }) { ${User.plural} { id } @@ -1495,7 +1456,7 @@ describe("auth/is-authenticated", () => { posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) } - extend type ${Post} @authentication(operations: [CREATE_RELATIONSHIP], jwt: { roles_INCLUDES: "admin" }) + extend type ${Post} @authentication(operations: [CREATE_RELATIONSHIP], jwt: { roles: {includes: "admin"} }) `; const userId = generate({ @@ -1517,7 +1478,7 @@ describe("auth/is-authenticated", () => { const query = /* GraphQL */ ` mutation { - ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.operations.update}(where: { id: { eq: "${userId}" } }, update: { posts: { connect: { where: { node: { id: { eq: "${postId}" } } } } } }) { ${User.plural} { id } @@ -1542,7 +1503,7 @@ describe("auth/is-authenticated", () => { test("should not throw if authenticated", async () => { const Post = testHelper.createUniqueType("Post"); - const typeDefs = /* GraphLQ */ ` + const typeDefs = /* GraphQL */ ` type ${Post} @node { id: String content: String @@ -1578,9 +1539,9 @@ describe("auth/is-authenticated", () => { }, }); - const query = /* GraphLQ */ ` + const query = /* GraphQL */ ` mutation { - ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.operations.update}(where: { id: { eq: "${userId}" } }, update: { posts: { disconnect: { where: { node: { id: { eq: "${postId}" } } } } } }) { ${User.plural} { id } @@ -1621,7 +1582,7 @@ describe("auth/is-authenticated", () => { } extend type ${User} - @authentication(operations: [DELETE_RELATIONSHIP], jwt: {roles_INCLUDES:"admin"}) + @authentication(operations: [DELETE_RELATIONSHIP], jwt: {roles: { includes: "admin" } }) extend type ${Post} @authentication(operations: [DELETE_RELATIONSHIP]) `; @@ -1645,7 +1606,7 @@ describe("auth/is-authenticated", () => { const query = /* GraphQL */ ` mutation { - ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.operations.update}(where: { id: {eq: "${userId}" } }, update: { posts: { disconnect: { where: { node: { id: {eq: "${postId}"} } } } } }) { ${User.plural} { id } @@ -1685,7 +1646,7 @@ describe("auth/is-authenticated", () => { posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) } - extend type ${Post} @authentication(operations: [DELETE_RELATIONSHIP], jwt: {roles_INCLUDES:"admin"}) + extend type ${Post} @authentication(operations: [DELETE_RELATIONSHIP], jwt: {roles: { includes: "admin" } }) `; const userId = generate({ @@ -1707,7 +1668,7 @@ describe("auth/is-authenticated", () => { const query = /* GraphQL */ ` mutation { - ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.operations.update}(where: { id: { eq: "${userId}" } }, update: { posts: { disconnect: { where: { node: { id: { eq: "${postId}" } } } } } }) { ${User.plural} { id } @@ -1768,7 +1729,7 @@ describe("auth/is-authenticated", () => { const query = /* GraphQL */ ` mutation { - ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.operations.update}(where: { id: { eq: "${userId}" } }, update: { posts: { disconnect: { where: { node: { id: { eq: "${postId}" } } } } } }) { ${User.plural} { id } @@ -1784,10 +1745,6 @@ describe("auth/is-authenticated", () => { CREATE (:${Post} {id: "${postId}"}) `); - const socket = new Socket({ readable: true }); - const req = new IncomingMessage(socket); - req.headers.authorization = `Bearer ${token}`; - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); @@ -1831,7 +1788,7 @@ describe("auth/is-authenticated", () => { const query = /* GraphQL */ ` mutation { - ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.operations.update}(where: { id: { eq: "${userId}" } }, update: { posts: { disconnect: { where: { node: { id: { eq: "${postId}" } } } } } }) { ${User.plural} { id } @@ -1847,10 +1804,6 @@ describe("auth/is-authenticated", () => { CREATE (:${Post} {id: "${postId}"}) `); - const socket = new Socket({ readable: true }); - const req = new IncomingMessage(socket); - req.headers.authorization = `Bearer ${token}`; - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); @@ -1877,7 +1830,7 @@ describe("auth/is-authenticated", () => { } extend type ${User} - @authentication(operations: [DELETE_RELATIONSHIP], jwt: { roles_INCLUDES: "admin" }) + @authentication(operations: [DELETE_RELATIONSHIP], jwt: { roles: { includes: "admin" } }) extend type ${Post} @authentication(operations: [DELETE_RELATIONSHIP]) `; @@ -1901,7 +1854,7 @@ describe("auth/is-authenticated", () => { const query = /* GraphQL */ ` mutation { - ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.operations.update}(where: { id: { eq: "${userId}" } }, update: { posts: { disconnect: { where: { node: { id: { eq: "${postId}" } } } } } }) { ${User.plural} { id } @@ -1941,7 +1894,7 @@ describe("auth/is-authenticated", () => { posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) } - extend type ${Post} @authentication(operations: [DELETE_RELATIONSHIP], jwt: { roles_INCLUDES: "admin" }) + extend type ${Post} @authentication(operations: [DELETE_RELATIONSHIP], jwt: { roles: { includes: "admin" } }) `; const userId = generate({ @@ -1963,7 +1916,7 @@ describe("auth/is-authenticated", () => { const query = /* GraphQL */ ` mutation { - ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.operations.update}(where: { id: { eq: "${userId}" } }, update: { posts: { disconnect: { where: { node: { id: { eq: "${postId}" } } } } } }) { ${User.plural} { id } @@ -1987,7 +1940,7 @@ describe("auth/is-authenticated", () => { describe("delete", () => { test("should not throw if authenticated on type definition", async () => { const typeDefs = /* GraphQL */ ` - type ${User} @authentication(operations: [DELETE]) @node { + type ${User} @authentication(operations: [DELETE]) @node { id: ID name: String } @@ -2023,7 +1976,7 @@ describe("auth/is-authenticated", () => { roles: [String!]! } - type ${User} @authentication(operations: [DELETE], jwt: {roles_INCLUDES: "admin"}) @node { + type ${User} @authentication(operations: [DELETE], jwt: {roles: { includes: "admin" }}) @node { id: ID name: String } @@ -2055,7 +2008,7 @@ describe("auth/is-authenticated", () => { test("should throw if not authenticated on type definition", async () => { const typeDefs = /* GraphQL */ ` - type ${User} @authentication(operations: [DELETE]) @node { + type ${User} @authentication(operations: [DELETE]) @node { id: ID name: String } @@ -2080,10 +2033,6 @@ describe("auth/is-authenticated", () => { const token = "not valid token"; - const socket = new Socket({ readable: true }); - const req = new IncomingMessage(socket); - req.headers.authorization = `Bearer ${token}`; - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); @@ -2122,7 +2071,7 @@ describe("auth/is-authenticated", () => { const query = /* GraphQL */ ` mutation { - ${User.operations.delete}(where: {id_EQ: "${userId}"}, delete:{ posts: {where:{node: { id_EQ: "${postId}"}}} }) { + ${User.operations.delete}(where: {id: { eq: "${userId}" }}, delete:{ posts: { where:{ node: { id: { eq: "${postId}" }}}} }) { nodesDeleted } } @@ -2134,10 +2083,6 @@ describe("auth/is-authenticated", () => { CREATE (:${User} {id: "${userId}"})-[:HAS_POST]->(:Post {id: "${postId}"}) `); - const socket = new Socket({ readable: true }); - const req = new IncomingMessage(socket); - req.headers.authorization = `Bearer ${token}`; - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); @@ -2149,7 +2094,7 @@ describe("auth/is-authenticated", () => { roles: [String!]! } - type ${User} @authentication(operations: [DELETE], jwt: { roles_INCLUDES: "admin" }) @node { + type ${User} @authentication(operations: [DELETE], jwt: { roles: { includes: "admin" } }) @node { id: ID name: String } @@ -2191,7 +2136,7 @@ describe("auth/is-authenticated", () => { posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) } - type ${Post} @node @authentication(operations: [DELETE], jwt: { roles_INCLUDES: "admin" }) { + type ${Post} @node @authentication(operations: [DELETE], jwt: { roles: { includes: "admin"} }) { id: ID name: String } @@ -2216,7 +2161,7 @@ describe("auth/is-authenticated", () => { const query = /* GraphQL */ ` mutation { - ${User.operations.delete}(where: {id_EQ: "${userId}"}, delete:{posts: {where:{node: { id_EQ: "${postId}"}}} }) { + ${User.operations.delete}(where: { id: { eq: "${userId}" } }, delete: { posts: { where: { node: { id: { eq: "${postId}" } } } } }) { nodesDeleted } } @@ -2266,7 +2211,7 @@ describe("auth/is-authenticated", () => { const query = /* GraphQL */ ` mutation { - ${User.operations.delete}(where: {id_EQ: "${userId}"}, delete:{ posts: {where:{node: { id_EQ: "${postId}"}}} }) { + ${User.operations.delete}(where: {id: { eq: "${userId}" }}, delete:{ posts: { where: { node: { id: { eq: "${postId}" } } } } }) { nodesDeleted } } @@ -2278,10 +2223,6 @@ describe("auth/is-authenticated", () => { CREATE (:${User} {id: "${userId}"})-[:HAS_POST]->(:${Post} {id: "${postId}"}) `); - const socket = new Socket({ readable: true }); - const req = new IncomingMessage(socket); - req.headers.authorization = `Bearer ${token}`; - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); @@ -2337,7 +2278,7 @@ describe("auth/is-authenticated", () => { } type Query { - users: [${User}] @cypher(statement: "MATCH (u:${User}) RETURN u", columnName: "u") @authentication(jwt: {roles_INCLUDES: "admin"}) + users: [${User}] @cypher(statement: "MATCH (u:${User}) RETURN u", columnName: "u") @authentication(jwt: {roles: { includes: "admin" }}) } `; @@ -2396,10 +2337,6 @@ describe("auth/is-authenticated", () => { const token = "not valid token"; - const socket = new Socket({ readable: true }); - const req = new IncomingMessage(socket); - req.headers.authorization = `Bearer ${token}`; - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); @@ -2417,7 +2354,7 @@ describe("auth/is-authenticated", () => { } type Query { - users: [${User}] @cypher(statement: "MATCH (u:${User}) RETURN u", columnName: "u") @authentication(jwt: {roles_INCLUDES: "admin"}) + users: [${User}] @cypher(statement: "MATCH (u:${User}) RETURN u", columnName: "u") @authentication(jwt: {roles: { includes: "admin" }}) } `; @@ -2493,7 +2430,7 @@ describe("auth/is-authenticated", () => { } type Mutation { - createUser: ${User} @cypher(statement: "CREATE (u:${User}) RETURN u", columnName: "u") @authentication(jwt: {roles_INCLUDES: "admin"}) + createUser: ${User} @cypher(statement: "CREATE (u:${User}) RETURN u", columnName: "u") @authentication(jwt: {roles: { includes: "admin" }}) } `; @@ -2552,10 +2489,6 @@ describe("auth/is-authenticated", () => { const token = "not valid token"; - const socket = new Socket({ readable: true }); - const req = new IncomingMessage(socket); - req.headers.authorization = `Bearer ${token}`; - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); @@ -2573,7 +2506,7 @@ describe("auth/is-authenticated", () => { } type Mutation { - createUser: ${User} @cypher(statement: "CREATE (u:${User}) RETURN u", columnName: "u") @authentication(jwt: {roles_INCLUDES: "admin"}) + createUser: ${User} @cypher(statement: "CREATE (u:${User}) RETURN u", columnName: "u") @authentication(jwt: {roles: { includes: "admin" }}) } `; @@ -2659,7 +2592,7 @@ describe("auth/is-authenticated", () => { id: ID history: [${History}] @cypher(statement: "MATCH (this)-[:HAS_HISTORY]->(h:${History}) RETURN h", columnName: "h") - @authentication(operations: [READ], jwt: {roles_INCLUDES: "admin"}) + @authentication(operations: [READ], jwt: {roles: { includes: "admin" } }) } `; @@ -2726,10 +2659,6 @@ describe("auth/is-authenticated", () => { const token = "not valid token"; - const socket = new Socket({ readable: true }); - const req = new IncomingMessage(socket); - req.headers.authorization = `Bearer ${token}`; - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); @@ -2751,7 +2680,7 @@ describe("auth/is-authenticated", () => { id: ID history: [${History}] @cypher(statement: "MATCH (this)-[:HAS_HISTORY]->(h:${History}) RETURN h", columnName: "h") - @authentication(operations: [READ], jwt: {roles_INCLUDES: "admin"}) + @authentication(operations: [READ], jwt: {roles: { includes: "admin" } }) } `; @@ -2825,7 +2754,7 @@ describe("auth/is-authenticated", () => { name: String! } - type ${Product} @authentication(operations: [READ], jwt: {name_STARTS_WITH: "John"}) @node { + type ${Product} @authentication(operations: [READ], jwt: { name: { startsWith: "John" } }) @node { id: ID name: String } @@ -2867,7 +2796,7 @@ describe("auth/is-authenticated", () => { name: String! } - type ${Product} @authentication(operations: [READ], jwt: {name_STARTS_WITH: "Doe"}) @node { + type ${Product} @authentication(operations: [READ], jwt: {name: { startsWith: "Doe" } }) @node { id: ID name: String } @@ -3123,13 +3052,13 @@ describe("auth/is-authenticated", () => { const query = ` mutation { - ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.operations.update}(where: { id: { eq: "${userId}" } }, update: { posts: { connect: { where: { node: { id: { eq: "${postId}" } } } } } }) { ${User.plural} { id } } } - `; + `; const token = "not valid token"; @@ -3158,7 +3087,7 @@ describe("auth/is-authenticated", () => { const query = ` mutation { - ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.operations.update}(where: { id: { eq: "${userId}" }}, update: { posts: { connect: { where: { node: { id: { eq: "${postId}" } } } } } }) { ${User.plural} { id } @@ -3221,7 +3150,7 @@ describe("auth/is-authenticated", () => { const query = ` mutation { - ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.operations.update}(where: { id: { eq: "${userId}" } }, update: { posts: { disconnect: { where: { node: { id: { eq: "${postId}" } } } } } }) { ${User.plural} { id } @@ -3256,7 +3185,7 @@ describe("auth/is-authenticated", () => { const query = ` mutation { - ${User.operations.update}(where: { id_EQ: "${userId}" }, update: { posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.operations.update}(where: { id: { eq: "${userId}" } }, update: { posts: { disconnect: { where: { node: { id: { eq: "${postId}" } } } } } }) { ${User.plural} { id } @@ -3357,12 +3286,12 @@ describe("auth/is-authenticated", () => { test("should throw if not authenticated type definition", async () => { const query = ` - query { - allUsers { - id + query { + allUsers { + id + } } - } - `; + `; const token = "not valid token"; @@ -3377,12 +3306,12 @@ describe("auth/is-authenticated", () => { test("should not throw if authenticated type definition", async () => { const query = ` - query { - allUsers { - id + query { + allUsers { + id + } } - } - `; + `; const token = createBearerToken(secret); diff --git a/packages/graphql/tests/integration/directives/authorization/object-path.int.test.ts b/packages/graphql/tests/integration/directives/authorization/object-path.int.test.ts index 81c0da6597..b2de96e613 100644 --- a/packages/graphql/tests/integration/directives/authorization/object-path.int.test.ts +++ b/packages/graphql/tests/integration/directives/authorization/object-path.int.test.ts @@ -38,7 +38,7 @@ describe("auth/object-path", () => { }); test("should use object path with allow", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { nestedSub: String! @jwtClaim(path: "nested.object.path.sub") } @@ -47,16 +47,16 @@ describe("auth/object-path", () => { id: ID } - extend type ${User} @authorization(validate: [{ when: [BEFORE], operations: [READ], where: { node: { id_EQ: "$jwt.nestedSub" } } }]) + extend type ${User} @authorization(validate: [{ when: [BEFORE], operations: [READ], where: { node: { id: { eq: "$jwt.nestedSub" } } } }]) `; const userId = generate({ charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` { - ${User.plural}(where: {id_EQ: "${userId}"}) { + ${User.plural}(where: { id: { eq: "${userId}" } }) { id } } @@ -94,7 +94,7 @@ describe("auth/object-path", () => { }); test("should use $context value plucking on auth", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID } @@ -104,7 +104,7 @@ describe("auth/object-path", () => { creator: [${User}!]! @relationship(type: "HAS_POST", direction: IN) } - extend type ${Post} @node @authorization(validate: [{ when: [BEFORE], operations: [READ], where: { node: { creator_SINGLE: { id_EQ: "$context.userId" } } } }]) + extend type ${Post} @node @authorization(validate: [{ when: [BEFORE], operations: [READ], where: { node: { creator: { single: { id: { eq: "$context.userId" } } } } } }]) `; const userId = generate({ @@ -115,9 +115,9 @@ describe("auth/object-path", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` { - ${Post.plural}(where: {id_EQ: "${postId}"}) { + ${Post.plural}(where: {id: { eq: "${postId}" }}) { id } } @@ -149,7 +149,7 @@ describe("auth/object-path", () => { }); test("should use object path with roles", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! @jwtClaim(path: "https://github\\\\.com/claims.https://github\\\\.com/claims/roles") } @@ -158,16 +158,16 @@ describe("auth/object-path", () => { id: ID } - extend type ${User} @authorization(validate: [{ when: [BEFORE], operations: [READ], where: { jwt: { roles_INCLUDES: "admin" } } }]) + extend type ${User} @authorization(validate: [{ when: [BEFORE], operations: [READ], where: { jwt: { roles: { includes: "admin" } } } }]) `; const userId = generate({ charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` { - ${User.plural}(where: {id_EQ: "${userId}"}) { + ${User.plural}(where: { id: { eq: "${userId}" }}) { id } } @@ -199,7 +199,7 @@ describe("auth/object-path", () => { }); test("should use object path with JWT endpoint", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -208,16 +208,16 @@ describe("auth/object-path", () => { id: ID } - extend type ${User} @authorization(validate: [{ when: [BEFORE], operations: [READ], where: { jwt: { roles_INCLUDES: "admin" } } }]) + extend type ${User} @authorization(validate: [{ when: [BEFORE], operations: [READ], where: { jwt: { roles:{ includes: "admin" }} } }]) `; const userId = generate({ charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` { - ${User.plural}(where: {id_EQ: "${userId}"}) { + ${User.plural}(where: {id: { eq: "${userId}" }}) { id } } diff --git a/packages/graphql/tests/integration/directives/authorization/roles.int.test.ts b/packages/graphql/tests/integration/directives/authorization/roles.int.test.ts index f2039e51a5..ddf5ae6f00 100644 --- a/packages/graphql/tests/integration/directives/authorization/roles.int.test.ts +++ b/packages/graphql/tests/integration/directives/authorization/roles.int.test.ts @@ -51,7 +51,7 @@ describe("auth/roles", () => { describe("read", () => { test("should throw if missing role on type definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -59,19 +59,19 @@ describe("auth/roles", () => { type ${typeProduct} @authorization(validate: [{ when: [BEFORE], operations: [READ], - where: { jwt: { roles_INCLUDES: "admin" } } + where: { jwt: { roles: { includes: "admin" } } } }]) @node { id: ID name: String } `; - const query = ` - { - ${typeProduct.plural} { - id + const query = /* GraphQL */ ` + { + ${typeProduct.plural} { + id + } } - } `; await testHelper.initNeo4jGraphQL({ @@ -91,7 +91,7 @@ describe("auth/roles", () => { }); test("should throw if missing role on field definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -101,7 +101,7 @@ describe("auth/roles", () => { password: String @authorization(validate: [{ when: [BEFORE], operations: [READ], - where: { jwt: { roles_INCLUDES: "admin" } } + where: { jwt: { roles: { includes: "admin" } } } }]) } `; @@ -131,7 +131,7 @@ describe("auth/roles", () => { }); test("Read Node & Cypher Field", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -140,7 +140,7 @@ describe("auth/roles", () => { url: String @authorization(validate: [{ when: [BEFORE], operations: [READ], - where: { jwt: { roles_INCLUDES: "super-admin" } } + where: { jwt: { roles: { includes: "super-admin" }} } }]) } type ${typeUser} @node { @@ -153,7 +153,7 @@ describe("auth/roles", () => { @authorization(validate: [{ when: [BEFORE], operations: [READ, CREATE, UPDATE, CREATE_RELATIONSHIP, DELETE_RELATIONSHIP, DELETE], - where: { jwt: { roles_INCLUDES: "admin" } } + where: { jwt: { roles: { includes: "admin" }} } }]) extend type ${typeUser} { @@ -162,12 +162,12 @@ describe("auth/roles", () => { @authorization(validate: [{ when: [BEFORE], operations: [READ], - where: { jwt: { roles_INCLUDES: "super-admin" } } + where: { jwt: { roles: { includes: "super-admin" }} } }]) } `; - const query = ` + const query = /* GraphQL */ ` { ${typeUser.plural} { history { @@ -212,21 +212,22 @@ describe("auth/roles", () => { // This tests reproduces the security issue related to authorization without match #195 // eslint-disable-next-line jest/no-disabled-tests test.skip("should throw if missing role on type definition and no nodes are matched", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } - type NotANode @authorization(validate: [{ - when: [BEFORE], - operations: [READ], - where: { jwt: { roles_INCLUDES: "admin" } } - }]) { + type NotANode + @authorization( + validate: [ + { when: [BEFORE], operations: [READ], where: { jwt: { roles: { includes: "admin" } } } } + ] + ) { name: String } `; - const query = ` + const query = /* GraphQL */ ` { notANodes { name @@ -253,7 +254,7 @@ describe("auth/roles", () => { describe("create", () => { test("should throw if missing role on type definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -261,14 +262,14 @@ describe("auth/roles", () => { type ${typeUser} @authorization(validate: [{ when: [AFTER], operations: [CREATE], - where: { jwt: { roles_INCLUDES: "admin" } } + where: { jwt: { roles: { includes: "admin" } } } }]) @node { id: ID name: String } `; - const query = ` + const query = /* GraphQL */ ` mutation { ${typeUser.operations.create}(input: [{ id: "1" }]) { ${typeUser.plural} { @@ -295,7 +296,7 @@ describe("auth/roles", () => { }); test("should throw if missing role on field definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -305,12 +306,12 @@ describe("auth/roles", () => { password: String @authorization(validate: [{ when: [AFTER], operations: [CREATE], - where: { jwt: { roles_INCLUDES: "admin" } } + where: { jwt: { roles: { includes: "admin" } } } }]) } `; - const query = ` + const query = /* GraphQL */ ` mutation { ${typeUser.operations.create}(input: [{ password: "1" }]) { ${typeUser.plural} { @@ -337,7 +338,7 @@ describe("auth/roles", () => { }); test("should not throw if missing role on field definition if is not specified in the request", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -347,12 +348,12 @@ describe("auth/roles", () => { password: String @authorization(validate: [{ when: [AFTER], operations: [CREATE], - where: { jwt: { roles_INCLUDES: "admin" } } + where: { jwt: { roles: { includes: "admin" } } } }]) } `; - const query = ` + const query = /* GraphQL */ ` mutation { ${typeUser.operations.create}(input: [{ id: "1" }]) { ${typeUser.plural} { @@ -389,7 +390,7 @@ describe("auth/roles", () => { type ${typeUser} @authorization(validate: [{ when: [BEFORE], operations: [UPDATE], - where: { jwt: { roles_INCLUDES: "admin" } } + where: { jwt: { roles: { includes: "admin" } } } }]) @node{ id: ID name: String @@ -433,7 +434,7 @@ describe("auth/roles", () => { password: String @authorization(validate: [{ when: [BEFORE], operations: [UPDATE], - where: { jwt: { roles_INCLUDES: "admin" } } + where: { jwt: { roles: { includes: "admin" } } } }]) } `; @@ -488,13 +489,13 @@ describe("auth/roles", () => { @authorization(validate: [{ when: [BEFORE], operations: [CREATE_RELATIONSHIP], - where: { jwt: { roles_INCLUDES: "admin" } } + where: { jwt: { roles: { includes: "admin" } } } }]) extend type ${typePost} @authorization(validate: [{ when: [BEFORE], operations: [CREATE_RELATIONSHIP], - where: { jwt: { roles_INCLUDES: "super-admin" } } + where: { jwt: { roles: { includes: "super-admin" } } } }]) `; @@ -508,7 +509,7 @@ describe("auth/roles", () => { const query = /* GraphQL */ ` mutation { - ${typeUser.operations.update}(update: { id_SET: "${userId}", posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${typeUser.operations.update}(update: { id_SET: "${userId}", posts: { connect: { where: { node: { id: { eq: "${postId}" } } } } }}) { ${typeUser.plural} { id } @@ -561,13 +562,13 @@ describe("auth/roles", () => { @authorization(validate: [{ when: [BEFORE], operations: [DELETE_RELATIONSHIP], - where: { jwt: { roles_INCLUDES: "admin" } } + where: { jwt: { roles: { includes: "admin" }} } }]) extend type ${typePost} @authorization(validate: [{ when: [BEFORE], operations: [DELETE_RELATIONSHIP], - where: { jwt: { roles_INCLUDES: "super-admin" } } + where: { jwt: { roles: { includes: "super-admin" } } } }]) `; @@ -581,7 +582,7 @@ describe("auth/roles", () => { const query = /* GraphQL */ ` mutation { - ${typeUser.operations.update}(update: { id_SET: "${userId}", posts: { disconnect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${typeUser.operations.update}(update: { id_SET: "${userId}", posts: { disconnect: { where: { node: { id: { eq: "${postId}" } } } } } }) { ${typeUser.plural} { id } @@ -613,7 +614,7 @@ describe("auth/roles", () => { describe("delete", () => { test("should throw if missing role on type definition", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -621,14 +622,14 @@ describe("auth/roles", () => { type ${typeUser} @node @authorization(validate: [{ when: [BEFORE], operations: [DELETE], - where: { jwt: { roles_INCLUDES: "admin" } } + where: { jwt: { roles: { includes: "admin" } } } }]) { id: ID name: String } `; - const query = ` + const query = /* GraphQL */ ` mutation { ${typeUser.operations.delete} { nodesDeleted @@ -653,7 +654,7 @@ describe("auth/roles", () => { }); test("should throw if missing role on type definition (with nested delete)", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -667,7 +668,7 @@ describe("auth/roles", () => { type ${typePost} @node @authorization(validate: [{ when: [BEFORE], operations: [DELETE], - where: { jwt: { roles_INCLUDES: "admin" } } + where: { jwt: { roles: { includes: "admin" } } } }]) { id: ID name: String @@ -682,9 +683,9 @@ describe("auth/roles", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { - ${typeUser.operations.delete}(where: {id_EQ: "${userId}"}, delete:{posts: {where:{node: { id_EQ: "${postId}"}}}}) { + ${typeUser.operations.delete}(where: {id: { eq: "${userId}"}}, delete: { posts: { where:{ node: { id: { eq: "${postId}" }}}}}) { nodesDeleted } } @@ -714,7 +715,7 @@ describe("auth/roles", () => { // TODO: Move these checks into JavaScript! Fun! describe("custom-resolvers", () => { test("should throw if missing role on custom Query with @cypher", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -725,7 +726,7 @@ describe("auth/roles", () => { } type Query { - ${typeUser.plural}: [${typeUser}] @cypher(statement: "MATCH (u:${typeUser}) RETURN u AS u", columnName: "u") @authentication(jwt: {roles_INCLUDES: "admin"}) + ${typeUser.plural}: [${typeUser}] @cypher(statement: "MATCH (u:${typeUser}) RETURN u AS u", columnName: "u") @authentication(jwt: {roles: { includes: "admin" }}) } `; @@ -754,7 +755,7 @@ describe("auth/roles", () => { }); test("should throw if missing role on custom Mutation with @cypher", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -765,7 +766,7 @@ describe("auth/roles", () => { } type Mutation { - ${typeUser.operations.create}: ${typeUser} @cypher(statement: "CREATE (u:${typeUser}) RETURN u AS u", columnName: "u") @authentication(jwt: {roles_INCLUDES: "admin"}) + ${typeUser.operations.create}: ${typeUser} @cypher(statement: "CREATE (u:${typeUser}) RETURN u AS u", columnName: "u") @authentication(jwt: { roles: { includes: "admin" } }) } `; @@ -794,7 +795,7 @@ describe("auth/roles", () => { }); test("should throw if missing role on Field definition @cypher", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! } @@ -809,12 +810,12 @@ describe("auth/roles", () => { @cypher(statement: "MATCH (this)-[:HAS_HISTORY]->(h:${typeHistory}) RETURN h AS h", columnName: "h") @authorization(validate: [{ when: [BEFORE], - where: { jwt: { roles_INCLUDES: "admin" } } + where: { jwt: { roles: { includes: "admin" } } } }]) } `; - const query = ` + const query = /* GraphQL */ ` { ${typeUser.plural} { history { @@ -845,7 +846,7 @@ describe("auth/roles", () => { test("combines where with roles", async () => { const type = testHelper.createUniqueType("User"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { id: String! roles: [String!]! @@ -861,10 +862,10 @@ describe("auth/roles", () => { @authorization( filter: [ { - where: { node: { id_EQ: "$jwt.id" }, jwt: { roles_INCLUDES: "user" } } + where: { node: { id: { eq: "$jwt.id" } }, jwt: { roles: { includes: "user" } } } }, { - where: { jwt: { roles_INCLUDES: "admin" } } + where: { jwt: { roles: { includes: "admin" } } } } ] ) @@ -878,7 +879,7 @@ describe("auth/roles", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` query { ${type.plural} { id @@ -928,7 +929,7 @@ describe("auth/roles", () => { test("can read role from path containing dots", async () => { const type = testHelper.createUniqueType("User"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type JWTPayload @jwt { roles: [String!]! @jwtClaim(path: "https://auth0\\\\.mysite\\\\.com/claims.https://auth0\\\\.mysite\\\\.com/claims/roles") } @@ -944,7 +945,7 @@ describe("auth/roles", () => { validate: [ { when: [BEFORE], - where: { jwt: { roles_INCLUDES: "admin" } } + where: { jwt: { roles: { includes: "admin" } } } } ] ) @@ -954,7 +955,7 @@ describe("auth/roles", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` query { ${type.plural} { id diff --git a/packages/graphql/tests/integration/directives/authorization/where.int.test.ts b/packages/graphql/tests/integration/directives/authorization/where.int.test.ts index a6230859dc..bfce10d846 100644 --- a/packages/graphql/tests/integration/directives/authorization/where.int.test.ts +++ b/packages/graphql/tests/integration/directives/authorization/where.int.test.ts @@ -39,19 +39,19 @@ describe("auth/where", () => { describe("read", () => { test("should add $jwt.id to where and return user", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID } - extend type ${User} @authorization(filter: [{ operations: [READ], where: { node: { id_EQ: "$jwt.sub" } } }]) + extend type ${User} @authorization(filter: [{ operations: [READ], where: { node: { id: { eq: "$jwt.sub" } } } }]) `; const userId = generate({ charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` { ${User.plural} { id @@ -83,8 +83,101 @@ describe("auth/where", () => { expect(users).toEqual([{ id: userId }]); }); + test("should return the correct id that startsWith the '$jwt.sub'", async () => { + const typeDefs = /* GraphQL */ ` + type ${User} @node { + id: ID + } + + extend type ${User} @authorization(filter: [{ operations: [READ], where: { node: { id: { startsWith: "$jwt.sub" } } } }]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const query = /* GraphQL */ ` + { + ${User.plural} { + id + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}SomethingMore"}) + CREATE (:${User} {id: "anotherUser"}) + `); + + const token = createBearerToken(secret, { sub: userId }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + + const users = (gqlResult.data as any)[User.plural] as any[]; + expect(users).toEqual([{ id: `${userId}SomethingMore` }]); + }); + + test("should return the correct id that startsWith the '$jwt.sub' and the '$jwt.sub' should startsWith test", async () => { + const typeDefs = /* GraphQL */ ` + type ${User} @node { + id: ID + } + + extend type ${User} @authorization(filter: [{ operations: [READ], where: { + node: { id: { startsWith: "$jwt.sub" } } + jwt: { sub: { startsWith: "test" } } + } }]) + `; + + const userId = `test${generate({ + charset: "alphabetic", + })}`; + + const query = /* GraphQL */ ` + { + ${User.plural} { + id + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:${User} {id: "${userId}SomethingMore"}) + CREATE (:${User} {id: "anotherUser"}) + `); + + const token = createBearerToken(secret, { sub: userId }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + + const users = (gqlResult.data as any)[User.plural] as any[]; + expect(users).toEqual([{ id: `${userId}SomethingMore` }]); + }); + test("should add $jwt.id to where on a relationship", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) @@ -95,7 +188,7 @@ describe("auth/where", () => { creator: [${User}!]! @relationship(type: "HAS_POST", direction: IN) } - extend type ${Post} @authorization(filter: [{ operations: [READ], where: { node: { creator_SINGLE: { id_EQ: "$jwt.sub" } } } }]) + extend type ${Post} @authorization(filter: [{ operations: [READ], where: { node: { creator: { single: { id: { eq: "$jwt.sub" } } } } } }]) `; const userId = generate({ @@ -109,7 +202,7 @@ describe("auth/where", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` { ${Post.plural} { id @@ -149,7 +242,7 @@ describe("auth/where", () => { }); test("should add $jwt.id to where on a relationship(using connection)", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) @@ -160,7 +253,7 @@ describe("auth/where", () => { creator: [${User}!]! @relationship(type: "HAS_POST", direction: IN) } - extend type ${Post} @authorization(filter: [{ operations: [READ], where: { node: { creator_SINGLE: { id_EQ: "$jwt.sub" } } } }]) + extend type ${Post} @authorization(filter: [{ operations: [READ], where: { node: { creator: { single: { id: { eq: "$jwt.sub" } } } } } }]) `; const userId = generate({ @@ -177,9 +270,9 @@ describe("auth/where", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` { - ${User.plural}(where: { id_EQ: "${userId}" }) { + ${User.plural}(where: { id: { eq: "${userId}"} }) { postsConnection { edges { node { @@ -227,7 +320,7 @@ describe("auth/where", () => { describe("union", () => { test("should add $jwt.id to where and return users search", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` union Content = ${Post} type ${User} @node { @@ -240,8 +333,8 @@ describe("auth/where", () => { creator: [${User}!]! @relationship(type: "HAS_CONTENT", direction: IN) } - extend type ${Post} @authorization(filter: [{ operations: [READ], where: { node: { creator_SINGLE: { id_EQ: "$jwt.sub" } } } }]) - extend type ${User} @authorization(filter: [{ operations: [READ], where: { node: { id_EQ: "$jwt.sub" } } }]) + extend type ${Post} @authorization(filter: [{ operations: [READ], where: { node: { creator: { single: { id: { eq: "$jwt.sub" } } } } } }]) + extend type ${User} @authorization(filter: [{ operations: [READ], where: { node: { id: { eq: "$jwt.sub" } } } }]) `; const userId = generate({ @@ -255,7 +348,7 @@ describe("auth/where", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` { ${User.plural} { content { @@ -298,7 +391,7 @@ describe("auth/where", () => { }); test("should add $jwt.id to where and return users search(using connections)", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` union Content = ${Post} type ${User} @node { @@ -311,8 +404,8 @@ describe("auth/where", () => { creator: [${User}!]! @relationship(type: "HAS_CONTENT", direction: IN) } - extend type ${Post} @authorization(filter: [{ operations: [READ], where: { node: { creator_SINGLE: { id_EQ: "$jwt.sub" } } } }]) - extend type ${User} @authorization(filter: [{ operations: [READ], where: { node: { id_EQ: "$jwt.sub" } } }]) + extend type ${Post} @authorization(filter: [{ operations: [READ], where: { node: { creator: { single: { id: { eq: "$jwt.sub" } } } } } }]) + extend type ${User} @authorization(filter: [{ operations: [READ], where: { node: { id: { eq: "$jwt.sub" } } } }]) `; const userId = generate({ @@ -326,7 +419,7 @@ describe("auth/where", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` { ${User.plural} { contentConnection { @@ -382,7 +475,7 @@ describe("auth/where", () => { id: ID } - extend type ${User} @authorization(filter: [{ operations: [UPDATE], where: { node: { id_EQ: "$jwt.sub" } } }]) + extend type ${User} @authorization(filter: [{ operations: [UPDATE], where: { node: { id: { eq: "$jwt.sub" } } } }]) `; const userId = generate({ @@ -428,12 +521,12 @@ describe("auth/where", () => { describe("delete", () => { test("should add $jwt.id to where", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID } - extend type ${User} @authorization(filter: [{ operations: [DELETE], where: { node: { id_EQ: "$jwt.sub" } } }]) + extend type ${User} @authorization(filter: [{ operations: [DELETE], where: { node: { id: { eq: "$jwt.sub" } } } }]) `; const userId = generate({ @@ -442,7 +535,7 @@ describe("auth/where", () => { const query = ` mutation { - ${User.operations.delete}(where: { id_EQ: "${userId}" }){ + ${User.operations.delete}(where: { id: { eq: "${userId}" } }){ nodesDeleted } } @@ -479,7 +572,7 @@ describe("auth/where", () => { describe("connect", () => { test("should add jwt.id to where - update update", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) @@ -490,7 +583,7 @@ describe("auth/where", () => { creator: [${User}!]! @relationship(type: "HAS_POST", direction: OUT) } - extend type ${User} @authorization(filter: [{ operations: [UPDATE, CREATE_RELATIONSHIP], where: { node: { id_EQ: "$jwt.sub" } } }]) + extend type ${User} @authorization(filter: [{ operations: [UPDATE, CREATE_RELATIONSHIP], where: { node: { id: { eq: "$jwt.sub" } } } }]) `; const userId = generate({ @@ -500,9 +593,9 @@ describe("auth/where", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { - ${User.operations.update}(update: { posts: { connect: { where: { node: { id_EQ: "${postId}" } } } } }) { + ${User.operations.update}(update: { posts: { connect: { where: { node: { id: { eq: "${postId}" } } } } } }) { ${User.plural} { id posts { @@ -537,7 +630,7 @@ describe("auth/where", () => { }); test("should add jwt.id to where - update connect", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) @@ -548,7 +641,7 @@ describe("auth/where", () => { creator: [${User}!]! @relationship(type: "HAS_POST", direction: OUT) } - extend type ${User} @authorization(filter: [{ operations: [UPDATE, CREATE_RELATIONSHIP], where: { node: { id_EQ: "$jwt.sub" } } }]) + extend type ${User} @authorization(filter: [{ operations: [UPDATE, CREATE_RELATIONSHIP], where: { node: { id: { eq: "$jwt.sub" } } } }]) `; const userId = generate({ @@ -558,9 +651,9 @@ describe("auth/where", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { - ${User.operations.update}(update:{posts:{connect:{where:{node:{id_EQ: "${postId}"}}}}}) { + ${User.operations.update}(update: { posts: { connect: { where: { node: { id: { eq: "${postId}" } } } } } }) { ${User.plural} { id posts { @@ -597,7 +690,7 @@ describe("auth/where", () => { describe("disconnect", () => { test("should add $jwt.id to where (update update)", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) @@ -608,7 +701,7 @@ describe("auth/where", () => { creator: [${User}!]! @relationship(type: "HAS_POST", direction: OUT) } - extend type ${User} @authorization(filter: [{ operations: [UPDATE, DELETE_RELATIONSHIP], where: { node: { id_EQ: "$jwt.sub" } } }]) + extend type ${User} @authorization(filter: [{ operations: [UPDATE, DELETE_RELATIONSHIP], where: { node: { id: { eq: "$jwt.sub" }} } }]) `; const userId = generate({ @@ -621,9 +714,9 @@ describe("auth/where", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { - ${User.operations.update}(update: { posts: { disconnect: { where: { node: { id_EQ: "${postId1}" } } } } }) { + ${User.operations.update}(update: { posts: { disconnect: { where: { node: { id: { eq: "${postId1}" } } } } } }) { ${User.plural} { id posts { @@ -659,7 +752,7 @@ describe("auth/where", () => { }); test("should add $jwt.id to where (update disconnect)", async () => { - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${User} @node { id: ID posts: [${Post}!]! @relationship(type: "HAS_POST", direction: OUT) @@ -670,7 +763,7 @@ describe("auth/where", () => { creator: [${User}!]! @relationship(type: "HAS_POST", direction: OUT) } - extend type ${User} @authorization(filter: [{ operations: [UPDATE, DELETE_RELATIONSHIP], where: { node: { id_EQ: "$jwt.sub" } } }]) + extend type ${User} @authorization(filter: [{ operations: [UPDATE, DELETE_RELATIONSHIP], where: { node: { id: { eq: "$jwt.sub" } } } }]) `; const userId = generate({ @@ -683,9 +776,9 @@ describe("auth/where", () => { charset: "alphabetic", }); - const query = ` + const query = /* GraphQL */ ` mutation { - ${User.operations.update}(update: { posts: { disconnect: { where: {node: { id_EQ: "${postId1}"}}}}}) { + ${User.operations.update}(update: { posts: { disconnect: { where: { node: { id: { eq: "${postId1}" } } } }} }) { ${User.plural} { id posts { diff --git a/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-auth.int.test.ts b/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-auth.int.test.ts index fa4457ceec..e6411d2ee9 100644 --- a/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-auth.int.test.ts +++ b/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-auth.int.test.ts @@ -32,7 +32,7 @@ describe("cypher directive filtering - Auth", () => { const Actor = testHelper.createUniqueType("Actor"); const typeDefs = /* GraphQL */ ` - type ${Movie} @node @authorization(filter: [{ where: { node: { custom_field_EQ: "$jwt.custom_value" } } }]) { + type ${Movie} @node @authorization(filter: [{ where: { node: { custom_field: { eq: "$jwt.custom_value" } } } }]) { title: String custom_field: String @cypher( @@ -110,7 +110,7 @@ describe("cypher directive filtering - Auth", () => { """ columnName: "s" ) - @authorization(filter: [{ where: { node: { custom_field_EQ: "$jwt.custom_value" } } }]) + @authorization(filter: [{ where: { node: { custom_field: { eq: "$jwt.custom_value" } } } }]) actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) } @@ -177,7 +177,7 @@ describe("cypher directive filtering - Auth", () => { """ columnName: "s" ) - @authorization(filter: [{ where: { node: { title_EQ: "$jwt.custom_value" } } }]) + @authorization(filter: [{ where: { node: { title: { eq: "$jwt.custom_value" } } } }]) actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) } @@ -209,7 +209,7 @@ describe("cypher directive filtering - Auth", () => { {} ); - const query = ` + const query = /* GraphQL */ ` query { ${Movie.plural} { title @@ -250,7 +250,7 @@ describe("cypher directive filtering - Auth", () => { actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) } - type ${Actor} @node @authorization(filter: [{ where: { node: { movies_SOME: { custom_field_EQ: "$jwt.custom_value" } } } }]) { + type ${Actor} @node @authorization(filter: [{ where: { node: { movies: { some: { custom_field: { eq: "$jwt.custom_value" }} } } } }]) { name: String movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -280,7 +280,7 @@ describe("cypher directive filtering - Auth", () => { {} ); - const query = ` + const query = /* GraphQL */ ` query { ${Actor.plural} { name @@ -306,7 +306,7 @@ describe("cypher directive filtering - Auth", () => { const typeDefs = /* GraphQL */ ` type ${Movie} @node { - title: String @authorization(filter: [{ where: { node: { custom_field_EQ: "$jwt.custom_value" } } }]) + title: String @authorization(filter: [{ where: { node: { custom_field: { eq: "$jwt.custom_value" } } } }]) custom_field: String @cypher( statement: """ @@ -346,7 +346,7 @@ describe("cypher directive filtering - Auth", () => { {} ); - const query = ` + const query = /* GraphQL */ ` query { ${Movie.plural} { title @@ -374,7 +374,7 @@ describe("cypher directive filtering - Auth", () => { const Actor = testHelper.createUniqueType("Actor"); const typeDefs = /* GraphQL */ ` - type ${Movie} @node @authorization(validate: [{ where: { node: { custom_field_EQ: "$jwt.custom_value" } } }]) { + type ${Movie} @node @authorization(validate: [{ where: { node: { custom_field: { eq: "$jwt.custom_value" } } } }]) { title: String custom_field: String @cypher( @@ -434,7 +434,7 @@ describe("cypher directive filtering - Auth", () => { const Actor = testHelper.createUniqueType("Actor"); const typeDefs = /* GraphQL */ ` - type ${Movie} @node @authorization(validate: [{ where: { node: { custom_field_EQ: "$jwt.custom_value" } } }]) { + type ${Movie} @node @authorization(validate: [{ where: { node: { custom_field: { eq: "$jwt.custom_value" } } } }]) { title: String custom_field: String @cypher( diff --git a/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-list.int.test.ts b/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-list.int.test.ts index 6cc5c77d6d..98d0f0d410 100644 --- a/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-list.int.test.ts +++ b/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-list.int.test.ts @@ -53,7 +53,7 @@ describe("cypher directive filtering - List", () => { const query = /* GraphQL */ ` query { - ${CustomType.plural}(where: { custom_cypher_list_INCLUDES: "a" }) { + ${CustomType.plural}(where: { custom_cypher_list: { includes: "a" } }) { title } } @@ -92,7 +92,7 @@ describe("cypher directive filtering - List", () => { const query = /* GraphQL */ ` query { - ${CustomType.plural}(where: { custom_cypher_list_INCLUDES: 2 }) { + ${CustomType.plural}(where: { custom_cypher_list: { includes: 2 }}) { title } } @@ -131,7 +131,7 @@ describe("cypher directive filtering - List", () => { const query = /* GraphQL */ ` query { - ${CustomType.plural}(where: { custom_cypher_list_INCLUDES: 20.0 }) { + ${CustomType.plural}(where: { custom_cypher_list: { includes: 20.0 } }) { title } } @@ -170,7 +170,7 @@ describe("cypher directive filtering - List", () => { const query = /* GraphQL */ ` query { - ${CustomType.plural}(where: { custom_cypher_list_INCLUDES: { latitude: 1, longitude: 2 } }) { + ${CustomType.plural}(where: { custom_cypher_list: { includes: { latitude: 1, longitude: 2 } } }) { title } } @@ -209,7 +209,7 @@ describe("cypher directive filtering - List", () => { const query = /* GraphQL */ ` query { - ${CustomType.plural}(where: { custom_cypher_list_INCLUDES: { x: 1, y: 2, z: 3 } }) { + ${CustomType.plural}(where: { custom_cypher_list: { includes: { x: 1, y: 2, z: 3 } } }) { title } } @@ -248,7 +248,7 @@ describe("cypher directive filtering - List", () => { const query = /* GraphQL */ ` query { - ${CustomType.plural}(where: { custom_cypher_list_INCLUDES: "2021-01-01T00:00:00Z" }) { + ${CustomType.plural}(where: { custom_cypher_list: { includes: "2021-01-01T00:00:00Z" } }) { title } } @@ -287,7 +287,7 @@ describe("cypher directive filtering - List", () => { const query = /* GraphQL */ ` query { - ${CustomType.plural}(where: { custom_cypher_list_INCLUDES: "2021-01-01T00:00:00" }) { + ${CustomType.plural}(where: { custom_cypher_list: { includes: "2021-01-01T00:00:00" } }) { title } } @@ -326,7 +326,7 @@ describe("cypher directive filtering - List", () => { const query = /* GraphQL */ ` query { - ${CustomType.plural}(where: { custom_cypher_list_INCLUDES: "2021-01-01" }) { + ${CustomType.plural}(where: { custom_cypher_list: { includes: "2021-01-01"} }) { title } } @@ -365,7 +365,7 @@ describe("cypher directive filtering - List", () => { const query = /* GraphQL */ ` query { - ${CustomType.plural}(where: { custom_cypher_list_INCLUDES: "12:00:00" }) { + ${CustomType.plural}(where: { custom_cypher_list: { includes: "12:00:00" }}) { title } } @@ -404,7 +404,7 @@ describe("cypher directive filtering - List", () => { const query = /* GraphQL */ ` query { - ${CustomType.plural}(where: { custom_cypher_list_INCLUDES: "12:00:00" }) { + ${CustomType.plural}(where: { custom_cypher_list: { includes: "12:00:00" } }) { title } } diff --git a/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-one-to-one-relationship.int.test.ts b/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-one-to-one-relationship.int.test.ts index 6ec544e325..b08eabb722 100644 --- a/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-one-to-one-relationship.int.test.ts +++ b/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-one-to-one-relationship.int.test.ts @@ -75,7 +75,7 @@ describe("cypher directive filtering - One To One Relationship", () => { ${Movie.plural}( where: { actor: { - name_EQ: "Keanu Reeves" + name: { eq: "Keanu Reeves" } } } ) { @@ -163,7 +163,7 @@ describe("cypher directive filtering - One To One Relationship", () => { ${Actor.plural}( where: { movie: { - title_STARTS_WITH: "The Matrix" + title: { startsWith: "The Matrix" } } } ) { @@ -191,6 +191,7 @@ describe("cypher directive filtering - One To One Relationship", () => { }); }); + // TODO: {actor: null} was not migrated to {actors: {eq: null}}. Check if this is correct test("1 to 1 relationship with null filter", async () => { const Movie = testHelper.createUniqueType("Movie"); const Actor = testHelper.createUniqueType("Actor"); @@ -239,7 +240,7 @@ describe("cypher directive filtering - One To One Relationship", () => { query { ${Movie.plural}( where: { - released_EQ: 2003, + released: {eq: 2003}, actor: null } ) { @@ -260,6 +261,7 @@ describe("cypher directive filtering - One To One Relationship", () => { }); }); + // TODO: {actor: null} was not migrated to {actors: {eq: null}}. Check if this is correct test("1 to 1 relationship with NOT null filter", async () => { const Movie = testHelper.createUniqueType("Movie"); const Actor = testHelper.createUniqueType("Actor"); @@ -309,7 +311,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { ${Movie.plural}( - where: { AND: [{ released_IN: [2003], NOT: { actor: null } }] } + where: { AND: [{ released: { in: [2003] }, NOT: { actor: null } }] } ) { title } @@ -336,7 +338,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const Person = testHelper.createUniqueType("Person"); const typeDefs = /* GraphQL */ ` - type ${Movie} @node @authorization(filter: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) { + type ${Movie} @node @authorization(filter: [{ where: { node: { directed_by: { name: { eq: "$jwt.custom_value" } } } } }]) { title: String released: Int directed_by: ${Person}! @@ -387,7 +389,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - ${Person.plural}(where: { directed: { title_EQ: "The Matrix" } }) { + ${Person.plural}(where: { directed: { title: { eq: "The Matrix" }} }) { directed { title directed_by { @@ -420,7 +422,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const Person = testHelper.createUniqueType("Person"); const typeDefs = /* GraphQL */ ` - type ${Movie} @node @authorization(filter: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) { + type ${Movie} @node @authorization(filter: [{ where: { node: { directed_by: { name:{ eq: "$jwt.custom_value" }} } } }]) { title: String released: Int directed_by: ${Person}! @@ -471,7 +473,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - ${Person.plural}(where: { directed: { title_EQ: "The Matrix" } }) { + ${Person.plural}(where: { directed: { title: { eq: "The Matrix" } } }) { directed { title directed_by { @@ -495,7 +497,7 @@ describe("cypher directive filtering - One To One Relationship", () => { type ${Movie} @node { title: String released: Int - directed_by: ${Person}! @authorization(filter: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) + directed_by: ${Person}! @authorization(filter: [{ where: { node: { directed_by: { name: { eq: "$jwt.custom_value" } } } } }]) @cypher( statement: """ MATCH (this)<-[:DIRECTED]-(director:${Person}) @@ -543,7 +545,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - ${Person.plural}(where: { directed: { title_EQ: "The Matrix" } }) { + ${Person.plural}(where: { directed: { title: { eq: "The Matrix" } } }) { directed { title directed_by { @@ -579,7 +581,7 @@ describe("cypher directive filtering - One To One Relationship", () => { type ${Movie} @node { title: String released: Int - directed_by: ${Person}! @authorization(filter: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) + directed_by: ${Person}! @authorization(filter: [{ where: { node: { directed_by: { name: { eq: "$jwt.custom_value" } } } } }]) @cypher( statement: """ MATCH (this)<-[:DIRECTED]-(director:${Person}) @@ -627,7 +629,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - ${Person.plural}(where: { directed: { title_EQ: "The Matrix" } }) { + ${Person.plural}(where: { directed: { title: { eq: "The Matrix" } } }) { directed { title directed_by { @@ -648,7 +650,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const Person = testHelper.createUniqueType("Person"); const typeDefs = /* GraphQL */ ` - type ${Movie} @node @authorization(validate: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) { + type ${Movie} @node @authorization(validate: [{ where: { node: { directed_by: { name: { eq: "$jwt.custom_value" } } } } }]) { title: String released: Int directed_by: ${Person}! @@ -699,7 +701,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - ${Person.plural}(where: { directed: { title_EQ: "The Matrix" } }) { + ${Person.plural}(where: { directed: { title: { eq: "The Matrix" } } }) { directed { title directed_by { @@ -732,7 +734,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const Person = testHelper.createUniqueType("Person"); const typeDefs = /* GraphQL */ ` - type ${Movie} @node @authorization(validate: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) { + type ${Movie} @node @authorization(validate: [{ where: { node: { directed_by: { name: { eq: "$jwt.custom_value" } } } } }]) { title: String released: Int directed_by: ${Person}! @@ -783,7 +785,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - ${Person.plural}(where: { directed: { title_EQ: "The Matrix" } }) { + ${Person.plural}(where: { directed: { title: { eq: "The Matrix" } } }) { directed { title directed_by { @@ -856,7 +858,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - ${Person.plural}(where: { directed: { title_EQ: "The Matrix" } }) { + ${Person.plural}(where: { directed: { title: { eq: "The Matrix" } } }) { directed { title directed_by { @@ -892,7 +894,7 @@ describe("cypher directive filtering - One To One Relationship", () => { type ${Movie} @node { title: String released: Int - directed_by: ${Person}! @authorization(validate: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) + directed_by: ${Person}! @authorization(validate: [{ where: { node: { directed_by: { name: { eq: "$jwt.custom_value" } } } } }]) @cypher( statement: """ MATCH (this)<-[:DIRECTED]-(director:${Person}) @@ -940,7 +942,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - ${Person.plural}(where: { directed: { title_EQ: "The Matrix" } }) { + ${Person.plural}(where: { directed: { title: { eq: "The Matrix" } } }) { directed { title directed_by { @@ -1015,7 +1017,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - ${Person.plural}(where: { directed: { title_EQ: "The Matrix" } }) { + ${Person.plural}(where: { directed: { title: { eq: "The Matrix" } } }) { directed { title directed_by { @@ -1133,7 +1135,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - ${Movie.plural}(where: { directed_by: { name_EQ: "Lilly Wachowski"}, title_ENDS_WITH: "Matrix" }) { + ${Movie.plural}(where: { directed_by: { name: { eq: "Lilly Wachowski"}}, title: { endsWith: "Matrix" }}) { actorsConnection { totalCount edges { diff --git a/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-scalar.int.test.ts b/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-scalar.int.test.ts index ab5e95a59f..b986b3c1db 100644 --- a/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-scalar.int.test.ts +++ b/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-scalar.int.test.ts @@ -36,27 +36,27 @@ describe("cypher directive filtering - Scalar", () => { test.each([ { title: "Int cypher field: exact match", - filter: `special_count_EQ: 1`, + filter: `special_count: { eq: 1 }`, }, { title: "Int cypher field: GT", - filter: `special_count_GT: 0`, + filter: `special_count: { gt: 0 }`, }, { title: "Int cypher field: GTE", - filter: `special_count_GTE: 1`, + filter: `special_count: { gte: 1 }`, }, { title: "Int cypher field: LT", - filter: `special_count_LT: 2`, + filter: `special_count: { lt: 2 }`, }, { title: "Int cypher field: LTE", - filter: `special_count_LTE: 2`, + filter: `special_count: { lte: 2 }`, }, { title: "Int cypher field: IN", - filter: `special_count_IN: [1, 2, 3]`, + filter: `special_count: { in: [1, 2, 3]}`, }, ] as const)("$title", async ({ filter }) => { const typeDefs = /* GraphQL */ ` @@ -85,7 +85,6 @@ describe("cypher directive filtering - Scalar", () => { `; const gqlResult = await testHelper.executeGraphQL(query); - expect(gqlResult.errors).toBeFalsy(); expect(gqlResult?.data).toEqual({ [CustomType.plural]: [ @@ -99,23 +98,23 @@ describe("cypher directive filtering - Scalar", () => { test.each([ { title: "String cypher field: exact match", - filter: `special_word_EQ: "test"`, + filter: `special_word: { eq: "test"}`, }, { title: "String cypher field: CONTAINS", - filter: `special_word_CONTAINS: "es"`, + filter: `special_word: { contains: "es"}`, }, { title: "String cypher field: ENDS_WITH", - filter: `special_word_ENDS_WITH: "est"`, + filter: `special_word:{ endsWith: "est"}`, }, { title: "String cypher field: STARTS_WITH", - filter: `special_word_STARTS_WITH: "tes"`, + filter: `special_word:{ startsWith: "tes"}`, }, { title: "String cypher field: IN", - filter: `special_word_IN: ["test", "test2"]`, + filter: `special_word:{ in: ["test", "test2"]}`, }, ] as const)("$title", async ({ filter }) => { const typeDefs = /* GraphQL */ ` @@ -185,7 +184,7 @@ describe("cypher directive filtering - Scalar", () => { const query = /* GraphQL */ ` query { - ${CustomType.plural}(where: { special_count_GTE: 1, title_EQ: "CustomType One" }) { + ${CustomType.plural}(where: { special_count: { gte: 1 }, title: { eq: "CustomType One"} }) { special_count } } @@ -234,7 +233,7 @@ describe("cypher directive filtering - Scalar", () => { const query = /* GraphQL */ ` query { - ${CustomType.plural}(where: { special_count_GTE: 1, title_EQ: "CustomType Unknown" }) { + ${CustomType.plural}(where: { special_count: { gt: 1 }, title: { eq: "CustomType Unknown"} }) { special_count } } @@ -268,7 +267,7 @@ describe("cypher directive filtering - Scalar", () => { const query = /* GraphQL */ ` query { - ${CustomType.plural}(where: { special_count_GTE: 1 }) { + ${CustomType.plural}(where: { special_count: { gte: 1 }}) { title } } diff --git a/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-sorting.int.test.ts b/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-sorting.int.test.ts index c8ee572a5b..e501ecb813 100644 --- a/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-sorting.int.test.ts +++ b/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-sorting.int.test.ts @@ -73,7 +73,7 @@ describe("cypher directive filtering - Sorting", () => { const query = /* GraphQL */ ` query { ${Movie.plural}( - where: { custom_field_STARTS_WITH: "The Matrix" } + where: { custom_field: { startsWith: "The Matrix" }} sort: [{ custom_field: DESC }] ) { title @@ -159,7 +159,7 @@ describe("cypher directive filtering - Sorting", () => { const query = /* GraphQL */ ` query { ${Movie.plural}( - where: { custom_field_EQ: "hello world!" } + where: { custom_field: { eq: "hello world!" } } sort: [{ title: DESC }] ) { title diff --git a/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-temporal.int.test.ts b/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-temporal.int.test.ts index e79e10a7b6..35dac2afef 100644 --- a/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-temporal.int.test.ts +++ b/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-temporal.int.test.ts @@ -62,7 +62,7 @@ describe("cypher directive filtering - Temporal", () => { query { ${CustomType.plural}( where: { - special_time_GT: "2024-09-02T00:00:00Z" + special_time: { gt: "2024-09-02T00:00:00Z"} } ) { special_time @@ -116,7 +116,7 @@ describe("cypher directive filtering - Temporal", () => { query { ${CustomType.plural}( where: { - special_duration_EQ: "P14DT16H12M" + special_duration: { eq: "P14DT16H12M" } } ) { title @@ -165,7 +165,7 @@ describe("cypher directive filtering - Temporal", () => { query { ${CustomType.plural}( where: { - special_duration_LT: "P14DT16H13M" + special_duration: { lt: "P14DT16H13M" } } ) { title @@ -217,7 +217,7 @@ describe("cypher directive filtering - Temporal", () => { query { ${CustomType.plural}( where: { - special_duration_LTE: "P14DT16H12M" + special_duration: { lte: "P14DT16H12M"} } ) { title @@ -269,7 +269,7 @@ describe("cypher directive filtering - Temporal", () => { query { ${CustomType.plural}( where: { - special_duration_GT: "P14DT16H11M" + special_duration: { gt: "P14DT16H11M"} } ) { title @@ -321,7 +321,7 @@ describe("cypher directive filtering - Temporal", () => { query { ${CustomType.plural}( where: { - special_duration_GTE: "P14DT16H12M" + special_duration: { gte: "P14DT16H12M"} } ) { title diff --git a/packages/graphql/tests/integration/directives/cypher/filtering/relationships/cypher-filtering-relationship-auth.int.test.ts b/packages/graphql/tests/integration/directives/cypher/filtering/relationships/cypher-filtering-relationship-auth.int.test.ts index ffd48be8b8..8dd4b53ab0 100644 --- a/packages/graphql/tests/integration/directives/cypher/filtering/relationships/cypher-filtering-relationship-auth.int.test.ts +++ b/packages/graphql/tests/integration/directives/cypher/filtering/relationships/cypher-filtering-relationship-auth.int.test.ts @@ -31,7 +31,7 @@ describe("cypher directive filtering - relationship auth filter", () => { const Actor = testHelper.createUniqueType("Actor"); const typeDefs = /* GraphQL */ ` - type ${Movie} @node @authorization(filter: [{ where: { node: { actors_SOME: { name_EQ: "$jwt.custom_value" } } } }]) { + type ${Movie} @node @authorization(filter: [{ where: { node: { actors: { some: { name: { eq: "$jwt.custom_value" } } } } } }]) { title: String rating: Float actors: [${Actor}!]! @@ -91,7 +91,7 @@ describe("cypher directive filtering - relationship auth filter", () => { query { ${Movie.operations.connection}( where: { - rating_GT: 7.0 + rating: { gt: 7.0 } } ) { edges { @@ -124,7 +124,7 @@ describe("cypher directive filtering - relationship auth filter", () => { const Actor = testHelper.createUniqueType("Actor"); const typeDefs = /* GraphQL */ ` - type ${Movie} @node @authorization(filter: [{ where: { node: { actors_SOME: { name_EQ: "$jwt.custom_value" } } } }]) { + type ${Movie} @node @authorization(filter: [{ where: { node: { actors: { some: { name: { eq: "$jwt.custom_value" } } } } } }]) { title: String rating: Float actors: [${Actor}!]! @@ -184,7 +184,7 @@ describe("cypher directive filtering - relationship auth filter", () => { query { ${Movie.operations.connection}( where: { - rating_GT: 7.0 + rating:{ gt: 7.0} } ) { edges { @@ -211,7 +211,7 @@ describe("cypher directive filtering - relationship auth filter", () => { const Actor = testHelper.createUniqueType("Actor"); const typeDefs = /* GraphQL */ ` - type ${Movie} @node @authorization(validate: [{ where: { node: { actors_SOME: { name_EQ: "$jwt.custom_value" } } } }]) { + type ${Movie} @node @authorization(validate: [{ where: { node: { actors: { some: { name: { eq: "$jwt.custom_value" } } } } } }]) { title: String rating: Float actors: [${Actor}!]! @@ -271,7 +271,7 @@ describe("cypher directive filtering - relationship auth filter", () => { query { ${Movie.operations.connection}( where: { - rating_LT: 7.0 + rating: { lt: 7.0 } } ) { edges { @@ -304,7 +304,7 @@ describe("cypher directive filtering - relationship auth filter", () => { const Actor = testHelper.createUniqueType("Actor"); const typeDefs = /* GraphQL */ ` - type ${Movie} @node @authorization(validate: [{ where: { node: { actors_SOME: { name_EQ: "$jwt.custom_value" } } } }]) { + type ${Movie} @node @authorization(validate: [{ where: { node: { actors: { some: { name: { eq: "$jwt.custom_value" } } } } } }]) { title: String rating: Float actors: [${Actor}!]! @@ -364,7 +364,7 @@ describe("cypher directive filtering - relationship auth filter", () => { query { ${Movie.operations.connection}( where: { - rating_GT: 7.0 + rating: { gt: 7.0 } } ) { edges { diff --git a/packages/graphql/tests/integration/directives/cypher/filtering/relationships/cypher-filtering-relationship-connection.int.test.ts b/packages/graphql/tests/integration/directives/cypher/filtering/relationships/cypher-filtering-relationship-connection.int.test.ts index 348c1bc666..e1a2a399eb 100644 --- a/packages/graphql/tests/integration/directives/cypher/filtering/relationships/cypher-filtering-relationship-connection.int.test.ts +++ b/packages/graphql/tests/integration/directives/cypher/filtering/relationships/cypher-filtering-relationship-connection.int.test.ts @@ -82,8 +82,12 @@ describe("Connection API - cypher directive filtering - Relationship", () => { ${Movie.operations.connection}( where: { NOT: { - actors_SOME: { - name_EQ: "Jada Pinkett Smith" + actors: { + some: { + name: { + eq: "Jada Pinkett Smith" + } + } } } } @@ -159,8 +163,12 @@ describe("Connection API - cypher directive filtering - Relationship", () => { query { ${Movie.operations.connection}( where: { - actors_ALL: { - name_EQ: "Keanu Reeves" + actors: { + all: { + name: { + eq: "Keanu Reeves" + } + } } } ) { @@ -239,8 +247,12 @@ describe("Connection API - cypher directive filtering - Relationship", () => { query { ${Movie.operations.connection}( where: { - actors_SINGLE: { - name_EQ: "Carrie-Anne Moss" + actors: { + single: { + name: { + eq: "Carrie-Anne Moss" + } + } } } ) { @@ -317,8 +329,10 @@ describe("Connection API - cypher directive filtering - Relationship", () => { query { ${Movie.operations.connection}( where: { - actors_SOME: { - name_EQ: "Keanu Reeves" + actors: { + some: { + name: { eq: "Keanu Reeves" } + } } } ) { @@ -400,8 +414,10 @@ describe("Connection API - cypher directive filtering - Relationship", () => { query { ${Movie.operations.connection}( where: { - actors_SOME: { - name_EQ: "Keanu Reeves" + actors: { + some: { + name: { eq: "Keanu Reeves" } + } } } sort: { @@ -485,8 +501,10 @@ describe("Connection API - cypher directive filtering - Relationship", () => { query { ${Movie.operations.connection}( where: { - actors_NONE: { - name_EQ: "Keanu Reeves" + actors: { + none: { + name: { eq: "Keanu Reeves" } + } } } ) { @@ -599,8 +617,8 @@ describe("Connection API - cypher directive filtering - Relationship", () => { ${Movie.operations.connection}( where: { OR: [ - { actors_SOME: { name_EQ: "Jada Pinkett Smith" } }, - { genres_SOME: { name_EQ: "Romance" } } + { actors: { some: { name: { eq: "Jada Pinkett Smith" } } }}, + { genres: { some: { name: { eq: "Romance" }} } } ] } ) diff --git a/packages/graphql/tests/integration/directives/cypher/filtering/relationships/cypher-filtering-relationship.int.test.ts b/packages/graphql/tests/integration/directives/cypher/filtering/relationships/cypher-filtering-relationship.int.test.ts index 471ff4f4eb..0b83ac8e2a 100644 --- a/packages/graphql/tests/integration/directives/cypher/filtering/relationships/cypher-filtering-relationship.int.test.ts +++ b/packages/graphql/tests/integration/directives/cypher/filtering/relationships/cypher-filtering-relationship.int.test.ts @@ -82,8 +82,10 @@ describe("cypher directive filtering - Relationship", () => { ${Movie.plural}( where: { NOT: { - actors_SOME: { - name_EQ: "Jada Pinkett Smith" + actors: { + some: { + name: { eq: "Jada Pinkett Smith"} + } } } } @@ -153,8 +155,8 @@ describe("cypher directive filtering - Relationship", () => { query { ${Movie.plural}( where: { - actors_ALL: { - name_EQ: "Keanu Reeves" + actors: { + all: { name: { eq: "Keanu Reeves" } } } } ) { @@ -225,8 +227,10 @@ describe("cypher directive filtering - Relationship", () => { query { ${Movie.plural}( where: { - actors_SINGLE: { - name_EQ: "Carrie-Anne Moss" + actors: { + single: { + name: { eq: "Carrie-Anne Moss" } + } } } ) { @@ -295,8 +299,10 @@ describe("cypher directive filtering - Relationship", () => { query { ${Movie.plural}( where: { - actors_SOME: { - name_EQ: "Keanu Reeves" + actors: { + some: { + name: { eq: "Keanu Reeves" } + } } } ) { @@ -367,8 +373,10 @@ describe("cypher directive filtering - Relationship", () => { query { ${Movie.plural}( where: { - actors_NONE: { - name_EQ: "Keanu Reeves" + actors: { + none: { + name: { eq: "Keanu Reeves" } + } } } ) { @@ -473,8 +481,8 @@ describe("cypher directive filtering - Relationship", () => { ${Movie.plural}( where: { OR: [ - { actors_SOME: { name_EQ: "Jada Pinkett Smith" } }, - { genres_SOME: { name_EQ: "Romance" } } + { actors: { some: { name: { eq: "Jada Pinkett Smith" } } } }, + { genres: { some: { name: { eq: "Romance" } } } } ] } ) 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 3f720f28ea..6de3c15c69 100644 --- a/packages/graphql/tests/integration/filtering/advanced-filtering.int.test.ts +++ b/packages/graphql/tests/integration/filtering/advanced-filtering.int.test.ts @@ -32,11 +32,11 @@ describe("Advanced Filtering", () => { test("should find Movies IN strings", async () => { const randomType = testHelper.createUniqueType("Movie"); - const typeDefs = ` - type ${randomType.name} @node { - property: ${type} - } - `; + const typeDefs = /* GraphQL */ ` + type ${randomType.name} @node { + property: ${type} + } + `; await testHelper.initNeo4jGraphQL({ typeDefs }); @@ -57,18 +57,18 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${randomType.name} {property: $value}) - `, + CREATE (:${randomType.name} {property: $value}) + `, { value } ); - const query = ` - { - ${randomType.plural}(where: { property_IN: ["${value}", "${randomValue1}", "${randomValue2}"] }) { - property - } - } - `; + const query = /* GraphQL */ ` + { + ${randomType.plural}(where: { property: { in: ["${value}", "${randomValue1}", "${randomValue2}"]} }) { + property + } + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -80,11 +80,11 @@ describe("Advanced Filtering", () => { test("should find Movies REGEX", async () => { const randomType = testHelper.createUniqueType("Movie"); - const typeDefs = ` - type ${randomType.name} @node { - property: ${type} - } - `; + const typeDefs = /* GraphQL */ ` + type ${randomType.name} @node { + property: ${type} + } + `; await testHelper.initNeo4jGraphQL({ typeDefs, @@ -104,18 +104,18 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${randomType.name} {property: $value}) - `, + CREATE (:${randomType.name} {property: $value}) + `, { value: `${value}${value}` } ); - const query = ` - { - ${randomType.plural}(where: { property_MATCHES: "(?i)${value}.*" }) { - property - } - } - `; + const query = /* GraphQL */ ` + { + ${randomType.plural}(where: { property: { matches: "(?i)${value}.*" } }) { + property + } + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -127,11 +127,11 @@ describe("Advanced Filtering", () => { test("should find Movies NOT string", async () => { const randomType = testHelper.createUniqueType("Movie"); - const typeDefs = ` - type ${randomType.name} @node { - property: ${type} - } - `; + const typeDefs = /* GraphQL */ ` + type ${randomType.name} @node { + property: ${type} + } + `; await testHelper.initNeo4jGraphQL({ typeDefs }); @@ -147,19 +147,19 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${randomType.name} {property: $value}) - CREATE (:${randomType.name} {property: $randomValue1}) - `, + CREATE (:${randomType.name} {property: $value}) + CREATE (:${randomType.name} {property: $randomValue1}) + `, { value, randomValue1 } ); - const query = ` - { - ${randomType.plural}(where: { NOT: { property_EQ: "${randomValue1}" } }) { - property - } - } - `; + const query = /* GraphQL */ ` + { + ${randomType.plural}(where: { NOT: { property: { eq: "${randomValue1}" } } }) { + property + } + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -173,11 +173,11 @@ describe("Advanced Filtering", () => { test("should find Movies CONTAINS string", async () => { const randomType = testHelper.createUniqueType("Movie"); - const typeDefs = ` - type ${randomType.name} @node { - property: ${type} - } - `; + const typeDefs = /* GraphQL */ ` + type ${randomType.name} @node { + property: ${type} + } + `; await testHelper.initNeo4jGraphQL({ typeDefs }); @@ -190,20 +190,20 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${randomType.name} {property: $superValue}) - CREATE (:${randomType.name} {property: $superValue}) - CREATE (:${randomType.name} {property: $superValue}) - `, + CREATE (:${randomType.name} {property: $superValue}) + CREATE (:${randomType.name} {property: $superValue}) + CREATE (:${randomType.name} {property: $superValue}) + `, { superValue } ); - const query = ` - { - ${randomType.plural}(where: { property_CONTAINS: "${value}" }) { - property - } - } - `; + const query = /* GraphQL */ ` + { + ${randomType.plural}(where: { property: { contains: "${value}" } }) { + property + } + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -217,11 +217,11 @@ describe("Advanced Filtering", () => { test("should find Movies STARTS_WITH string", async () => { const randomType = testHelper.createUniqueType("Movie"); - const typeDefs = ` - type ${randomType.name} @node { - property: ${type} - } - `; + const typeDefs = /* GraphQL */ ` + type ${randomType.name} @node { + property: ${type} + } + `; await testHelper.initNeo4jGraphQL({ typeDefs }); @@ -234,20 +234,20 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${randomType.name} {property: $superValue}) - CREATE (:${randomType.name} {property: $superValue}) - CREATE (:${randomType.name} {property: $superValue}) - `, + CREATE (:${randomType.name} {property: $superValue}) + CREATE (:${randomType.name} {property: $superValue}) + CREATE (:${randomType.name} {property: $superValue}) + `, { superValue } ); - const query = ` - { - ${randomType.plural}(where: { property_STARTS_WITH: "${value}" }) { - property - } - } - `; + const query = /* GraphQL */ ` + { + ${randomType.plural}(where: { property: { startsWith: "${value}" } }) { + property + } + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -263,11 +263,11 @@ describe("Advanced Filtering", () => { test("should find Movies ENDS_WITH string", async () => { const randomType = testHelper.createUniqueType("Movie"); - const typeDefs = ` - type ${randomType.name} @node { - property: ${type} - } - `; + const typeDefs = /* GraphQL */ ` + type ${randomType.name} @node { + property: ${type} + } + `; await testHelper.initNeo4jGraphQL({ typeDefs }); @@ -285,20 +285,20 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${randomType.name} {property: $value}) - CREATE (:${randomType.name} {property: $notValue}) - CREATE (:${randomType.name} {property: $superValue}) - `, + CREATE (:${randomType.name} {property: $value}) + CREATE (:${randomType.name} {property: $notValue}) + CREATE (:${randomType.name} {property: $superValue}) + `, { value, notValue, superValue } ); - const query = ` - { - ${randomType.plural}(where: { property_ENDS_WITH: "${value}" }) { - property - } - } - `; + const query = /* GraphQL */ ` + { + ${randomType.plural}(where: { property: { endsWith: "${value}" } }) { + property + } + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -312,11 +312,11 @@ describe("Advanced Filtering", () => { test("should find Movies implicit EQ string", async () => { const movieType = testHelper.createUniqueType("Movie"); - const typeDefs = ` - type ${movieType.name} @node { - title: String - } - `; + const typeDefs = /* GraphQL */ ` + type ${movieType.name} @node { + title: String + } + `; await testHelper.initNeo4jGraphQL({ typeDefs, @@ -329,21 +329,21 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${movieType.name} {title: $animatrix}) - CREATE (:${movieType.name} {title: $matrix}) - CREATE (:${movieType.name} {title: $matrixReloaded}) - CREATE (:${movieType.name} {title: $matrixRevolutions}) - `, + CREATE (:${movieType.name} {title: $animatrix}) + CREATE (:${movieType.name} {title: $matrix}) + CREATE (:${movieType.name} {title: $matrixReloaded}) + CREATE (:${movieType.name} {title: $matrixRevolutions}) + `, { animatrix, matrix, matrixReloaded, matrixRevolutions } ); - const query = ` - { - ${movieType.plural}(where: { title_EQ: "${matrix}" }) { - title - } - } - `; + const query = /* GraphQL */ ` + { + ${movieType.plural}(where: { title: { eq: "${matrix}" }}) { + title + } + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -360,11 +360,11 @@ describe("Advanced Filtering", () => { test("should find Movies EQ string", async () => { const movieType = testHelper.createUniqueType("Movie"); - const typeDefs = ` - type ${movieType.name} @node { - title: String - } - `; + const typeDefs = /* GraphQL */ ` + type ${movieType.name} @node { + title: String + } + `; await testHelper.initNeo4jGraphQL({ typeDefs, @@ -377,21 +377,21 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${movieType.name} {title: $animatrix}) - CREATE (:${movieType.name} {title: $matrix}) - CREATE (:${movieType.name} {title: $matrixReloaded}) - CREATE (:${movieType.name} {title: $matrixRevolutions}) - `, + CREATE (:${movieType.name} {title: $animatrix}) + CREATE (:${movieType.name} {title: $matrix}) + CREATE (:${movieType.name} {title: $matrixReloaded}) + CREATE (:${movieType.name} {title: $matrixRevolutions}) + `, { animatrix, matrix, matrixReloaded, matrixRevolutions } ); - const query = ` - { - ${movieType.plural}(where: { title_EQ: "${matrix}" }) { - title - } - } - `; + const query = /* GraphQL */ ` + { + ${movieType.plural}(where: { title: { eq: "${matrix}" } }) { + title + } + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -408,11 +408,11 @@ describe("Advanced Filtering", () => { test("should find Movies GT string", async () => { const movieType = testHelper.createUniqueType("Movie"); - const typeDefs = ` - type ${movieType.name} @node { - title: String - } - `; + const typeDefs = /* GraphQL */ ` + type ${movieType.name} @node { + title: String + } + `; await testHelper.initNeo4jGraphQL({ features: { @@ -435,21 +435,21 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${movieType.name} {title: $animatrix}) - CREATE (:${movieType.name} {title: $matrix}) - CREATE (:${movieType.name} {title: $matrixReloaded}) - CREATE (:${movieType.name} {title: $matrixRevolutions}) - `, + CREATE (:${movieType.name} {title: $animatrix}) + CREATE (:${movieType.name} {title: $matrix}) + CREATE (:${movieType.name} {title: $matrixReloaded}) + CREATE (:${movieType.name} {title: $matrixRevolutions}) + `, { animatrix, matrix, matrixReloaded, matrixRevolutions } ); - const query = ` - { - ${movieType.plural}(where: { title_GT: "${matrix}" }) { - title - } - } - `; + const query = /* GraphQL */ ` + { + ${movieType.plural}(where: { title: { gt: "${matrix}" } }) { + title + } + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -468,11 +468,11 @@ describe("Advanced Filtering", () => { test("should find Movies LT string", async () => { const movieType = testHelper.createUniqueType("Movie"); - const typeDefs = ` - type ${movieType.name} @node { - title: String - } - `; + const typeDefs = /* GraphQL */ ` + type ${movieType.name} @node { + title: String + } + `; await testHelper.initNeo4jGraphQL({ features: { @@ -495,21 +495,21 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${movieType.name} {title: $matrix}) - CREATE (:${movieType.name} {title: $matrixReloaded}) - CREATE (:${movieType.name} {title: $matrixRevolutions}) - CREATE (:${movieType.name} {title: $matrixResurrections}) - `, + CREATE (:${movieType.name} {title: $matrix}) + CREATE (:${movieType.name} {title: $matrixReloaded}) + CREATE (:${movieType.name} {title: $matrixRevolutions}) + CREATE (:${movieType.name} {title: $matrixResurrections}) + `, { matrix, matrixReloaded, matrixRevolutions, matrixResurrections } ); - const query = ` - { - ${movieType.plural}(where: { title_LT: "${matrixRevolutions}" }) { - title - } - } - `; + const query = /* GraphQL */ ` + { + ${movieType.plural}(where: { title: { lt: "${matrixRevolutions}" } }) { + title + } + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -528,11 +528,11 @@ describe("Advanced Filtering", () => { test("should find Movies GTE string", async () => { const movieType = testHelper.createUniqueType("Movie"); - const typeDefs = ` - type ${movieType.name} @node { - title: String - } - `; + const typeDefs = /* GraphQL */ ` + type ${movieType.name} @node { + title: String + } + `; await testHelper.initNeo4jGraphQL({ features: { @@ -555,21 +555,21 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${movieType.name} {title: $animatrix}) - CREATE (:${movieType.name} {title: $matrix}) - CREATE (:${movieType.name} {title: $matrixReloaded}) - CREATE (:${movieType.name} {title: $matrixRevolutions}) - `, + CREATE (:${movieType.name} {title: $animatrix}) + CREATE (:${movieType.name} {title: $matrix}) + CREATE (:${movieType.name} {title: $matrixReloaded}) + CREATE (:${movieType.name} {title: $matrixRevolutions}) + `, { animatrix, matrix, matrixReloaded, matrixRevolutions } ); - const query = ` - { - ${movieType.plural}(where: { title_GTE: "${matrix}" }) { - title - } - } - `; + const query = /* GraphQL */ ` + { + ${movieType.plural}(where: { title: { gte: "${matrix}" } }) { + title + } + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -588,11 +588,11 @@ describe("Advanced Filtering", () => { test("should find Movies LTE string", async () => { const movieType = testHelper.createUniqueType("Movie"); - const typeDefs = ` - type ${movieType.name} @node { - title: String - } - `; + const typeDefs = /* GraphQL */ ` + type ${movieType.name} @node { + title: String + } + `; await testHelper.initNeo4jGraphQL({ features: { @@ -615,22 +615,21 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${movieType.name} {title: $matrix}) - CREATE (:${movieType.name} {title: $matrixReloaded}) - CREATE (:${movieType.name} {title: $matrixRevolutions}) - CREATE (:${movieType.name} {title: $matrixResurrections}) - - `, + CREATE (:${movieType.name} {title: $matrix}) + CREATE (:${movieType.name} {title: $matrixReloaded}) + CREATE (:${movieType.name} {title: $matrixRevolutions}) + CREATE (:${movieType.name} {title: $matrixResurrections}) + `, { matrix, matrixReloaded, matrixRevolutions, matrixResurrections } ); - const query = ` - { - ${movieType.plural}(where: { title_LTE: "${matrixRevolutions}" }) { - title - } - } - `; + const query = /* GraphQL */ ` + { + ${movieType.plural}(where: { title: { lte: "${matrixRevolutions}" } }) { + title + } + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -656,11 +655,11 @@ describe("Advanced Filtering", () => { test("should find Movies NOT number", async () => { const randomType = testHelper.createUniqueType("Movie"); - const typeDefs = ` - type ${randomType.name} @node { - property: ${type} - } - `; + const typeDefs = /* GraphQL */ ` + type ${randomType.name} @node { + property: ${type} + } + `; await testHelper.initNeo4jGraphQL({ typeDefs }); @@ -682,19 +681,19 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${randomType.name} {property: $property}) - CREATE (:${randomType.name} {property: $notProperty}) - `, + CREATE (:${randomType.name} {property: $property}) + CREATE (:${randomType.name} {property: $notProperty}) + `, { property, notProperty } ); - const query = ` - { - ${randomType.plural}(where: { NOT: { property_EQ: ${notProperty} } }) { - property - } - } - `; + const query = /* GraphQL */ ` + { + ${randomType.plural}(where: { NOT: { property: { eq: ${notProperty} }} }) { + property + } + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -707,11 +706,11 @@ describe("Advanced Filtering", () => { test("should find Movies IN numbers", async () => { const randomType = testHelper.createUniqueType("Movie"); - const typeDefs = ` - type ${randomType.name} @node { - property: ${type} - } - `; + const typeDefs = /* GraphQL */ ` + type ${randomType.name} @node { + property: ${type} + } + `; await testHelper.initNeo4jGraphQL({ typeDefs }); @@ -741,18 +740,18 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${randomType.name} {property: $value}) - `, + CREATE (:${randomType.name} {property: $value}) + `, { value } ); - const query = ` - { - ${randomType.plural}(where: { property_IN: [${value}, ${randomValue1}, ${randomValue2}] }) { - property - } - } - `; + const query = /* GraphQL */ ` + { + ${randomType.plural}(where: { property: { in: [${value}, ${randomValue1}, ${randomValue2}] } }) { + property + } + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -765,11 +764,11 @@ describe("Advanced Filtering", () => { test("should find Movies LT number", async () => { const randomType = testHelper.createUniqueType("Movie"); - const typeDefs = ` - type ${randomType.name} @node { - property: ${type} - } - `; + const typeDefs = /* GraphQL */ ` + type ${randomType.name} @node { + property: ${type} + } + `; await testHelper.initNeo4jGraphQL({ typeDefs }); @@ -785,19 +784,19 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${randomType.name} {property: $value}) - CREATE (:${randomType.name} {property: $lessThanValue}) - `, + CREATE (:${randomType.name} {property: $value}) + CREATE (:${randomType.name} {property: $lessThanValue}) + `, { value, lessThanValue } ); - const query = ` - { - ${randomType.plural}(where: { property_LT: ${lessThanValue + 1} }) { - property - } - } - `; + const query = /* GraphQL */ ` + { + ${randomType.plural}(where: { property: {lt: ${lessThanValue + 1}} }) { + property + } + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -810,11 +809,11 @@ describe("Advanced Filtering", () => { test("should find Movies LTE number", async () => { const randomType = testHelper.createUniqueType("Movie"); - const typeDefs = ` - type ${randomType.name} @node { - property: ${type} - } - `; + const typeDefs = /* GraphQL */ ` + type ${randomType.name} @node { + property: ${type} + } + `; await testHelper.initNeo4jGraphQL({ typeDefs }); @@ -830,19 +829,19 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${randomType.name} {property: $value}) - CREATE (:${randomType.name} {property: $lessThanValue}) - `, + CREATE (:${randomType.name} {property: $value}) + CREATE (:${randomType.name} {property: $lessThanValue}) + `, { value, lessThanValue } ); - const query = ` - { - ${randomType.plural}(where: { property_LTE: ${value} }) { - property - } - } - `; + const query = /* GraphQL */ ` + { + ${randomType.plural}(where: { property: { lte: ${value} } }) { + property + } + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -854,11 +853,11 @@ describe("Advanced Filtering", () => { test("should find Movies GT number", async () => { const randomType = testHelper.createUniqueType("Movie"); - const typeDefs = ` - type ${randomType.name} @node { - property: ${type} - } - `; + const typeDefs = /* GraphQL */ ` + type ${randomType.name} @node { + property: ${type} + } + `; await testHelper.initNeo4jGraphQL({ typeDefs }); @@ -874,19 +873,19 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${randomType.name} {property: $value}) - CREATE (:${randomType.name} {property: $graterThanValue}) - `, + CREATE (:${randomType.name} {property: $value}) + CREATE (:${randomType.name} {property: $graterThanValue}) + `, { value, graterThanValue } ); - const query = ` - { - ${randomType.plural}(where: { property_GT: ${graterThanValue - 1} }) { - property - } - } - `; + const query = /* GraphQL */ ` + { + ${randomType.plural}(where: { property: { gt: ${graterThanValue - 1} } }) { + property + } + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -899,11 +898,11 @@ describe("Advanced Filtering", () => { test("should find Movies GTE number", async () => { const randomType = testHelper.createUniqueType("Movie"); - const typeDefs = ` - type ${randomType.name} @node { - property: ${type} - } - `; + const typeDefs = /* GraphQL */ ` + type ${randomType.name} @node { + property: ${type} + } + `; await testHelper.initNeo4jGraphQL({ typeDefs }); @@ -919,19 +918,19 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${randomType.name} {property: $value}) - CREATE (:${randomType.name} {property: $greaterThan}) - `, + CREATE (:${randomType.name} {property: $value}) + CREATE (:${randomType.name} {property: $greaterThan}) + `, { value, greaterThan } ); - const query = ` - { - ${randomType.plural}(where: { property_GTE: ${value} }) { - property - } - } - `; + const query = /* GraphQL */ ` + { + ${randomType.plural}(where: { property: { gte: ${value} } }) { + property + } + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -945,11 +944,11 @@ describe("Advanced Filtering", () => { test("should find Movies equality equality", async () => { const randomType = testHelper.createUniqueType("Movie"); - const typeDefs = ` - type ${randomType.name} @node { - property: Boolean - } - `; + const typeDefs = /* GraphQL */ ` + type ${randomType.name} @node { + property: Boolean + } + `; await testHelper.initNeo4jGraphQL({ typeDefs }); @@ -957,18 +956,18 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${randomType.name} {property: $value}) - `, + CREATE (:${randomType.name} {property: $value}) + `, { value } ); - const query = ` - { - ${randomType.plural}(where: { property_EQ: false }) { - property - } - } - `; + const query = /* GraphQL */ ` + { + ${randomType.plural}(where: { property: { eq: false } }) { + property + } + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -980,11 +979,11 @@ describe("Advanced Filtering", () => { test("should find Movies NOT boolean", async () => { const randomType = testHelper.createUniqueType("Movie"); - const typeDefs = ` - type ${randomType.name} @node { - property: Boolean - } - `; + const typeDefs = /* GraphQL */ ` + type ${randomType.name} @node { + property: Boolean + } + `; await testHelper.initNeo4jGraphQL({ typeDefs }); @@ -992,18 +991,18 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${randomType.name} {property: $value}) - `, + CREATE (:${randomType.name} {property: $value}) + `, { value } ); - const query = ` - { - ${randomType.plural}(where: { NOT: { property_EQ: false } }) { - property - } - } - `; + const query = /* GraphQL */ ` + { + ${randomType.plural}(where: { NOT: { property: { eq: false } } }) { + property + } + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -1019,7 +1018,7 @@ describe("Advanced Filtering", () => { const randomType1 = testHelper.createUniqueType("Movie"); const randomType2 = testHelper.createUniqueType("Genre"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${randomType1.name} @node { id: ID ${randomType2.plural}: [${randomType2.name}!]! @relationship(type: "IN_GENRE", direction: OUT) @@ -1046,25 +1045,25 @@ describe("Advanced Filtering", () => { 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) - `, + 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 query = ` - { - ${randomType1.plural}(where: { ${randomType2.plural}_SOME: { id_EQ: "${relationId}" } }) { + const query = /* GraphQL */ ` + { + ${randomType1.plural}(where: { ${randomType2.plural}: { some: { id: { eq: "${relationId}" }} } }) { + id + ${randomType2.plural} { id - ${randomType2.plural} { - id - } } } - `; + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -1081,7 +1080,7 @@ describe("Advanced Filtering", () => { const Movie = testHelper.createUniqueType("Movie"); const Genre = testHelper.createUniqueType("Genre"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Movie} @node { id: ID genres: [${Genre}!]! @relationship(type: "IN_GENRE", direction: OUT) @@ -1104,21 +1103,21 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${Movie} {id: $movieId})-[:IN_GENRE]->(:${Genre} {id:$genreId}) - `, + CREATE (:${Movie} {id: $movieId})-[:IN_GENRE]->(:${Genre} {id:$genreId}) + `, { movieId, genreId } ); - const query = ` - { - ${Movie.plural}(where: { genresConnection_SOME: { node: { id_EQ: "${genreId}" } } }) { + const query = /* GraphQL */ ` + { + ${Movie.plural}(where: { genresConnection: { some: { node: { id: { eq: "${genreId}" } } } } }) { + id + genres { id - genres { - id - } } } - `; + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -1138,19 +1137,19 @@ describe("Advanced Filtering", () => { const Movie = testHelper.createUniqueType("Movie"); const Genre = testHelper.createUniqueType("Genre"); - const typeDefs = ` - type ${Movie} @node { - id: ID - genres: [${Genre}!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "ActedIn") - } + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + id: ID + genres: [${Genre}!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "ActedIn") + } - type ${Genre} @node { - id: ID - } + type ${Genre} @node { + id: ID + } - type ActedIn @relationshipProperties { - id: String - } + type ActedIn @relationshipProperties { + id: String + } `; await testHelper.initNeo4jGraphQL({ typeDefs }); @@ -1169,21 +1168,21 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (movie:${Movie} {id: $movieId})-[:IN_GENRE {id:$actedInId}]->(:${Genre} {id:$genreId}) - `, + CREATE (movie:${Movie} {id: $movieId})-[:IN_GENRE {id:$actedInId}]->(:${Genre} {id:$genreId}) + `, { movieId, genreId, actedInId } ); - const query = ` - { - ${Movie.plural}(where: { genresConnection_SOME: { edge: { id_EQ: "${actedInId}" } } }) { + const query = /* GraphQL */ ` + { + ${Movie.plural}(where: { genresConnection: { some: { edge: { id: { eq: "${actedInId}" } } } } }) { + id + genres { id - genres { - id - } } } - `; + } + `; const gqlResult = await testHelper.executeGraphQL(query); @@ -1202,7 +1201,7 @@ describe("Advanced Filtering", () => { const Movie = testHelper.createUniqueType("Movie"); const Genre = testHelper.createUniqueType("Genre"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${Movie} @node { id: ID genres: [${Genre}!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "ActedIn") @@ -1233,14 +1232,14 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${Movie} {id: $movieId})-[:IN_GENRE {id:$actedInId}]->(:${Genre} {id:$genreId}) - `, + CREATE (:${Movie} {id: $movieId})-[:IN_GENRE {id:$actedInId}]->(:${Genre} {id:$genreId}) + `, { movieId, genreId, actedInId } ); - const query = ` + const query = /* GraphQL */ ` { - ${Movie.plural}(where: { genresConnection_SOME: { node: { id_EQ: "${genreId}" } edge: { id_EQ: "${actedInId}" } } }) { + ${Movie.plural}(where: { genresConnection: { some: { node: { id: { eq: "${genreId}" }} edge: { id: { eq: "${actedInId}" } } } } }) { id genres { id @@ -1269,15 +1268,15 @@ describe("Advanced Filtering", () => { 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) - } + 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 - } + type ${randomType2.name} @node { + id: ID + } `; await testHelper.initNeo4jGraphQL({ typeDefs }); @@ -1298,19 +1297,19 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (root1:${randomType1.name} {id: $rootId1}) - CREATE (root2:${randomType1.name} {id: $rootId2}) - CREATE (relation1:${randomType2.name} {id: $relationId1}) - CREATE (relation2:${randomType2.name} {id: $relationId2}) - MERGE (root1)-[:IN_GENRE]->(relation1) - MERGE (root2)-[:IN_GENRE]->(relation2) - `, + CREATE (root1:${randomType1.name} {id: $rootId1}) + CREATE (root2:${randomType1.name} {id: $rootId2}) + CREATE (relation1:${randomType2.name} {id: $relationId1}) + CREATE (relation2:${randomType2.name} {id: $relationId2}) + MERGE (root1)-[:IN_GENRE]->(relation1) + MERGE (root2)-[:IN_GENRE]->(relation2) + `, { rootId1, rootId2, relationId1, relationId2 } ); const query = /* GraphQL */ ` { - ${randomType1.plural}(where: { NOT: { ${randomType2.plural}_SOME: { id_EQ: "${relationId2}" } } }) { + ${randomType1.plural}(where: { NOT: { ${randomType2.plural}: { some: { id: { eq: "${relationId2}" }}} } }) { id ${randomType2.plural} { id @@ -1334,19 +1333,19 @@ describe("Advanced Filtering", () => { 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, properties: "ActedIn") - } + const typeDefs = /* GraphQL */ ` + type ${randomType1.name} @node { + id: ID + ${randomType2.plural}: [${randomType2.name}!]! @relationship(type: "IN_GENRE", direction: OUT, properties: "ActedIn") + } - type ${randomType2.name} @node { - id: ID - } + type ${randomType2.name} @node { + id: ID + } - type ActedIn @relationshipProperties { - id: ID - } + type ActedIn @relationshipProperties { + id: ID + } `; await testHelper.initNeo4jGraphQL({ typeDefs }); @@ -1370,15 +1369,15 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${randomType1.name} {id: $rootId1})-[:IN_GENRE {id: $actedInId}]->(:${randomType2.name} {id: $relationId1}) - CREATE (:${randomType1.name} {id: $rootId2})-[:IN_GENRE {id: randomUUID()}]->(:${randomType2.name} {id: $relationId2}) - `, + CREATE (:${randomType1.name} {id: $rootId1})-[:IN_GENRE {id: $actedInId}]->(:${randomType2.name} {id: $relationId1}) + CREATE (:${randomType1.name} {id: $rootId2})-[:IN_GENRE {id: randomUUID()}]->(:${randomType2.name} {id: $relationId2}) + `, { rootId1, rootId2, relationId1, relationId2, actedInId } ); - const query = ` + const query = /* GraphQL */ ` { - ${randomType1.plural}(where: { ${randomType2.plural}Connection_NONE: { edge: { id_EQ: "${actedInId}" } } }) { + ${randomType1.plural}(where: { ${randomType2.plural}Connection: { none: {edge: { id: { eq: "${actedInId}"} } } } }) { id ${randomType2.plural} { id @@ -1418,19 +1417,19 @@ describe("Advanced Filtering", () => { Movie = testHelper.createUniqueType("Movie"); Actor = testHelper.createUniqueType("Actor"); - const typeDefs = ` - type ${Movie} @node { - id: ID! @id - budget: Int! - actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) - } + const typeDefs = /* GraphQL */ ` + type ${Movie} @node { + id: ID! @id + budget: Int! + actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN) + } - type ${Actor} @node { - id: ID! @id - flag: Boolean! - actedIn: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) - } - `; + type ${Actor} @node { + id: ID! @id + flag: Boolean! + actedIn: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT) + } + `; await testHelper.initNeo4jGraphQL({ typeDefs }); await testHelper.executeCypher( @@ -1454,12 +1453,12 @@ 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_EQ: false } } }] }) { + ${Movie.plural}(where: { AND: [{ id: { in: $movieIds }}, { actors: { ${predicate}: { NOT: { flag: { eq: false }} } } }] }) { id - actors(where: { NOT: { flag_EQ: false } }) { + actors(where: { NOT: { flag: {eq: false} } }) { id flag } @@ -1468,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) }, }); @@ -1484,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) }, }); @@ -1500,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) }, }); @@ -1516,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) }, }); @@ -1542,11 +1541,11 @@ describe("Advanced Filtering", () => { }); describe("on relationship using NOT operator", () => { - const generateQuery = (predicate: "ALL" | "NONE" | "SINGLE" | "SOME") => ` + const generateQuery = (predicate: "all" | "none" | "single" | "some") => /* GraphQL */ ` query($movieIds: [ID!]!) { - ${Movie.plural}(where: { AND: [{ id_IN: $movieIds }, { actors_${predicate}: { NOT: { flag_EQ: false } } }] }) { + ${Movie.plural}(where: { AND: [{ id: { in: $movieIds }}, { actors: { ${predicate}: { NOT: { flag: {eq: false }}} } }] }) { id - actors(where: { NOT: { flag_EQ: false } }) { + actors(where: { NOT: { flag: { eq: false }} }) { id flag } @@ -1554,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) }, }); @@ -1570,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) }, }); @@ -1586,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) }, }); @@ -1602,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) }, }); @@ -1628,11 +1627,11 @@ 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_EQ: false } } }}] }) { + ${Movie.plural}(where: { AND: [{ id: {in: $movieIds} }, { actorsConnection: { ${predicate}: { node: { NOT: { flag: { eq: false} } } }}}] }) { id - actors(where: { NOT: { flag_EQ: false } }) { + actors(where: { NOT: { flag:{ eq: false }} }) { id flag } @@ -1640,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) }, }); @@ -1656,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) }, }); @@ -1672,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) }, }); @@ -1688,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) }, }); @@ -1714,11 +1713,11 @@ describe("Advanced Filtering", () => { }); describe("on connection using NOT operator", () => { - const generateQuery = (predicate: "ALL" | "NONE" | "SINGLE" | "SOME") => ` + const generateQuery = (predicate: "all" | "none" | "single" | "some") => /* GraphQL */ ` query($movieIds: [ID!]!) { - ${Movie.plural}(where: { AND: [{ id_IN: $movieIds }, { actorsConnection_${predicate}: { node: { NOT: { flag_EQ: false } } } }] }) { + ${Movie.plural}(where: { AND: [{ id:{ in: $movieIds }}, { actorsConnection: { ${predicate}: { node: { NOT: { flag: {eq: false} } } } } }] }) { id - actors(where: { NOT: { flag_EQ: false }}) { + actors(where: { NOT: { flag: { eq: false } }}) { id flag } @@ -1726,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) }, }); @@ -1742,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) }, }); @@ -1758,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) }, }); @@ -1774,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) }, }); @@ -1799,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 = ` - 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", () => { @@ -1866,7 +1805,7 @@ describe("Advanced Filtering", () => { test("should work for existence and non-existence", async () => { const randomType = testHelper.createUniqueType("Movie"); - const typeDefs = ` + const typeDefs = /* GraphQL */ ` type ${randomType.name} @node { id: String! optional: String @@ -1892,21 +1831,21 @@ describe("Advanced Filtering", () => { await testHelper.executeCypher( ` - CREATE (:${randomType.name} {id: $id1}) - CREATE (:${randomType.name} {id: $id2, optional: $optionalValue}) - `, + CREATE (:${randomType.name} {id: $id1}) + CREATE (:${randomType.name} {id: $id2, optional: $optionalValue}) + `, { id1, id2, optionalValue } ); // Test NULL checking - const nullQuery = ` - { - ${randomType.plural}(where: { optional_EQ: null }) { - id - } + const nullQuery = /* GraphQL */ ` + { + ${randomType.plural}(where: { optional: { eq: null} }) { + id } - `; + } + `; const nullResult = await testHelper.executeGraphQL(nullQuery); @@ -1918,13 +1857,13 @@ describe("Advanced Filtering", () => { // Test NOT NULL checking - const notNullQuery = ` - { - ${randomType.plural}(where: { NOT: { optional_EQ: null } }) { - id - } + const notNullQuery = /* GraphQL */ ` + { + ${randomType.plural}(where: { NOT: { optional: { eq: null } } }) { + id } - `; + } + `; const notNullResult = await testHelper.executeGraphQL(notNullQuery); diff --git a/packages/graphql/tests/integration/filtering/custom-scalar-filtering.int.test.ts b/packages/graphql/tests/integration/filtering/custom-scalar-filtering.int.test.ts new file mode 100644 index 0000000000..e7d92f1f41 --- /dev/null +++ b/packages/graphql/tests/integration/filtering/custom-scalar-filtering.int.test.ts @@ -0,0 +1,526 @@ +/* + * 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 { TestHelper } from "../../utils/tests-helper"; + +describe("Custom Scalar Filtering", () => { + const testHelper = new TestHelper(); + + afterEach(async () => { + await testHelper.close(); + }); + + describe("Single Value Custom Scalar", () => { + test("Filter NOT CustomScalar - expect return value", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + scalar CustomScalar + + type ${randomType.name} @node { + property: CustomScalar + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const value = 1; + const unwantedValue = 2; + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value}) + CREATE (:${randomType.name} {property: $unwantedValue}) + `, + { value, unwantedValue } + ); + + const query = ` + { + ${randomType.plural}(where: { NOT: { property: {eq: ${unwantedValue} } } }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(1); + expect((gqlResult.data as any)[randomType.plural][0].property).toEqual(value); + }); + + test("Filter NOT CustomScalar - expect array of return values", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + scalar CustomScalar + + type ${randomType.name} @node { + property: CustomScalar + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const value1 = 1; + const value2 = 202; + const unwantedValue = 2; + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value1}) + CREATE (:${randomType.name} {property: $value2}) + CREATE (:${randomType.name} {property: $unwantedValue}) + `, + { value1, value2, unwantedValue } + ); + + const query = ` + { + ${randomType.plural}(where: { NOT: { property: {eq: ${unwantedValue} } } }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(2); + expect((gqlResult.data as any)[randomType.plural]).toIncludeSameMembers([ + { + property: value1, + }, + { + property: value2, + }, + ]); + }); + test("Filter NOT CustomScalar - expect no return values", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + scalar CustomScalar + + type ${randomType.name} @node { + property: CustomScalar + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const value = 11; + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value}) + `, + { value } + ); + + const query = ` + { + ${randomType.plural}(where: { NOT: { property: { eq: ${value} } }}) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(0); + }); + test("Filter IN CustomScalar - expect return value", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + scalar CustomScalar + + type ${randomType.name} @node { + property: CustomScalar + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const value = "someValue"; + const unknownValue1 = "foo"; + const unknownValue2 = "bar"; + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value}) + `, + { value } + ); + + const query = ` + { + ${randomType.plural}(where: { + property: {in: ["${value}", "${unknownValue1}", "${unknownValue2}"] } + }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(1); + expect((gqlResult.data as any)[randomType.plural][0].property).toEqual(value); + }); + test("Filter IN CustomScalar - expect array of return values", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + scalar CustomScalar + + type ${randomType.name} @node { + property: CustomScalar + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const value1 = "someValue"; + const value2 = "someOtherValue"; + const unwantedValue = "foo"; + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value1}) + CREATE (:${randomType.name} {property: $value2}) + CREATE (:${randomType.name} {property: $unwantedValue}) + `, + { value1, value2, unwantedValue } + ); + + const query = ` + { + ${randomType.plural}(where: { + property: {in: ["${value1}", "${value2}"] } + }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(2); + expect((gqlResult.data as any)[randomType.plural]).toIncludeSameMembers([ + { + property: value1, + }, + { + property: value2, + }, + ]); + }); + test("Filter IN CustomScalar - expect no return values", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + scalar CustomScalar + + type ${randomType.name} @node { + property: CustomScalar + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const value = "someValue"; + const unknownValue = "someUnknownValue"; + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value}) + `, + { value } + ); + + const query = ` + { + ${randomType.plural}(where: { property: { in: ["${unknownValue}"] } }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(0); + }); + }); + describe("List Custom Scalar Filtering", () => { + test("Filter NOT CustomListScalar - expect return value", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + scalar CustomListScalar + + type ${randomType.name} @node { + property: [CustomListScalar!] + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const value = [1, 2, 3]; + const unwantedValue = [2, 3]; + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value}) + CREATE (:${randomType.name} {property: $unwantedValue}) + `, + { value, unwantedValue } + ); + + const query = ` + query($unwantedValue: [CustomListScalar!]!){ + ${randomType.plural}(where: { NOT: { property: { eq: $unwantedValue } } }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query, { + variableValues: { unwantedValue }, + }); + + expect(gqlResult.errors).toBeUndefined(); + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(1); + expect((gqlResult.data as any)[randomType.plural][0].property).toEqual(value); + }); + test("Filter NOT CustomListScalar - expect array of return values", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + scalar CustomListScalar + + type ${randomType.name} @node { + property: [CustomListScalar!] + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const value1 = [1, 2, 3]; + const value2 = ["someValue"]; + const unwantedValue = [2, 3]; + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value1}) + CREATE (:${randomType.name} {property: $value2}) + CREATE (:${randomType.name} {property: $unwantedValue}) + `, + { value1, value2, unwantedValue } + ); + + const query = ` + query($unwantedValue: [CustomListScalar!]!){ + ${randomType.plural}(where: { NOT: { property: {eq: $unwantedValue } }}) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query, { + variableValues: { unwantedValue }, + }); + + expect(gqlResult.errors).toBeUndefined(); + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(2); + expect((gqlResult.data as any)[randomType.plural]).toIncludeSameMembers([ + { + property: value1, + }, + { + property: value2, + }, + ]); + }); + test("Filter NOT CustomListScalar - expect no return values", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + scalar CustomListScalar + + type ${randomType.name} @node { + property: [CustomListScalar!] + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const value = [1, 2, 3]; + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value}) + `, + { value } + ); + + const query = ` + query($value: [CustomListScalar!]!){ + ${randomType.plural}(where: { NOT: { property: {eq: $value } } }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query, { + variableValues: { value }, + }); + + expect(gqlResult.errors).toBeUndefined(); + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(0); + }); + test("Filter INCLUDES CustomListScalar - expect return value", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + scalar CustomListScalar + + type ${randomType.name} @node { + property: [CustomListScalar!] + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const value = ["val1", "val2", "val3"]; + const unwantedValue = ["foo", "bar"]; + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value}) + CREATE (:${randomType.name} {property: $unwantedValue}) + `, + { value, unwantedValue } + ); + + const query = ` + { + ${randomType.plural}(where: { property: { includes: ${value[0]} } }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(1); + expect((gqlResult.data as any)[randomType.plural][0].property).toEqual(value); + }); + test("Filter INCLUDES CustomListScalar - expect array of return values", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + scalar CustomListScalar + + type ${randomType.name} @node { + property: [CustomListScalar!] + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const value1 = ["val1", "val2", "val3"]; + const value2 = [value1[0]]; + const unwantedValue = ["foo", "bar"]; + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value1}) + CREATE (:${randomType.name} {property: $value2}) + CREATE (:${randomType.name} {property: $unwantedValue}) + `, + { value1, value2, unwantedValue } + ); + + const query = ` + { + ${randomType.plural}(where: { property: {includes: ${value1[0]} } }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(2); + expect((gqlResult.data as any)[randomType.plural]).toIncludeSameMembers([ + { + property: value1, + }, + { + property: value2, + }, + ]); + }); + test("Filter INCLUDES CustomListScalar - expect no return values", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + scalar CustomListScalar + + type ${randomType.name} @node { + property: [CustomListScalar!] + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const value = ["val1", "val2", "val3"]; + const unknownValue = "foo"; + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {property: $value}) + `, + { value } + ); + + const query = ` + { + ${randomType.plural}(where: { property: {includes: ${unknownValue[0]} } }) { + property + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + expect((gqlResult.data as any)[randomType.plural]).toHaveLength(0); + }); + }); +}); diff --git a/packages/graphql/tests/integration/filtering/enum.int.test.ts b/packages/graphql/tests/integration/filtering/enum.int.test.ts new file mode 100644 index 0000000000..c14f7aa12e --- /dev/null +++ b/packages/graphql/tests/integration/filtering/enum.int.test.ts @@ -0,0 +1,89 @@ +/* + * 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("enum filtering", () => { + let Movie: UniqueType; + + const testHelper = new TestHelper(); + + beforeEach(async () => { + Movie = testHelper.createUniqueType("Movie"); + + const typeDefs = /* GraphQL */ ` + enum Genre { + THRILLER, + COMEDY + SCIFI + } + + type ${Movie} @node { + title: String! + genre: Genre! + } + `; + await testHelper.initNeo4jGraphQL({ + typeDefs, + }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("filter by eq", async () => { + await testHelper.executeCypher(`CREATE (:${Movie} {title: "The Matrix", genre: "SCIFI"}) + CREATE(:${Movie} {title: "Johnny English", genre: "COMEDY"})`); + + const query = /* GraphQL */ ` + query { + ${Movie.plural}(where: {genre: {eq: COMEDY}}) { + title + } + } + `; + + const result = await testHelper.executeGraphQL(query); + expect(result.errors).toBeUndefined(); + expect(result).toEqual({ + data: { [Movie.plural]: [{ title: "Johnny English" }] }, + }); + }); + + test("filter by not eq", async () => { + await testHelper.executeCypher(`CREATE (:${Movie} {title: "The Matrix", genre: "SCIFI"}) + CREATE(:${Movie} {title: "Johnny English", genre: "COMEDY"})`); + + const query = /* GraphQL */ ` + query { + ${Movie.plural}(where: {NOT: {genre: {eq: COMEDY}}}) { + title + } + } + `; + + const result = await testHelper.executeGraphQL(query); + expect(result.errors).toBeUndefined(); + expect(result).toEqual({ + data: { [Movie.plural]: [{ title: "The Matrix" }] }, + }); + }); +}); diff --git a/packages/graphql/tests/integration/filtering/typename-in-auth.int.test.ts b/packages/graphql/tests/integration/filtering/typename-in-auth.int.test.ts index 2f265ba8c2..c8672e7eb6 100644 --- a/packages/graphql/tests/integration/filtering/typename-in-auth.int.test.ts +++ b/packages/graphql/tests/integration/filtering/typename-in-auth.int.test.ts @@ -94,7 +94,7 @@ describe("typename_IN with auth", () => { operations: [READ] where: { node: { - actedInConnection_SOME: { node: { AND: [ { title_EQ: "The Matrix" }, {typename_IN: [${Movie.name}] }] } } + actedInConnection_SOME: { node: { AND: [ { title_EQ: "The Matrix" }, {typename: [${Movie.name}] }] } } } } } @@ -142,7 +142,7 @@ describe("typename_IN with auth", () => { operations: [READ] where: { node: { - actedInConnection_SOME: { node: { AND: [ { title_EQ: "The Matrix" }, {typename_IN: [${Series.name}] }] } } + actedInConnection_SOME: { node: { AND: [ { title_EQ: "The Matrix" }, {typename: [${Series.name}] }] } } } } } @@ -185,7 +185,7 @@ describe("typename_IN with auth", () => { operations: [READ] where: { node: { - actedInConnection_SOME: { node: { AND: [ { title_EQ: "The Matrix" }, {typename_IN: [${Movie.name}] }] } } + actedInConnection_SOME: { node: { AND: [ { title_EQ: "The Matrix" }, {typename: [${Movie.name}] }] } } } } } @@ -235,7 +235,7 @@ describe("typename_IN with auth", () => { operations: [READ] where: { node: { - actedInConnection_SOME: { node: { AND: [ { title_EQ: "The Matrix" }, {typename_IN: [${Series.name}] }] } } + actedInConnection_SOME: { node: { AND: [ { title_EQ: "The Matrix" }, {typename: [${Series.name}] }] } } } } } @@ -279,7 +279,7 @@ describe("typename_IN with auth", () => { operations: [READ] where: { node: { - actedInConnection_SOME: { node: { AND: [ { title_EQ: "The Matrix" }, {typename_IN: [${Series.name}] }] } } + actedInConnection_SOME: { node: { AND: [ { title_EQ: "The Matrix" }, {typename: [${Series.name}] }] } } } } } @@ -333,7 +333,7 @@ describe("typename_IN with auth", () => { { where: { node: { - actedInConnection_SOME: { node: { AND: [ { title_EQ: "The Matrix" }, {typename_IN: [${Movie.name}] }] } } + actedInConnection_SOME: { node: { AND: [ { title_EQ: "The Matrix" }, {typename: [${Movie.name}] }] } } } } } @@ -379,7 +379,7 @@ describe("typename_IN with auth", () => { { where: { node: { - actedInConnection_SOME: { node: { AND: [ { title_EQ: "The Matrix" }, {typename_IN: [${Series.name}] }] } } + actedInConnection_SOME: { node: { AND: [ { title_EQ: "The Matrix" }, {typename: [${Series.name}] }] } } } } } diff --git a/packages/graphql/tests/integration/filtering/typename-in.int.test.ts b/packages/graphql/tests/integration/filtering/typename-in.int.test.ts index 6f70d2b905..11ae33d414 100644 --- a/packages/graphql/tests/integration/filtering/typename-in.int.test.ts +++ b/packages/graphql/tests/integration/filtering/typename-in.int.test.ts @@ -88,7 +88,7 @@ describe("typename_IN", () => { test("top-level", async () => { const query = ` { - productions(where: { OR: [{ AND: [{ title_EQ: "The Matrix" }, { typename_IN: [${Movie.name}] }] }, { typename_IN: [${Series.name}] }]}) { + productions(where: { OR: [{ AND: [{ title_EQ: "The Matrix" }, { typename: [${Movie.name}] }] }, { typename: [${Series.name}] }]}) { __typename title } @@ -116,8 +116,8 @@ describe("typename_IN", () => { { ${Actor.plural} { actedIn(where: { OR: [ - { AND: [{ title_EQ: "The Matrix" }, { typename_IN: [${Movie.name}] }] } - { typename_IN: [${Series.name}] } + { AND: [{ title_EQ: "The Matrix" }, { typename: [${Movie.name}] }] } + { typename: [${Series.name}] } ] }) { __typename title @@ -149,7 +149,7 @@ describe("typename_IN", () => { test("aggregation", async () => { const query = ` { - productionsAggregate(where: { OR: [ { typename_IN: [${Movie.name}, ${Series.name}] } { typename_IN: [${Cartoon.name}] } ] }) { + productionsAggregate(where: { OR: [ { typename: [${Movie.name}, ${Series.name}] } { typename: [${Cartoon.name}] } ] }) { count } } @@ -168,7 +168,7 @@ describe("typename_IN", () => { const query = ` { ${Actor.plural} { - actedInAggregate(where: { NOT: { typename_IN: [${Movie.name}, ${Series.name}] } }) { + actedInAggregate(where: { NOT: { typename: [${Movie.name}, ${Series.name}] } }) { count } } diff --git a/packages/graphql/tests/integration/interfaces/interface-filtering.int.test.ts b/packages/graphql/tests/integration/interfaces/interface-filtering.int.test.ts index 3191acd5cc..37cba9adc1 100644 --- a/packages/graphql/tests/integration/interfaces/interface-filtering.int.test.ts +++ b/packages/graphql/tests/integration/interfaces/interface-filtering.int.test.ts @@ -31,7 +31,7 @@ describe("Interface filtering", () => { const Actor = testHelper.createUniqueType("Actor"); beforeAll(async () => { - typeDefs = ` + typeDefs = /* GraphQL */ ` interface Show { title: String! actors: [${Actor}!]! @declareRelationship @@ -90,9 +90,9 @@ describe("Interface filtering", () => { }); test("allow for logical filters on top-level interfaces", async () => { - const query = ` + const query = /* GraphQL */ ` query actedInWhere { - shows(where: { OR: [{ title_EQ: "The Office" }, { title_EQ: "The Office 2" }] }) { + shows(where: { OR: [{ title: { eq: "The Office" } }, { title: { eq: "The Office 2" } }] }) { title } } @@ -117,10 +117,10 @@ describe("Interface filtering", () => { }); test("allow for logical filters on nested-level interfaces", async () => { - const query = ` + const query = /* GraphQL */ ` query actedInWhere { ${Actor.plural} { - actedIn(where: { OR: [{ title_EQ: "The Office" }, { title_EQ: "The Office 2" }] }) { + actedIn(where: { OR: [{ title: {eq: "The Office"} }, { title: { eq: "The Office 2"} }] }) { title } } diff --git a/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/interface-filters.int.test.ts b/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/interface-filters.int.test.ts index a432eacb87..823fbbb9b6 100644 --- a/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/interface-filters.int.test.ts +++ b/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/interface-filters.int.test.ts @@ -248,7 +248,7 @@ describe("interface filters of declared relationships", () => { test("should filter using connection filters + typename_IN + logical", async () => { const query = /* GraphQL */ ` query production { - productions(where: { OR: [{ typename_IN: [${Series}] }, {actorsConnection_SOME: { node: { name_EQ: "${actorName2}" } }}] }) { + productions(where: { OR: [{ typename: [${Series}] }, {actorsConnection_SOME: { node: { name_EQ: "${actorName2}" } }}] }) { title actorsConnection { edges { @@ -718,7 +718,7 @@ describe("interface filters of declared interface relationships", () => { test("should filter using connection filters + typename_IN + logical", async () => { const query = /* GraphQL */ ` query production { - productions(where: { OR: [{ typename_IN: [${Series}] }, {actorsConnection_SOME: { node: { name_EQ: "${actorName2}" } }}] }) { + productions(where: { OR: [{ typename: [${Series}] }, {actorsConnection_SOME: { node: { name_EQ: "${actorName2}" } }}] }) { title actorsConnection { edges { diff --git a/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/interface-simple.int.test.ts b/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/interface-simple.int.test.ts index c33f799bf3..7574474f7f 100644 --- a/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/interface-simple.int.test.ts +++ b/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/interface-simple.int.test.ts @@ -1333,7 +1333,7 @@ describe("interface with declared relationships", () => { ] ); }); - + // FLAKY_TEST // update -> connect -> edge test("update interface relationship, connect edge", async () => { const actorName = "actor1"; @@ -1853,7 +1853,7 @@ describe("interface with declared relationships", () => { actedIn: { connect: { edge: { screenTime: 10 } - where: { node: { title_EQ: "${movieTitle}", typename_IN: [${Movie.name}] } } + where: { node: { title_EQ: "${movieTitle}", typename: [${Movie.name}] } } } } } diff --git a/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/type-narrowing-nested.int.test.ts b/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/type-narrowing-nested.int.test.ts index dd7af989e5..74216d65f2 100644 --- a/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/type-narrowing-nested.int.test.ts +++ b/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/type-narrowing-nested.int.test.ts @@ -438,7 +438,7 @@ describe("type narrowing nested connections", () => { query UntrainedPeople { ${UntrainedPerson.plural} { name - actedInConnection(where: { edge: { AppearsIn: { sceneNr_EQ: 0 } } }) { + actedInConnection(where: { edge: { AppearsIn: { sceneNr: { eq: 0 } } } }) { edges { node { title @@ -528,7 +528,7 @@ describe("type narrowing nested connections", () => { query UntrainedPeople { ${UntrainedPerson.plural} { name - actedInConnection(where: { edge: { AppearsIn: { sceneNr_EQ: ${sceneNr} }, ActedIn: {screenTime_EQ: ${movieScreenTime}} } }) { + actedInConnection(where: { edge: { AppearsIn: { sceneNr:{ eq: ${sceneNr}} }, ActedIn: {screenTime: { eq: ${movieScreenTime} }} } }) { edges { node { title diff --git a/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/type-narrowing.int.test.ts b/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/type-narrowing.int.test.ts index 160dc28d23..29d8df5a8e 100644 --- a/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/type-narrowing.int.test.ts +++ b/packages/graphql/tests/integration/interfaces/relationships/declare-relationship/type-narrowing.int.test.ts @@ -569,7 +569,7 @@ describe("type narrowing - simple case", () => { const query = /* GraphQL */ ` query People { - people(where: { actedInConnection_SOME: { edge: { ActedIn: { screenTime_EQ: ${movieScreenTime} }, AppearsIn: { sceneNr_EQ: ${sceneNr} } } } }) { + people(where: { actedInConnection_SOME: { edge: { ActedIn: { screenTime: {eq: ${movieScreenTime} } }, AppearsIn: { sceneNr: { eq: ${sceneNr} } } } } }) { name actedInConnection { edges { @@ -688,7 +688,7 @@ describe("type narrowing - simple case", () => { const query = /* GraphQL */ ` query People { - people(where: { actedInConnection_SOME: { node: { OR: [ { title_EQ: "${movieTitle}" }, { title_EQ: "${amatureProductionTitle}" }] } } }) { + people(where: { actedInConnection_SOME: { node: { OR: [ { title: { eq: "${movieTitle}" } }, { title: { eq: "${amatureProductionTitle}" }}] } } }) { name actedInConnection { edges { @@ -811,7 +811,7 @@ describe("type narrowing - simple case", () => { edges { node { title - actorsConnection(where: { edge: { ActedIn: {screenTime_EQ: ${movieScreenTime2}}, AppearsIn: {} } }) { + actorsConnection(where: { edge: { ActedIn: {screenTime: { eq: ${movieScreenTime2}} }, AppearsIn: {} } }) { edges { node { name @@ -971,7 +971,7 @@ describe("type narrowing - simple case", () => { edges { node { title - actorsConnection(where: { edge: { AppearsIn: { NOT: { sceneNr_EQ: ${sceneNr} } } } }) { + actorsConnection(where: { edge: { AppearsIn: { NOT: { sceneNr: { eq: ${sceneNr}} } } } }) { edges { node { name @@ -1131,7 +1131,7 @@ describe("type narrowing - simple case", () => { edges { node { title - actorsConnection(where: { edge: { ActedIn: { NOT: { screenTime_EQ: ${movieScreenTime} } }, AppearsIn: { NOT: { sceneNr_EQ: ${sceneNr} } } } }) { + actorsConnection(where: { edge: { ActedIn: { NOT: { screenTime: { eq: ${movieScreenTime}} } }, AppearsIn: { NOT: { sceneNr: { eq: ${sceneNr} } } } } }) { edges { node { name @@ -1277,7 +1277,7 @@ describe("type narrowing - simple case", () => { query Actors { ${Actor.plural} { name - actedInConnection(where: { edge: { ActedIn: { screenTime_EQ: ${movieScreenTime} } } }) { + actedInConnection(where: { edge: { ActedIn: { screenTime: { eq: ${movieScreenTime}} } } }) { edges { node { title @@ -1371,7 +1371,7 @@ describe("type narrowing - simple case", () => { query Actors { ${Actor.plural} { name - actedInConnection(where: { edge: { AppearsIn: { sceneNr_EQ: 0 } } }) { + actedInConnection(where: { edge: { AppearsIn: { sceneNr:{ eq: 0 }} } }) { edges { node { title diff --git a/packages/graphql/tests/integration/issues/4583.int.test.ts b/packages/graphql/tests/integration/issues/4583.int.test.ts index eac0e3429e..1ea2903c8b 100644 --- a/packages/graphql/tests/integration/issues/4583.int.test.ts +++ b/packages/graphql/tests/integration/issues/4583.int.test.ts @@ -147,7 +147,7 @@ describe("https://github.com/neo4j/graphql/issues/4583", () => { actedIn: { connect: { edge: { screenTime: 10 } - where: { node: { title_EQ: "${movieTitle}", typename_IN: [${Movie.name}] } } + where: { node: { title_EQ: "${movieTitle}", typename: [${Movie.name}] } } } } } @@ -198,7 +198,7 @@ describe("https://github.com/neo4j/graphql/issues/4583", () => { connect: { actedIn: { edge: { screenTime: 25 } - where: { node: { title_EQ: "${sameTitle}", typename_IN: [${Movie.name}]} } + where: { node: { title_EQ: "${sameTitle}", typename: [${Movie.name}]} } } } } @@ -261,8 +261,8 @@ describe("https://github.com/neo4j/graphql/issues/4583", () => { connect: { edge: { screenTime: 10 } where: { node: { OR: [ - { title_EQ: "${movieTitle}", typename_IN: [${Movie.name}]}, - { AND: [ {typename_IN: [${Series.name}]}, { NOT: { title_EQ: "${sameTitle}"} }] } + { title_EQ: "${movieTitle}", typename: [${Movie.name}]}, + { AND: [ {typename: [${Series.name}]}, { NOT: { title_EQ: "${sameTitle}"} }] } ] } } } } 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/integration/math.int.test.ts b/packages/graphql/tests/integration/math.int.test.ts index cd3f5a280a..70df9ee16c 100644 --- a/packages/graphql/tests/integration/math.int.test.ts +++ b/packages/graphql/tests/integration/math.int.test.ts @@ -32,16 +32,16 @@ describe("Mathematical operations tests", () => { }); test.each([ - { initialValue: int(0), value: 5, type: "Int", operation: "INCREMENT", expected: 5 }, - { initialValue: int(10), value: 5, type: "Int", operation: "DECREMENT", expected: 5 }, - { initialValue: int(0), value: "5", type: "BigInt", operation: "INCREMENT", expected: "5" }, - { initialValue: int(10), value: "5", type: "BigInt", operation: "DECREMENT", expected: "5" }, - { initialValue: int(10), value: "-5", type: "BigInt", operation: "DECREMENT", expected: "15" }, - { initialValue: 0.0, value: 5.0, type: "Float", operation: "ADD", expected: 5.0 }, - { initialValue: 10.0, value: 5.0, type: "Float", operation: "SUBTRACT", expected: 5.0 }, - { initialValue: 10.0, value: 5.0, type: "Float", operation: "MULTIPLY", expected: 50.0 }, - { initialValue: 10.0, value: -5.0, type: "Float", operation: "MULTIPLY", expected: -50.0 }, - { initialValue: 10.0, value: 5.0, type: "Float", operation: "DIVIDE", expected: 2.0 }, + { initialValue: int(0), value: 5, type: "Int", operation: "add", expected: 5 }, + { initialValue: int(10), value: 5, type: "Int", operation: "subtract", expected: 5 }, + { initialValue: int(0), value: "5", type: "BigInt", operation: "add", expected: "5" }, + { initialValue: int(10), value: "5", type: "BigInt", operation: "subtract", expected: "5" }, + { initialValue: int(10), value: "-5", type: "BigInt", operation: "subtract", expected: "15" }, + { initialValue: 0.0, value: 5.0, type: "Float", operation: "add", expected: 5.0 }, + { initialValue: 10.0, value: 5.0, type: "Float", operation: "subtract", expected: 5.0 }, + { initialValue: 10.0, value: 5.0, type: "Float", operation: "multiply", expected: 50.0 }, + { initialValue: 10.0, value: -5.0, type: "Float", operation: "multiply", expected: -50.0 }, + { initialValue: 10.0, value: 5.0, type: "Float", operation: "divide", expected: 2.0 }, ])( "Simple operations on numerical fields: on $type, $operation($initialValue, $value) should return $expected", async ({ initialValue, type, value, operation, expected }) => { @@ -62,7 +62,7 @@ describe("Mathematical operations tests", () => { const query = /* GraphQL */ ` mutation($id: ID, $value: ${type}) { - ${movie.operations.update}(where: { id_EQ: $id }, update: {viewers_${operation}: $value}) { + ${movie.operations.update}(where: { id_EQ: $id }, update: {viewers: { ${operation}: $value }}) { ${movie.plural} { id viewers @@ -98,24 +98,24 @@ describe("Mathematical operations tests", () => { initialValue: int(largestSafeSigned32BitInteger), value: largestSafeSigned32BitInteger, type: "Int", - operation: "INCREMENT", + operation: "add", expectedError: "overflow", }, { initialValue: int(largestSafeSigned64BitBigInt), value: largestSafeSigned64BitBigInt, type: "BigInt", - operation: "INCREMENT", + operation: "add", expectedError: "overflow", }, { initialValue: Number.MAX_VALUE, value: Number.MAX_VALUE, type: "Float", - operation: "ADD", + operation: "add", expectedError: "overflow", }, - { initialValue: 10.0, value: 0.0, type: "Float", operation: "DIVIDE", expectedError: "division by zero" }, + { initialValue: 10.0, value: 0.0, type: "Float", operation: "divide", expectedError: "division by zero" }, ])( "Should raise an error in case of $expectedError on $type, initialValue: $initialValue, value: $value", async ({ initialValue, type, value, operation, expectedError }) => { @@ -135,7 +135,7 @@ describe("Mathematical operations tests", () => { const query = /* GraphQL */ ` mutation($id: ID, $value: ${type}) { - ${movie.operations.update}(where: { id_EQ: $id }, update: {viewers_${operation}: $value}) { + ${movie.operations.update}(where: { id_EQ: $id }, update: {viewers: {${operation}: $value }}) { ${movie.plural} { id viewers @@ -321,7 +321,7 @@ describe("Mathematical operations tests", () => { { update: { node: { - viewers_INCREMENT: $value + viewers: {add: $value} } } } @@ -403,7 +403,7 @@ describe("Mathematical operations tests", () => { { update: { node: { - viewers_INCREMENT: $value + viewers: {add: $value } } } } @@ -542,7 +542,7 @@ describe("Mathematical operations tests", () => { { update: { edge: { - pay_ADD: $payIncrement + pay: {add: $payIncrement} } } } @@ -628,8 +628,7 @@ describe("Mathematical operations tests", () => { { update: { edge: { - pay_ADD: $payIncrement - pay_SET: $payIncrement + pay: {add: $payIncrement, set: $payIncrement} } } } @@ -669,10 +668,10 @@ describe("Mathematical operations tests", () => { }); expect(gqlResult.errors).toBeDefined(); - + const relationshipType = `${movie.name}ActorsRelationship`; expect(gqlResult.errors).toEqual([ - new GraphQLError(`Conflicting modification of [[pay_SET]], [[pay_ADD]] on type ${relationshipType}`), + new GraphQLError(`Conflicting modification of field pay: [[set]], [[add]] on type ${relationshipType}`), ]); const storedValue = await testHelper.executeCypher( ` diff --git a/packages/graphql/tests/integration/types/bigint.int.test.ts b/packages/graphql/tests/integration/types/bigint.int.test.ts index 159c5a9ab4..b7d63b661e 100644 --- a/packages/graphql/tests/integration/types/bigint.int.test.ts +++ b/packages/graphql/tests/integration/types/bigint.int.test.ts @@ -185,7 +185,7 @@ describe("BigInt", () => { const query = ` query { - ${File.plural}(where: { name_EQ: "${name}" }) { + ${File.plural}(where: { name: {eq: "${name}" } }) { name size } diff --git a/packages/graphql/tests/integration/types/date.int.test.ts b/packages/graphql/tests/integration/types/date.int.test.ts index dfa44ca55a..cd4d3b541a 100644 --- a/packages/graphql/tests/integration/types/date.int.test.ts +++ b/packages/graphql/tests/integration/types/date.int.test.ts @@ -143,7 +143,7 @@ describe("Date", () => { const query = /* GraphQL */ ` query { - ${Movie.plural}(where: { date_EQ: "${date.toISOString()}" }) { + ${Movie.plural}(where: { date: { eq: "${date.toISOString()}" }}) { date } } @@ -189,7 +189,7 @@ describe("Date", () => { mutation { ${ Movie.operations.update - }(where: { id_EQ: "${id}"}, update: { date_SET: "${date.toISOString()}" }) { + }(where: { id_EQ: "${id}"}, update: { date: {set: "${date.toISOString()}" } }) { ${Movie.plural} { id date diff --git a/packages/graphql/tests/integration/types/datetime.int.test.ts b/packages/graphql/tests/integration/types/datetime.int.test.ts index 9d043fa5e8..b27554b3b5 100644 --- a/packages/graphql/tests/integration/types/datetime.int.test.ts +++ b/packages/graphql/tests/integration/types/datetime.int.test.ts @@ -143,7 +143,7 @@ describe("DateTime", () => { const query = ` query { - ${Movie.plural}(where: { datetime_EQ: "${date.toISOString()}" }) { + ${Movie.plural}(where: { datetime: {eq: "${date.toISOString()}" } }) { datetime } } @@ -179,7 +179,7 @@ describe("DateTime", () => { const query = /* GraphQL */ ` query { - ${Movie.plural}(where: { name_EQ: "${Movie.name}" }) { + ${Movie.plural}(where: { name: {eq: "${Movie.name}" }}) { datetime } } diff --git a/packages/graphql/tests/integration/types/duration.int.test.ts b/packages/graphql/tests/integration/types/duration.int.test.ts index c386887771..f395fad802 100644 --- a/packages/graphql/tests/integration/types/duration.int.test.ts +++ b/packages/graphql/tests/integration/types/duration.int.test.ts @@ -189,7 +189,7 @@ describe("Duration", () => { const mutation = /* GraphQL */ ` mutation ($id: ID!, $duration: Duration) { - ${Movie.operations.update}(where: { id_EQ: $id }, update: { duration_SET: $duration }) { + ${Movie.operations.update}(where: { id_EQ: $id }, update: { duration: { set: $duration } }) { ${Movie.plural} { id duration @@ -255,7 +255,7 @@ describe("Duration", () => { const query = /* GraphQL */ ` query ($id: ID!, $duration: Duration!) { - ${Movie.plural}(where: { id_EQ: $id, duration_EQ: $duration }) { + ${Movie.plural}(where: { id: {eq: $id }, duration: { eq: $duration } }) { id duration } @@ -274,7 +274,7 @@ describe("Duration", () => { expect(parseDuration(graphqlMovie.duration)).toStrictEqual(parsedDuration); }); - test.each(["LT", "LTE", "GT", "GTE"])( + test.each(["lt", "lte", "gt", "gte"])( "should filter based on duration comparison, for filter: %s", async (filter) => { const typeDefs = ` @@ -342,7 +342,7 @@ describe("Duration", () => { const graphqlResult = await testHelper.executeGraphQL(query, { variableValues: { - where: { id_IN: [longId, mediumId, shortId], [`duration_${filter}`]: medium }, + where: { id: { in: [longId, mediumId, shortId] }, duration: { [filter]: medium } }, }, }); diff --git a/packages/graphql/tests/integration/types/float.int.test.ts b/packages/graphql/tests/integration/types/float.int.test.ts index 51781d7b80..3a75989360 100644 --- a/packages/graphql/tests/integration/types/float.int.test.ts +++ b/packages/graphql/tests/integration/types/float.int.test.ts @@ -225,7 +225,7 @@ describe("Float", () => { const query = /* GraphQL */ ` query { - ${Movie.plural}(where: { id_EQ: "${id}" }){ + ${Movie.plural}(where: { id: { eq: "${id}" } }){ fakeFloat } } diff --git a/packages/graphql/tests/integration/types/localdatetime.int.test.ts b/packages/graphql/tests/integration/types/localdatetime.int.test.ts index ac408a71a3..d02876f9a6 100644 --- a/packages/graphql/tests/integration/types/localdatetime.int.test.ts +++ b/packages/graphql/tests/integration/types/localdatetime.int.test.ts @@ -224,7 +224,7 @@ describe("LocalDateTime", () => { const query = /* GraphQL */ ` query ($localDT: LocalDateTime!) { - ${Movie.plural}(where: { localDT_EQ: $localDT }) { + ${Movie.plural}(where: { localDT: { eq: $localDT } }) { id localDT } @@ -242,7 +242,7 @@ describe("LocalDateTime", () => { expect(graphqlMovie.id).toEqual(id); expect(parseLocalDateTime(graphqlMovie.localDT)).toStrictEqual(parsedLocalDateTime); }); - test.each(["LT", "LTE", "GT", "GTE"])( + test.each(["lt", "lte", "gt", "gte"])( "should filter based on localDT comparison, for filter %s", async (filter) => { const futureId = generate({ readable: false }); @@ -311,7 +311,7 @@ describe("LocalDateTime", () => { const graphqlResult = await testHelper.executeGraphQL(query, { variableValues: { - where: { id_IN: [futureId, presentId, pastId], [`localDT_${filter}`]: present }, + where: { id: { in: [futureId, presentId, pastId] }, localDT: { [filter]: present } }, }, }); @@ -321,13 +321,13 @@ describe("LocalDateTime", () => { expect(graphqlMovies).toBeDefined(); /* eslint-disable jest/no-conditional-expect */ - if (filter === "LT") { + if (filter === "lt") { expect(graphqlMovies).toHaveLength(1); expect(graphqlMovies[0]?.id).toBe(pastId); expect(parseLocalDateTime(graphqlMovies[0]?.localDT)).toStrictEqual(parsedPast); } - if (filter === "LTE") { + if (filter === "lte") { expect(graphqlMovies).toHaveLength(2); expect(graphqlMovies[0]?.id).toBe(pastId); expect(parseLocalDateTime(graphqlMovies[0]?.localDT)).toStrictEqual(parsedPast); @@ -336,13 +336,13 @@ describe("LocalDateTime", () => { expect(parseLocalDateTime(graphqlMovies[1]?.localDT)).toStrictEqual(parsedPresent); } - if (filter === "GT") { + if (filter === "gt") { expect(graphqlMovies).toHaveLength(1); expect(graphqlMovies[0]?.id).toBe(futureId); expect(parseLocalDateTime(graphqlMovies[0]?.localDT)).toStrictEqual(parsedFuture); } - if (filter === "GTE") { + if (filter === "gte") { expect(graphqlMovies).toHaveLength(2); expect(graphqlMovies[0]?.id).toBe(presentId); expect(parseLocalDateTime(graphqlMovies[0]?.localDT)).toStrictEqual(parsedPresent); diff --git a/packages/graphql/tests/integration/types/localtime.int.test.ts b/packages/graphql/tests/integration/types/localtime.int.test.ts index b89a58f17f..badbaa36e7 100644 --- a/packages/graphql/tests/integration/types/localtime.int.test.ts +++ b/packages/graphql/tests/integration/types/localtime.int.test.ts @@ -166,7 +166,7 @@ describe("LocalTime", () => { const mutation = /* GraphQL */ ` mutation ($id: ID!, $time: LocalTime) { - ${Movie.operations.update}(where: { id_EQ: $id }, update: { time_SET: $time }) { + ${Movie.operations.update}(where: { id_EQ: $id }, update: { time: {set: $time} }) { ${Movie.plural} { id time @@ -222,7 +222,7 @@ describe("LocalTime", () => { const query = /* GraphQL */ ` query ($time: LocalTime!) { - ${Movie.plural}(where: { time_EQ: $time }) { + ${Movie.plural}(where: { time: { eq: $time } }) { id time } @@ -240,7 +240,7 @@ describe("LocalTime", () => { expect(graphqlMovie.id).toEqual(id); expect(parseLocalTime(graphqlMovie.time)).toStrictEqual(parsedTime); }); - test.each(["LT", "LTE", "GT", "GTE"])( + test.each(["lt", "lte", "gt", "gte"])( "should filter based on time comparison, for filter %s", async (filter) => { const futureId = generate({ readable: false }); @@ -300,7 +300,7 @@ describe("LocalTime", () => { const graphqlResult = await testHelper.executeGraphQL(query, { variableValues: { - where: { id_IN: [futureId, presentId, pastId], [`time_${filter}`]: present }, + where: { id: { in: [futureId, presentId, pastId] }, time: { [filter]: present } }, }, }); @@ -310,13 +310,13 @@ describe("LocalTime", () => { expect(graphqlMovies).toBeDefined(); /* eslint-disable jest/no-conditional-expect */ - if (filter === "LT") { + if (filter === "lt") { expect(graphqlMovies).toHaveLength(1); expect(graphqlMovies[0]?.id).toBe(pastId); expect(parseLocalTime(graphqlMovies[0]?.time)).toStrictEqual(parsedPast); } - if (filter === "LTE") { + if (filter === "lte") { expect(graphqlMovies).toHaveLength(2); expect(graphqlMovies[0]?.id).toBe(pastId); expect(parseLocalTime(graphqlMovies[0]?.time)).toStrictEqual(parsedPast); @@ -325,13 +325,13 @@ describe("LocalTime", () => { expect(parseLocalTime(graphqlMovies[1]?.time)).toStrictEqual(parsedPresent); } - if (filter === "GT") { + if (filter === "gt") { expect(graphqlMovies).toHaveLength(1); expect(graphqlMovies[0]?.id).toBe(futureId); expect(parseLocalTime(graphqlMovies[0]?.time)).toStrictEqual(parsedFuture); } - if (filter === "GTE") { + if (filter === "gte") { expect(graphqlMovies).toHaveLength(2); expect(graphqlMovies[0]?.id).toBe(presentId); expect(parseLocalTime(graphqlMovies[0]?.time)).toStrictEqual(parsedPresent); diff --git a/packages/graphql/tests/integration/types/point-cartesian.int.test.ts b/packages/graphql/tests/integration/types/point-cartesian.int.test.ts index 5814de30ba..fb1813d30b 100644 --- a/packages/graphql/tests/integration/types/point-cartesian.int.test.ts +++ b/packages/graphql/tests/integration/types/point-cartesian.int.test.ts @@ -155,7 +155,7 @@ describe("CartesianPoint", () => { const update = /* GraphQL */ ` mutation UpdateParts($serial: String!, $x: Float!, $y: Float!) { - ${Part.operations.update}(where: { serial_EQ: $serial }, update: { location_SET: { x: $x, y: $y } }) { + ${Part.operations.update}(where: { serial: {eq: $serial } }, update: { location_SET: { x: $x, y: $y } }) { ${Part.plural} { serial location { @@ -218,7 +218,7 @@ describe("CartesianPoint", () => { const update = /* GraphQL */ ` mutation UpdateParts($serial: String!, $x: Float!, $y: Float!, $z: Float!) { - ${Part.operations.update}(where: { serial_EQ: $serial }, update: { location_SET: { x: $x, y: $y, z: $z } }) { + ${Part.operations.update}(where: { serial: { eq: $serial } }, update: { location_SET: { x: $x, y: $y, z: $z } }) { ${Part.plural} { serial location { @@ -279,7 +279,7 @@ describe("CartesianPoint", () => { const partsQuery = /* GraphQL */ ` query Parts($serial: String!) { - ${Part.plural}(where: { serial_EQ: $serial }) { + ${Part.plural}(where: { serial: {eq: $serial} }) { serial location { x @@ -330,7 +330,7 @@ describe("CartesianPoint", () => { const partsQuery = /* GraphQL */ ` query Parts($serial: String!) { - ${Part.plural}(where: { serial_EQ: $serial }) { + ${Part.plural}(where: { serial: {eq: $serial } }) { serial location { x diff --git a/packages/graphql/tests/integration/types/point.int.test.ts b/packages/graphql/tests/integration/types/point.int.test.ts index 16dec61048..f085db42f9 100644 --- a/packages/graphql/tests/integration/types/point.int.test.ts +++ b/packages/graphql/tests/integration/types/point.int.test.ts @@ -194,7 +194,7 @@ describe("Point", () => { mutation UpdatePhotographs($id: String!, $longitude: Float!, $latitude: Float!) { ${Photograph.operations.update}( where: { id_EQ: $id } - update: { location_SET: { longitude: $longitude, latitude: $latitude } } + update: { location: { set: { longitude: $longitude, latitude: $latitude } } } ) { ${Photograph.plural} { id @@ -263,7 +263,7 @@ describe("Point", () => { mutation UpdatePhotographs($id: String!, $longitude: Float!, $latitude: Float!, $height: Float!) { ${Photograph.operations.update}( where: { id_EQ: $id } - update: { location_SET: { longitude: $longitude, latitude: $latitude, height: $height } } + update: { location: { set: { longitude: $longitude, latitude: $latitude, height: $height } } } ) { ${Photograph.plural} { id @@ -331,7 +331,7 @@ describe("Point", () => { // Test equality const photographsEqualsQuery = /* GraphQL */ ` query Photographs($longitude: Float!, $latitude: Float!) { - ${Photograph.plural}(where: { location_EQ: { longitude: $longitude, latitude: $latitude } }) { + ${Photograph.plural}(where: { location: { eq: { longitude: $longitude, latitude: $latitude } } }) { id size location { @@ -363,7 +363,7 @@ describe("Point", () => { // Test IN functionality const photographsInQuery = /* GraphQL */ ` query Photographs($locations: [PointInput!]) { - ${Photograph.plural}(where: { location_IN: $locations }) { + ${Photograph.plural}(where: { location: {in: $locations } }) { id size location { @@ -404,7 +404,7 @@ describe("Point", () => { const photographsLessThanQuery = /* GraphQL */ ` query Photographs($longitude: Float!, $latitude: Float!) { ${Photograph.plural}( - where: { location_LT: { point: { longitude: $longitude, latitude: $latitude }, distance: 1000000 } } + where: { location: { distance: { from: { longitude: $longitude, latitude: $latitude }, lt: 1000000 } } } ) { id size @@ -438,7 +438,7 @@ describe("Point", () => { const photographsGreaterThanQuery = /* GraphQL */ ` query Photographs($longitude: Float!, $latitude: Float!) { ${Photograph.plural}( - where: { location_GT: { point: { longitude: $longitude, latitude: $latitude }, distance: 1 } } + where: { location: { distance: { from: { longitude: $longitude, latitude: $latitude }, gt: 1 } } } ) { id size @@ -494,7 +494,7 @@ describe("Point", () => { const photographsQuery = /* GraphQL */ ` query Photographs($longitude: Float!, $latitude: Float!, $height: Float) { - ${Photograph.plural}(where: { location_EQ: { longitude: $longitude, latitude: $latitude, height: $height } }) { + ${Photograph.plural}(where: { location: { eq: { longitude: $longitude, latitude: $latitude, height: $height } } }) { id size location { diff --git a/packages/graphql/tests/integration/types/points-cartesian.int.test.ts b/packages/graphql/tests/integration/types/points-cartesian.int.test.ts index b33157d50c..33dafc4b1e 100644 --- a/packages/graphql/tests/integration/types/points-cartesian.int.test.ts +++ b/packages/graphql/tests/integration/types/points-cartesian.int.test.ts @@ -264,7 +264,7 @@ describe("[CartesianPoint]", () => { const update = /* GraphQL */ ` mutation UpdateParts($id: String!, $locations: [CartesianPointInput!]) { - ${Part.operations.update}(where: { id_EQ: $id }, update: { locations_SET: $locations }) { + ${Part.operations.update}(where: { id: { eq: $id } }, update: { locations_SET: $locations }) { ${Part.plural} { id locations { @@ -328,7 +328,7 @@ describe("[CartesianPoint]", () => { const partsQuery = /* GraphQL */ ` query Parts($id: String!) { - ${Part.plural}(where: { id_EQ: $id }) { + ${Part.plural}(where: { id: { eq: $id } }) { id locations { y @@ -373,7 +373,7 @@ describe("[CartesianPoint]", () => { const partsQuery = /* GraphQL */ ` query Parts($id: String!) { - ${Part.plural}(where: { id_EQ: $id }) { + ${Part.plural}(where: { id: { eq: $id } }) { id locations { y diff --git a/packages/graphql/tests/integration/types/points.int.test.ts b/packages/graphql/tests/integration/types/points.int.test.ts index b95d1502ae..2705afca94 100644 --- a/packages/graphql/tests/integration/types/points.int.test.ts +++ b/packages/graphql/tests/integration/types/points.int.test.ts @@ -334,7 +334,7 @@ describe("[Point]", () => { // Test for equality const routesQuery = /* GraphQL */ ` query Routes($waypoints: [PointInput!]) { - ${Route.plural}(where: { waypoints_EQ: $waypoints }) { + ${Route.plural}(where: { waypoints: { eq: $waypoints } }) { id waypoints { latitude @@ -357,7 +357,7 @@ describe("[Point]", () => { // Test INCLUDES functionality const routesIncludesQuery = /* GraphQL */ ` query RoutesIncludes($waypoint: PointInput) { - ${Route.plural}(where: { waypoints_INCLUDES: $waypoint }) { + ${Route.plural}(where: { waypoints: {includes: $waypoint } }) { id waypoints { latitude @@ -404,7 +404,7 @@ describe("[Point]", () => { const routesQuery = /* GraphQL */ ` query Routes($id: String!) { - ${Route.plural}(where: { id_EQ: $id }) { + ${Route.plural}(where: { id: { eq: $id } }) { id waypoints { latitude diff --git a/packages/graphql/tests/integration/types/time.int.test.ts b/packages/graphql/tests/integration/types/time.int.test.ts index c7bf472332..998c29f7ee 100644 --- a/packages/graphql/tests/integration/types/time.int.test.ts +++ b/packages/graphql/tests/integration/types/time.int.test.ts @@ -242,7 +242,7 @@ describe("Time", () => { const query = /* GraphQL */ ` query ($time: Time!) { - ${Movie.plural}(where: { time_EQ: $time }) { + ${Movie.plural}(where: { time: { eq: $time } }) { id time } @@ -259,7 +259,7 @@ describe("Time", () => { expect(parseTime(graphqlMovie.time)).toStrictEqual(parsedTime); }); - test.each(["LT", "LTE", "GT", "GTE"])( + test.each(["lt", "lte", "gt", "gte"])( "should filter based on time comparison for filter: %s", async (filter) => { const typeDefs = /* GraphQL */ ` @@ -334,7 +334,7 @@ describe("Time", () => { const graphqlResult = await testHelper.executeGraphQL(query, { variableValues: { - where: { id_IN: [futureId, presentId, pastId], [`time_${filter}`]: present }, + where: { id: { in: [futureId, presentId, pastId] }, time: { [filter]: present } }, }, }); @@ -344,13 +344,13 @@ describe("Time", () => { expect(graphqlMovies).toBeDefined(); /* eslint-disable jest/no-conditional-expect */ - if (filter === "LT") { + if (filter === "lt") { expect(graphqlMovies).toHaveLength(1); expect(graphqlMovies[0]?.id).toBe(pastId); expect(parseTime(graphqlMovies[0]?.time)).toStrictEqual(parsedPast); } - if (filter === "LTE") { + if (filter === "lte") { expect(graphqlMovies).toHaveLength(2); expect(graphqlMovies[0]?.id).toBe(pastId); expect(parseTime(graphqlMovies[0]?.time)).toStrictEqual(parsedPast); @@ -359,13 +359,13 @@ describe("Time", () => { expect(parseTime(graphqlMovies[1]?.time)).toStrictEqual(parsedPresent); } - if (filter === "GT") { + if (filter === "gt") { expect(graphqlMovies).toHaveLength(1); expect(graphqlMovies[0]?.id).toBe(futureId); expect(parseTime(graphqlMovies[0]?.time)).toStrictEqual(parsedFuture); } - if (filter === "GTE") { + if (filter === "gte") { expect(graphqlMovies).toHaveLength(2); expect(graphqlMovies[0]?.id).toBe(presentId); expect(parseTime(graphqlMovies[0]?.time)).toStrictEqual(parsedPresent); diff --git a/packages/graphql/tests/integration/update.int.test.ts b/packages/graphql/tests/integration/update.int.test.ts index 9ed464be8a..60c0aa131c 100644 --- a/packages/graphql/tests/integration/update.int.test.ts +++ b/packages/graphql/tests/integration/update.int.test.ts @@ -21,7 +21,7 @@ import { generate } from "randomstring"; import type { UniqueType } from "../utils/graphql-types"; import { TestHelper } from "../utils/tests-helper"; -describe("update (deprecate implicit _SET)", () => { +describe("update", () => { const testHelper = new TestHelper(); let Movie: UniqueType; let Actor: UniqueType; @@ -65,7 +65,7 @@ describe("update (deprecate implicit _SET)", () => { const query = /* GraphQL */ ` mutation($id: ID, $name: String) { - ${Movie.operations.update}(where: { id_EQ: $id }, update: { name_SET: $name }) { + ${Movie.operations.update}(where: { id: {eq: $id } }, update: { name: { set: $name }}) { ${Movie.plural} { id name @@ -107,7 +107,7 @@ describe("update (deprecate implicit _SET)", () => { const query = /* GraphQL */ ` mutation($id: ID, $name: String) { - ${Movie.operations.update}(where: { id_EQ: $id }, update: {name_SET: $name}) { + ${Movie.operations.update}(where: { id: {eq: $id } }, update: {name: {set: $name}}) { ${Movie.plural} { id name @@ -171,16 +171,16 @@ describe("update (deprecate implicit _SET)", () => { const query = /* GraphQL */ ` mutation { ${Movie.operations.update}( - where: { id_EQ: "1" }, + where: { id: { eq: "1" } }, update: { director: { connect: { - where: { node: { id_EQ: "2"} }, + where: { node: { id: { eq: "2" }} }, connect: { movies: { - where: { node: { id_EQ: "3"} }, + where: { node: { id: { eq: "3" }} }, connect: { director: { - where: { node: { id_EQ: "4"} }, + where: { node: { id: { eq: "4" }} }, connect: { movies: { - where: { node: { id_EQ: "5" } } + where: { node: { id: { eq: "5" } } } } } } } } @@ -256,7 +256,7 @@ describe("update (deprecate implicit _SET)", () => { ${Movie.operations.update}( where: { actorsConnection_SOME: { node: { name_EQ: $actorName } } }, update: { - id_SET: $updatedMovieId + id: { set: $updatedMovieId } } ) { ${Movie.plural} { @@ -312,7 +312,7 @@ describe("update (deprecate implicit _SET)", () => { const query = /* GraphQL */ ` mutation($id1: ID, $id2: ID, $name: String) { - ${Movie.operations.update}(where: { OR: [{ id_EQ: $id1 }, { id_EQ: $id2 }] }, update: {name_SET: $name}) { + ${Movie.operations.update}(where: { OR: [{ id_EQ: $id1 }, { id_EQ: $id2 }] }, update: {name: { set: $name }}) { ${Movie.plural} { id name @@ -380,7 +380,7 @@ describe("update (deprecate implicit _SET)", () => { update: { actors: [{ where: { node: { name_EQ: $initialName } }, - update: { node: { name_SET: $updatedName } } + update: { node: { name: { set: $updatedName } } } }] } ) { @@ -744,10 +744,10 @@ describe("update (deprecate implicit _SET)", () => { where: { node: { name_EQ: "old actor name" } } update: { node: { - name_SET: "new actor name" + name: { set: "new actor name" } movies: [{ where: { node: { title_EQ: "old movie title" } } - update: { node: { title_SET: "new movie title" } } + update: { node: { title: { set: "new movie title" } } } }] } } @@ -1118,7 +1118,7 @@ describe("update (deprecate implicit _SET)", () => { where: { node: { name_EQ: "Green Photo", id_EQ: "${photo0Id}" } } update: { node: { - name_SET: "Light Green Photo" + name: { set: "Light Green Photo" } color: { connect: { where: { node: { name_EQ: "Light Green", id_EQ: "${photo0Color1Id}" } } } disconnect: { where: { node: { name_EQ: "Green", id_EQ: "${photo0Color0Id}" } } } @@ -1130,7 +1130,7 @@ describe("update (deprecate implicit _SET)", () => { where: { node: { name_EQ: "Yellow Photo", id_EQ: "${photo1Id}" } } update: { node: { - name_SET: "Light Yellow Photo" + name: { set: "Light Yellow Photo" } color: { connect: { where: { node: { name_EQ: "Light Yellow", id_EQ: "${photo1Color1Id}" } } } disconnect: { where: { node: { name_EQ: "Yellow", id_EQ: "${photo1Color0Id}" } } } diff --git a/packages/graphql/tests/schema/aggregations.test.ts b/packages/graphql/tests/schema/aggregations.test.ts index 5ebb1f0fd3..86c4458f18 100644 --- a/packages/graphql/tests/schema/aggregations.test.ts +++ b/packages/graphql/tests/schema/aggregations.test.ts @@ -60,6 +60,23 @@ describe("Aggregations", () => { sum: BigInt } + \\"\\"\\"BigInt filters\\"\\"\\" + input BigIntScalarFilters { + eq: BigInt + gt: BigInt + gte: BigInt + in: [BigInt!] + lt: BigInt + lte: BigInt + } + + \\"\\"\\"BigInt mutations\\"\\"\\" + input BigIntScalarMutations { + add: BigInt + set: BigInt + subtract: BigInt + } + \\"\\"\\" Information about the number of nodes and relationships created during a create mutation \\"\\"\\" @@ -81,6 +98,21 @@ describe("Aggregations", () => { min: DateTime } + \\"\\"\\"DateTime filters\\"\\"\\" + input DateTimeScalarFilters { + eq: DateTime + gt: DateTime + gte: DateTime + in: [DateTime!] + lt: DateTime + lte: DateTime + } + + \\"\\"\\"DateTime mutations\\"\\"\\" + input DateTimeScalarMutations { + set: DateTime + } + \\"\\"\\" Information about the number of nodes and relationships deleted during a delete mutation \\"\\"\\" @@ -97,6 +129,21 @@ describe("Aggregations", () => { min: Duration } + \\"\\"\\"Duration filters\\"\\"\\" + input DurationScalarFilters { + eq: Duration + gt: Duration + gte: Duration + in: [Duration!] + lt: Duration + lte: Duration + } + + \\"\\"\\"Duration mutations\\"\\"\\" + input DurationScalarMutations { + set: Duration + } + type FloatAggregateSelection { average: Float max: Float @@ -104,9 +151,37 @@ describe("Aggregations", () => { sum: Float } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -116,6 +191,23 @@ describe("Aggregations", () => { sum: Int } + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + \\"\\"\\"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'\\"\\"\\" scalar LocalDateTime @@ -124,6 +216,21 @@ describe("Aggregations", () => { min: LocalDateTime } + \\"\\"\\"LocalDateTime filters\\"\\"\\" + input LocalDateTimeScalarFilters { + eq: LocalDateTime + gt: LocalDateTime + gte: LocalDateTime + in: [LocalDateTime!] + lt: LocalDateTime + lte: LocalDateTime + } + + \\"\\"\\"LocalDateTime mutations\\"\\"\\" + input LocalDateTimeScalarMutations { + set: LocalDateTime + } + \\"\\"\\" A local time, represented as a time string without timezone information \\"\\"\\" @@ -134,6 +241,21 @@ describe("Aggregations", () => { min: LocalTime } + \\"\\"\\"LocalTime filters\\"\\"\\" + input LocalTimeScalarFilters { + eq: LocalTime + gt: LocalTime + gte: LocalTime + in: [LocalTime!] + lt: LocalTime + lte: LocalTime + } + + \\"\\"\\"LocalTime mutations\\"\\"\\" + input LocalTimeScalarMutations { + set: LocalTime + } + type Movie { createdAt: DateTime id: ID @@ -151,7 +273,6 @@ describe("Aggregations", () => { type MovieAggregateSelection { count: Int! createdAt: DateTimeAggregateSelection! - id: IDAggregateSelection! imdbRating: FloatAggregateSelection! isbn: StringAggregateSelection! screenTime: DurationAggregateSelection! @@ -200,94 +321,116 @@ describe("Aggregations", () => { } input MovieUpdateInput { - createdAt_SET: DateTime - id_SET: ID - imdbRating_ADD: Float - imdbRating_DIVIDE: Float - imdbRating_MULTIPLY: Float - imdbRating_SET: Float - imdbRating_SUBTRACT: Float - isbn_SET: String - screenTime_SET: Duration - someBigInt_DECREMENT: BigInt - someBigInt_INCREMENT: BigInt - someBigInt_SET: BigInt - someInt_DECREMENT: Int - someInt_INCREMENT: Int - someInt_SET: Int - someLocalDateTime_SET: LocalDateTime - someLocalTime_SET: LocalTime - someTime_SET: Time - title_SET: String + createdAt: DateTimeScalarMutations + createdAt_SET: DateTime @deprecated(reason: \\"Please use the generic mutation 'createdAt: { set: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + imdbRating: FloatScalarMutations + imdbRating_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'imdbRating: { add: ... } }' instead.\\") + imdbRating_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'imdbRating: { divide: ... } }' instead.\\") + imdbRating_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'imdbRating: { multiply: ... } }' instead.\\") + imdbRating_SET: Float @deprecated(reason: \\"Please use the generic mutation 'imdbRating: { set: ... } }' instead.\\") + imdbRating_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'imdbRating: { subtract: ... } }' instead.\\") + isbn: StringScalarMutations + isbn_SET: String @deprecated(reason: \\"Please use the generic mutation 'isbn: { set: ... } }' instead.\\") + screenTime: DurationScalarMutations + screenTime_SET: Duration @deprecated(reason: \\"Please use the generic mutation 'screenTime: { set: ... } }' instead.\\") + someBigInt: BigIntScalarMutations + someBigInt_DECREMENT: BigInt @deprecated(reason: \\"Please use the relevant generic mutation 'someBigInt: { decrement: ... } }' instead.\\") + someBigInt_INCREMENT: BigInt @deprecated(reason: \\"Please use the relevant generic mutation 'someBigInt: { increment: ... } }' instead.\\") + someBigInt_SET: BigInt @deprecated(reason: \\"Please use the generic mutation 'someBigInt: { set: ... } }' instead.\\") + someInt: IntScalarMutations + someInt_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'someInt: { decrement: ... } }' instead.\\") + someInt_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'someInt: { increment: ... } }' instead.\\") + someInt_SET: Int @deprecated(reason: \\"Please use the generic mutation 'someInt: { set: ... } }' instead.\\") + someLocalDateTime: LocalDateTimeScalarMutations + someLocalDateTime_SET: LocalDateTime @deprecated(reason: \\"Please use the generic mutation 'someLocalDateTime: { set: ... } }' instead.\\") + someLocalTime: LocalTimeScalarMutations + someLocalTime_SET: LocalTime @deprecated(reason: \\"Please use the generic mutation 'someLocalTime: { set: ... } }' instead.\\") + someTime: TimeScalarMutations + someTime_SET: Time @deprecated(reason: \\"Please use the generic mutation 'someTime: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - createdAt_EQ: DateTime - createdAt_GT: DateTime - createdAt_GTE: DateTime - createdAt_IN: [DateTime] - createdAt_LT: DateTime - createdAt_LTE: DateTime - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - imdbRating_EQ: Float - imdbRating_GT: Float - imdbRating_GTE: Float - imdbRating_IN: [Float] - imdbRating_LT: Float - imdbRating_LTE: Float - isbn_CONTAINS: String - isbn_ENDS_WITH: String - isbn_EQ: String - isbn_IN: [String!] - isbn_STARTS_WITH: String - screenTime_EQ: Duration - screenTime_GT: Duration - screenTime_GTE: Duration - screenTime_IN: [Duration] - screenTime_LT: Duration - screenTime_LTE: Duration - someBigInt_EQ: BigInt - someBigInt_GT: BigInt - someBigInt_GTE: BigInt - someBigInt_IN: [BigInt] - someBigInt_LT: BigInt - someBigInt_LTE: BigInt - someInt_EQ: Int - someInt_GT: Int - someInt_GTE: Int - someInt_IN: [Int] - someInt_LT: Int - someInt_LTE: Int - someLocalDateTime_EQ: LocalDateTime - someLocalDateTime_GT: LocalDateTime - someLocalDateTime_GTE: LocalDateTime - someLocalDateTime_IN: [LocalDateTime] - someLocalDateTime_LT: LocalDateTime - someLocalDateTime_LTE: LocalDateTime - someLocalTime_EQ: LocalTime - someLocalTime_GT: LocalTime - someLocalTime_GTE: LocalTime - someLocalTime_IN: [LocalTime] - someLocalTime_LT: LocalTime - someLocalTime_LTE: LocalTime - someTime_EQ: Time - someTime_GT: Time - someTime_GTE: Time - someTime_IN: [Time] - someTime_LT: Time - someTime_LTE: Time - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + createdAt: DateTimeScalarFilters + createdAt_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { eq: ... }\\") + createdAt_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { gt: ... }\\") + createdAt_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { gte: ... }\\") + createdAt_IN: [DateTime] @deprecated(reason: \\"Please use the relevant generic filter createdAt: { in: ... }\\") + createdAt_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { lt: ... }\\") + createdAt_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + imdbRating: FloatScalarFilters + imdbRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { eq: ... }\\") + imdbRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { gt: ... }\\") + imdbRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { gte: ... }\\") + imdbRating_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { in: ... }\\") + imdbRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { lt: ... }\\") + imdbRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { lte: ... }\\") + isbn: StringScalarFilters + isbn_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter isbn: { contains: ... }\\") + isbn_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter isbn: { endsWith: ... }\\") + isbn_EQ: String @deprecated(reason: \\"Please use the relevant generic filter isbn: { eq: ... }\\") + isbn_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter isbn: { in: ... }\\") + isbn_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter isbn: { startsWith: ... }\\") + screenTime: DurationScalarFilters + screenTime_EQ: Duration @deprecated(reason: \\"Please use the relevant generic filter screenTime: { eq: ... }\\") + screenTime_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gt: ... }\\") + screenTime_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gte: ... }\\") + screenTime_IN: [Duration] @deprecated(reason: \\"Please use the relevant generic filter screenTime: { in: ... }\\") + screenTime_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lt: ... }\\") + screenTime_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lte: ... }\\") + someBigInt: BigIntScalarFilters + someBigInt_EQ: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { eq: ... }\\") + someBigInt_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { gt: ... }\\") + someBigInt_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { gte: ... }\\") + someBigInt_IN: [BigInt] @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { in: ... }\\") + someBigInt_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { lt: ... }\\") + someBigInt_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { lte: ... }\\") + someInt: IntScalarFilters + someInt_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { eq: ... }\\") + someInt_GT: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { gt: ... }\\") + someInt_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { gte: ... }\\") + someInt_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter someInt: { in: ... }\\") + someInt_LT: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { lt: ... }\\") + someInt_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { lte: ... }\\") + someLocalDateTime: LocalDateTimeScalarFilters + someLocalDateTime_EQ: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { eq: ... }\\") + someLocalDateTime_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { gt: ... }\\") + someLocalDateTime_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { gte: ... }\\") + someLocalDateTime_IN: [LocalDateTime] @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { in: ... }\\") + someLocalDateTime_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { lt: ... }\\") + someLocalDateTime_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { lte: ... }\\") + someLocalTime: LocalTimeScalarFilters + someLocalTime_EQ: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { eq: ... }\\") + someLocalTime_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { gt: ... }\\") + someLocalTime_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { gte: ... }\\") + someLocalTime_IN: [LocalTime] @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { in: ... }\\") + someLocalTime_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { lt: ... }\\") + someLocalTime_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { lte: ... }\\") + someTime: TimeScalarFilters + someTime_EQ: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { eq: ... }\\") + someTime_GT: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { gt: ... }\\") + someTime_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { gte: ... }\\") + someTime_IN: [Time] @deprecated(reason: \\"Please use the relevant generic filter someTime: { in: ... }\\") + someTime_LT: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { lt: ... }\\") + someTime_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -329,6 +472,20 @@ describe("Aggregations", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\"A time, represented as an RFC3339 time string\\"\\"\\" scalar Time @@ -337,6 +494,21 @@ describe("Aggregations", () => { min: Time } + \\"\\"\\"Time filters\\"\\"\\" + input TimeScalarFilters { + eq: Time + gt: Time + gte: Time + in: [Time!] + lt: Time + lte: Time + } + + \\"\\"\\"Time mutations\\"\\"\\" + input TimeScalarMutations { + set: Time + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -408,6 +580,31 @@ describe("Aggregations", () => { sum: BigInt } + \\"\\"\\"Filters for an aggregation of an BigInt field\\"\\"\\" + input BigIntScalarAggregationFilters { + average: BigIntScalarFilters + max: BigIntScalarFilters + min: BigIntScalarFilters + sum: BigIntScalarFilters + } + + \\"\\"\\"BigInt filters\\"\\"\\" + input BigIntScalarFilters { + eq: BigInt + gt: BigInt + gte: BigInt + in: [BigInt!] + lt: BigInt + lte: BigInt + } + + \\"\\"\\"BigInt mutations\\"\\"\\" + input BigIntScalarMutations { + add: BigInt + set: BigInt + subtract: BigInt + } + \\"\\"\\" Information about the number of nodes and relationships created during a create mutation \\"\\"\\" @@ -434,6 +631,27 @@ describe("Aggregations", () => { min: DateTime } + \\"\\"\\"Filters for an aggregation of an DateTime input field\\"\\"\\" + input DateTimeScalarAggregationFilters { + max: DateTimeScalarFilters + min: DateTimeScalarFilters + } + + \\"\\"\\"DateTime filters\\"\\"\\" + input DateTimeScalarFilters { + eq: DateTime + gt: DateTime + gte: DateTime + in: [DateTime!] + lt: DateTime + lte: DateTime + } + + \\"\\"\\"DateTime mutations\\"\\"\\" + input DateTimeScalarMutations { + set: DateTime + } + \\"\\"\\" Information about the number of nodes and relationships deleted during a delete mutation \\"\\"\\" @@ -450,6 +668,28 @@ describe("Aggregations", () => { min: Duration } + \\"\\"\\"Filters for an aggregation of a Dutation input field\\"\\"\\" + input DurationScalarAggregationFilters { + average: DurationScalarFilters + max: DurationScalarFilters + min: DurationScalarFilters + } + + \\"\\"\\"Duration filters\\"\\"\\" + input DurationScalarFilters { + eq: Duration + gt: Duration + gte: Duration + in: [Duration!] + lt: Duration + lte: Duration + } + + \\"\\"\\"Duration mutations\\"\\"\\" + input DurationScalarMutations { + set: Duration + } + type FloatAggregateSelection { average: Float max: Float @@ -457,9 +697,45 @@ describe("Aggregations", () => { sum: Float } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Filters for an aggregation of a float field\\"\\"\\" + input FloatScalarAggregationFilters { + average: FloatScalarFilters + max: FloatScalarFilters + min: FloatScalarFilters + sum: FloatScalarFilters + } + + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -469,6 +745,31 @@ describe("Aggregations", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + \\"\\"\\" The edge properties for the following fields: * Post.likes @@ -490,146 +791,145 @@ describe("Aggregations", () => { AND: [LikesAggregationWhereInput!] NOT: LikesAggregationWhereInput OR: [LikesAggregationWhereInput!] - someBigInt_AVERAGE_EQUAL: BigInt - someBigInt_AVERAGE_GT: BigInt - someBigInt_AVERAGE_GTE: BigInt - someBigInt_AVERAGE_LT: BigInt - someBigInt_AVERAGE_LTE: BigInt - someBigInt_MAX_EQUAL: BigInt - someBigInt_MAX_GT: BigInt - someBigInt_MAX_GTE: BigInt - someBigInt_MAX_LT: BigInt - someBigInt_MAX_LTE: BigInt - someBigInt_MIN_EQUAL: BigInt - someBigInt_MIN_GT: BigInt - someBigInt_MIN_GTE: BigInt - someBigInt_MIN_LT: BigInt - someBigInt_MIN_LTE: BigInt - someBigInt_SUM_EQUAL: BigInt - someBigInt_SUM_GT: BigInt - someBigInt_SUM_GTE: BigInt - someBigInt_SUM_LT: BigInt - someBigInt_SUM_LTE: BigInt - someDateTime_MAX_EQUAL: DateTime - someDateTime_MAX_GT: DateTime - someDateTime_MAX_GTE: DateTime - someDateTime_MAX_LT: DateTime - someDateTime_MAX_LTE: DateTime - someDateTime_MIN_EQUAL: DateTime - someDateTime_MIN_GT: DateTime - someDateTime_MIN_GTE: DateTime - someDateTime_MIN_LT: DateTime - someDateTime_MIN_LTE: DateTime - someDuration_AVERAGE_EQUAL: Duration - someDuration_AVERAGE_GT: Duration - someDuration_AVERAGE_GTE: Duration - someDuration_AVERAGE_LT: Duration - someDuration_AVERAGE_LTE: Duration - someDuration_MAX_EQUAL: Duration - someDuration_MAX_GT: Duration - someDuration_MAX_GTE: Duration - someDuration_MAX_LT: Duration - someDuration_MAX_LTE: Duration - someDuration_MIN_EQUAL: Duration - someDuration_MIN_GT: Duration - someDuration_MIN_GTE: Duration - someDuration_MIN_LT: Duration - someDuration_MIN_LTE: Duration - someFloat_AVERAGE_EQUAL: Float - someFloat_AVERAGE_GT: Float - someFloat_AVERAGE_GTE: Float - someFloat_AVERAGE_LT: Float - someFloat_AVERAGE_LTE: Float - someFloat_MAX_EQUAL: Float - someFloat_MAX_GT: Float - someFloat_MAX_GTE: Float - someFloat_MAX_LT: Float - someFloat_MAX_LTE: Float - someFloat_MIN_EQUAL: Float - someFloat_MIN_GT: Float - someFloat_MIN_GTE: Float - someFloat_MIN_LT: Float - someFloat_MIN_LTE: Float - someFloat_SUM_EQUAL: Float - someFloat_SUM_GT: Float - someFloat_SUM_GTE: Float - someFloat_SUM_LT: Float - someFloat_SUM_LTE: Float - someId_MAX_EQUAL: ID - someId_MAX_GT: ID - someId_MAX_GTE: ID - someId_MAX_LT: ID - someId_MAX_LTE: ID - someId_MIN_EQUAL: ID - someId_MIN_GT: ID - someId_MIN_GTE: ID - someId_MIN_LT: ID - someId_MIN_LTE: ID - someInt_AVERAGE_EQUAL: Float - someInt_AVERAGE_GT: Float - someInt_AVERAGE_GTE: Float - someInt_AVERAGE_LT: Float - someInt_AVERAGE_LTE: Float - someInt_MAX_EQUAL: Int - someInt_MAX_GT: Int - someInt_MAX_GTE: Int - someInt_MAX_LT: Int - someInt_MAX_LTE: Int - someInt_MIN_EQUAL: Int - someInt_MIN_GT: Int - someInt_MIN_GTE: Int - someInt_MIN_LT: Int - someInt_MIN_LTE: Int - someInt_SUM_EQUAL: Int - someInt_SUM_GT: Int - someInt_SUM_GTE: Int - someInt_SUM_LT: Int - someInt_SUM_LTE: Int - someLocalDateTime_MAX_EQUAL: LocalDateTime - someLocalDateTime_MAX_GT: LocalDateTime - someLocalDateTime_MAX_GTE: LocalDateTime - someLocalDateTime_MAX_LT: LocalDateTime - someLocalDateTime_MAX_LTE: LocalDateTime - someLocalDateTime_MIN_EQUAL: LocalDateTime - someLocalDateTime_MIN_GT: LocalDateTime - someLocalDateTime_MIN_GTE: LocalDateTime - someLocalDateTime_MIN_LT: LocalDateTime - someLocalDateTime_MIN_LTE: LocalDateTime - someLocalTime_MAX_EQUAL: LocalTime - someLocalTime_MAX_GT: LocalTime - someLocalTime_MAX_GTE: LocalTime - someLocalTime_MAX_LT: LocalTime - someLocalTime_MAX_LTE: LocalTime - someLocalTime_MIN_EQUAL: LocalTime - someLocalTime_MIN_GT: LocalTime - someLocalTime_MIN_GTE: LocalTime - someLocalTime_MIN_LT: LocalTime - someLocalTime_MIN_LTE: LocalTime - someString_AVERAGE_LENGTH_EQUAL: Float - someString_AVERAGE_LENGTH_GT: Float - someString_AVERAGE_LENGTH_GTE: Float - someString_AVERAGE_LENGTH_LT: Float - someString_AVERAGE_LENGTH_LTE: Float - someString_LONGEST_LENGTH_EQUAL: Int - someString_LONGEST_LENGTH_GT: Int - someString_LONGEST_LENGTH_GTE: Int - someString_LONGEST_LENGTH_LT: Int - someString_LONGEST_LENGTH_LTE: Int - someString_SHORTEST_LENGTH_EQUAL: Int - someString_SHORTEST_LENGTH_GT: Int - someString_SHORTEST_LENGTH_GTE: Int - someString_SHORTEST_LENGTH_LT: Int - someString_SHORTEST_LENGTH_LTE: Int - someTime_MAX_EQUAL: Time - someTime_MAX_GT: Time - someTime_MAX_GTE: Time - someTime_MAX_LT: Time - someTime_MAX_LTE: Time - someTime_MIN_EQUAL: Time - someTime_MIN_GT: Time - someTime_MIN_GTE: Time - someTime_MIN_LT: Time - someTime_MIN_LTE: Time + someBigInt: BigIntScalarAggregationFilters + someBigInt_AVERAGE_EQUAL: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { average: { eq: ... } } }' instead.\\") + someBigInt_AVERAGE_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { average: { gt: ... } } }' instead.\\") + someBigInt_AVERAGE_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { average: { gte: ... } } }' instead.\\") + someBigInt_AVERAGE_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { average: { lt: ... } } }' instead.\\") + someBigInt_AVERAGE_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { average: { lte: ... } } }' instead.\\") + someBigInt_MAX_EQUAL: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { max: { eq: ... } } }' instead.\\") + someBigInt_MAX_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { max: { gt: ... } } }' instead.\\") + someBigInt_MAX_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { max: { gte: ... } } }' instead.\\") + someBigInt_MAX_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { max: { lt: ... } } }' instead.\\") + someBigInt_MAX_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { max: { lte: ... } } }' instead.\\") + someBigInt_MIN_EQUAL: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { min: { eq: ... } } }' instead.\\") + someBigInt_MIN_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { min: { gt: ... } } }' instead.\\") + someBigInt_MIN_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { min: { gte: ... } } }' instead.\\") + someBigInt_MIN_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { min: { lt: ... } } }' instead.\\") + someBigInt_MIN_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { min: { lte: ... } } }' instead.\\") + someBigInt_SUM_EQUAL: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { sum: { eq: ... } } }' instead.\\") + someBigInt_SUM_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { sum: { gt: ... } } }' instead.\\") + someBigInt_SUM_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { sum: { gte: ... } } }' instead.\\") + someBigInt_SUM_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { sum: { lt: ... } } }' instead.\\") + someBigInt_SUM_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { sum: { lte: ... } } }' instead.\\") + someDateTime: DateTimeScalarAggregationFilters + someDateTime_MAX_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { max: { eq: ... } } }' instead.\\") + someDateTime_MAX_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { max: { gt: ... } } }' instead.\\") + someDateTime_MAX_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { max: { gte: ... } } }' instead.\\") + someDateTime_MAX_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { max: { lt: ... } } }' instead.\\") + someDateTime_MAX_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { max: { lte: ... } } }' instead.\\") + someDateTime_MIN_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { min: { eq: ... } } }' instead.\\") + someDateTime_MIN_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { min: { gt: ... } } }' instead.\\") + someDateTime_MIN_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { min: { gte: ... } } }' instead.\\") + someDateTime_MIN_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { min: { lt: ... } } }' instead.\\") + someDateTime_MIN_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { min: { lte: ... } } }' instead.\\") + someDuration: DurationScalarAggregationFilters + someDuration_AVERAGE_EQUAL: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { average: { eq: ... } } }' instead.\\") + someDuration_AVERAGE_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { average: { gt: ... } } }' instead.\\") + someDuration_AVERAGE_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { average: { gte: ... } } }' instead.\\") + someDuration_AVERAGE_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { average: { lt: ... } } }' instead.\\") + someDuration_AVERAGE_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { average: { lte: ... } } }' instead.\\") + someDuration_MAX_EQUAL: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { max: { eq: ... } } }' instead.\\") + someDuration_MAX_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { max: { gt: ... } } }' instead.\\") + someDuration_MAX_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { max: { gte: ... } } }' instead.\\") + someDuration_MAX_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { max: { lt: ... } } }' instead.\\") + someDuration_MAX_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { max: { lte: ... } } }' instead.\\") + someDuration_MIN_EQUAL: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { min: { eq: ... } } }' instead.\\") + someDuration_MIN_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { min: { gt: ... } } }' instead.\\") + someDuration_MIN_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { min: { gte: ... } } }' instead.\\") + someDuration_MIN_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { min: { lt: ... } } }' instead.\\") + someDuration_MIN_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { min: { lte: ... } } }' instead.\\") + someFloat: FloatScalarAggregationFilters + someFloat_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { average: { eq: ... } } }' instead.\\") + someFloat_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { average: { gt: ... } } }' instead.\\") + someFloat_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { average: { gte: ... } } }' instead.\\") + someFloat_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { average: { lt: ... } } }' instead.\\") + someFloat_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { average: { lte: ... } } }' instead.\\") + someFloat_MAX_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { max: { eq: ... } } }' instead.\\") + someFloat_MAX_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { max: { gt: ... } } }' instead.\\") + someFloat_MAX_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { max: { gte: ... } } }' instead.\\") + someFloat_MAX_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { max: { lt: ... } } }' instead.\\") + someFloat_MAX_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { max: { lte: ... } } }' instead.\\") + someFloat_MIN_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { min: { eq: ... } } }' instead.\\") + someFloat_MIN_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { min: { gt: ... } } }' instead.\\") + someFloat_MIN_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { min: { gte: ... } } }' instead.\\") + someFloat_MIN_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { min: { lt: ... } } }' instead.\\") + someFloat_MIN_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { min: { lte: ... } } }' instead.\\") + someFloat_SUM_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { sum: { eq: ... } } }' instead.\\") + someFloat_SUM_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { sum: { gt: ... } } }' instead.\\") + someFloat_SUM_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { sum: { gte: ... } } }' instead.\\") + someFloat_SUM_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { sum: { lt: ... } } }' instead.\\") + someFloat_SUM_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { sum: { lte: ... } } }' instead.\\") + someInt: IntScalarAggregationFilters + someInt_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { average: { eq: ... } } }' instead.\\") + someInt_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { average: { gt: ... } } }' instead.\\") + someInt_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { average: { gte: ... } } }' instead.\\") + someInt_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { average: { lt: ... } } }' instead.\\") + someInt_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { average: { lte: ... } } }' instead.\\") + someInt_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { max: { eq: ... } } }' instead.\\") + someInt_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { max: { gt: ... } } }' instead.\\") + someInt_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { max: { gte: ... } } }' instead.\\") + someInt_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { max: { lt: ... } } }' instead.\\") + someInt_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { max: { lte: ... } } }' instead.\\") + someInt_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { min: { eq: ... } } }' instead.\\") + someInt_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { min: { gt: ... } } }' instead.\\") + someInt_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { min: { gte: ... } } }' instead.\\") + someInt_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { min: { lt: ... } } }' instead.\\") + someInt_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { min: { lte: ... } } }' instead.\\") + someInt_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { sum: { eq: ... } } }' instead.\\") + someInt_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { sum: { gt: ... } } }' instead.\\") + someInt_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { sum: { gte: ... } } }' instead.\\") + someInt_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { sum: { lt: ... } } }' instead.\\") + someInt_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { sum: { lte: ... } } }' instead.\\") + someLocalDateTime: LocalDateTimeScalarAggregationFilters + someLocalDateTime_MAX_EQUAL: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { max: { eq: ... } } }' instead.\\") + someLocalDateTime_MAX_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { max: { gt: ... } } }' instead.\\") + someLocalDateTime_MAX_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { max: { gte: ... } } }' instead.\\") + someLocalDateTime_MAX_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { max: { lt: ... } } }' instead.\\") + someLocalDateTime_MAX_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { max: { lte: ... } } }' instead.\\") + someLocalDateTime_MIN_EQUAL: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { min: { eq: ... } } }' instead.\\") + someLocalDateTime_MIN_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { min: { gt: ... } } }' instead.\\") + someLocalDateTime_MIN_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { min: { gte: ... } } }' instead.\\") + someLocalDateTime_MIN_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { min: { lt: ... } } }' instead.\\") + someLocalDateTime_MIN_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { min: { lte: ... } } }' instead.\\") + someLocalTime: LocalTimeScalarAggregationFilters + someLocalTime_MAX_EQUAL: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { max: { eq: ... } } }' instead.\\") + someLocalTime_MAX_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { max: { gt: ... } } }' instead.\\") + someLocalTime_MAX_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { max: { gte: ... } } }' instead.\\") + someLocalTime_MAX_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { max: { lt: ... } } }' instead.\\") + someLocalTime_MAX_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { max: { lte: ... } } }' instead.\\") + someLocalTime_MIN_EQUAL: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { min: { eq: ... } } }' instead.\\") + someLocalTime_MIN_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { min: { gt: ... } } }' instead.\\") + someLocalTime_MIN_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { min: { gte: ... } } }' instead.\\") + someLocalTime_MIN_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { min: { lt: ... } } }' instead.\\") + someLocalTime_MIN_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { min: { lte: ... } } }' instead.\\") + someString: StringScalarAggregationFilters + someString_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { eq: ... } } }' instead.\\") + someString_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { gt: ... } } }' instead.\\") + someString_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { gte: ... } } }' instead.\\") + someString_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { lt: ... } } }' instead.\\") + someString_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { lte: ... } } }' instead.\\") + someString_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { eq: ... } } }' instead.\\") + someString_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { gt: ... } } }' instead.\\") + someString_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { gte: ... } } }' instead.\\") + someString_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { lt: ... } } }' instead.\\") + someString_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { lte: ... } } }' instead.\\") + someString_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { eq: ... } } }' instead.\\") + someString_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { gt: ... } } }' instead.\\") + someString_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { gte: ... } } }' instead.\\") + someString_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { lt: ... } } }' instead.\\") + someString_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { lte: ... } } }' instead.\\") + someTime: TimeScalarAggregationFilters + someTime_MAX_EQUAL: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { max: { eq: ... } } }' instead.\\") + someTime_MAX_GT: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { max: { gt: ... } } }' instead.\\") + someTime_MAX_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { max: { gte: ... } } }' instead.\\") + someTime_MAX_LT: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { max: { lt: ... } } }' instead.\\") + someTime_MAX_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { max: { lte: ... } } }' instead.\\") + someTime_MIN_EQUAL: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { min: { eq: ... } } }' instead.\\") + someTime_MIN_GT: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { min: { gt: ... } } }' instead.\\") + someTime_MIN_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { min: { gte: ... } } }' instead.\\") + someTime_MIN_LT: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { min: { lt: ... } } }' instead.\\") + someTime_MIN_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { min: { lte: ... } } }' instead.\\") } input LikesCreateInput { @@ -659,88 +959,108 @@ describe("Aggregations", () => { } input LikesUpdateInput { - someBigInt_DECREMENT: BigInt - someBigInt_INCREMENT: BigInt - someBigInt_SET: BigInt - someDateTime_SET: DateTime - someDuration_SET: Duration - someFloat_ADD: Float - someFloat_DIVIDE: Float - someFloat_MULTIPLY: Float - someFloat_SET: Float - someFloat_SUBTRACT: Float - someId_SET: ID - someInt_DECREMENT: Int - someInt_INCREMENT: Int - someInt_SET: Int - someLocalDateTime_SET: LocalDateTime - someLocalTime_SET: LocalTime - someString_SET: String - someTime_SET: Time + someBigInt: BigIntScalarMutations + someBigInt_DECREMENT: BigInt @deprecated(reason: \\"Please use the relevant generic mutation 'someBigInt: { decrement: ... } }' instead.\\") + someBigInt_INCREMENT: BigInt @deprecated(reason: \\"Please use the relevant generic mutation 'someBigInt: { increment: ... } }' instead.\\") + someBigInt_SET: BigInt @deprecated(reason: \\"Please use the generic mutation 'someBigInt: { set: ... } }' instead.\\") + someDateTime: DateTimeScalarMutations + someDateTime_SET: DateTime @deprecated(reason: \\"Please use the generic mutation 'someDateTime: { set: ... } }' instead.\\") + someDuration: DurationScalarMutations + someDuration_SET: Duration @deprecated(reason: \\"Please use the generic mutation 'someDuration: { set: ... } }' instead.\\") + someFloat: FloatScalarMutations + someFloat_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { add: ... } }' instead.\\") + someFloat_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { divide: ... } }' instead.\\") + someFloat_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { multiply: ... } }' instead.\\") + someFloat_SET: Float @deprecated(reason: \\"Please use the generic mutation 'someFloat: { set: ... } }' instead.\\") + someFloat_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { subtract: ... } }' instead.\\") + someId: IDScalarMutations + someId_SET: ID @deprecated(reason: \\"Please use the generic mutation 'someId: { set: ... } }' instead.\\") + someInt: IntScalarMutations + someInt_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'someInt: { decrement: ... } }' instead.\\") + someInt_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'someInt: { increment: ... } }' instead.\\") + someInt_SET: Int @deprecated(reason: \\"Please use the generic mutation 'someInt: { set: ... } }' instead.\\") + someLocalDateTime: LocalDateTimeScalarMutations + someLocalDateTime_SET: LocalDateTime @deprecated(reason: \\"Please use the generic mutation 'someLocalDateTime: { set: ... } }' instead.\\") + someLocalTime: LocalTimeScalarMutations + someLocalTime_SET: LocalTime @deprecated(reason: \\"Please use the generic mutation 'someLocalTime: { set: ... } }' instead.\\") + someString: StringScalarMutations + someString_SET: String @deprecated(reason: \\"Please use the generic mutation 'someString: { set: ... } }' instead.\\") + someTime: TimeScalarMutations + someTime_SET: Time @deprecated(reason: \\"Please use the generic mutation 'someTime: { set: ... } }' instead.\\") } input LikesWhere { AND: [LikesWhere!] NOT: LikesWhere OR: [LikesWhere!] - someBigInt_EQ: BigInt - someBigInt_GT: BigInt - someBigInt_GTE: BigInt - someBigInt_IN: [BigInt] - someBigInt_LT: BigInt - someBigInt_LTE: BigInt - someDateTime_EQ: DateTime - someDateTime_GT: DateTime - someDateTime_GTE: DateTime - someDateTime_IN: [DateTime] - someDateTime_LT: DateTime - someDateTime_LTE: DateTime - someDuration_EQ: Duration - someDuration_GT: Duration - someDuration_GTE: Duration - someDuration_IN: [Duration] - someDuration_LT: Duration - someDuration_LTE: Duration - someFloat_EQ: Float - someFloat_GT: Float - someFloat_GTE: Float - someFloat_IN: [Float] - someFloat_LT: Float - someFloat_LTE: Float - someId_CONTAINS: ID - someId_ENDS_WITH: ID - someId_EQ: ID - someId_IN: [ID] - someId_STARTS_WITH: ID - someInt_EQ: Int - someInt_GT: Int - someInt_GTE: Int - someInt_IN: [Int] - someInt_LT: Int - someInt_LTE: Int - someLocalDateTime_EQ: LocalDateTime - someLocalDateTime_GT: LocalDateTime - someLocalDateTime_GTE: LocalDateTime - someLocalDateTime_IN: [LocalDateTime] - someLocalDateTime_LT: LocalDateTime - someLocalDateTime_LTE: LocalDateTime - someLocalTime_EQ: LocalTime - someLocalTime_GT: LocalTime - someLocalTime_GTE: LocalTime - someLocalTime_IN: [LocalTime] - someLocalTime_LT: LocalTime - someLocalTime_LTE: LocalTime - someString_CONTAINS: String - someString_ENDS_WITH: String - someString_EQ: String - someString_IN: [String] - someString_STARTS_WITH: String - someTime_EQ: Time - someTime_GT: Time - someTime_GTE: Time - someTime_IN: [Time] - someTime_LT: Time - someTime_LTE: Time + someBigInt: BigIntScalarFilters + someBigInt_EQ: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { eq: ... }\\") + someBigInt_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { gt: ... }\\") + someBigInt_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { gte: ... }\\") + someBigInt_IN: [BigInt] @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { in: ... }\\") + someBigInt_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { lt: ... }\\") + someBigInt_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { lte: ... }\\") + someDateTime: DateTimeScalarFilters + someDateTime_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { eq: ... }\\") + someDateTime_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { gt: ... }\\") + someDateTime_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { gte: ... }\\") + someDateTime_IN: [DateTime] @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { in: ... }\\") + someDateTime_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { lt: ... }\\") + someDateTime_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { lte: ... }\\") + someDuration: DurationScalarFilters + someDuration_EQ: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { eq: ... }\\") + someDuration_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { gt: ... }\\") + someDuration_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { gte: ... }\\") + someDuration_IN: [Duration] @deprecated(reason: \\"Please use the relevant generic filter someDuration: { in: ... }\\") + someDuration_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { lt: ... }\\") + someDuration_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { lte: ... }\\") + someFloat: FloatScalarFilters + someFloat_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { eq: ... }\\") + someFloat_GT: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { gt: ... }\\") + someFloat_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { gte: ... }\\") + someFloat_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter someFloat: { in: ... }\\") + someFloat_LT: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { lt: ... }\\") + someFloat_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { lte: ... }\\") + someId: IDScalarFilters + someId_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { contains: ... }\\") + someId_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { endsWith: ... }\\") + someId_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { eq: ... }\\") + someId_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter someId: { in: ... }\\") + someId_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { startsWith: ... }\\") + someInt: IntScalarFilters + someInt_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { eq: ... }\\") + someInt_GT: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { gt: ... }\\") + someInt_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { gte: ... }\\") + someInt_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter someInt: { in: ... }\\") + someInt_LT: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { lt: ... }\\") + someInt_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { lte: ... }\\") + someLocalDateTime: LocalDateTimeScalarFilters + someLocalDateTime_EQ: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { eq: ... }\\") + someLocalDateTime_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { gt: ... }\\") + someLocalDateTime_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { gte: ... }\\") + someLocalDateTime_IN: [LocalDateTime] @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { in: ... }\\") + someLocalDateTime_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { lt: ... }\\") + someLocalDateTime_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { lte: ... }\\") + someLocalTime: LocalTimeScalarFilters + someLocalTime_EQ: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { eq: ... }\\") + someLocalTime_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { gt: ... }\\") + someLocalTime_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { gte: ... }\\") + someLocalTime_IN: [LocalTime] @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { in: ... }\\") + someLocalTime_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { lt: ... }\\") + someLocalTime_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { lte: ... }\\") + someString: StringScalarFilters + someString_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter someString: { contains: ... }\\") + someString_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter someString: { endsWith: ... }\\") + someString_EQ: String @deprecated(reason: \\"Please use the relevant generic filter someString: { eq: ... }\\") + someString_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter someString: { in: ... }\\") + someString_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter someString: { startsWith: ... }\\") + someTime: TimeScalarFilters + someTime_EQ: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { eq: ... }\\") + someTime_GT: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { gt: ... }\\") + someTime_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { gte: ... }\\") + someTime_IN: [Time] @deprecated(reason: \\"Please use the relevant generic filter someTime: { in: ... }\\") + someTime_LT: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { lt: ... }\\") + someTime_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { lte: ... }\\") } \\"\\"\\"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'\\"\\"\\" @@ -751,6 +1071,27 @@ describe("Aggregations", () => { min: LocalDateTime } + \\"\\"\\"Filters for an aggregation of an LocalDateTime input field\\"\\"\\" + input LocalDateTimeScalarAggregationFilters { + max: LocalDateTimeScalarFilters + min: LocalDateTimeScalarFilters + } + + \\"\\"\\"LocalDateTime filters\\"\\"\\" + input LocalDateTimeScalarFilters { + eq: LocalDateTime + gt: LocalDateTime + gte: LocalDateTime + in: [LocalDateTime!] + lt: LocalDateTime + lte: LocalDateTime + } + + \\"\\"\\"LocalDateTime mutations\\"\\"\\" + input LocalDateTimeScalarMutations { + set: LocalDateTime + } + \\"\\"\\" A local time, represented as a time string without timezone information \\"\\"\\" @@ -761,6 +1102,27 @@ describe("Aggregations", () => { min: LocalTime } + \\"\\"\\"Filters for an aggregation of an LocalTime input field\\"\\"\\" + input LocalTimeScalarAggregationFilters { + max: LocalTimeScalarFilters + min: LocalTimeScalarFilters + } + + \\"\\"\\"LocalTime filters\\"\\"\\" + input LocalTimeScalarFilters { + eq: LocalTime + gt: LocalTime + gte: LocalTime + in: [LocalTime!] + lt: LocalTime + lte: LocalTime + } + + \\"\\"\\"LocalTime mutations\\"\\"\\" + input LocalTimeScalarMutations { + set: LocalTime + } + type Mutation { createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! @@ -808,6 +1170,7 @@ describe("Aggregations", () => { AND: [PostLikesAggregateInput!] NOT: PostLikesAggregateInput OR: [PostLikesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -828,6 +1191,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 @@ -863,146 +1245,145 @@ describe("Aggregations", () => { AND: [PostLikesNodeAggregationWhereInput!] NOT: PostLikesNodeAggregationWhereInput OR: [PostLikesNodeAggregationWhereInput!] - someBigInt_AVERAGE_EQUAL: BigInt - someBigInt_AVERAGE_GT: BigInt - someBigInt_AVERAGE_GTE: BigInt - someBigInt_AVERAGE_LT: BigInt - someBigInt_AVERAGE_LTE: BigInt - someBigInt_MAX_EQUAL: BigInt - someBigInt_MAX_GT: BigInt - someBigInt_MAX_GTE: BigInt - someBigInt_MAX_LT: BigInt - someBigInt_MAX_LTE: BigInt - someBigInt_MIN_EQUAL: BigInt - someBigInt_MIN_GT: BigInt - someBigInt_MIN_GTE: BigInt - someBigInt_MIN_LT: BigInt - someBigInt_MIN_LTE: BigInt - someBigInt_SUM_EQUAL: BigInt - someBigInt_SUM_GT: BigInt - someBigInt_SUM_GTE: BigInt - someBigInt_SUM_LT: BigInt - someBigInt_SUM_LTE: BigInt - someDateTime_MAX_EQUAL: DateTime - someDateTime_MAX_GT: DateTime - someDateTime_MAX_GTE: DateTime - someDateTime_MAX_LT: DateTime - someDateTime_MAX_LTE: DateTime - someDateTime_MIN_EQUAL: DateTime - someDateTime_MIN_GT: DateTime - someDateTime_MIN_GTE: DateTime - someDateTime_MIN_LT: DateTime - someDateTime_MIN_LTE: DateTime - someDuration_AVERAGE_EQUAL: Duration - someDuration_AVERAGE_GT: Duration - someDuration_AVERAGE_GTE: Duration - someDuration_AVERAGE_LT: Duration - someDuration_AVERAGE_LTE: Duration - someDuration_MAX_EQUAL: Duration - someDuration_MAX_GT: Duration - someDuration_MAX_GTE: Duration - someDuration_MAX_LT: Duration - someDuration_MAX_LTE: Duration - someDuration_MIN_EQUAL: Duration - someDuration_MIN_GT: Duration - someDuration_MIN_GTE: Duration - someDuration_MIN_LT: Duration - someDuration_MIN_LTE: Duration - someFloat_AVERAGE_EQUAL: Float - someFloat_AVERAGE_GT: Float - someFloat_AVERAGE_GTE: Float - someFloat_AVERAGE_LT: Float - someFloat_AVERAGE_LTE: Float - someFloat_MAX_EQUAL: Float - someFloat_MAX_GT: Float - someFloat_MAX_GTE: Float - someFloat_MAX_LT: Float - someFloat_MAX_LTE: Float - someFloat_MIN_EQUAL: Float - someFloat_MIN_GT: Float - someFloat_MIN_GTE: Float - someFloat_MIN_LT: Float - someFloat_MIN_LTE: Float - someFloat_SUM_EQUAL: Float - someFloat_SUM_GT: Float - someFloat_SUM_GTE: Float - someFloat_SUM_LT: Float - someFloat_SUM_LTE: Float - someId_MAX_EQUAL: ID - someId_MAX_GT: ID - someId_MAX_GTE: ID - someId_MAX_LT: ID - someId_MAX_LTE: ID - someId_MIN_EQUAL: ID - someId_MIN_GT: ID - someId_MIN_GTE: ID - someId_MIN_LT: ID - someId_MIN_LTE: ID - someInt_AVERAGE_EQUAL: Float - someInt_AVERAGE_GT: Float - someInt_AVERAGE_GTE: Float - someInt_AVERAGE_LT: Float - someInt_AVERAGE_LTE: Float - someInt_MAX_EQUAL: Int - someInt_MAX_GT: Int - someInt_MAX_GTE: Int - someInt_MAX_LT: Int - someInt_MAX_LTE: Int - someInt_MIN_EQUAL: Int - someInt_MIN_GT: Int - someInt_MIN_GTE: Int - someInt_MIN_LT: Int - someInt_MIN_LTE: Int - someInt_SUM_EQUAL: Int - someInt_SUM_GT: Int - someInt_SUM_GTE: Int - someInt_SUM_LT: Int - someInt_SUM_LTE: Int - someLocalDateTime_MAX_EQUAL: LocalDateTime - someLocalDateTime_MAX_GT: LocalDateTime - someLocalDateTime_MAX_GTE: LocalDateTime - someLocalDateTime_MAX_LT: LocalDateTime - someLocalDateTime_MAX_LTE: LocalDateTime - someLocalDateTime_MIN_EQUAL: LocalDateTime - someLocalDateTime_MIN_GT: LocalDateTime - someLocalDateTime_MIN_GTE: LocalDateTime - someLocalDateTime_MIN_LT: LocalDateTime - someLocalDateTime_MIN_LTE: LocalDateTime - someLocalTime_MAX_EQUAL: LocalTime - someLocalTime_MAX_GT: LocalTime - someLocalTime_MAX_GTE: LocalTime - someLocalTime_MAX_LT: LocalTime - someLocalTime_MAX_LTE: LocalTime - someLocalTime_MIN_EQUAL: LocalTime - someLocalTime_MIN_GT: LocalTime - someLocalTime_MIN_GTE: LocalTime - someLocalTime_MIN_LT: LocalTime - someLocalTime_MIN_LTE: LocalTime - someString_AVERAGE_LENGTH_EQUAL: Float - someString_AVERAGE_LENGTH_GT: Float - someString_AVERAGE_LENGTH_GTE: Float - someString_AVERAGE_LENGTH_LT: Float - someString_AVERAGE_LENGTH_LTE: Float - someString_LONGEST_LENGTH_EQUAL: Int - someString_LONGEST_LENGTH_GT: Int - someString_LONGEST_LENGTH_GTE: Int - someString_LONGEST_LENGTH_LT: Int - someString_LONGEST_LENGTH_LTE: Int - someString_SHORTEST_LENGTH_EQUAL: Int - someString_SHORTEST_LENGTH_GT: Int - someString_SHORTEST_LENGTH_GTE: Int - someString_SHORTEST_LENGTH_LT: Int - someString_SHORTEST_LENGTH_LTE: Int - someTime_MAX_EQUAL: Time - someTime_MAX_GT: Time - someTime_MAX_GTE: Time - someTime_MAX_LT: Time - someTime_MAX_LTE: Time - someTime_MIN_EQUAL: Time - someTime_MIN_GT: Time - someTime_MIN_GTE: Time - someTime_MIN_LT: Time - someTime_MIN_LTE: Time + someBigInt: BigIntScalarAggregationFilters + someBigInt_AVERAGE_EQUAL: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { average: { eq: ... } } }' instead.\\") + someBigInt_AVERAGE_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { average: { gt: ... } } }' instead.\\") + someBigInt_AVERAGE_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { average: { gte: ... } } }' instead.\\") + someBigInt_AVERAGE_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { average: { lt: ... } } }' instead.\\") + someBigInt_AVERAGE_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { average: { lte: ... } } }' instead.\\") + someBigInt_MAX_EQUAL: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { max: { eq: ... } } }' instead.\\") + someBigInt_MAX_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { max: { gt: ... } } }' instead.\\") + someBigInt_MAX_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { max: { gte: ... } } }' instead.\\") + someBigInt_MAX_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { max: { lt: ... } } }' instead.\\") + someBigInt_MAX_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { max: { lte: ... } } }' instead.\\") + someBigInt_MIN_EQUAL: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { min: { eq: ... } } }' instead.\\") + someBigInt_MIN_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { min: { gt: ... } } }' instead.\\") + someBigInt_MIN_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { min: { gte: ... } } }' instead.\\") + someBigInt_MIN_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { min: { lt: ... } } }' instead.\\") + someBigInt_MIN_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { min: { lte: ... } } }' instead.\\") + someBigInt_SUM_EQUAL: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { sum: { eq: ... } } }' instead.\\") + someBigInt_SUM_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { sum: { gt: ... } } }' instead.\\") + someBigInt_SUM_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { sum: { gte: ... } } }' instead.\\") + someBigInt_SUM_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { sum: { lt: ... } } }' instead.\\") + someBigInt_SUM_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { sum: { lte: ... } } }' instead.\\") + someDateTime: DateTimeScalarAggregationFilters + someDateTime_MAX_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { max: { eq: ... } } }' instead.\\") + someDateTime_MAX_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { max: { gt: ... } } }' instead.\\") + someDateTime_MAX_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { max: { gte: ... } } }' instead.\\") + someDateTime_MAX_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { max: { lt: ... } } }' instead.\\") + someDateTime_MAX_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { max: { lte: ... } } }' instead.\\") + someDateTime_MIN_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { min: { eq: ... } } }' instead.\\") + someDateTime_MIN_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { min: { gt: ... } } }' instead.\\") + someDateTime_MIN_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { min: { gte: ... } } }' instead.\\") + someDateTime_MIN_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { min: { lt: ... } } }' instead.\\") + someDateTime_MIN_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { min: { lte: ... } } }' instead.\\") + someDuration: DurationScalarAggregationFilters + someDuration_AVERAGE_EQUAL: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { average: { eq: ... } } }' instead.\\") + someDuration_AVERAGE_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { average: { gt: ... } } }' instead.\\") + someDuration_AVERAGE_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { average: { gte: ... } } }' instead.\\") + someDuration_AVERAGE_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { average: { lt: ... } } }' instead.\\") + someDuration_AVERAGE_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { average: { lte: ... } } }' instead.\\") + someDuration_MAX_EQUAL: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { max: { eq: ... } } }' instead.\\") + someDuration_MAX_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { max: { gt: ... } } }' instead.\\") + someDuration_MAX_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { max: { gte: ... } } }' instead.\\") + someDuration_MAX_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { max: { lt: ... } } }' instead.\\") + someDuration_MAX_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { max: { lte: ... } } }' instead.\\") + someDuration_MIN_EQUAL: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { min: { eq: ... } } }' instead.\\") + someDuration_MIN_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { min: { gt: ... } } }' instead.\\") + someDuration_MIN_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { min: { gte: ... } } }' instead.\\") + someDuration_MIN_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { min: { lt: ... } } }' instead.\\") + someDuration_MIN_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { min: { lte: ... } } }' instead.\\") + someFloat: FloatScalarAggregationFilters + someFloat_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { average: { eq: ... } } }' instead.\\") + someFloat_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { average: { gt: ... } } }' instead.\\") + someFloat_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { average: { gte: ... } } }' instead.\\") + someFloat_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { average: { lt: ... } } }' instead.\\") + someFloat_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { average: { lte: ... } } }' instead.\\") + someFloat_MAX_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { max: { eq: ... } } }' instead.\\") + someFloat_MAX_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { max: { gt: ... } } }' instead.\\") + someFloat_MAX_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { max: { gte: ... } } }' instead.\\") + someFloat_MAX_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { max: { lt: ... } } }' instead.\\") + someFloat_MAX_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { max: { lte: ... } } }' instead.\\") + someFloat_MIN_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { min: { eq: ... } } }' instead.\\") + someFloat_MIN_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { min: { gt: ... } } }' instead.\\") + someFloat_MIN_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { min: { gte: ... } } }' instead.\\") + someFloat_MIN_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { min: { lt: ... } } }' instead.\\") + someFloat_MIN_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { min: { lte: ... } } }' instead.\\") + someFloat_SUM_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { sum: { eq: ... } } }' instead.\\") + someFloat_SUM_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { sum: { gt: ... } } }' instead.\\") + someFloat_SUM_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { sum: { gte: ... } } }' instead.\\") + someFloat_SUM_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { sum: { lt: ... } } }' instead.\\") + someFloat_SUM_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { sum: { lte: ... } } }' instead.\\") + someInt: IntScalarAggregationFilters + someInt_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { average: { eq: ... } } }' instead.\\") + someInt_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { average: { gt: ... } } }' instead.\\") + someInt_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { average: { gte: ... } } }' instead.\\") + someInt_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { average: { lt: ... } } }' instead.\\") + someInt_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { average: { lte: ... } } }' instead.\\") + someInt_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { max: { eq: ... } } }' instead.\\") + someInt_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { max: { gt: ... } } }' instead.\\") + someInt_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { max: { gte: ... } } }' instead.\\") + someInt_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { max: { lt: ... } } }' instead.\\") + someInt_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { max: { lte: ... } } }' instead.\\") + someInt_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { min: { eq: ... } } }' instead.\\") + someInt_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { min: { gt: ... } } }' instead.\\") + someInt_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { min: { gte: ... } } }' instead.\\") + someInt_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { min: { lt: ... } } }' instead.\\") + someInt_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { min: { lte: ... } } }' instead.\\") + someInt_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { sum: { eq: ... } } }' instead.\\") + someInt_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { sum: { gt: ... } } }' instead.\\") + someInt_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { sum: { gte: ... } } }' instead.\\") + someInt_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { sum: { lt: ... } } }' instead.\\") + someInt_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { sum: { lte: ... } } }' instead.\\") + someLocalDateTime: LocalDateTimeScalarAggregationFilters + someLocalDateTime_MAX_EQUAL: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { max: { eq: ... } } }' instead.\\") + someLocalDateTime_MAX_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { max: { gt: ... } } }' instead.\\") + someLocalDateTime_MAX_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { max: { gte: ... } } }' instead.\\") + someLocalDateTime_MAX_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { max: { lt: ... } } }' instead.\\") + someLocalDateTime_MAX_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { max: { lte: ... } } }' instead.\\") + someLocalDateTime_MIN_EQUAL: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { min: { eq: ... } } }' instead.\\") + someLocalDateTime_MIN_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { min: { gt: ... } } }' instead.\\") + someLocalDateTime_MIN_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { min: { gte: ... } } }' instead.\\") + someLocalDateTime_MIN_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { min: { lt: ... } } }' instead.\\") + someLocalDateTime_MIN_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { min: { lte: ... } } }' instead.\\") + someLocalTime: LocalTimeScalarAggregationFilters + someLocalTime_MAX_EQUAL: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { max: { eq: ... } } }' instead.\\") + someLocalTime_MAX_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { max: { gt: ... } } }' instead.\\") + someLocalTime_MAX_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { max: { gte: ... } } }' instead.\\") + someLocalTime_MAX_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { max: { lt: ... } } }' instead.\\") + someLocalTime_MAX_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { max: { lte: ... } } }' instead.\\") + someLocalTime_MIN_EQUAL: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { min: { eq: ... } } }' instead.\\") + someLocalTime_MIN_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { min: { gt: ... } } }' instead.\\") + someLocalTime_MIN_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { min: { gte: ... } } }' instead.\\") + someLocalTime_MIN_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { min: { lt: ... } } }' instead.\\") + someLocalTime_MIN_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { min: { lte: ... } } }' instead.\\") + someString: StringScalarAggregationFilters + someString_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { eq: ... } } }' instead.\\") + someString_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { gt: ... } } }' instead.\\") + someString_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { gte: ... } } }' instead.\\") + someString_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { lt: ... } } }' instead.\\") + someString_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { lte: ... } } }' instead.\\") + someString_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { eq: ... } } }' instead.\\") + someString_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { gt: ... } } }' instead.\\") + someString_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { gte: ... } } }' instead.\\") + someString_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { lt: ... } } }' instead.\\") + someString_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { lte: ... } } }' instead.\\") + someString_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { eq: ... } } }' instead.\\") + someString_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { gt: ... } } }' instead.\\") + someString_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { gte: ... } } }' instead.\\") + someString_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { lt: ... } } }' instead.\\") + someString_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { lte: ... } } }' instead.\\") + someTime: TimeScalarAggregationFilters + someTime_MAX_EQUAL: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { max: { eq: ... } } }' instead.\\") + someTime_MAX_GT: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { max: { gt: ... } } }' instead.\\") + someTime_MAX_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { max: { gte: ... } } }' instead.\\") + someTime_MAX_LT: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { max: { lt: ... } } }' instead.\\") + someTime_MAX_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { max: { lte: ... } } }' instead.\\") + someTime_MIN_EQUAL: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { min: { eq: ... } } }' instead.\\") + someTime_MIN_GT: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { min: { gt: ... } } }' instead.\\") + someTime_MIN_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { min: { gte: ... } } }' instead.\\") + someTime_MIN_LT: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { min: { lt: ... } } }' instead.\\") + someTime_MIN_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { min: { lte: ... } } }' instead.\\") } type PostLikesRelationship { @@ -1034,7 +1415,8 @@ describe("Aggregations", () => { input PostUpdateInput { likes: [PostLikesUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } type PostUserLikesAggregationSelection { @@ -1048,7 +1430,6 @@ describe("Aggregations", () => { someDateTime: DateTimeAggregateSelection! someDuration: DurationAggregateSelection! someFloat: FloatAggregateSelection! - someId: IDAggregateSelection! someInt: IntAggregateSelection! someLocalDateTime: LocalDateTimeAggregateSelection! someLocalTime: LocalTimeAggregateSelection! @@ -1061,7 +1442,6 @@ describe("Aggregations", () => { someDateTime: DateTimeAggregateSelection! someDuration: DurationAggregateSelection! someFloat: FloatAggregateSelection! - someId: IDAggregateSelection! someInt: IntAggregateSelection! someLocalDateTime: LocalDateTimeAggregateSelection! someLocalTime: LocalTimeAggregateSelection! @@ -1073,36 +1453,39 @@ describe("Aggregations", () => { AND: [PostWhere!] NOT: PostWhere OR: [PostWhere!] + likes: UserRelationshipFilters likesAggregate: PostLikesAggregateInput + likesConnection: PostLikesConnectionFilters \\"\\"\\" Return Posts where all of the related PostLikesConnections match this filter \\"\\"\\" - likesConnection_ALL: PostLikesConnectionWhere + likesConnection_ALL: PostLikesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'likesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Posts where none of the related PostLikesConnections match this filter \\"\\"\\" - likesConnection_NONE: PostLikesConnectionWhere + likesConnection_NONE: PostLikesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'likesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Posts where one of the related PostLikesConnections match this filter \\"\\"\\" - likesConnection_SINGLE: PostLikesConnectionWhere + likesConnection_SINGLE: PostLikesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'likesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Posts where some of the related PostLikesConnections match this filter \\"\\"\\" - likesConnection_SOME: PostLikesConnectionWhere + likesConnection_SOME: PostLikesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'likesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Posts where all of the related Users match this filter\\"\\"\\" - likes_ALL: UserWhere + likes_ALL: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'likes: { all: ... }' instead.\\") \\"\\"\\"Return Posts where none of the related Users match this filter\\"\\"\\" - likes_NONE: UserWhere + likes_NONE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'likes: { none: ... }' instead.\\") \\"\\"\\"Return Posts where one of the related Users match this filter\\"\\"\\" - likes_SINGLE: UserWhere + likes_SINGLE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'likes: { single: ... }' instead.\\") \\"\\"\\"Return Posts where some of the related Users match this filter\\"\\"\\" - likes_SOME: UserWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + likes_SOME: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'likes: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type PostsConnection { @@ -1133,6 +1516,27 @@ describe("Aggregations", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\"A time, represented as an RFC3339 time string\\"\\"\\" scalar Time @@ -1141,6 +1545,27 @@ describe("Aggregations", () => { min: Time } + \\"\\"\\"Filters for an aggregation of an Time input field\\"\\"\\" + input TimeScalarAggregationFilters { + max: TimeScalarFilters + min: TimeScalarFilters + } + + \\"\\"\\"Time filters\\"\\"\\" + input TimeScalarFilters { + eq: Time + gt: Time + gte: Time + in: [Time!] + lt: Time + lte: Time + } + + \\"\\"\\"Time mutations\\"\\"\\" + input TimeScalarMutations { + set: Time + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -1180,7 +1605,6 @@ describe("Aggregations", () => { someDateTime: DateTimeAggregateSelection! someDuration: DurationAggregateSelection! someFloat: FloatAggregateSelection! - someId: IDAggregateSelection! someInt: IntAggregateSelection! someLocalDateTime: LocalDateTimeAggregateSelection! someLocalTime: LocalTimeAggregateSelection! @@ -1210,6 +1634,1210 @@ describe("Aggregations", () => { node: User! } + input UserRelationshipFilters { + \\"\\"\\"Filter type where all of the related Users match this filter\\"\\"\\" + all: UserWhere + \\"\\"\\"Filter type where none of the related Users match this filter\\"\\"\\" + none: UserWhere + \\"\\"\\"Filter type where one of the related Users match this filter\\"\\"\\" + single: UserWhere + \\"\\"\\"Filter type where some of the related Users match this filter\\"\\"\\" + some: UserWhere + } + + \\"\\"\\" + Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. + \\"\\"\\" + input UserSort { + someBigInt: SortDirection + someDateTime: SortDirection + someDuration: SortDirection + someFloat: SortDirection + someId: SortDirection + someInt: SortDirection + someLocalDateTime: SortDirection + someLocalTime: SortDirection + someString: SortDirection + someTime: SortDirection + } + + input UserUpdateInput { + someBigInt: BigIntScalarMutations + someBigInt_DECREMENT: BigInt @deprecated(reason: \\"Please use the relevant generic mutation 'someBigInt: { decrement: ... } }' instead.\\") + someBigInt_INCREMENT: BigInt @deprecated(reason: \\"Please use the relevant generic mutation 'someBigInt: { increment: ... } }' instead.\\") + someBigInt_SET: BigInt @deprecated(reason: \\"Please use the generic mutation 'someBigInt: { set: ... } }' instead.\\") + someDateTime: DateTimeScalarMutations + someDateTime_SET: DateTime @deprecated(reason: \\"Please use the generic mutation 'someDateTime: { set: ... } }' instead.\\") + someDuration: DurationScalarMutations + someDuration_SET: Duration @deprecated(reason: \\"Please use the generic mutation 'someDuration: { set: ... } }' instead.\\") + someFloat: FloatScalarMutations + someFloat_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { add: ... } }' instead.\\") + someFloat_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { divide: ... } }' instead.\\") + someFloat_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { multiply: ... } }' instead.\\") + someFloat_SET: Float @deprecated(reason: \\"Please use the generic mutation 'someFloat: { set: ... } }' instead.\\") + someFloat_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { subtract: ... } }' instead.\\") + someId: IDScalarMutations + someId_SET: ID @deprecated(reason: \\"Please use the generic mutation 'someId: { set: ... } }' instead.\\") + someInt: IntScalarMutations + someInt_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'someInt: { decrement: ... } }' instead.\\") + someInt_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'someInt: { increment: ... } }' instead.\\") + someInt_SET: Int @deprecated(reason: \\"Please use the generic mutation 'someInt: { set: ... } }' instead.\\") + someLocalDateTime: LocalDateTimeScalarMutations + someLocalDateTime_SET: LocalDateTime @deprecated(reason: \\"Please use the generic mutation 'someLocalDateTime: { set: ... } }' instead.\\") + someLocalTime: LocalTimeScalarMutations + someLocalTime_SET: LocalTime @deprecated(reason: \\"Please use the generic mutation 'someLocalTime: { set: ... } }' instead.\\") + someString: StringScalarMutations + someString_SET: String @deprecated(reason: \\"Please use the generic mutation 'someString: { set: ... } }' instead.\\") + someTime: TimeScalarMutations + someTime_SET: Time @deprecated(reason: \\"Please use the generic mutation 'someTime: { set: ... } }' instead.\\") + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + someBigInt: BigIntScalarFilters + someBigInt_EQ: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { eq: ... }\\") + someBigInt_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { gt: ... }\\") + someBigInt_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { gte: ... }\\") + someBigInt_IN: [BigInt] @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { in: ... }\\") + someBigInt_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { lt: ... }\\") + someBigInt_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { lte: ... }\\") + someDateTime: DateTimeScalarFilters + someDateTime_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { eq: ... }\\") + someDateTime_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { gt: ... }\\") + someDateTime_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { gte: ... }\\") + someDateTime_IN: [DateTime] @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { in: ... }\\") + someDateTime_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { lt: ... }\\") + someDateTime_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { lte: ... }\\") + someDuration: DurationScalarFilters + someDuration_EQ: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { eq: ... }\\") + someDuration_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { gt: ... }\\") + someDuration_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { gte: ... }\\") + someDuration_IN: [Duration] @deprecated(reason: \\"Please use the relevant generic filter someDuration: { in: ... }\\") + someDuration_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { lt: ... }\\") + someDuration_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { lte: ... }\\") + someFloat: FloatScalarFilters + someFloat_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { eq: ... }\\") + someFloat_GT: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { gt: ... }\\") + someFloat_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { gte: ... }\\") + someFloat_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter someFloat: { in: ... }\\") + someFloat_LT: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { lt: ... }\\") + someFloat_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { lte: ... }\\") + someId: IDScalarFilters + someId_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { contains: ... }\\") + someId_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { endsWith: ... }\\") + someId_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { eq: ... }\\") + someId_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter someId: { in: ... }\\") + someId_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { startsWith: ... }\\") + someInt: IntScalarFilters + someInt_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { eq: ... }\\") + someInt_GT: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { gt: ... }\\") + someInt_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { gte: ... }\\") + someInt_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter someInt: { in: ... }\\") + someInt_LT: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { lt: ... }\\") + someInt_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { lte: ... }\\") + someLocalDateTime: LocalDateTimeScalarFilters + someLocalDateTime_EQ: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { eq: ... }\\") + someLocalDateTime_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { gt: ... }\\") + someLocalDateTime_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { gte: ... }\\") + someLocalDateTime_IN: [LocalDateTime] @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { in: ... }\\") + someLocalDateTime_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { lt: ... }\\") + someLocalDateTime_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { lte: ... }\\") + someLocalTime: LocalTimeScalarFilters + someLocalTime_EQ: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { eq: ... }\\") + someLocalTime_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { gt: ... }\\") + someLocalTime_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { gte: ... }\\") + someLocalTime_IN: [LocalTime] @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { in: ... }\\") + someLocalTime_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { lt: ... }\\") + someLocalTime_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { lte: ... }\\") + someString: StringScalarFilters + someString_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter someString: { contains: ... }\\") + someString_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter someString: { endsWith: ... }\\") + someString_EQ: String @deprecated(reason: \\"Please use the relevant generic filter someString: { eq: ... }\\") + someString_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter someString: { in: ... }\\") + someString_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter someString: { startsWith: ... }\\") + someTime: TimeScalarFilters + someTime_EQ: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { eq: ... }\\") + someTime_GT: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { gt: ... }\\") + someTime_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { gte: ... }\\") + someTime_IN: [Time] @deprecated(reason: \\"Please use the relevant generic filter someTime: { in: ... }\\") + someTime_LT: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { lt: ... }\\") + someTime_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { lte: ... }\\") + } + + type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + }" + `); + }); + + test("Where Level Aggregations with arrays", async () => { + const typeDefs = gql` + type User @node { + someId: ID + someString: String + someFloat: Float + someInt: Int + someBigInt: BigInt + someDateTime: DateTime + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someTime: Time + someDuration: Duration + } + + type Post @node { + title: String + likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") + } + + type Likes @relationshipProperties { + someId: [ID!]! + someString: [String!]! + someFloat: [Float!]! + someInt: [Int!]! + someBigInt: [BigInt!]! + someDateTime: [DateTime!]! + someLocalDateTime: [LocalDateTime!]! + someLocalTime: [LocalTime!]! + someTime: [Time!]! + someDuration: [Duration!]! + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\" + A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. + \\"\\"\\" + scalar BigInt + + type BigIntAggregateSelection { + average: BigInt + max: BigInt + min: BigInt + sum: BigInt + } + + \\"\\"\\"BigInt list filters\\"\\"\\" + input BigIntListFilters { + eq: [BigInt!] + includes: BigInt + } + + \\"\\"\\"Filters for an aggregation of an BigInt field\\"\\"\\" + input BigIntScalarAggregationFilters { + average: BigIntScalarFilters + max: BigIntScalarFilters + min: BigIntScalarFilters + sum: BigIntScalarFilters + } + + \\"\\"\\"BigInt filters\\"\\"\\" + input BigIntScalarFilters { + eq: BigInt + gt: BigInt + gte: BigInt + in: [BigInt!] + lt: BigInt + lte: BigInt + } + + \\"\\"\\"BigInt mutations\\"\\"\\" + input BigIntScalarMutations { + add: BigInt + set: BigInt + subtract: BigInt + } + + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" + type CreateInfo { + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreatePostsMutationResponse { + info: CreateInfo! + posts: [Post!]! + } + + type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! + } + + \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" + scalar DateTime + + type DateTimeAggregateSelection { + max: DateTime + min: DateTime + } + + \\"\\"\\"DateTime list filters\\"\\"\\" + input DateTimeListFilters { + eq: [DateTime!] + includes: DateTime + } + + \\"\\"\\"Filters for an aggregation of an DateTime input field\\"\\"\\" + input DateTimeScalarAggregationFilters { + max: DateTimeScalarFilters + min: DateTimeScalarFilters + } + + \\"\\"\\"DateTime filters\\"\\"\\" + input DateTimeScalarFilters { + eq: DateTime + gt: DateTime + gte: DateTime + in: [DateTime!] + lt: DateTime + lte: DateTime + } + + \\"\\"\\"DateTime mutations\\"\\"\\" + input DateTimeScalarMutations { + set: DateTime + } + + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" + type DeleteInfo { + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + \\"\\"\\"A duration, represented as an ISO 8601 duration string\\"\\"\\" + scalar Duration + + type DurationAggregateSelection { + max: Duration + min: Duration + } + + \\"\\"\\"Duration list filters\\"\\"\\" + input DurationListFilters { + eq: [Duration!] + includes: Duration + } + + \\"\\"\\"Filters for an aggregation of a Dutation input field\\"\\"\\" + input DurationScalarAggregationFilters { + average: DurationScalarFilters + max: DurationScalarFilters + min: DurationScalarFilters + } + + \\"\\"\\"Duration filters\\"\\"\\" + input DurationScalarFilters { + eq: Duration + gt: Duration + gte: Duration + in: [Duration!] + lt: Duration + lte: Duration + } + + \\"\\"\\"Duration mutations\\"\\"\\" + input DurationScalarMutations { + set: Duration + } + + type FloatAggregateSelection { + average: Float + max: Float + min: Float + sum: Float + } + + \\"\\"\\"Float list filters\\"\\"\\" + input FloatListFilters { + eq: [Float!] + includes: Float + } + + \\"\\"\\"Filters for an aggregation of a float field\\"\\"\\" + input FloatScalarAggregationFilters { + average: FloatScalarFilters + max: FloatScalarFilters + min: FloatScalarFilters + sum: FloatScalarFilters + } + + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + + \\"\\"\\"ID list filters\\"\\"\\" + input IDListFilters { + eq: [ID!] + includes: ID + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + type IntAggregateSelection { + average: Float + max: Int + min: Int + sum: Int + } + + \\"\\"\\"Int list filters\\"\\"\\" + input IntListFilters { + eq: [Int!] + includes: Int + } + + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + + \\"\\"\\" + The edge properties for the following fields: + * Post.likes + \\"\\"\\" + type Likes { + someBigInt: [BigInt!]! + someDateTime: [DateTime!]! + someDuration: [Duration!]! + someFloat: [Float!]! + someId: [ID!]! + someInt: [Int!]! + someLocalDateTime: [LocalDateTime!]! + someLocalTime: [LocalTime!]! + someString: [String!]! + someTime: [Time!]! + } + + input LikesCreateInput { + someBigInt: [BigInt!]! + someDateTime: [DateTime!]! + someDuration: [Duration!]! + someFloat: [Float!]! + someId: [ID!]! + someInt: [Int!]! + someLocalDateTime: [LocalDateTime!]! + someLocalTime: [LocalTime!]! + someString: [String!]! + someTime: [Time!]! + } + + input LikesSort { + someBigInt: SortDirection + someDateTime: SortDirection + someDuration: SortDirection + someFloat: SortDirection + someId: SortDirection + someInt: SortDirection + someLocalDateTime: SortDirection + someLocalTime: SortDirection + someString: SortDirection + someTime: SortDirection + } + + input LikesUpdateInput { + someBigInt: ListBigIntMutations + someBigInt_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someBigInt: { pop: ... } }' instead.\\") + someBigInt_PUSH: [BigInt!] @deprecated(reason: \\"Please use the generic mutation 'someBigInt: { push: ... } }' instead.\\") + someBigInt_SET: [BigInt!] @deprecated(reason: \\"Please use the generic mutation 'someBigInt: { set: ... } }' instead.\\") + someDateTime: ListDateTimeMutations + someDateTime_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someDateTime: { pop: ... } }' instead.\\") + someDateTime_PUSH: [DateTime!] @deprecated(reason: \\"Please use the generic mutation 'someDateTime: { push: ... } }' instead.\\") + someDateTime_SET: [DateTime!] @deprecated(reason: \\"Please use the generic mutation 'someDateTime: { set: ... } }' instead.\\") + someDuration: ListDurationMutations + someDuration_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someDuration: { pop: ... } }' instead.\\") + someDuration_PUSH: [Duration!] @deprecated(reason: \\"Please use the generic mutation 'someDuration: { push: ... } }' instead.\\") + someDuration_SET: [Duration!] @deprecated(reason: \\"Please use the generic mutation 'someDuration: { set: ... } }' instead.\\") + someFloat: ListFloatMutations + someFloat_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someFloat: { pop: ... } }' instead.\\") + someFloat_PUSH: [Float!] @deprecated(reason: \\"Please use the generic mutation 'someFloat: { push: ... } }' instead.\\") + someFloat_SET: [Float!] @deprecated(reason: \\"Please use the generic mutation 'someFloat: { set: ... } }' instead.\\") + someId: ListIDMutations + someId_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someId: { pop: ... } }' instead.\\") + someId_PUSH: [ID!] @deprecated(reason: \\"Please use the generic mutation 'someId: { push: ... } }' instead.\\") + someId_SET: [ID!] @deprecated(reason: \\"Please use the generic mutation 'someId: { set: ... } }' instead.\\") + someInt: ListIntMutations + someInt_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someInt: { pop: ... } }' instead.\\") + someInt_PUSH: [Int!] @deprecated(reason: \\"Please use the generic mutation 'someInt: { push: ... } }' instead.\\") + someInt_SET: [Int!] @deprecated(reason: \\"Please use the generic mutation 'someInt: { set: ... } }' instead.\\") + someLocalDateTime: ListLocalDateTimeMutations + someLocalDateTime_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someLocalDateTime: { pop: ... } }' instead.\\") + someLocalDateTime_PUSH: [LocalDateTime!] @deprecated(reason: \\"Please use the generic mutation 'someLocalDateTime: { push: ... } }' instead.\\") + someLocalDateTime_SET: [LocalDateTime!] @deprecated(reason: \\"Please use the generic mutation 'someLocalDateTime: { set: ... } }' instead.\\") + someLocalTime: ListLocalTimeMutations + someLocalTime_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someLocalTime: { pop: ... } }' instead.\\") + someLocalTime_PUSH: [LocalTime!] @deprecated(reason: \\"Please use the generic mutation 'someLocalTime: { push: ... } }' instead.\\") + someLocalTime_SET: [LocalTime!] @deprecated(reason: \\"Please use the generic mutation 'someLocalTime: { set: ... } }' instead.\\") + someString: ListStringMutations + someString_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someString: { pop: ... } }' instead.\\") + someString_PUSH: [String!] @deprecated(reason: \\"Please use the generic mutation 'someString: { push: ... } }' instead.\\") + someString_SET: [String!] @deprecated(reason: \\"Please use the generic mutation 'someString: { set: ... } }' instead.\\") + someTime: ListTimeMutations + someTime_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someTime: { pop: ... } }' instead.\\") + someTime_PUSH: [Time!] @deprecated(reason: \\"Please use the generic mutation 'someTime: { push: ... } }' instead.\\") + someTime_SET: [Time!] @deprecated(reason: \\"Please use the generic mutation 'someTime: { set: ... } }' instead.\\") + } + + input LikesWhere { + AND: [LikesWhere!] + NOT: LikesWhere + OR: [LikesWhere!] + someBigInt: BigIntListFilters + someBigInt_EQ: [BigInt!] @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { eq: ... }\\") + someBigInt_INCLUDES: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { includes: ... }\\") + someDateTime: DateTimeListFilters + someDateTime_EQ: [DateTime!] @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { eq: ... }\\") + someDateTime_INCLUDES: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { includes: ... }\\") + someDuration: DurationListFilters + someDuration_EQ: [Duration!] @deprecated(reason: \\"Please use the relevant generic filter someDuration: { eq: ... }\\") + someDuration_INCLUDES: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { includes: ... }\\") + someFloat: FloatListFilters + someFloat_EQ: [Float!] @deprecated(reason: \\"Please use the relevant generic filter someFloat: { eq: ... }\\") + someFloat_INCLUDES: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { includes: ... }\\") + someId: IDListFilters + someId_EQ: [ID!] @deprecated(reason: \\"Please use the relevant generic filter someId: { eq: ... }\\") + someId_INCLUDES: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { includes: ... }\\") + someInt: IntListFilters + someInt_EQ: [Int!] @deprecated(reason: \\"Please use the relevant generic filter someInt: { eq: ... }\\") + someInt_INCLUDES: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { includes: ... }\\") + someLocalDateTime: LocalDateTimeListFilters + someLocalDateTime_EQ: [LocalDateTime!] @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { eq: ... }\\") + someLocalDateTime_INCLUDES: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { includes: ... }\\") + someLocalTime: LocalTimeListFilters + someLocalTime_EQ: [LocalTime!] @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { eq: ... }\\") + someLocalTime_INCLUDES: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { includes: ... }\\") + someString: StringListFilters + someString_EQ: [String!] @deprecated(reason: \\"Please use the relevant generic filter someString: { eq: ... }\\") + someString_INCLUDES: String @deprecated(reason: \\"Please use the relevant generic filter someString: { includes: ... }\\") + someTime: TimeListFilters + someTime_EQ: [Time!] @deprecated(reason: \\"Please use the relevant generic filter someTime: { eq: ... }\\") + someTime_INCLUDES: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { includes: ... }\\") + } + + \\"\\"\\"Mutations for a list for BigInt\\"\\"\\" + input ListBigIntMutations { + pop: Int + push: [BigInt!] + set: [BigInt!] + } + + \\"\\"\\"Mutations for a list for DateTime\\"\\"\\" + input ListDateTimeMutations { + pop: Int + push: [DateTime!] + set: [DateTime!] + } + + \\"\\"\\"Mutations for a list for Duration\\"\\"\\" + input ListDurationMutations { + pop: Int + push: [Duration!] + set: [Duration!] + } + + \\"\\"\\"Mutations for a list for Float\\"\\"\\" + input ListFloatMutations { + pop: Int + push: [Float!] + set: [Float!] + } + + \\"\\"\\"Mutations for a list for ID\\"\\"\\" + input ListIDMutations { + pop: Int + push: [ID!] + set: [ID!] + } + + \\"\\"\\"Mutations for a list for Int\\"\\"\\" + input ListIntMutations { + pop: Int + push: [Int!] + set: [Int!] + } + + \\"\\"\\"Mutations for a list for LocalDateTime\\"\\"\\" + input ListLocalDateTimeMutations { + pop: Int + push: [LocalDateTime!] + set: [LocalDateTime!] + } + + \\"\\"\\"Mutations for a list for LocalTime\\"\\"\\" + input ListLocalTimeMutations { + pop: Int + push: [LocalTime!] + set: [LocalTime!] + } + + \\"\\"\\"Mutations for a list for String\\"\\"\\" + input ListStringMutations { + pop: Int + push: [String!] + set: [String!] + } + + \\"\\"\\"Mutations for a list for Time\\"\\"\\" + input ListTimeMutations { + pop: Int + push: [Time!] + set: [Time!] + } + + \\"\\"\\"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'\\"\\"\\" + scalar LocalDateTime + + type LocalDateTimeAggregateSelection { + max: LocalDateTime + min: LocalDateTime + } + + \\"\\"\\"LocalDateTime list filters\\"\\"\\" + input LocalDateTimeListFilters { + eq: [LocalDateTime!] + includes: LocalDateTime + } + + \\"\\"\\"Filters for an aggregation of an LocalDateTime input field\\"\\"\\" + input LocalDateTimeScalarAggregationFilters { + max: LocalDateTimeScalarFilters + min: LocalDateTimeScalarFilters + } + + \\"\\"\\"LocalDateTime filters\\"\\"\\" + input LocalDateTimeScalarFilters { + eq: LocalDateTime + gt: LocalDateTime + gte: LocalDateTime + in: [LocalDateTime!] + lt: LocalDateTime + lte: LocalDateTime + } + + \\"\\"\\"LocalDateTime mutations\\"\\"\\" + input LocalDateTimeScalarMutations { + set: LocalDateTime + } + + \\"\\"\\" + A local time, represented as a time string without timezone information + \\"\\"\\" + scalar LocalTime + + type LocalTimeAggregateSelection { + max: LocalTime + min: LocalTime + } + + \\"\\"\\"LocalTime list filters\\"\\"\\" + input LocalTimeListFilters { + eq: [LocalTime!] + includes: LocalTime + } + + \\"\\"\\"Filters for an aggregation of an LocalTime input field\\"\\"\\" + input LocalTimeScalarAggregationFilters { + max: LocalTimeScalarFilters + min: LocalTimeScalarFilters + } + + \\"\\"\\"LocalTime filters\\"\\"\\" + input LocalTimeScalarFilters { + eq: LocalTime + gt: LocalTime + gte: LocalTime + in: [LocalTime!] + lt: LocalTime + lte: LocalTime + } + + \\"\\"\\"LocalTime mutations\\"\\"\\" + input LocalTimeScalarMutations { + set: LocalTime + } + + type Mutation { + createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! + deleteUsers(where: UserWhere): DeleteInfo! + updatePosts(update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! + updateUsers(update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Post { + likes(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + likesAggregate(where: UserWhere): PostUserLikesAggregationSelection + likesConnection(after: String, first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! + title: String + } + + type PostAggregateSelection { + count: Int! + title: StringAggregateSelection! + } + + input PostCreateInput { + likes: PostLikesFieldInput + title: String + } + + input PostDeleteInput { + likes: [PostLikesDeleteFieldInput!] + } + + type PostEdge { + cursor: String! + node: Post! + } + + input PostLikesAggregateInput { + AND: [PostLikesAggregateInput!] + NOT: PostLikesAggregateInput + OR: [PostLikesAggregateInput!] + count: IntScalarFilters + count_EQ: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: PostLikesNodeAggregationWhereInput + } + + input PostLikesConnectFieldInput { + edge: LikesCreateInput! + where: UserConnectWhere + } + + type PostLikesConnection { + edges: [PostLikesRelationship!]! + pageInfo: PageInfo! + 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 + } + + input PostLikesConnectionWhere { + AND: [PostLikesConnectionWhere!] + NOT: PostLikesConnectionWhere + OR: [PostLikesConnectionWhere!] + edge: LikesWhere + node: UserWhere + } + + input PostLikesCreateFieldInput { + edge: LikesCreateInput! + node: UserCreateInput! + } + + input PostLikesDeleteFieldInput { + where: PostLikesConnectionWhere + } + + input PostLikesDisconnectFieldInput { + where: PostLikesConnectionWhere + } + + input PostLikesFieldInput { + connect: [PostLikesConnectFieldInput!] + create: [PostLikesCreateFieldInput!] + } + + input PostLikesNodeAggregationWhereInput { + AND: [PostLikesNodeAggregationWhereInput!] + NOT: PostLikesNodeAggregationWhereInput + OR: [PostLikesNodeAggregationWhereInput!] + someBigInt: BigIntScalarAggregationFilters + someBigInt_AVERAGE_EQUAL: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { average: { eq: ... } } }' instead.\\") + someBigInt_AVERAGE_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { average: { gt: ... } } }' instead.\\") + someBigInt_AVERAGE_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { average: { gte: ... } } }' instead.\\") + someBigInt_AVERAGE_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { average: { lt: ... } } }' instead.\\") + someBigInt_AVERAGE_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { average: { lte: ... } } }' instead.\\") + someBigInt_MAX_EQUAL: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { max: { eq: ... } } }' instead.\\") + someBigInt_MAX_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { max: { gt: ... } } }' instead.\\") + someBigInt_MAX_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { max: { gte: ... } } }' instead.\\") + someBigInt_MAX_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { max: { lt: ... } } }' instead.\\") + someBigInt_MAX_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { max: { lte: ... } } }' instead.\\") + someBigInt_MIN_EQUAL: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { min: { eq: ... } } }' instead.\\") + someBigInt_MIN_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { min: { gt: ... } } }' instead.\\") + someBigInt_MIN_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { min: { gte: ... } } }' instead.\\") + someBigInt_MIN_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { min: { lt: ... } } }' instead.\\") + someBigInt_MIN_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { min: { lte: ... } } }' instead.\\") + someBigInt_SUM_EQUAL: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { sum: { eq: ... } } }' instead.\\") + someBigInt_SUM_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { sum: { gt: ... } } }' instead.\\") + someBigInt_SUM_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { sum: { gte: ... } } }' instead.\\") + someBigInt_SUM_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { sum: { lt: ... } } }' instead.\\") + someBigInt_SUM_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter 'someBigInt: { sum: { lte: ... } } }' instead.\\") + someDateTime: DateTimeScalarAggregationFilters + someDateTime_MAX_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { max: { eq: ... } } }' instead.\\") + someDateTime_MAX_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { max: { gt: ... } } }' instead.\\") + someDateTime_MAX_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { max: { gte: ... } } }' instead.\\") + someDateTime_MAX_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { max: { lt: ... } } }' instead.\\") + someDateTime_MAX_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { max: { lte: ... } } }' instead.\\") + someDateTime_MIN_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { min: { eq: ... } } }' instead.\\") + someDateTime_MIN_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { min: { gt: ... } } }' instead.\\") + someDateTime_MIN_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { min: { gte: ... } } }' instead.\\") + someDateTime_MIN_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { min: { lt: ... } } }' instead.\\") + someDateTime_MIN_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'someDateTime: { min: { lte: ... } } }' instead.\\") + someDuration: DurationScalarAggregationFilters + someDuration_AVERAGE_EQUAL: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { average: { eq: ... } } }' instead.\\") + someDuration_AVERAGE_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { average: { gt: ... } } }' instead.\\") + someDuration_AVERAGE_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { average: { gte: ... } } }' instead.\\") + someDuration_AVERAGE_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { average: { lt: ... } } }' instead.\\") + someDuration_AVERAGE_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { average: { lte: ... } } }' instead.\\") + someDuration_MAX_EQUAL: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { max: { eq: ... } } }' instead.\\") + someDuration_MAX_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { max: { gt: ... } } }' instead.\\") + someDuration_MAX_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { max: { gte: ... } } }' instead.\\") + someDuration_MAX_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { max: { lt: ... } } }' instead.\\") + someDuration_MAX_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { max: { lte: ... } } }' instead.\\") + someDuration_MIN_EQUAL: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { min: { eq: ... } } }' instead.\\") + someDuration_MIN_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { min: { gt: ... } } }' instead.\\") + someDuration_MIN_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { min: { gte: ... } } }' instead.\\") + someDuration_MIN_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { min: { lt: ... } } }' instead.\\") + someDuration_MIN_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'someDuration: { min: { lte: ... } } }' instead.\\") + someFloat: FloatScalarAggregationFilters + someFloat_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { average: { eq: ... } } }' instead.\\") + someFloat_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { average: { gt: ... } } }' instead.\\") + someFloat_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { average: { gte: ... } } }' instead.\\") + someFloat_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { average: { lt: ... } } }' instead.\\") + someFloat_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { average: { lte: ... } } }' instead.\\") + someFloat_MAX_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { max: { eq: ... } } }' instead.\\") + someFloat_MAX_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { max: { gt: ... } } }' instead.\\") + someFloat_MAX_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { max: { gte: ... } } }' instead.\\") + someFloat_MAX_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { max: { lt: ... } } }' instead.\\") + someFloat_MAX_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { max: { lte: ... } } }' instead.\\") + someFloat_MIN_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { min: { eq: ... } } }' instead.\\") + someFloat_MIN_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { min: { gt: ... } } }' instead.\\") + someFloat_MIN_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { min: { gte: ... } } }' instead.\\") + someFloat_MIN_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { min: { lt: ... } } }' instead.\\") + someFloat_MIN_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { min: { lte: ... } } }' instead.\\") + someFloat_SUM_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { sum: { eq: ... } } }' instead.\\") + someFloat_SUM_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { sum: { gt: ... } } }' instead.\\") + someFloat_SUM_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { sum: { gte: ... } } }' instead.\\") + someFloat_SUM_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { sum: { lt: ... } } }' instead.\\") + someFloat_SUM_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someFloat: { sum: { lte: ... } } }' instead.\\") + someInt: IntScalarAggregationFilters + someInt_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { average: { eq: ... } } }' instead.\\") + someInt_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { average: { gt: ... } } }' instead.\\") + someInt_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { average: { gte: ... } } }' instead.\\") + someInt_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { average: { lt: ... } } }' instead.\\") + someInt_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { average: { lte: ... } } }' instead.\\") + someInt_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { max: { eq: ... } } }' instead.\\") + someInt_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { max: { gt: ... } } }' instead.\\") + someInt_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { max: { gte: ... } } }' instead.\\") + someInt_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { max: { lt: ... } } }' instead.\\") + someInt_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { max: { lte: ... } } }' instead.\\") + someInt_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { min: { eq: ... } } }' instead.\\") + someInt_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { min: { gt: ... } } }' instead.\\") + someInt_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { min: { gte: ... } } }' instead.\\") + someInt_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { min: { lt: ... } } }' instead.\\") + someInt_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { min: { lte: ... } } }' instead.\\") + someInt_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { sum: { eq: ... } } }' instead.\\") + someInt_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { sum: { gt: ... } } }' instead.\\") + someInt_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { sum: { gte: ... } } }' instead.\\") + someInt_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { sum: { lt: ... } } }' instead.\\") + someInt_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someInt: { sum: { lte: ... } } }' instead.\\") + someLocalDateTime: LocalDateTimeScalarAggregationFilters + someLocalDateTime_MAX_EQUAL: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { max: { eq: ... } } }' instead.\\") + someLocalDateTime_MAX_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { max: { gt: ... } } }' instead.\\") + someLocalDateTime_MAX_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { max: { gte: ... } } }' instead.\\") + someLocalDateTime_MAX_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { max: { lt: ... } } }' instead.\\") + someLocalDateTime_MAX_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { max: { lte: ... } } }' instead.\\") + someLocalDateTime_MIN_EQUAL: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { min: { eq: ... } } }' instead.\\") + someLocalDateTime_MIN_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { min: { gt: ... } } }' instead.\\") + someLocalDateTime_MIN_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { min: { gte: ... } } }' instead.\\") + someLocalDateTime_MIN_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { min: { lt: ... } } }' instead.\\") + someLocalDateTime_MIN_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalDateTime: { min: { lte: ... } } }' instead.\\") + someLocalTime: LocalTimeScalarAggregationFilters + someLocalTime_MAX_EQUAL: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { max: { eq: ... } } }' instead.\\") + someLocalTime_MAX_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { max: { gt: ... } } }' instead.\\") + someLocalTime_MAX_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { max: { gte: ... } } }' instead.\\") + someLocalTime_MAX_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { max: { lt: ... } } }' instead.\\") + someLocalTime_MAX_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { max: { lte: ... } } }' instead.\\") + someLocalTime_MIN_EQUAL: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { min: { eq: ... } } }' instead.\\") + someLocalTime_MIN_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { min: { gt: ... } } }' instead.\\") + someLocalTime_MIN_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { min: { gte: ... } } }' instead.\\") + someLocalTime_MIN_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { min: { lt: ... } } }' instead.\\") + someLocalTime_MIN_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'someLocalTime: { min: { lte: ... } } }' instead.\\") + someString: StringScalarAggregationFilters + someString_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { eq: ... } } }' instead.\\") + someString_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { gt: ... } } }' instead.\\") + someString_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { gte: ... } } }' instead.\\") + someString_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { lt: ... } } }' instead.\\") + someString_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { lte: ... } } }' instead.\\") + someString_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { eq: ... } } }' instead.\\") + someString_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { gt: ... } } }' instead.\\") + someString_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { gte: ... } } }' instead.\\") + someString_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { lt: ... } } }' instead.\\") + someString_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { lte: ... } } }' instead.\\") + someString_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { eq: ... } } }' instead.\\") + someString_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { gt: ... } } }' instead.\\") + someString_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { gte: ... } } }' instead.\\") + someString_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { lt: ... } } }' instead.\\") + someString_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { lte: ... } } }' instead.\\") + someTime: TimeScalarAggregationFilters + someTime_MAX_EQUAL: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { max: { eq: ... } } }' instead.\\") + someTime_MAX_GT: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { max: { gt: ... } } }' instead.\\") + someTime_MAX_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { max: { gte: ... } } }' instead.\\") + someTime_MAX_LT: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { max: { lt: ... } } }' instead.\\") + someTime_MAX_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { max: { lte: ... } } }' instead.\\") + someTime_MIN_EQUAL: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { min: { eq: ... } } }' instead.\\") + someTime_MIN_GT: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { min: { gt: ... } } }' instead.\\") + someTime_MIN_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { min: { gte: ... } } }' instead.\\") + someTime_MIN_LT: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { min: { lt: ... } } }' instead.\\") + someTime_MIN_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'someTime: { min: { lte: ... } } }' instead.\\") + } + + type PostLikesRelationship { + cursor: String! + node: User! + properties: Likes! + } + + input PostLikesUpdateConnectionInput { + edge: LikesUpdateInput + node: UserUpdateInput + } + + input PostLikesUpdateFieldInput { + connect: [PostLikesConnectFieldInput!] + create: [PostLikesCreateFieldInput!] + delete: [PostLikesDeleteFieldInput!] + disconnect: [PostLikesDisconnectFieldInput!] + update: PostLikesUpdateConnectionInput + where: PostLikesConnectionWhere + } + + \\"\\"\\" + Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. + \\"\\"\\" + input PostSort { + title: SortDirection + } + + input PostUpdateInput { + likes: [PostLikesUpdateFieldInput!] + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") + } + + type PostUserLikesAggregationSelection { + count: Int! + node: PostUserLikesNodeAggregateSelection + } + + type PostUserLikesNodeAggregateSelection { + someBigInt: BigIntAggregateSelection! + someDateTime: DateTimeAggregateSelection! + someDuration: DurationAggregateSelection! + someFloat: FloatAggregateSelection! + someInt: IntAggregateSelection! + someLocalDateTime: LocalDateTimeAggregateSelection! + someLocalTime: LocalTimeAggregateSelection! + someString: StringAggregateSelection! + someTime: TimeAggregateSelection! + } + + input PostWhere { + AND: [PostWhere!] + NOT: PostWhere + OR: [PostWhere!] + likes: UserRelationshipFilters + likesAggregate: PostLikesAggregateInput + likesConnection: PostLikesConnectionFilters + \\"\\"\\" + Return Posts where all of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_ALL: PostLikesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'likesConnection: { all: { node: ... } } }' instead.\\") + \\"\\"\\" + Return Posts where none of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_NONE: PostLikesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'likesConnection: { none: { node: ... } } }' instead.\\") + \\"\\"\\" + Return Posts where one of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_SINGLE: PostLikesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'likesConnection: { single: { node: ... } } }' instead.\\") + \\"\\"\\" + Return Posts where some of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_SOME: PostLikesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'likesConnection: { some: { node: ... } } }' instead.\\") + \\"\\"\\"Return Posts where all of the related Users match this filter\\"\\"\\" + likes_ALL: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'likes: { all: ... }' instead.\\") + \\"\\"\\"Return Posts where none of the related Users match this filter\\"\\"\\" + likes_NONE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'likes: { none: ... }' instead.\\") + \\"\\"\\"Return Posts where one of the related Users match this filter\\"\\"\\" + likes_SINGLE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'likes: { single: ... }' instead.\\") + \\"\\"\\"Return Posts where some of the related Users match this filter\\"\\"\\" + likes_SOME: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'likes: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + } + + type PostsConnection { + edges: [PostEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Query { + posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): PostAggregateSelection! + postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! + users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! + } + + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type StringAggregateSelection { + longest: String + shortest: String + } + + \\"\\"\\"String list filters\\"\\"\\" + input StringListFilters { + eq: [String!] + includes: String + } + + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + + \\"\\"\\"A time, represented as an RFC3339 time string\\"\\"\\" + scalar Time + + type TimeAggregateSelection { + max: Time + min: Time + } + + \\"\\"\\"Time list filters\\"\\"\\" + input TimeListFilters { + eq: [Time!] + includes: Time + } + + \\"\\"\\"Filters for an aggregation of an Time input field\\"\\"\\" + input TimeScalarAggregationFilters { + max: TimeScalarFilters + min: TimeScalarFilters + } + + \\"\\"\\"Time filters\\"\\"\\" + input TimeScalarFilters { + eq: Time + gt: Time + gte: Time + in: [Time!] + lt: Time + lte: Time + } + + \\"\\"\\"Time mutations\\"\\"\\" + input TimeScalarMutations { + set: Time + } + + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" + type UpdateInfo { + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdatePostsMutationResponse { + info: UpdateInfo! + posts: [Post!]! + } + + type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! + } + + type User { + someBigInt: BigInt + someDateTime: DateTime + someDuration: Duration + someFloat: Float + someId: ID + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someString: String + someTime: Time + } + + type UserAggregateSelection { + count: Int! + someBigInt: BigIntAggregateSelection! + someDateTime: DateTimeAggregateSelection! + someDuration: DurationAggregateSelection! + someFloat: FloatAggregateSelection! + someInt: IntAggregateSelection! + someLocalDateTime: LocalDateTimeAggregateSelection! + someLocalTime: LocalTimeAggregateSelection! + someString: StringAggregateSelection! + someTime: TimeAggregateSelection! + } + + input UserConnectWhere { + node: UserWhere! + } + + input UserCreateInput { + someBigInt: BigInt + someDateTime: DateTime + someDuration: Duration + someFloat: Float + someId: ID + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someString: String + someTime: Time + } + + type UserEdge { + cursor: String! + node: User! + } + + input UserRelationshipFilters { + \\"\\"\\"Filter type where all of the related Users match this filter\\"\\"\\" + all: UserWhere + \\"\\"\\"Filter type where none of the related Users match this filter\\"\\"\\" + none: UserWhere + \\"\\"\\"Filter type where one of the related Users match this filter\\"\\"\\" + single: UserWhere + \\"\\"\\"Filter type where some of the related Users match this filter\\"\\"\\" + some: UserWhere + } + \\"\\"\\" Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. \\"\\"\\" @@ -1227,88 +2855,108 @@ describe("Aggregations", () => { } input UserUpdateInput { - someBigInt_DECREMENT: BigInt - someBigInt_INCREMENT: BigInt - someBigInt_SET: BigInt - someDateTime_SET: DateTime - someDuration_SET: Duration - someFloat_ADD: Float - someFloat_DIVIDE: Float - someFloat_MULTIPLY: Float - someFloat_SET: Float - someFloat_SUBTRACT: Float - someId_SET: ID - someInt_DECREMENT: Int - someInt_INCREMENT: Int - someInt_SET: Int - someLocalDateTime_SET: LocalDateTime - someLocalTime_SET: LocalTime - someString_SET: String - someTime_SET: Time + someBigInt: BigIntScalarMutations + someBigInt_DECREMENT: BigInt @deprecated(reason: \\"Please use the relevant generic mutation 'someBigInt: { decrement: ... } }' instead.\\") + someBigInt_INCREMENT: BigInt @deprecated(reason: \\"Please use the relevant generic mutation 'someBigInt: { increment: ... } }' instead.\\") + someBigInt_SET: BigInt @deprecated(reason: \\"Please use the generic mutation 'someBigInt: { set: ... } }' instead.\\") + someDateTime: DateTimeScalarMutations + someDateTime_SET: DateTime @deprecated(reason: \\"Please use the generic mutation 'someDateTime: { set: ... } }' instead.\\") + someDuration: DurationScalarMutations + someDuration_SET: Duration @deprecated(reason: \\"Please use the generic mutation 'someDuration: { set: ... } }' instead.\\") + someFloat: FloatScalarMutations + someFloat_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { add: ... } }' instead.\\") + someFloat_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { divide: ... } }' instead.\\") + someFloat_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { multiply: ... } }' instead.\\") + someFloat_SET: Float @deprecated(reason: \\"Please use the generic mutation 'someFloat: { set: ... } }' instead.\\") + someFloat_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { subtract: ... } }' instead.\\") + someId: IDScalarMutations + someId_SET: ID @deprecated(reason: \\"Please use the generic mutation 'someId: { set: ... } }' instead.\\") + someInt: IntScalarMutations + someInt_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'someInt: { decrement: ... } }' instead.\\") + someInt_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'someInt: { increment: ... } }' instead.\\") + someInt_SET: Int @deprecated(reason: \\"Please use the generic mutation 'someInt: { set: ... } }' instead.\\") + someLocalDateTime: LocalDateTimeScalarMutations + someLocalDateTime_SET: LocalDateTime @deprecated(reason: \\"Please use the generic mutation 'someLocalDateTime: { set: ... } }' instead.\\") + someLocalTime: LocalTimeScalarMutations + someLocalTime_SET: LocalTime @deprecated(reason: \\"Please use the generic mutation 'someLocalTime: { set: ... } }' instead.\\") + someString: StringScalarMutations + someString_SET: String @deprecated(reason: \\"Please use the generic mutation 'someString: { set: ... } }' instead.\\") + someTime: TimeScalarMutations + someTime_SET: Time @deprecated(reason: \\"Please use the generic mutation 'someTime: { set: ... } }' instead.\\") } input UserWhere { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] - someBigInt_EQ: BigInt - someBigInt_GT: BigInt - someBigInt_GTE: BigInt - someBigInt_IN: [BigInt] - someBigInt_LT: BigInt - someBigInt_LTE: BigInt - someDateTime_EQ: DateTime - someDateTime_GT: DateTime - someDateTime_GTE: DateTime - someDateTime_IN: [DateTime] - someDateTime_LT: DateTime - someDateTime_LTE: DateTime - someDuration_EQ: Duration - someDuration_GT: Duration - someDuration_GTE: Duration - someDuration_IN: [Duration] - someDuration_LT: Duration - someDuration_LTE: Duration - someFloat_EQ: Float - someFloat_GT: Float - someFloat_GTE: Float - someFloat_IN: [Float] - someFloat_LT: Float - someFloat_LTE: Float - someId_CONTAINS: ID - someId_ENDS_WITH: ID - someId_EQ: ID - someId_IN: [ID] - someId_STARTS_WITH: ID - someInt_EQ: Int - someInt_GT: Int - someInt_GTE: Int - someInt_IN: [Int] - someInt_LT: Int - someInt_LTE: Int - someLocalDateTime_EQ: LocalDateTime - someLocalDateTime_GT: LocalDateTime - someLocalDateTime_GTE: LocalDateTime - someLocalDateTime_IN: [LocalDateTime] - someLocalDateTime_LT: LocalDateTime - someLocalDateTime_LTE: LocalDateTime - someLocalTime_EQ: LocalTime - someLocalTime_GT: LocalTime - someLocalTime_GTE: LocalTime - someLocalTime_IN: [LocalTime] - someLocalTime_LT: LocalTime - someLocalTime_LTE: LocalTime - someString_CONTAINS: String - someString_ENDS_WITH: String - someString_EQ: String - someString_IN: [String] - someString_STARTS_WITH: String - someTime_EQ: Time - someTime_GT: Time - someTime_GTE: Time - someTime_IN: [Time] - someTime_LT: Time - someTime_LTE: Time + someBigInt: BigIntScalarFilters + someBigInt_EQ: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { eq: ... }\\") + someBigInt_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { gt: ... }\\") + someBigInt_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { gte: ... }\\") + someBigInt_IN: [BigInt] @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { in: ... }\\") + someBigInt_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { lt: ... }\\") + someBigInt_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { lte: ... }\\") + someDateTime: DateTimeScalarFilters + someDateTime_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { eq: ... }\\") + someDateTime_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { gt: ... }\\") + someDateTime_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { gte: ... }\\") + someDateTime_IN: [DateTime] @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { in: ... }\\") + someDateTime_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { lt: ... }\\") + someDateTime_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { lte: ... }\\") + someDuration: DurationScalarFilters + someDuration_EQ: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { eq: ... }\\") + someDuration_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { gt: ... }\\") + someDuration_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { gte: ... }\\") + someDuration_IN: [Duration] @deprecated(reason: \\"Please use the relevant generic filter someDuration: { in: ... }\\") + someDuration_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { lt: ... }\\") + someDuration_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { lte: ... }\\") + someFloat: FloatScalarFilters + someFloat_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { eq: ... }\\") + someFloat_GT: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { gt: ... }\\") + someFloat_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { gte: ... }\\") + someFloat_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter someFloat: { in: ... }\\") + someFloat_LT: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { lt: ... }\\") + someFloat_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { lte: ... }\\") + someId: IDScalarFilters + someId_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { contains: ... }\\") + someId_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { endsWith: ... }\\") + someId_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { eq: ... }\\") + someId_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter someId: { in: ... }\\") + someId_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { startsWith: ... }\\") + someInt: IntScalarFilters + someInt_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { eq: ... }\\") + someInt_GT: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { gt: ... }\\") + someInt_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { gte: ... }\\") + someInt_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter someInt: { in: ... }\\") + someInt_LT: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { lt: ... }\\") + someInt_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { lte: ... }\\") + someLocalDateTime: LocalDateTimeScalarFilters + someLocalDateTime_EQ: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { eq: ... }\\") + someLocalDateTime_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { gt: ... }\\") + someLocalDateTime_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { gte: ... }\\") + someLocalDateTime_IN: [LocalDateTime] @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { in: ... }\\") + someLocalDateTime_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { lt: ... }\\") + someLocalDateTime_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { lte: ... }\\") + someLocalTime: LocalTimeScalarFilters + someLocalTime_EQ: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { eq: ... }\\") + someLocalTime_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { gt: ... }\\") + someLocalTime_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { gte: ... }\\") + someLocalTime_IN: [LocalTime] @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { in: ... }\\") + someLocalTime_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { lt: ... }\\") + someLocalTime_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { lte: ... }\\") + someString: StringScalarFilters + someString_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter someString: { contains: ... }\\") + someString_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter someString: { endsWith: ... }\\") + someString_EQ: String @deprecated(reason: \\"Please use the relevant generic filter someString: { eq: ... }\\") + someString_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter someString: { in: ... }\\") + someString_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter someString: { startsWith: ... }\\") + someTime: TimeScalarFilters + someTime_EQ: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { eq: ... }\\") + someTime_GT: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { gt: ... }\\") + someTime_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { gte: ... }\\") + someTime_IN: [Time] @deprecated(reason: \\"Please use the relevant generic filter someTime: { in: ... }\\") + someTime_LT: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { lt: ... }\\") + someTime_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { lte: ... }\\") } type UsersConnection { diff --git a/packages/graphql/tests/schema/array-methods.test.ts b/packages/graphql/tests/schema/array-methods.test.ts index 4d506ae71a..5001c8da76 100644 --- a/packages/graphql/tests/schema/array-methods.test.ts +++ b/packages/graphql/tests/schema/array-methods.test.ts @@ -68,17 +68,19 @@ describe("Arrays Methods", () => { } input ActedInUpdateInput { - pay_POP: Int - pay_PUSH: [Float!] - pay_SET: [Float!] + pay: ListFloatMutations + pay_POP: Int @deprecated(reason: \\"Please use the generic mutation 'pay: { pop: ... } }' instead.\\") + pay_PUSH: [Float!] @deprecated(reason: \\"Please use the generic mutation 'pay: { push: ... } }' instead.\\") + pay_SET: [Float!] @deprecated(reason: \\"Please use the generic mutation 'pay: { set: ... } }' instead.\\") } input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - pay_EQ: [Float!] - pay_INCLUDES: Float + pay: FloatListFilters + pay_EQ: [Float!] @deprecated(reason: \\"Please use the relevant generic filter pay: { eq: ... }\\") + pay_INCLUDES: Float @deprecated(reason: \\"Please use the relevant generic filter pay: { includes: ... }\\") } type Actor { @@ -92,6 +94,7 @@ describe("Arrays Methods", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -112,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 @@ -149,36 +171,27 @@ describe("Arrays Methods", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - averageRating_AVERAGE_EQUAL: Float - averageRating_AVERAGE_GT: Float - averageRating_AVERAGE_GTE: Float - averageRating_AVERAGE_LT: Float - averageRating_AVERAGE_LTE: Float - averageRating_MAX_EQUAL: Float - averageRating_MAX_GT: Float - averageRating_MAX_GTE: Float - averageRating_MAX_LT: Float - averageRating_MAX_LTE: Float - averageRating_MIN_EQUAL: Float - averageRating_MIN_GT: Float - averageRating_MIN_GTE: Float - averageRating_MIN_LT: Float - averageRating_MIN_LTE: Float - averageRating_SUM_EQUAL: Float - averageRating_SUM_GT: Float - averageRating_SUM_GTE: Float - averageRating_SUM_LT: Float - averageRating_SUM_LTE: Float - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + averageRating: FloatScalarAggregationFilters + averageRating_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { eq: ... } } }' instead.\\") + averageRating_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gt: ... } } }' instead.\\") + averageRating_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gte: ... } } }' instead.\\") + averageRating_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lt: ... } } }' instead.\\") + averageRating_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lte: ... } } }' instead.\\") + averageRating_MAX_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { eq: ... } } }' instead.\\") + averageRating_MAX_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gt: ... } } }' instead.\\") + averageRating_MAX_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gte: ... } } }' instead.\\") + averageRating_MAX_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lt: ... } } }' instead.\\") + averageRating_MAX_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lte: ... } } }' instead.\\") + averageRating_MIN_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { eq: ... } } }' instead.\\") + averageRating_MIN_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gt: ... } } }' instead.\\") + averageRating_MIN_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gte: ... } } }' instead.\\") + averageRating_MIN_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lt: ... } } }' instead.\\") + averageRating_MIN_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lte: ... } } }' instead.\\") + averageRating_SUM_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { eq: ... } } }' instead.\\") + averageRating_SUM_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gt: ... } } }' instead.\\") + averageRating_SUM_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gte: ... } } }' instead.\\") + averageRating_SUM_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lt: ... } } }' instead.\\") + averageRating_SUM_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -239,7 +252,17 @@ describe("Arrays Methods", () => { type ActorMovieActedInNodeAggregateSelection { averageRating: FloatAggregateSelection! - id: IDAggregateSelection! + } + + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere } \\"\\"\\" @@ -251,43 +274,47 @@ describe("Arrays Methods", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: MovieRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere + actedIn_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere + actedIn_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere + actedIn_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + actedIn_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -329,9 +356,68 @@ describe("Arrays Methods", () => { sum: Float } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float list filters\\"\\"\\" + input FloatListFilters { + eq: [Float!] + includes: Float + } + + \\"\\"\\"Filters for an aggregation of a float field\\"\\"\\" + input FloatScalarAggregationFilters { + average: FloatScalarFilters + max: FloatScalarFilters + min: FloatScalarFilters + sum: FloatScalarFilters + } + + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Mutations for a list for Float\\"\\"\\" + input ListFloatMutations { + pop: Int + push: [Float!] + set: [Float!] } type Movie { @@ -356,6 +442,7 @@ describe("Arrays Methods", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -376,6 +463,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 @@ -413,21 +519,22 @@ describe("Arrays Methods", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -453,7 +560,6 @@ describe("Arrays Methods", () => { type MovieAggregateSelection { averageRating: FloatAggregateSelection! count: Int! - id: IDAggregateSelection! } input MovieConnectInput { @@ -484,6 +590,17 @@ describe("Arrays Methods", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -494,59 +611,67 @@ describe("Arrays Methods", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SET: Float - averageRating_SUBTRACT: Float - id_SET: ID - ratings_POP: Int - ratings_PUSH: [Float!] - ratings_SET: [Float!] + averageRating: FloatScalarMutations + averageRating_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { add: ... } }' instead.\\") + averageRating_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { divide: ... } }' instead.\\") + averageRating_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { multiply: ... } }' instead.\\") + averageRating_SET: Float @deprecated(reason: \\"Please use the generic mutation 'averageRating: { set: ... } }' instead.\\") + averageRating_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { subtract: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + ratings: ListFloatMutations + ratings_POP: Int @deprecated(reason: \\"Please use the generic mutation 'ratings: { pop: ... } }' instead.\\") + ratings_PUSH: [Float!] @deprecated(reason: \\"Please use the generic mutation 'ratings: { push: ... } }' instead.\\") + ratings_SET: [Float!] @deprecated(reason: \\"Please use the generic mutation 'ratings: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - averageRating_EQ: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float!] - averageRating_LT: Float - averageRating_LTE: Float - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - ratings_EQ: [Float!] - ratings_INCLUDES: Float + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + averageRating: FloatScalarFilters + averageRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { eq: ... }\\") + averageRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gt: ... }\\") + averageRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gte: ... }\\") + averageRating_IN: [Float!] @deprecated(reason: \\"Please use the relevant generic filter averageRating: { in: ... }\\") + averageRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lt: ... }\\") + averageRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + ratings: FloatListFilters + ratings_EQ: [Float!] @deprecated(reason: \\"Please use the relevant generic filter ratings: { eq: ... }\\") + ratings_INCLUDES: Float @deprecated(reason: \\"Please use the relevant generic filter ratings: { includes: ... }\\") } type MoviesConnection { @@ -594,6 +719,27 @@ describe("Arrays Methods", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/arrays.test.ts b/packages/graphql/tests/schema/arrays.test.ts index 04562a9dcd..1eea14bbdc 100644 --- a/packages/graphql/tests/schema/arrays.test.ts +++ b/packages/graphql/tests/schema/arrays.test.ts @@ -68,9 +68,50 @@ describe("Arrays", () => { sum: Float } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float list filters\\"\\"\\" + input FloatListFilters { + eq: [Float!] + includes: Float + } + + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Mutations for a list for Float\\"\\"\\" + input ListFloatMutations { + pop: Int + push: [Float!] + set: [Float!] } type Movie { @@ -82,7 +123,6 @@ describe("Arrays", () => { type MovieAggregateSelection { averageRating: FloatAggregateSelection! count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -105,34 +145,40 @@ describe("Arrays", () => { } input MovieUpdateInput { - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SET: Float - averageRating_SUBTRACT: Float - id_SET: ID - ratings_POP: Int - ratings_PUSH: [Float!] - ratings_SET: [Float!] + averageRating: FloatScalarMutations + averageRating_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { add: ... } }' instead.\\") + averageRating_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { divide: ... } }' instead.\\") + averageRating_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { multiply: ... } }' instead.\\") + averageRating_SET: Float @deprecated(reason: \\"Please use the generic mutation 'averageRating: { set: ... } }' instead.\\") + averageRating_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { subtract: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + ratings: ListFloatMutations + ratings_POP: Int @deprecated(reason: \\"Please use the generic mutation 'ratings: { pop: ... } }' instead.\\") + ratings_PUSH: [Float!] @deprecated(reason: \\"Please use the generic mutation 'ratings: { push: ... } }' instead.\\") + ratings_SET: [Float!] @deprecated(reason: \\"Please use the generic mutation 'ratings: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - averageRating_EQ: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float!] - averageRating_LT: Float - averageRating_LTE: Float - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - ratings_EQ: [Float!] - ratings_INCLUDES: Float + averageRating: FloatScalarFilters + averageRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { eq: ... }\\") + averageRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gt: ... }\\") + averageRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gte: ... }\\") + averageRating_IN: [Float!] @deprecated(reason: \\"Please use the relevant generic filter averageRating: { in: ... }\\") + averageRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lt: ... }\\") + averageRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + ratings: FloatListFilters + ratings_EQ: [Float!] @deprecated(reason: \\"Please use the relevant generic filter ratings: { eq: ... }\\") + ratings_INCLUDES: Float @deprecated(reason: \\"Please use the relevant generic filter ratings: { includes: ... }\\") } type MoviesConnection { diff --git a/packages/graphql/tests/schema/authorization.test.ts b/packages/graphql/tests/schema/authorization.test.ts index c426faef04..3e8944e582 100644 --- a/packages/graphql/tests/schema/authorization.test.ts +++ b/packages/graphql/tests/schema/authorization.test.ts @@ -73,9 +73,38 @@ describe("Authorization", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Mutation { @@ -105,7 +134,6 @@ describe("Authorization", () => { type PostAggregateSelection { count: Int! - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -113,6 +141,7 @@ describe("Authorization", () => { AND: [PostAuthorAggregateInput!] NOT: PostAuthorAggregateInput OR: [PostAuthorAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -132,6 +161,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 } @@ -166,31 +214,22 @@ describe("Authorization", () => { AND: [PostAuthorNodeAggregationWhereInput!] NOT: PostAuthorNodeAggregationWhereInput OR: [PostAuthorNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type PostAuthorRelationship { @@ -236,8 +275,10 @@ describe("Authorization", () => { input PostUpdateInput { author: [PostAuthorUpdateFieldInput!] - id_SET: ID - name_SET: String + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } type PostUserAuthorAggregationSelection { @@ -246,7 +287,6 @@ describe("Authorization", () => { } type PostUserAuthorNodeAggregateSelection { - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -254,41 +294,45 @@ describe("Authorization", () => { AND: [PostWhere!] NOT: PostWhere OR: [PostWhere!] + author: UserRelationshipFilters authorAggregate: PostAuthorAggregateInput + authorConnection: PostAuthorConnectionFilters \\"\\"\\" Return Posts where all of the related PostAuthorConnections match this filter \\"\\"\\" - authorConnection_ALL: PostAuthorConnectionWhere + authorConnection_ALL: PostAuthorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'authorConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Posts where none of the related PostAuthorConnections match this filter \\"\\"\\" - authorConnection_NONE: PostAuthorConnectionWhere + authorConnection_NONE: PostAuthorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'authorConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Posts where one of the related PostAuthorConnections match this filter \\"\\"\\" - authorConnection_SINGLE: PostAuthorConnectionWhere + authorConnection_SINGLE: PostAuthorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'authorConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Posts where some of the related PostAuthorConnections match this filter \\"\\"\\" - authorConnection_SOME: PostAuthorConnectionWhere + authorConnection_SOME: PostAuthorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'authorConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Posts where all of the related Users match this filter\\"\\"\\" - author_ALL: UserWhere + author_ALL: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'author: { all: ... }' instead.\\") \\"\\"\\"Return Posts where none of the related Users match this filter\\"\\"\\" - author_NONE: UserWhere + author_NONE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'author: { none: ... }' instead.\\") \\"\\"\\"Return Posts where one of the related Users match this filter\\"\\"\\" - author_SINGLE: UserWhere + author_SINGLE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'author: { single: ... }' instead.\\") \\"\\"\\"Return Posts where some of the related Users match this filter\\"\\"\\" - author_SOME: UserWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + author_SOME: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'author: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type PostsConnection { @@ -319,6 +363,27 @@ describe("Authorization", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -349,7 +414,6 @@ describe("Authorization", () => { type UserAggregateSelection { count: Int! - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -384,6 +448,7 @@ describe("Authorization", () => { AND: [UserPostsAggregateInput!] NOT: UserPostsAggregateInput OR: [UserPostsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -403,6 +468,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 } @@ -437,31 +521,22 @@ describe("Authorization", () => { AND: [UserPostsNodeAggregationWhereInput!] NOT: UserPostsNodeAggregationWhereInput OR: [UserPostsNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type UserPostsRelationship { @@ -482,6 +557,17 @@ describe("Authorization", () => { where: UserPostsConnectionWhere } + input UserRelationshipFilters { + \\"\\"\\"Filter type where all of the related Users match this filter\\"\\"\\" + all: UserWhere + \\"\\"\\"Filter type where none of the related Users match this filter\\"\\"\\" + none: UserWhere + \\"\\"\\"Filter type where one of the related Users match this filter\\"\\"\\" + single: UserWhere + \\"\\"\\"Filter type where some of the related Users match this filter\\"\\"\\" + some: UserWhere + } + \\"\\"\\" Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. \\"\\"\\" @@ -491,8 +577,10 @@ describe("Authorization", () => { } input UserUpdateInput { - id_SET: ID - name_SET: String + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") posts: [UserPostsUpdateFieldInput!] } @@ -502,7 +590,6 @@ describe("Authorization", () => { } type UserUserPostsNodeAggregateSelection { - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -510,41 +597,45 @@ describe("Authorization", () => { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + posts: UserRelationshipFilters postsAggregate: UserPostsAggregateInput + postsConnection: UserPostsConnectionFilters \\"\\"\\" Return Users where all of the related UserPostsConnections match this filter \\"\\"\\" - postsConnection_ALL: UserPostsConnectionWhere + postsConnection_ALL: UserPostsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'postsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Users where none of the related UserPostsConnections match this filter \\"\\"\\" - postsConnection_NONE: UserPostsConnectionWhere + postsConnection_NONE: UserPostsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'postsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Users where one of the related UserPostsConnections match this filter \\"\\"\\" - postsConnection_SINGLE: UserPostsConnectionWhere + postsConnection_SINGLE: UserPostsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'postsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Users where some of the related UserPostsConnections match this filter \\"\\"\\" - postsConnection_SOME: UserPostsConnectionWhere + postsConnection_SOME: UserPostsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'postsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Users where all of the related Users match this filter\\"\\"\\" - posts_ALL: UserWhere + posts_ALL: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'posts: { all: ... }' instead.\\") \\"\\"\\"Return Users where none of the related Users match this filter\\"\\"\\" - posts_NONE: UserWhere + posts_NONE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'posts: { none: ... }' instead.\\") \\"\\"\\"Return Users where one of the related Users match this filter\\"\\"\\" - posts_SINGLE: UserWhere + posts_SINGLE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'posts: { single: ... }' instead.\\") \\"\\"\\"Return Users where some of the related Users match this filter\\"\\"\\" - posts_SOME: UserWhere + posts_SOME: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'posts: { some: ... }' instead.\\") } type UsersConnection { diff --git a/packages/graphql/tests/schema/comments.test.ts b/packages/graphql/tests/schema/comments.test.ts index 77fbed82fe..435d206d1c 100644 --- a/packages/graphql/tests/schema/comments.test.ts +++ b/packages/graphql/tests/schema/comments.test.ts @@ -65,6 +65,16 @@ describe("Comments", () => { mutation: Mutation } + \\"\\"\\"Boolean filters\\"\\"\\" + input BooleanScalarFilters { + eq: Boolean + } + + \\"\\"\\"Boolean mutations\\"\\"\\" + input BooleanScalarMutations { + set: Boolean + } + \\"\\"\\" Information about the number of nodes and relationships created during a create mutation \\"\\"\\" @@ -81,6 +91,17 @@ describe("Comments", () => { \\"\\"\\"A custom scalar.\\"\\"\\" scalar CustomScalar + \\"\\"\\"CustomScalar filters\\"\\"\\" + input CustomScalarScalarFilters { + eq: CustomScalar + in: [CustomScalar!] + } + + \\"\\"\\"CustomScalar filters\\"\\"\\" + input CustomScalarScalarMutations { + set: CustomScalar + } + \\"\\"\\" Information about the number of nodes and relationships deleted during a delete mutation \\"\\"\\" @@ -96,6 +117,25 @@ describe("Comments", () => { sum: Float } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + \\"\\"\\"An enumeration of movie genres.\\"\\"\\" enum Genre { ACTION @@ -103,9 +143,29 @@ describe("Comments", () => { ROMANCE } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Genre filters\\"\\"\\" + input GenreEnumScalarFilters { + eq: Genre + in: [Genre!] + } + + \\"\\"\\"Genre mutations\\"\\"\\" + input GenreEnumScalarMutations { + set: Genre + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -115,6 +175,23 @@ describe("Comments", () => { sum: Int } + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + \\"\\"\\"A type describing a movie.\\"\\"\\" type Movie { \\"\\"\\"The number of actors who acted in the movie.\\"\\"\\" @@ -136,7 +213,6 @@ describe("Comments", () => { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -166,46 +242,58 @@ describe("Comments", () => { } input MovieUpdateInput { - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actorCount_SET: Int - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SET: Float - averageRating_SUBTRACT: Float - customScalar_SET: CustomScalar - genre_SET: Genre - id_SET: ID - isActive_SET: Boolean + actorCount: IntScalarMutations + actorCount_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'actorCount: { decrement: ... } }' instead.\\") + actorCount_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'actorCount: { increment: ... } }' instead.\\") + actorCount_SET: Int @deprecated(reason: \\"Please use the generic mutation 'actorCount: { set: ... } }' instead.\\") + averageRating: FloatScalarMutations + averageRating_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { add: ... } }' instead.\\") + averageRating_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { divide: ... } }' instead.\\") + averageRating_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { multiply: ... } }' instead.\\") + averageRating_SET: Float @deprecated(reason: \\"Please use the generic mutation 'averageRating: { set: ... } }' instead.\\") + averageRating_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { subtract: ... } }' instead.\\") + customScalar: CustomScalarScalarMutations + customScalar_SET: CustomScalar @deprecated(reason: \\"Please use the generic mutation 'customScalar: { set: ... } }' instead.\\") + genre: GenreEnumScalarMutations + genre_SET: Genre @deprecated(reason: \\"Please use the generic mutation 'genre: { set: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + isActive: BooleanScalarMutations + isActive_SET: Boolean @deprecated(reason: \\"Please use the generic mutation 'isActive: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount_EQ: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - averageRating_EQ: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - customScalar_EQ: CustomScalar - customScalar_IN: [CustomScalar] - genre_EQ: Genre - genre_IN: [Genre] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive_EQ: Boolean + actorCount: IntScalarFilters + actorCount_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { eq: ... }\\") + actorCount_GT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gt: ... }\\") + actorCount_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gte: ... }\\") + actorCount_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter actorCount: { in: ... }\\") + actorCount_LT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lt: ... }\\") + actorCount_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lte: ... }\\") + averageRating: FloatScalarFilters + averageRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { eq: ... }\\") + averageRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gt: ... }\\") + averageRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gte: ... }\\") + averageRating_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter averageRating: { in: ... }\\") + averageRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lt: ... }\\") + averageRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lte: ... }\\") + customScalar: CustomScalarScalarFilters + customScalar_EQ: CustomScalar @deprecated(reason: \\"Please use the relevant generic filter customScalar: { eq: ... }\\") + customScalar_IN: [CustomScalar] @deprecated(reason: \\"Please use the relevant generic filter customScalar: { in: ... }\\") + genre: GenreEnumScalarFilters + genre_EQ: Genre @deprecated(reason: \\"Please use the relevant generic filter genre: { eq: ... }\\") + genre_IN: [Genre] @deprecated(reason: \\"Please use the relevant generic filter genre: { in: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + isActive: BooleanScalarFilters + isActive_EQ: Boolean @deprecated(reason: \\"Please use the relevant generic filter isActive: { eq: ... }\\") } type MoviesConnection { @@ -303,6 +391,17 @@ describe("Comments", () => { node: Actor! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -311,18 +410,20 @@ describe("Comments", () => { } input ActorUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -357,9 +458,38 @@ describe("Comments", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Movie { @@ -383,6 +513,7 @@ describe("Comments", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -401,6 +532,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 } @@ -433,21 +583,22 @@ describe("Comments", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -470,7 +621,6 @@ describe("Comments", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -496,43 +646,47 @@ describe("Comments", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -580,6 +734,27 @@ describe("Comments", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -649,26 +824,27 @@ describe("Comments", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_MAX_EQUAL: Int - screenTime_MAX_GT: Int - screenTime_MAX_GTE: Int - screenTime_MAX_LT: Int - screenTime_MAX_LTE: Int - screenTime_MIN_EQUAL: Int - screenTime_MIN_GT: Int - screenTime_MIN_GTE: Int - screenTime_MIN_LT: Int - screenTime_MIN_LTE: Int - screenTime_SUM_EQUAL: Int - screenTime_SUM_GT: Int - screenTime_SUM_GTE: Int - screenTime_SUM_LT: Int - screenTime_SUM_LTE: Int + screenTime: IntScalarAggregationFilters + screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { eq: ... } } }' instead.\\") + screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gt: ... } } }' instead.\\") + screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gte: ... } } }' instead.\\") + screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lt: ... } } }' instead.\\") + screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lte: ... } } }' instead.\\") + screenTime_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { eq: ... } } }' instead.\\") + screenTime_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gt: ... } } }' instead.\\") + screenTime_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gte: ... } } }' instead.\\") + screenTime_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lt: ... } } }' instead.\\") + screenTime_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lte: ... } } }' instead.\\") + screenTime_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { eq: ... } } }' instead.\\") + screenTime_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gt: ... } } }' instead.\\") + screenTime_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gte: ... } } }' instead.\\") + screenTime_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lt: ... } } }' instead.\\") + screenTime_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lte: ... } } }' instead.\\") + screenTime_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { eq: ... } } }' instead.\\") + screenTime_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gt: ... } } }' instead.\\") + screenTime_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gte: ... } } }' instead.\\") + screenTime_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lt: ... } } }' instead.\\") + screenTime_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lte: ... } } }' instead.\\") } input ActedInCreateInput { @@ -680,21 +856,23 @@ describe("Comments", () => { } input ActedInUpdateInput { - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - screenTime_SET: Int + screenTime: IntScalarMutations + screenTime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { decrement: ... } }' instead.\\") + screenTime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { increment: ... } }' instead.\\") + screenTime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'screenTime: { set: ... } }' instead.\\") } input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime_EQ: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int + screenTime: IntScalarFilters + screenTime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { eq: ... }\\") + screenTime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gt: ... }\\") + screenTime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gte: ... }\\") + screenTime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter screenTime: { in: ... }\\") + screenTime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lt: ... }\\") + screenTime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lte: ... }\\") } type Actor { @@ -709,6 +887,7 @@ describe("Comments", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -729,6 +908,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 @@ -764,21 +962,22 @@ describe("Comments", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -843,43 +1042,47 @@ describe("Comments", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ProductionRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere + actedIn_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere + actedIn_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere + actedIn_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -919,6 +1122,16 @@ describe("Comments", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + type IntAggregateSelection { average: Float max: Int @@ -926,6 +1139,31 @@ describe("Comments", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie implements Production { runtime: Int! title: String! @@ -956,27 +1194,31 @@ describe("Comments", () => { } input MovieUpdateInput { - runtime_DECREMENT: Int - runtime_INCREMENT: Int - runtime_SET: Int - title_SET: String + runtime: IntScalarMutations + runtime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { decrement: ... } }' instead.\\") + runtime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { increment: ... } }' instead.\\") + runtime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'runtime: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - runtime_EQ: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + runtime: IntScalarFilters + runtime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { eq: ... }\\") + runtime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gt: ... }\\") + runtime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gte: ... }\\") + runtime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter runtime: { in: ... }\\") + runtime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lt: ... }\\") + runtime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -1033,6 +1275,17 @@ describe("Comments", () => { Series } + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + \\"\\"\\" Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. \\"\\"\\" @@ -1041,19 +1294,21 @@ describe("Comments", () => { } input ProductionUpdateInput { - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -1113,27 +1368,31 @@ describe("Comments", () => { } input SeriesUpdateInput { - episodes_DECREMENT: Int - episodes_INCREMENT: Int - episodes_SET: Int - title_SET: String + episodes: IntScalarMutations + episodes_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodes: { decrement: ... } }' instead.\\") + episodes_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodes: { increment: ... } }' instead.\\") + episodes_SET: Int @deprecated(reason: \\"Please use the generic mutation 'episodes: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] - episodes_EQ: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + episodes: IntScalarFilters + episodes_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { eq: ... }\\") + episodes_GT: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { gt: ... }\\") + episodes_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { gte: ... }\\") + episodes_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter episodes: { in: ... }\\") + episodes_LT: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { lt: ... }\\") + episodes_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -1149,6 +1408,27 @@ describe("Comments", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -1231,7 +1511,6 @@ describe("Comments", () => { type GenreAggregateSelection { count: Int! - id: IDAggregateSelection! } input GenreConnectWhere { @@ -1255,18 +1534,20 @@ describe("Comments", () => { } input GenreUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input GenreWhere { AND: [GenreWhere!] NOT: GenreWhere OR: [GenreWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type GenresConnection { @@ -1275,9 +1556,18 @@ describe("Comments", () => { totalCount: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -1289,7 +1579,6 @@ describe("Comments", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieConnectInput { @@ -1329,6 +1618,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 @@ -1452,7 +1760,8 @@ describe("Comments", () => { } input MovieUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") search: MovieSearchUpdateInput } @@ -1460,35 +1769,38 @@ describe("Comments", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + search: SearchRelationshipFilters + searchConnection: MovieSearchConnectionFilters \\"\\"\\" Return Movies where all of the related MovieSearchConnections match this filter \\"\\"\\" - searchConnection_ALL: MovieSearchConnectionWhere + searchConnection_ALL: MovieSearchConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'searchConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieSearchConnections match this filter \\"\\"\\" - searchConnection_NONE: MovieSearchConnectionWhere + searchConnection_NONE: MovieSearchConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'searchConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieSearchConnections match this filter \\"\\"\\" - searchConnection_SINGLE: MovieSearchConnectionWhere + searchConnection_SINGLE: MovieSearchConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'searchConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieSearchConnections match this filter \\"\\"\\" - searchConnection_SOME: MovieSearchConnectionWhere + searchConnection_SOME: MovieSearchConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'searchConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Searches match this filter\\"\\"\\" - search_ALL: SearchWhere + search_ALL: SearchWhere @deprecated(reason: \\"Please use the relevant generic filter 'search: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Searches match this filter\\"\\"\\" - search_NONE: SearchWhere + search_NONE: SearchWhere @deprecated(reason: \\"Please use the relevant generic filter 'search: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Searches match this filter\\"\\"\\" - search_SINGLE: SearchWhere + search_SINGLE: SearchWhere @deprecated(reason: \\"Please use the relevant generic filter 'search: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Searches match this filter\\"\\"\\" - search_SOME: SearchWhere + search_SOME: SearchWhere @deprecated(reason: \\"Please use the relevant generic filter 'search: { some: ... }' instead.\\") } type MoviesConnection { @@ -1526,6 +1838,17 @@ describe("Comments", () => { union Search = Genre | Movie + input SearchRelationshipFilters { + \\"\\"\\"Filter type where all of the related Searches match this filter\\"\\"\\" + all: SearchWhere + \\"\\"\\"Filter type where none of the related Searches match this filter\\"\\"\\" + none: SearchWhere + \\"\\"\\"Filter type where one of the related Searches match this filter\\"\\"\\" + single: SearchWhere + \\"\\"\\"Filter type where some of the related Searches match this filter\\"\\"\\" + some: SearchWhere + } + input SearchWhere { Genre: GenreWhere Movie: MovieWhere diff --git a/packages/graphql/tests/schema/connections/enums.test.ts b/packages/graphql/tests/schema/connections/enums.test.ts index bccef6e895..d2b4c0eaca 100644 --- a/packages/graphql/tests/schema/connections/enums.test.ts +++ b/packages/graphql/tests/schema/connections/enums.test.ts @@ -71,15 +71,17 @@ describe("Enums", () => { } input ActedInUpdateInput { - roleType_SET: RoleType + roleType: RoleTypeEnumScalarMutations + roleType_SET: RoleType @deprecated(reason: \\"Please use the generic mutation 'roleType: { set: ... } }' instead.\\") } input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - roleType_EQ: RoleType - roleType_IN: [RoleType!] + roleType: RoleTypeEnumScalarFilters + roleType_EQ: RoleType @deprecated(reason: \\"Please use the relevant generic filter roleType: { eq: ... }\\") + roleType_IN: [RoleType!] @deprecated(reason: \\"Please use the relevant generic filter roleType: { in: ... }\\") } type Actor { @@ -133,6 +135,7 @@ describe("Enums", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -153,6 +156,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 @@ -190,21 +212,22 @@ describe("Enums", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -227,6 +250,17 @@ describe("Enums", () => { where: ActorMoviesConnectionWhere } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -236,43 +270,47 @@ describe("Enums", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -307,6 +345,26 @@ describe("Enums", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -327,6 +385,7 @@ describe("Enums", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -347,6 +406,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 @@ -384,21 +462,22 @@ describe("Enums", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -452,6 +531,17 @@ describe("Enums", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -461,43 +551,47 @@ describe("Enums", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -537,6 +631,17 @@ describe("Enums", () => { SUPPORTING } + \\"\\"\\"RoleType filters\\"\\"\\" + input RoleTypeEnumScalarFilters { + eq: RoleType + in: [RoleType!] + } + + \\"\\"\\"RoleType mutations\\"\\"\\" + input RoleTypeEnumScalarMutations { + set: RoleType + } + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" enum SortDirection { \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" @@ -550,6 +655,27 @@ describe("Enums", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/connections/interfaces.test.ts b/packages/graphql/tests/schema/connections/interfaces.test.ts index 62c82bdfc0..e8ce46097d 100644 --- a/packages/graphql/tests/schema/connections/interfaces.test.ts +++ b/packages/graphql/tests/schema/connections/interfaces.test.ts @@ -93,7 +93,6 @@ describe("Connection with interfaces", () => { type CreatureAggregateSelection { count: Int! - id: IDAggregateSelection! } input CreatureConnectInput { @@ -129,12 +128,12 @@ describe("Connection with interfaces", () => { AND: [CreatureMoviesAggregateInput!] NOT: CreatureMoviesAggregateInput OR: [CreatureMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int count_LT: Int count_LTE: Int - node: CreatureMoviesNodeAggregationWhereInput } input CreatureMoviesConnectFieldInput { @@ -148,6 +147,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 } @@ -173,22 +191,6 @@ describe("Connection with interfaces", () => { where: CreatureMoviesConnectionWhere } - input CreatureMoviesNodeAggregationWhereInput { - AND: [CreatureMoviesNodeAggregationWhereInput!] - NOT: CreatureMoviesNodeAggregationWhereInput - OR: [CreatureMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - } - type CreatureMoviesRelationship { cursor: String! node: Production! @@ -207,6 +209,17 @@ describe("Connection with interfaces", () => { where: CreatureMoviesConnectionWhere } + input CreatureRelationshipFilters { + \\"\\"\\"Filter type where all of the related Creatures match this filter\\"\\"\\" + all: CreatureWhere + \\"\\"\\"Filter type where none of the related Creatures match this filter\\"\\"\\" + none: CreatureWhere + \\"\\"\\"Filter type where one of the related Creatures match this filter\\"\\"\\" + single: CreatureWhere + \\"\\"\\"Filter type where some of the related Creatures match this filter\\"\\"\\" + some: CreatureWhere + } + \\"\\"\\" Fields to sort Creatures by. The order in which sorts are applied is not guaranteed when specifying many fields in one CreatureSort object. \\"\\"\\" @@ -215,7 +228,8 @@ describe("Connection with interfaces", () => { } input CreatureUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") movies: [CreatureMoviesUpdateFieldInput!] } @@ -223,45 +237,48 @@ describe("Connection with interfaces", () => { AND: [CreatureWhere!] NOT: CreatureWhere OR: [CreatureWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + movies: ProductionRelationshipFilters moviesAggregate: CreatureMoviesAggregateInput + moviesConnection: CreatureMoviesConnectionFilters \\"\\"\\" Return Creatures where all of the related CreatureMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: CreatureMoviesConnectionWhere + moviesConnection_ALL: CreatureMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Creatures where none of the related CreatureMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: CreatureMoviesConnectionWhere + moviesConnection_NONE: CreatureMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Creatures where one of the related CreatureMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: CreatureMoviesConnectionWhere + moviesConnection_SINGLE: CreatureMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Creatures where some of the related CreatureMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: CreatureMoviesConnectionWhere + moviesConnection_SOME: CreatureMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\" Return Creatures where all of the related Productions match this filter \\"\\"\\" - movies_ALL: ProductionWhere + movies_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\" Return Creatures where none of the related Productions match this filter \\"\\"\\" - movies_NONE: ProductionWhere + movies_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\" Return Creatures where one of the related Productions match this filter \\"\\"\\" - movies_SINGLE: ProductionWhere + movies_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\" Return Creatures where some of the related Productions match this filter \\"\\"\\" - movies_SOME: ProductionWhere - typename_IN: [CreatureImplementation!] + movies_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + typename: [CreatureImplementation!] } type CreaturesConnection { @@ -278,9 +295,18 @@ describe("Connection with interfaces", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -290,6 +316,23 @@ describe("Connection with interfaces", () => { sum: Int } + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie implements Production { director(limit: Int, offset: Int, sort: [CreatureSort!], where: CreatureWhere): [Creature!]! directorAggregate(where: CreatureWhere): MovieCreatureDirectorAggregationSelection @@ -300,7 +343,6 @@ describe("Connection with interfaces", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! title: StringAggregateSelection! } @@ -312,11 +354,6 @@ describe("Connection with interfaces", () => { type MovieCreatureDirectorAggregationSelection { count: Int! - node: MovieCreatureDirectorNodeAggregateSelection - } - - type MovieCreatureDirectorNodeAggregateSelection { - id: IDAggregateSelection! } input MovieDeleteInput { @@ -327,12 +364,12 @@ describe("Connection with interfaces", () => { AND: [MovieDirectorAggregateInput!] NOT: MovieDirectorAggregateInput OR: [MovieDirectorAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int count_LT: Int count_LTE: Int - node: MovieDirectorNodeAggregationWhereInput } input MovieDirectorConnectFieldInput { @@ -340,6 +377,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! } @@ -359,22 +415,6 @@ describe("Connection with interfaces", () => { create: [MovieDirectorCreateFieldInput!] } - input MovieDirectorNodeAggregationWhereInput { - AND: [MovieDirectorNodeAggregationWhereInput!] - NOT: MovieDirectorNodeAggregationWhereInput - OR: [MovieDirectorNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - } - input MovieDirectorUpdateConnectionInput { node: CreatureUpdateInput } @@ -403,49 +443,55 @@ describe("Connection with interfaces", () => { input MovieUpdateInput { director: [MovieDirectorUpdateFieldInput!] - id_SET: ID - title_SET: String + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + director: CreatureRelationshipFilters directorAggregate: MovieDirectorAggregateInput + directorConnection: MovieDirectorConnectionFilters \\"\\"\\" Return Movies where all of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_ALL: ProductionDirectorConnectionWhere + directorConnection_ALL: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_NONE: ProductionDirectorConnectionWhere + directorConnection_NONE: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_SINGLE: ProductionDirectorConnectionWhere + directorConnection_SINGLE: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_SOME: ProductionDirectorConnectionWhere + directorConnection_SOME: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Creatures match this filter\\"\\"\\" - director_ALL: CreatureWhere + director_ALL: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Creatures match this filter\\"\\"\\" - director_NONE: CreatureWhere + director_NONE: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Creatures match this filter\\"\\"\\" - director_SINGLE: CreatureWhere + director_SINGLE: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Creatures match this filter\\"\\"\\" - director_SOME: CreatureWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + director_SOME: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -489,7 +535,6 @@ describe("Connection with interfaces", () => { type PersonAggregateSelection { count: Int! - id: IDAggregateSelection! } input PersonCreateInput { @@ -510,12 +555,12 @@ describe("Connection with interfaces", () => { AND: [PersonMoviesAggregateInput!] NOT: PersonMoviesAggregateInput OR: [PersonMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int count_LT: Int count_LTE: Int - node: PersonMoviesNodeAggregationWhereInput } input PersonMoviesConnectFieldInput { @@ -523,6 +568,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! } @@ -542,22 +606,6 @@ describe("Connection with interfaces", () => { create: [PersonMoviesCreateFieldInput!] } - input PersonMoviesNodeAggregationWhereInput { - AND: [PersonMoviesNodeAggregationWhereInput!] - NOT: PersonMoviesNodeAggregationWhereInput - OR: [PersonMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - } - input PersonMoviesUpdateConnectionInput { node: ProductionUpdateInput } @@ -573,11 +621,6 @@ describe("Connection with interfaces", () => { type PersonProductionMoviesAggregationSelection { count: Int! - node: PersonProductionMoviesNodeAggregateSelection - } - - type PersonProductionMoviesNodeAggregateSelection { - id: IDAggregateSelection! } \\"\\"\\" @@ -588,7 +631,8 @@ describe("Connection with interfaces", () => { } input PersonUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") movies: [PersonMoviesUpdateFieldInput!] } @@ -596,36 +640,39 @@ describe("Connection with interfaces", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + movies: ProductionRelationshipFilters moviesAggregate: PersonMoviesAggregateInput + moviesConnection: PersonMoviesConnectionFilters \\"\\"\\" Return People where all of the related CreatureMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: CreatureMoviesConnectionWhere + moviesConnection_ALL: CreatureMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return People where none of the related CreatureMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: CreatureMoviesConnectionWhere + moviesConnection_NONE: CreatureMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return People where one of the related CreatureMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: CreatureMoviesConnectionWhere + moviesConnection_SINGLE: CreatureMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return People where some of the related CreatureMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: CreatureMoviesConnectionWhere + moviesConnection_SOME: CreatureMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return People where all of the related Productions match this filter\\"\\"\\" - movies_ALL: ProductionWhere + movies_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return People where none of the related Productions match this filter\\"\\"\\" - movies_NONE: ProductionWhere + movies_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return People where one of the related Productions match this filter\\"\\"\\" - movies_SINGLE: ProductionWhere + movies_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return People where some of the related Productions match this filter\\"\\"\\" - movies_SOME: ProductionWhere + movies_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") } interface Production { @@ -636,7 +683,6 @@ describe("Connection with interfaces", () => { type ProductionAggregateSelection { count: Int! - id: IDAggregateSelection! } input ProductionConnectInput { @@ -660,12 +706,12 @@ describe("Connection with interfaces", () => { AND: [ProductionDirectorAggregateInput!] NOT: ProductionDirectorAggregateInput OR: [ProductionDirectorAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int count_LT: Int count_LTE: Int - node: ProductionDirectorNodeAggregationWhereInput } input ProductionDirectorConnectFieldInput { @@ -679,6 +725,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 } @@ -704,22 +769,6 @@ describe("Connection with interfaces", () => { where: ProductionDirectorConnectionWhere } - input ProductionDirectorNodeAggregationWhereInput { - AND: [ProductionDirectorNodeAggregationWhereInput!] - NOT: ProductionDirectorNodeAggregationWhereInput - OR: [ProductionDirectorNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - } - type ProductionDirectorRelationship { cursor: String! node: Creature! @@ -752,6 +801,17 @@ describe("Connection with interfaces", () => { Series } + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + \\"\\"\\" Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. \\"\\"\\" @@ -761,52 +821,56 @@ describe("Connection with interfaces", () => { input ProductionUpdateInput { director: [ProductionDirectorUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] + director: CreatureRelationshipFilters directorAggregate: ProductionDirectorAggregateInput + directorConnection: ProductionDirectorConnectionFilters \\"\\"\\" Return Productions where all of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_ALL: ProductionDirectorConnectionWhere + directorConnection_ALL: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where none of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_NONE: ProductionDirectorConnectionWhere + directorConnection_NONE: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where one of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_SINGLE: ProductionDirectorConnectionWhere + directorConnection_SINGLE: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where some of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_SOME: ProductionDirectorConnectionWhere + directorConnection_SOME: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where all of the related Creatures match this filter \\"\\"\\" - director_ALL: CreatureWhere + director_ALL: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { all: ... }' instead.\\") \\"\\"\\" Return Productions where none of the related Creatures match this filter \\"\\"\\" - director_NONE: CreatureWhere + director_NONE: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { none: ... }' instead.\\") \\"\\"\\" Return Productions where one of the related Creatures match this filter \\"\\"\\" - director_SINGLE: CreatureWhere + director_SINGLE: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { single: ... }' instead.\\") \\"\\"\\" Return Productions where some of the related Creatures match this filter \\"\\"\\" - director_SOME: CreatureWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - typename_IN: [ProductionImplementation!] + director_SOME: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -845,7 +909,6 @@ describe("Connection with interfaces", () => { type SeriesAggregateSelection { count: Int! episode: IntAggregateSelection! - id: IDAggregateSelection! title: StringAggregateSelection! } @@ -864,11 +927,6 @@ describe("Connection with interfaces", () => { type SeriesCreatureDirectorAggregationSelection { count: Int! - node: SeriesCreatureDirectorNodeAggregateSelection - } - - type SeriesCreatureDirectorNodeAggregateSelection { - id: IDAggregateSelection! } input SeriesDeleteInput { @@ -879,12 +937,12 @@ describe("Connection with interfaces", () => { AND: [SeriesDirectorAggregateInput!] NOT: SeriesDirectorAggregateInput OR: [SeriesDirectorAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int count_LT: Int count_LTE: Int - node: SeriesDirectorNodeAggregationWhereInput } input SeriesDirectorConnectFieldInput { @@ -892,6 +950,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! } @@ -911,22 +988,6 @@ describe("Connection with interfaces", () => { create: [SeriesDirectorCreateFieldInput!] } - input SeriesDirectorNodeAggregationWhereInput { - AND: [SeriesDirectorNodeAggregationWhereInput!] - NOT: SeriesDirectorNodeAggregationWhereInput - OR: [SeriesDirectorNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - } - input SeriesDirectorUpdateConnectionInput { node: CreatureUpdateInput } @@ -956,58 +1017,66 @@ describe("Connection with interfaces", () => { input SeriesUpdateInput { director: [SeriesDirectorUpdateFieldInput!] - episode_DECREMENT: Int - episode_INCREMENT: Int - episode_SET: Int - id_SET: ID - title_SET: String + episode: IntScalarMutations + episode_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episode: { decrement: ... } }' instead.\\") + episode_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episode: { increment: ... } }' instead.\\") + episode_SET: Int @deprecated(reason: \\"Please use the generic mutation 'episode: { set: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] + director: CreatureRelationshipFilters directorAggregate: SeriesDirectorAggregateInput + directorConnection: SeriesDirectorConnectionFilters \\"\\"\\" Return Series where all of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_ALL: ProductionDirectorConnectionWhere + directorConnection_ALL: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where none of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_NONE: ProductionDirectorConnectionWhere + directorConnection_NONE: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where one of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_SINGLE: ProductionDirectorConnectionWhere + directorConnection_SINGLE: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where some of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_SOME: ProductionDirectorConnectionWhere + directorConnection_SOME: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Series where all of the related Creatures match this filter\\"\\"\\" - director_ALL: CreatureWhere + director_ALL: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { all: ... }' instead.\\") \\"\\"\\"Return Series where none of the related Creatures match this filter\\"\\"\\" - director_NONE: CreatureWhere + director_NONE: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { none: ... }' instead.\\") \\"\\"\\"Return Series where one of the related Creatures match this filter\\"\\"\\" - director_SINGLE: CreatureWhere + director_SINGLE: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { single: ... }' instead.\\") \\"\\"\\"Return Series where some of the related Creatures match this filter\\"\\"\\" - director_SOME: CreatureWhere - episode_EQ: Int - episode_GT: Int - episode_GTE: Int - episode_IN: [Int!] - episode_LT: Int - episode_LTE: Int - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + director_SOME: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { some: ... }' instead.\\") + episode: IntScalarFilters + episode_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter episode: { eq: ... }\\") + episode_GT: Int @deprecated(reason: \\"Please use the relevant generic filter episode: { gt: ... }\\") + episode_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter episode: { gte: ... }\\") + episode_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter episode: { in: ... }\\") + episode_LT: Int @deprecated(reason: \\"Please use the relevant generic filter episode: { lt: ... }\\") + episode_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter episode: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -1023,6 +1092,20 @@ describe("Connection with interfaces", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" diff --git a/packages/graphql/tests/schema/connections/sort.test.ts b/packages/graphql/tests/schema/connections/sort.test.ts index 409a950ed1..764fd9a2db 100644 --- a/packages/graphql/tests/schema/connections/sort.test.ts +++ b/packages/graphql/tests/schema/connections/sort.test.ts @@ -69,6 +69,26 @@ describe("Sort", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Mutation { createNode1s(input: [Node1CreateInput!]!): CreateNode1sMutationResponse! createNode2s(input: [Node2CreateInput!]!): CreateNode2sMutationResponse! @@ -124,6 +144,7 @@ describe("Sort", () => { AND: [Node1RelatedToAggregateInput!] NOT: Node1RelatedToAggregateInput OR: [Node1RelatedToAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -142,6 +163,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 @@ -186,6 +226,17 @@ describe("Sort", () => { where: Node1RelatedToConnectionWhere } + input Node1RelationshipFilters { + \\"\\"\\"Filter type where all of the related Node1s match this filter\\"\\"\\" + all: Node1Where + \\"\\"\\"Filter type where none of the related Node1s match this filter\\"\\"\\" + none: Node1Where + \\"\\"\\"Filter type where one of the related Node1s match this filter\\"\\"\\" + single: Node1Where + \\"\\"\\"Filter type where some of the related Node1s match this filter\\"\\"\\" + some: Node1Where + } + \\"\\"\\" Fields to sort Node1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Node1Sort object. \\"\\"\\" @@ -194,7 +245,8 @@ describe("Sort", () => { } input Node1UpdateInput { - property_SET: String + property: StringScalarMutations + property_SET: String @deprecated(reason: \\"Please use the generic mutation 'property: { set: ... } }' instead.\\") relatedTo: [Node1RelatedToUpdateFieldInput!] } @@ -202,36 +254,39 @@ describe("Sort", () => { AND: [Node1Where!] NOT: Node1Where OR: [Node1Where!] - property_CONTAINS: String - property_ENDS_WITH: String - property_EQ: String - property_IN: [String!] - property_STARTS_WITH: String + property: StringScalarFilters + property_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter property: { contains: ... }\\") + property_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter property: { endsWith: ... }\\") + property_EQ: String @deprecated(reason: \\"Please use the relevant generic filter property: { eq: ... }\\") + property_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter property: { in: ... }\\") + property_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter property: { startsWith: ... }\\") + relatedTo: Node2RelationshipFilters relatedToAggregate: Node1RelatedToAggregateInput + relatedToConnection: Node1RelatedToConnectionFilters \\"\\"\\" Return Node1s where all of the related Node1RelatedToConnections match this filter \\"\\"\\" - relatedToConnection_ALL: Node1RelatedToConnectionWhere + relatedToConnection_ALL: Node1RelatedToConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'relatedToConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Node1s where none of the related Node1RelatedToConnections match this filter \\"\\"\\" - relatedToConnection_NONE: Node1RelatedToConnectionWhere + relatedToConnection_NONE: Node1RelatedToConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'relatedToConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Node1s where one of the related Node1RelatedToConnections match this filter \\"\\"\\" - relatedToConnection_SINGLE: Node1RelatedToConnectionWhere + relatedToConnection_SINGLE: Node1RelatedToConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'relatedToConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Node1s where some of the related Node1RelatedToConnections match this filter \\"\\"\\" - relatedToConnection_SOME: Node1RelatedToConnectionWhere + relatedToConnection_SOME: Node1RelatedToConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'relatedToConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Node1s where all of the related Node2s match this filter\\"\\"\\" - relatedTo_ALL: Node2Where + relatedTo_ALL: Node2Where @deprecated(reason: \\"Please use the relevant generic filter 'relatedTo: { all: ... }' instead.\\") \\"\\"\\"Return Node1s where none of the related Node2s match this filter\\"\\"\\" - relatedTo_NONE: Node2Where + relatedTo_NONE: Node2Where @deprecated(reason: \\"Please use the relevant generic filter 'relatedTo: { none: ... }' instead.\\") \\"\\"\\"Return Node1s where one of the related Node2s match this filter\\"\\"\\" - relatedTo_SINGLE: Node2Where + relatedTo_SINGLE: Node2Where @deprecated(reason: \\"Please use the relevant generic filter 'relatedTo: { single: ... }' instead.\\") \\"\\"\\"Return Node1s where some of the related Node2s match this filter\\"\\"\\" - relatedTo_SOME: Node2Where + relatedTo_SOME: Node2Where @deprecated(reason: \\"Please use the relevant generic filter 'relatedTo: { some: ... }' instead.\\") } type Node1sConnection { @@ -288,6 +343,7 @@ describe("Sort", () => { AND: [Node2RelatedToAggregateInput!] NOT: Node2RelatedToAggregateInput OR: [Node2RelatedToAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -307,6 +363,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 } @@ -341,21 +416,22 @@ describe("Sort", () => { AND: [Node2RelatedToNodeAggregationWhereInput!] NOT: Node2RelatedToNodeAggregationWhereInput OR: [Node2RelatedToNodeAggregationWhereInput!] - property_AVERAGE_LENGTH_EQUAL: Float - property_AVERAGE_LENGTH_GT: Float - property_AVERAGE_LENGTH_GTE: Float - property_AVERAGE_LENGTH_LT: Float - property_AVERAGE_LENGTH_LTE: Float - property_LONGEST_LENGTH_EQUAL: Int - property_LONGEST_LENGTH_GT: Int - property_LONGEST_LENGTH_GTE: Int - property_LONGEST_LENGTH_LT: Int - property_LONGEST_LENGTH_LTE: Int - property_SHORTEST_LENGTH_EQUAL: Int - property_SHORTEST_LENGTH_GT: Int - property_SHORTEST_LENGTH_GTE: Int - property_SHORTEST_LENGTH_LT: Int - property_SHORTEST_LENGTH_LTE: Int + property: StringScalarAggregationFilters + property_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'property: { averageLength: { eq: ... } } }' instead.\\") + property_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'property: { averageLength: { gt: ... } } }' instead.\\") + property_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'property: { averageLength: { gte: ... } } }' instead.\\") + property_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'property: { averageLength: { lt: ... } } }' instead.\\") + property_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'property: { averageLength: { lte: ... } } }' instead.\\") + property_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'property: { longestLength: { eq: ... } } }' instead.\\") + property_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'property: { longestLength: { gt: ... } } }' instead.\\") + property_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'property: { longestLength: { gte: ... } } }' instead.\\") + property_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'property: { longestLength: { lt: ... } } }' instead.\\") + property_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'property: { longestLength: { lte: ... } } }' instead.\\") + property_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'property: { shortestLength: { eq: ... } } }' instead.\\") + property_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'property: { shortestLength: { gt: ... } } }' instead.\\") + property_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'property: { shortestLength: { gte: ... } } }' instead.\\") + property_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'property: { shortestLength: { lt: ... } } }' instead.\\") + property_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'property: { shortestLength: { lte: ... } } }' instead.\\") } type Node2RelatedToRelationship { @@ -376,6 +452,17 @@ describe("Sort", () => { where: Node2RelatedToConnectionWhere } + input Node2RelationshipFilters { + \\"\\"\\"Filter type where all of the related Node2s match this filter\\"\\"\\" + all: Node2Where + \\"\\"\\"Filter type where none of the related Node2s match this filter\\"\\"\\" + none: Node2Where + \\"\\"\\"Filter type where one of the related Node2s match this filter\\"\\"\\" + single: Node2Where + \\"\\"\\"Filter type where some of the related Node2s match this filter\\"\\"\\" + some: Node2Where + } + input Node2UpdateInput { relatedTo: [Node2RelatedToUpdateFieldInput!] } @@ -384,31 +471,33 @@ describe("Sort", () => { AND: [Node2Where!] NOT: Node2Where OR: [Node2Where!] + relatedTo: Node1RelationshipFilters relatedToAggregate: Node2RelatedToAggregateInput + relatedToConnection: Node2RelatedToConnectionFilters \\"\\"\\" Return Node2s where all of the related Node2RelatedToConnections match this filter \\"\\"\\" - relatedToConnection_ALL: Node2RelatedToConnectionWhere + relatedToConnection_ALL: Node2RelatedToConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'relatedToConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Node2s where none of the related Node2RelatedToConnections match this filter \\"\\"\\" - relatedToConnection_NONE: Node2RelatedToConnectionWhere + relatedToConnection_NONE: Node2RelatedToConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'relatedToConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Node2s where one of the related Node2RelatedToConnections match this filter \\"\\"\\" - relatedToConnection_SINGLE: Node2RelatedToConnectionWhere + relatedToConnection_SINGLE: Node2RelatedToConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'relatedToConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Node2s where some of the related Node2RelatedToConnections match this filter \\"\\"\\" - relatedToConnection_SOME: Node2RelatedToConnectionWhere + relatedToConnection_SOME: Node2RelatedToConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'relatedToConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Node2s where all of the related Node1s match this filter\\"\\"\\" - relatedTo_ALL: Node1Where + relatedTo_ALL: Node1Where @deprecated(reason: \\"Please use the relevant generic filter 'relatedTo: { all: ... }' instead.\\") \\"\\"\\"Return Node2s where none of the related Node1s match this filter\\"\\"\\" - relatedTo_NONE: Node1Where + relatedTo_NONE: Node1Where @deprecated(reason: \\"Please use the relevant generic filter 'relatedTo: { none: ... }' instead.\\") \\"\\"\\"Return Node2s where one of the related Node1s match this filter\\"\\"\\" - relatedTo_SINGLE: Node1Where + relatedTo_SINGLE: Node1Where @deprecated(reason: \\"Please use the relevant generic filter 'relatedTo: { single: ... }' instead.\\") \\"\\"\\"Return Node2s where some of the related Node1s match this filter\\"\\"\\" - relatedTo_SOME: Node1Where + relatedTo_SOME: Node1Where @deprecated(reason: \\"Please use the relevant generic filter 'relatedTo: { some: ... }' instead.\\") } type Node2sConnection { @@ -447,6 +536,27 @@ describe("Sort", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" diff --git a/packages/graphql/tests/schema/connections/unions.test.ts b/packages/graphql/tests/schema/connections/unions.test.ts index a669459ee7..8e3764ae32 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 } @@ -234,6 +253,17 @@ describe("Unions", () => { Journal: [AuthorPublicationsJournalUpdateFieldInput!] } + input AuthorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Authors match this filter\\"\\"\\" + all: AuthorWhere + \\"\\"\\"Filter type where none of the related Authors match this filter\\"\\"\\" + none: AuthorWhere + \\"\\"\\"Filter type where one of the related Authors match this filter\\"\\"\\" + single: AuthorWhere + \\"\\"\\"Filter type where some of the related Authors match this filter\\"\\"\\" + some: AuthorWhere + } + \\"\\"\\" Fields to sort Authors by. The order in which sorts are applied is not guaranteed when specifying many fields in one AuthorSort object. \\"\\"\\" @@ -242,7 +272,8 @@ describe("Unions", () => { } input AuthorUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") publications: AuthorPublicationsUpdateInput } @@ -250,39 +281,42 @@ describe("Unions", () => { AND: [AuthorWhere!] NOT: AuthorWhere OR: [AuthorWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + publications: PublicationRelationshipFilters + publicationsConnection: AuthorPublicationsConnectionFilters \\"\\"\\" Return Authors where all of the related AuthorPublicationsConnections match this filter \\"\\"\\" - publicationsConnection_ALL: AuthorPublicationsConnectionWhere + publicationsConnection_ALL: AuthorPublicationsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'publicationsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Authors where none of the related AuthorPublicationsConnections match this filter \\"\\"\\" - publicationsConnection_NONE: AuthorPublicationsConnectionWhere + publicationsConnection_NONE: AuthorPublicationsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'publicationsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Authors where one of the related AuthorPublicationsConnections match this filter \\"\\"\\" - publicationsConnection_SINGLE: AuthorPublicationsConnectionWhere + publicationsConnection_SINGLE: AuthorPublicationsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'publicationsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Authors where some of the related AuthorPublicationsConnections match this filter \\"\\"\\" - publicationsConnection_SOME: AuthorPublicationsConnectionWhere + publicationsConnection_SOME: AuthorPublicationsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'publicationsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Authors where all of the related Publications match this filter\\"\\"\\" - publications_ALL: PublicationWhere + publications_ALL: PublicationWhere @deprecated(reason: \\"Please use the relevant generic filter 'publications: { all: ... }' instead.\\") \\"\\"\\" Return Authors where none of the related Publications match this filter \\"\\"\\" - publications_NONE: PublicationWhere + publications_NONE: PublicationWhere @deprecated(reason: \\"Please use the relevant generic filter 'publications: { none: ... }' instead.\\") \\"\\"\\"Return Authors where one of the related Publications match this filter\\"\\"\\" - publications_SINGLE: PublicationWhere + publications_SINGLE: PublicationWhere @deprecated(reason: \\"Please use the relevant generic filter 'publications: { single: ... }' instead.\\") \\"\\"\\" Return Authors where some of the related Publications match this filter \\"\\"\\" - publications_SOME: PublicationWhere + publications_SOME: PublicationWhere @deprecated(reason: \\"Please use the relevant generic filter 'publications: { some: ... }' instead.\\") } type AuthorsConnection { @@ -307,6 +341,7 @@ describe("Unions", () => { AND: [BookAuthorAggregateInput!] NOT: BookAuthorAggregateInput OR: [BookAuthorAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -342,6 +377,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 @@ -379,21 +433,22 @@ describe("Unions", () => { AND: [BookAuthorNodeAggregationWhereInput!] NOT: BookAuthorNodeAggregationWhereInput OR: [BookAuthorNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type BookAuthorRelationship { @@ -451,43 +506,47 @@ describe("Unions", () => { input BookUpdateInput { author: [BookAuthorUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input BookWhere { AND: [BookWhere!] NOT: BookWhere OR: [BookWhere!] + author: AuthorRelationshipFilters authorAggregate: BookAuthorAggregateInput + authorConnection: BookAuthorConnectionFilters \\"\\"\\" Return Books where all of the related BookAuthorConnections match this filter \\"\\"\\" - authorConnection_ALL: BookAuthorConnectionWhere + authorConnection_ALL: BookAuthorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'authorConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Books where none of the related BookAuthorConnections match this filter \\"\\"\\" - authorConnection_NONE: BookAuthorConnectionWhere + authorConnection_NONE: BookAuthorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'authorConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Books where one of the related BookAuthorConnections match this filter \\"\\"\\" - authorConnection_SINGLE: BookAuthorConnectionWhere + authorConnection_SINGLE: BookAuthorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'authorConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Books where some of the related BookAuthorConnections match this filter \\"\\"\\" - authorConnection_SOME: BookAuthorConnectionWhere + authorConnection_SOME: BookAuthorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'authorConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Books where all of the related Authors match this filter\\"\\"\\" - author_ALL: AuthorWhere + author_ALL: AuthorWhere @deprecated(reason: \\"Please use the relevant generic filter 'author: { all: ... }' instead.\\") \\"\\"\\"Return Books where none of the related Authors match this filter\\"\\"\\" - author_NONE: AuthorWhere + author_NONE: AuthorWhere @deprecated(reason: \\"Please use the relevant generic filter 'author: { none: ... }' instead.\\") \\"\\"\\"Return Books where one of the related Authors match this filter\\"\\"\\" - author_SINGLE: AuthorWhere + author_SINGLE: AuthorWhere @deprecated(reason: \\"Please use the relevant generic filter 'author: { single: ... }' instead.\\") \\"\\"\\"Return Books where some of the related Authors match this filter\\"\\"\\" - author_SOME: AuthorWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + author_SOME: AuthorWhere @deprecated(reason: \\"Please use the relevant generic filter 'author: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type BooksConnection { @@ -527,6 +586,16 @@ describe("Unions", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + type IntAggregateSelection { average: Float max: Int @@ -534,6 +603,31 @@ describe("Unions", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Journal { author(limit: Int, offset: Int, sort: [AuthorSort!], where: AuthorWhere): [Author!]! authorAggregate(where: AuthorWhere): JournalAuthorAuthorAggregationSelection @@ -550,6 +644,7 @@ describe("Unions", () => { AND: [JournalAuthorAggregateInput!] NOT: JournalAuthorAggregateInput OR: [JournalAuthorAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -585,6 +680,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 @@ -622,21 +736,22 @@ describe("Unions", () => { AND: [JournalAuthorNodeAggregationWhereInput!] NOT: JournalAuthorNodeAggregationWhereInput OR: [JournalAuthorNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type JournalAuthorRelationship { @@ -694,43 +809,47 @@ describe("Unions", () => { input JournalUpdateInput { author: [JournalAuthorUpdateFieldInput!] - subject_SET: String + subject: StringScalarMutations + subject_SET: String @deprecated(reason: \\"Please use the generic mutation 'subject: { set: ... } }' instead.\\") } input JournalWhere { AND: [JournalWhere!] NOT: JournalWhere OR: [JournalWhere!] + author: AuthorRelationshipFilters authorAggregate: JournalAuthorAggregateInput + authorConnection: JournalAuthorConnectionFilters \\"\\"\\" Return Journals where all of the related JournalAuthorConnections match this filter \\"\\"\\" - authorConnection_ALL: JournalAuthorConnectionWhere + authorConnection_ALL: JournalAuthorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'authorConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Journals where none of the related JournalAuthorConnections match this filter \\"\\"\\" - authorConnection_NONE: JournalAuthorConnectionWhere + authorConnection_NONE: JournalAuthorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'authorConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Journals where one of the related JournalAuthorConnections match this filter \\"\\"\\" - authorConnection_SINGLE: JournalAuthorConnectionWhere + authorConnection_SINGLE: JournalAuthorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'authorConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Journals where some of the related JournalAuthorConnections match this filter \\"\\"\\" - authorConnection_SOME: JournalAuthorConnectionWhere + authorConnection_SOME: JournalAuthorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'authorConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Journals where all of the related Authors match this filter\\"\\"\\" - author_ALL: AuthorWhere + author_ALL: AuthorWhere @deprecated(reason: \\"Please use the relevant generic filter 'author: { all: ... }' instead.\\") \\"\\"\\"Return Journals where none of the related Authors match this filter\\"\\"\\" - author_NONE: AuthorWhere + author_NONE: AuthorWhere @deprecated(reason: \\"Please use the relevant generic filter 'author: { none: ... }' instead.\\") \\"\\"\\"Return Journals where one of the related Authors match this filter\\"\\"\\" - author_SINGLE: AuthorWhere + author_SINGLE: AuthorWhere @deprecated(reason: \\"Please use the relevant generic filter 'author: { single: ... }' instead.\\") \\"\\"\\"Return Journals where some of the related Authors match this filter\\"\\"\\" - author_SOME: AuthorWhere - subject_CONTAINS: String - subject_ENDS_WITH: String - subject_EQ: String - subject_IN: [String!] - subject_STARTS_WITH: String + author_SOME: AuthorWhere @deprecated(reason: \\"Please use the relevant generic filter 'author: { some: ... }' instead.\\") + subject: StringScalarFilters + subject_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter subject: { contains: ... }\\") + subject_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter subject: { endsWith: ... }\\") + subject_EQ: String @deprecated(reason: \\"Please use the relevant generic filter subject: { eq: ... }\\") + subject_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter subject: { in: ... }\\") + subject_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter subject: { startsWith: ... }\\") } type JournalsConnection { @@ -761,6 +880,17 @@ describe("Unions", () => { union Publication = Book | Journal + input PublicationRelationshipFilters { + \\"\\"\\"Filter type where all of the related Publications match this filter\\"\\"\\" + all: PublicationWhere + \\"\\"\\"Filter type where none of the related Publications match this filter\\"\\"\\" + none: PublicationWhere + \\"\\"\\"Filter type where one of the related Publications match this filter\\"\\"\\" + single: PublicationWhere + \\"\\"\\"Filter type where some of the related Publications match this filter\\"\\"\\" + some: PublicationWhere + } + input PublicationWhere { Book: BookWhere Journal: JournalWhere @@ -792,6 +922,27 @@ describe("Unions", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateAuthorsMutationResponse { authors: [Author!]! info: UpdateInfo! @@ -831,26 +982,27 @@ describe("Unions", () => { AND: [WroteAggregationWhereInput!] NOT: WroteAggregationWhereInput OR: [WroteAggregationWhereInput!] - words_AVERAGE_EQUAL: Float - words_AVERAGE_GT: Float - words_AVERAGE_GTE: Float - words_AVERAGE_LT: Float - words_AVERAGE_LTE: Float - words_MAX_EQUAL: Int - words_MAX_GT: Int - words_MAX_GTE: Int - words_MAX_LT: Int - words_MAX_LTE: Int - words_MIN_EQUAL: Int - words_MIN_GT: Int - words_MIN_GTE: Int - words_MIN_LT: Int - words_MIN_LTE: Int - words_SUM_EQUAL: Int - words_SUM_GT: Int - words_SUM_GTE: Int - words_SUM_LT: Int - words_SUM_LTE: Int + words: IntScalarAggregationFilters + words_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'words: { average: { eq: ... } } }' instead.\\") + words_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'words: { average: { gt: ... } } }' instead.\\") + words_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'words: { average: { gte: ... } } }' instead.\\") + words_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'words: { average: { lt: ... } } }' instead.\\") + words_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'words: { average: { lte: ... } } }' instead.\\") + words_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'words: { max: { eq: ... } } }' instead.\\") + words_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'words: { max: { gt: ... } } }' instead.\\") + words_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'words: { max: { gte: ... } } }' instead.\\") + words_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'words: { max: { lt: ... } } }' instead.\\") + words_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'words: { max: { lte: ... } } }' instead.\\") + words_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'words: { min: { eq: ... } } }' instead.\\") + words_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'words: { min: { gt: ... } } }' instead.\\") + words_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'words: { min: { gte: ... } } }' instead.\\") + words_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'words: { min: { lt: ... } } }' instead.\\") + words_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'words: { min: { lte: ... } } }' instead.\\") + words_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'words: { sum: { eq: ... } } }' instead.\\") + words_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'words: { sum: { gt: ... } } }' instead.\\") + words_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'words: { sum: { gte: ... } } }' instead.\\") + words_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'words: { sum: { lt: ... } } }' instead.\\") + words_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'words: { sum: { lte: ... } } }' instead.\\") } input WroteCreateInput { @@ -862,21 +1014,23 @@ describe("Unions", () => { } input WroteUpdateInput { - words_DECREMENT: Int - words_INCREMENT: Int - words_SET: Int + words: IntScalarMutations + words_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'words: { decrement: ... } }' instead.\\") + words_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'words: { increment: ... } }' instead.\\") + words_SET: Int @deprecated(reason: \\"Please use the generic mutation 'words: { set: ... } }' instead.\\") } input WroteWhere { AND: [WroteWhere!] NOT: WroteWhere OR: [WroteWhere!] - words_EQ: Int - words_GT: Int - words_GTE: Int - words_IN: [Int!] - words_LT: Int - words_LTE: Int + words: IntScalarFilters + words_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter words: { eq: ... }\\") + words_GT: Int @deprecated(reason: \\"Please use the relevant generic filter words: { gt: ... }\\") + words_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter words: { gte: ... }\\") + words_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter words: { in: ... }\\") + words_LT: Int @deprecated(reason: \\"Please use the relevant generic filter words: { lt: ... }\\") + words_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter words: { lte: ... }\\") }" `); }); diff --git a/packages/graphql/tests/schema/custom-mutations.test.ts b/packages/graphql/tests/schema/custom-mutations.test.ts index 6eee69b406..ca4df6f23f 100644 --- a/packages/graphql/tests/schema/custom-mutations.test.ts +++ b/packages/graphql/tests/schema/custom-mutations.test.ts @@ -83,9 +83,18 @@ describe("Custom-mutations", () => { id: ID } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -94,7 +103,6 @@ describe("Custom-mutations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -114,18 +122,20 @@ describe("Custom-mutations", () => { } input MovieUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { diff --git a/packages/graphql/tests/schema/directive-preserve.test.ts b/packages/graphql/tests/schema/directive-preserve.test.ts index 066265b7fb..360f8db2a2 100644 --- a/packages/graphql/tests/schema/directive-preserve.test.ts +++ b/packages/graphql/tests/schema/directive-preserve.test.ts @@ -67,9 +67,18 @@ describe("Directive-preserve", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie @preservedTopLevel { @@ -78,7 +87,6 @@ describe("Directive-preserve", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -98,6 +106,7 @@ describe("Directive-preserve", () => { } input MovieUpdateInput { + id: IDScalarMutations id_SET: ID } @@ -105,11 +114,12 @@ describe("Directive-preserve", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -219,6 +229,33 @@ describe("Directive-preserve", () => { sum: Float } + \\"\\"\\"Filters for an aggregation of a float field\\"\\"\\" + input FloatScalarAggregationFilters { + average: FloatScalarFilters + max: FloatScalarFilters + min: FloatScalarFilters + sum: FloatScalarFilters + } + + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + type Genre { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! moviesAggregate(where: MovieWhere): GenreMovieMoviesAggregationSelection @@ -272,6 +309,7 @@ describe("Directive-preserve", () => { AND: [GenreMoviesAggregateInput!] NOT: GenreMoviesAggregateInput OR: [GenreMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -291,6 +329,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 } @@ -325,61 +382,64 @@ describe("Directive-preserve", () => { AND: [GenreMoviesNodeAggregationWhereInput!] NOT: GenreMoviesNodeAggregationWhereInput OR: [GenreMoviesNodeAggregationWhereInput!] - imdbRating_AVERAGE_EQUAL: Float - imdbRating_AVERAGE_GT: Float - imdbRating_AVERAGE_GTE: Float - imdbRating_AVERAGE_LT: Float - imdbRating_AVERAGE_LTE: Float - imdbRating_MAX_EQUAL: Float - imdbRating_MAX_GT: Float - imdbRating_MAX_GTE: Float - imdbRating_MAX_LT: Float - imdbRating_MAX_LTE: Float - imdbRating_MIN_EQUAL: Float - imdbRating_MIN_GT: Float - imdbRating_MIN_GTE: Float - imdbRating_MIN_LT: Float - imdbRating_MIN_LTE: Float - imdbRating_SUM_EQUAL: Float - imdbRating_SUM_GT: Float - imdbRating_SUM_GTE: Float - imdbRating_SUM_LT: Float - imdbRating_SUM_LTE: Float - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int - year_AVERAGE_EQUAL: Float - year_AVERAGE_GT: Float - year_AVERAGE_GTE: Float - year_AVERAGE_LT: Float - year_AVERAGE_LTE: Float - year_MAX_EQUAL: Int - year_MAX_GT: Int - year_MAX_GTE: Int - year_MAX_LT: Int - year_MAX_LTE: Int - year_MIN_EQUAL: Int - year_MIN_GT: Int - year_MIN_GTE: Int - year_MIN_LT: Int - year_MIN_LTE: Int - year_SUM_EQUAL: Int - year_SUM_GT: Int - year_SUM_GTE: Int - year_SUM_LT: Int - year_SUM_LTE: Int + imdbRating: FloatScalarAggregationFilters + imdbRating_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { average: { eq: ... } } }' instead.\\") + imdbRating_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { average: { gt: ... } } }' instead.\\") + imdbRating_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { average: { gte: ... } } }' instead.\\") + imdbRating_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { average: { lt: ... } } }' instead.\\") + imdbRating_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { average: { lte: ... } } }' instead.\\") + imdbRating_MAX_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { max: { eq: ... } } }' instead.\\") + imdbRating_MAX_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { max: { gt: ... } } }' instead.\\") + imdbRating_MAX_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { max: { gte: ... } } }' instead.\\") + imdbRating_MAX_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { max: { lt: ... } } }' instead.\\") + imdbRating_MAX_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { max: { lte: ... } } }' instead.\\") + imdbRating_MIN_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { min: { eq: ... } } }' instead.\\") + imdbRating_MIN_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { min: { gt: ... } } }' instead.\\") + imdbRating_MIN_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { min: { gte: ... } } }' instead.\\") + imdbRating_MIN_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { min: { lt: ... } } }' instead.\\") + imdbRating_MIN_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { min: { lte: ... } } }' instead.\\") + imdbRating_SUM_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { sum: { eq: ... } } }' instead.\\") + imdbRating_SUM_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { sum: { gt: ... } } }' instead.\\") + imdbRating_SUM_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { sum: { gte: ... } } }' instead.\\") + imdbRating_SUM_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { sum: { lt: ... } } }' instead.\\") + imdbRating_SUM_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { sum: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") + year: IntScalarAggregationFilters + year_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'year: { average: { eq: ... } } }' instead.\\") + year_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'year: { average: { gt: ... } } }' instead.\\") + year_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'year: { average: { gte: ... } } }' instead.\\") + year_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'year: { average: { lt: ... } } }' instead.\\") + year_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'year: { average: { lte: ... } } }' instead.\\") + year_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { max: { eq: ... } } }' instead.\\") + year_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { max: { gt: ... } } }' instead.\\") + year_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { max: { gte: ... } } }' instead.\\") + year_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { max: { lt: ... } } }' instead.\\") + year_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { max: { lte: ... } } }' instead.\\") + year_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { min: { eq: ... } } }' instead.\\") + year_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { min: { gt: ... } } }' instead.\\") + year_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { min: { gte: ... } } }' instead.\\") + year_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { min: { lt: ... } } }' instead.\\") + year_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { min: { lte: ... } } }' instead.\\") + year_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { sum: { eq: ... } } }' instead.\\") + year_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { sum: { gt: ... } } }' instead.\\") + year_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { sum: { gte: ... } } }' instead.\\") + year_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { sum: { lt: ... } } }' instead.\\") + year_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { sum: { lte: ... } } }' instead.\\") } type GenreMoviesRelationship { @@ -400,6 +460,17 @@ describe("Directive-preserve", () => { where: GenreMoviesConnectionWhere } + input GenreRelationshipFilters { + \\"\\"\\"Filter type where all of the related Genres match this filter\\"\\"\\" + all: GenreWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Filter type where none of the related Genres match this filter\\"\\"\\" + none: GenreWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Filter type where one of the related Genres match this filter\\"\\"\\" + single: GenreWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Filter type where some of the related Genres match this filter\\"\\"\\" + some: GenreWhere @deprecated(reason: \\"Do not use\\") + } + \\"\\"\\" Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object. \\"\\"\\" @@ -409,43 +480,47 @@ describe("Directive-preserve", () => { input GenreUpdateInput { movies: [GenreMoviesUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input GenreWhere { AND: [GenreWhere!] NOT: GenreWhere OR: [GenreWhere!] + movies: MovieRelationshipFilters moviesAggregate: GenreMoviesAggregateInput + moviesConnection: GenreMoviesConnectionFilters \\"\\"\\" Return Genres where all of the related GenreMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: GenreMoviesConnectionWhere + moviesConnection_ALL: GenreMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Genres where none of the related GenreMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: GenreMoviesConnectionWhere + moviesConnection_NONE: GenreMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Genres where one of the related GenreMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: GenreMoviesConnectionWhere + moviesConnection_SINGLE: GenreMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Genres where some of the related GenreMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: GenreMoviesConnectionWhere + moviesConnection_SOME: GenreMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Genres where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Genres where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Genres where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Genres where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type GenresConnection { @@ -461,6 +536,31 @@ describe("Directive-preserve", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie { genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! @deprecated(reason: \\"Do not use\\") genresAggregate(where: GenreWhere): MovieGenreGenresAggregationSelection @deprecated(reason: \\"Do not use\\") @@ -518,6 +618,7 @@ describe("Directive-preserve", () => { AND: [MovieGenresAggregateInput!] NOT: MovieGenresAggregateInput OR: [MovieGenresAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -537,6 +638,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 } @@ -571,21 +691,22 @@ describe("Directive-preserve", () => { AND: [MovieGenresNodeAggregationWhereInput!] NOT: MovieGenresNodeAggregationWhereInput OR: [MovieGenresNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieGenresRelationship { @@ -606,6 +727,17 @@ describe("Directive-preserve", () => { where: MovieGenresConnectionWhere } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -617,22 +749,27 @@ describe("Directive-preserve", () => { input MovieUpdateInput { genres: [MovieGenresUpdateFieldInput!] @deprecated(reason: \\"Do not use\\") - imdbRating_ADD: Float - imdbRating_DIVIDE: Float - imdbRating_MULTIPLY: Float - imdbRating_SET: Float - imdbRating_SUBTRACT: Float - title_SET: String - year_DECREMENT: Int - year_INCREMENT: Int - year_SET: Int + imdbRating: FloatScalarMutations + imdbRating_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'imdbRating: { add: ... } }' instead.\\") + imdbRating_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'imdbRating: { divide: ... } }' instead.\\") + imdbRating_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'imdbRating: { multiply: ... } }' instead.\\") + imdbRating_SET: Float @deprecated(reason: \\"Please use the generic mutation 'imdbRating: { set: ... } }' instead.\\") + imdbRating_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'imdbRating: { subtract: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") + year: IntScalarMutations + year_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'year: { decrement: ... } }' instead.\\") + year_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'year: { increment: ... } }' instead.\\") + year_SET: Int @deprecated(reason: \\"Please use the generic mutation 'year: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + genres: GenreRelationshipFilters genresAggregate: MovieGenresAggregateInput @deprecated(reason: \\"Do not use\\") + genresConnection: MovieGenresConnectionFilters \\"\\"\\" Return Movies where all of the related MovieGenresConnections match this filter \\"\\"\\" @@ -657,23 +794,26 @@ describe("Directive-preserve", () => { genres_SINGLE: GenreWhere @deprecated(reason: \\"Do not use\\") \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" genres_SOME: GenreWhere @deprecated(reason: \\"Do not use\\") - imdbRating_EQ: Float - imdbRating_GT: Float - imdbRating_GTE: Float - imdbRating_IN: [Float] - imdbRating_LT: Float - imdbRating_LTE: Float - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String - year_EQ: Int - year_GT: Int - year_GTE: Int - year_IN: [Int] - year_LT: Int - year_LTE: Int + imdbRating: FloatScalarFilters + imdbRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { eq: ... }\\") + imdbRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { gt: ... }\\") + imdbRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { gte: ... }\\") + imdbRating_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { in: ... }\\") + imdbRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { lt: ... }\\") + imdbRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + year: IntScalarFilters + year_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter year: { eq: ... }\\") + year_GT: Int @deprecated(reason: \\"Please use the relevant generic filter year: { gt: ... }\\") + year_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter year: { gte: ... }\\") + year_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter year: { in: ... }\\") + year_LT: Int @deprecated(reason: \\"Please use the relevant generic filter year: { lt: ... }\\") + year_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter year: { lte: ... }\\") } type MoviesConnection { @@ -721,6 +861,27 @@ describe("Directive-preserve", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateGenresMutationResponse { genres: [Genre!]! info: UpdateInfo! @@ -805,21 +966,22 @@ describe("Directive-preserve", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - role_AVERAGE_LENGTH_EQUAL: Float - role_AVERAGE_LENGTH_GT: Float - role_AVERAGE_LENGTH_GTE: Float - role_AVERAGE_LENGTH_LT: Float - role_AVERAGE_LENGTH_LTE: Float - role_LONGEST_LENGTH_EQUAL: Int - role_LONGEST_LENGTH_GT: Int - role_LONGEST_LENGTH_GTE: Int - role_LONGEST_LENGTH_LT: Int - role_LONGEST_LENGTH_LTE: Int - role_SHORTEST_LENGTH_EQUAL: Int - role_SHORTEST_LENGTH_GT: Int - role_SHORTEST_LENGTH_GTE: Int - role_SHORTEST_LENGTH_LT: Int - role_SHORTEST_LENGTH_LTE: Int + role: StringScalarAggregationFilters + role_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'role: { averageLength: { eq: ... } } }' instead.\\") + role_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'role: { averageLength: { gt: ... } } }' instead.\\") + role_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'role: { averageLength: { gte: ... } } }' instead.\\") + role_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'role: { averageLength: { lt: ... } } }' instead.\\") + role_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'role: { averageLength: { lte: ... } } }' instead.\\") + role_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { longestLength: { eq: ... } } }' instead.\\") + role_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { longestLength: { gt: ... } } }' instead.\\") + role_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { longestLength: { gte: ... } } }' instead.\\") + role_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { longestLength: { lt: ... } } }' instead.\\") + role_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { longestLength: { lte: ... } } }' instead.\\") + role_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { shortestLength: { eq: ... } } }' instead.\\") + role_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { shortestLength: { gt: ... } } }' instead.\\") + role_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { shortestLength: { gte: ... } } }' instead.\\") + role_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { shortestLength: { lt: ... } } }' instead.\\") + role_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { shortestLength: { lte: ... } } }' instead.\\") } input ActedInCreateInput { @@ -831,18 +993,20 @@ describe("Directive-preserve", () => { } input ActedInUpdateInput { - role_SET: String + role: StringScalarMutations + role_SET: String @deprecated(reason: \\"Please use the generic mutation 'role: { set: ... } }' instead.\\") } input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - role_CONTAINS: String - role_ENDS_WITH: String - role_EQ: String - role_IN: [String!] - role_STARTS_WITH: String + role: StringScalarFilters + role_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter role: { contains: ... }\\") + role_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter role: { endsWith: ... }\\") + role_EQ: String @deprecated(reason: \\"Please use the relevant generic filter role: { eq: ... }\\") + role_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter role: { in: ... }\\") + role_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter role: { startsWith: ... }\\") } type Actor { @@ -856,6 +1020,7 @@ describe("Directive-preserve", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -877,6 +1042,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 @@ -914,21 +1098,22 @@ describe("Directive-preserve", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -996,6 +1181,17 @@ describe("Directive-preserve", () => { title: StringAggregateSelection! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -1005,43 +1201,47 @@ describe("Directive-preserve", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ProductionRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere + actedIn_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere + actedIn_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere + actedIn_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -1081,6 +1281,16 @@ describe("Directive-preserve", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + type IntAggregateSelection { average: Float max: Int @@ -1088,6 +1298,23 @@ describe("Directive-preserve", () => { sum: Int } + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie implements Production { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") @@ -1114,6 +1341,7 @@ describe("Directive-preserve", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1129,6 +1357,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! @@ -1143,21 +1390,22 @@ describe("Directive-preserve", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } input MovieActorsUpdateConnectionInput { @@ -1205,17 +1453,21 @@ describe("Directive-preserve", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] @deprecated(reason: \\"Do not use\\") - runtime_DECREMENT: Int - runtime_INCREMENT: Int - runtime_SET: Int - title_SET: String + runtime: IntScalarMutations + runtime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { decrement: ... } }' instead.\\") + runtime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { increment: ... } }' instead.\\") + runtime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'runtime: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput @deprecated(reason: \\"Do not use\\") + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related ProductionActorsConnections match this filter \\"\\"\\" @@ -1240,17 +1492,19 @@ describe("Directive-preserve", () => { actors_SINGLE: ActorWhere @deprecated(reason: \\"Do not use\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" actors_SOME: ActorWhere @deprecated(reason: \\"Do not use\\") - runtime_EQ: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + runtime: IntScalarFilters + runtime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { eq: ... }\\") + runtime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gt: ... }\\") + runtime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gte: ... }\\") + runtime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter runtime: { in: ... }\\") + runtime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lt: ... }\\") + runtime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -1289,6 +1543,7 @@ describe("Directive-preserve", () => { AND: [ProductionActorsAggregateInput!] NOT: ProductionActorsAggregateInput OR: [ProductionActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1310,6 +1565,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 @@ -1387,21 +1661,22 @@ describe("Directive-preserve", () => { AND: [ProductionActorsNodeAggregationWhereInput!] NOT: ProductionActorsNodeAggregationWhereInput OR: [ProductionActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type ProductionActorsRelationship { @@ -1462,6 +1737,17 @@ describe("Directive-preserve", () => { Series } + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + \\"\\"\\" Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. \\"\\"\\" @@ -1471,44 +1757,48 @@ describe("Directive-preserve", () => { input ProductionUpdateInput { actors: [ProductionActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] + actors: ActorRelationshipFilters actorsAggregate: ProductionActorsAggregateInput + actorsConnection: ProductionActorsConnectionFilters \\"\\"\\" Return Productions where all of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere + actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where none of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where one of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere + actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where some of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere + actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Productions where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Productions where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Productions where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Productions where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -1558,6 +1848,7 @@ describe("Directive-preserve", () => { AND: [SeriesActorsAggregateInput!] NOT: SeriesActorsAggregateInput OR: [SeriesActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1573,6 +1864,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! @@ -1587,21 +1897,22 @@ describe("Directive-preserve", () => { AND: [SeriesActorsNodeAggregationWhereInput!] NOT: SeriesActorsNodeAggregationWhereInput OR: [SeriesActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } input SeriesActorsUpdateConnectionInput { @@ -1655,52 +1966,58 @@ describe("Directive-preserve", () => { input SeriesUpdateInput { actors: [SeriesActorsUpdateFieldInput!] - episodes_DECREMENT: Int - episodes_INCREMENT: Int - episodes_SET: Int - title_SET: String + episodes: IntScalarMutations + episodes_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodes: { decrement: ... } }' instead.\\") + episodes_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodes: { increment: ... } }' instead.\\") + episodes_SET: Int @deprecated(reason: \\"Please use the generic mutation 'episodes: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] + actors: ActorRelationshipFilters actorsAggregate: SeriesActorsAggregateInput + actorsConnection: SeriesActorsConnectionFilters \\"\\"\\" Return Series where all of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere + actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where none of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where one of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere + actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where some of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere + actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - episodes_EQ: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + episodes: IntScalarFilters + episodes_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { eq: ... }\\") + episodes_GT: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { gt: ... }\\") + episodes_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { gte: ... }\\") + episodes_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter episodes: { in: ... }\\") + episodes_LT: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { lt: ... }\\") + episodes_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -1716,6 +2033,27 @@ describe("Directive-preserve", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -1806,21 +2144,22 @@ describe("Directive-preserve", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - role_AVERAGE_LENGTH_EQUAL: Float - role_AVERAGE_LENGTH_GT: Float - role_AVERAGE_LENGTH_GTE: Float - role_AVERAGE_LENGTH_LT: Float - role_AVERAGE_LENGTH_LTE: Float - role_LONGEST_LENGTH_EQUAL: Int - role_LONGEST_LENGTH_GT: Int - role_LONGEST_LENGTH_GTE: Int - role_LONGEST_LENGTH_LT: Int - role_LONGEST_LENGTH_LTE: Int - role_SHORTEST_LENGTH_EQUAL: Int - role_SHORTEST_LENGTH_GT: Int - role_SHORTEST_LENGTH_GTE: Int - role_SHORTEST_LENGTH_LT: Int - role_SHORTEST_LENGTH_LTE: Int + role: StringScalarAggregationFilters + role_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'role: { averageLength: { eq: ... } } }' instead.\\") + role_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'role: { averageLength: { gt: ... } } }' instead.\\") + role_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'role: { averageLength: { gte: ... } } }' instead.\\") + role_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'role: { averageLength: { lt: ... } } }' instead.\\") + role_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'role: { averageLength: { lte: ... } } }' instead.\\") + role_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { longestLength: { eq: ... } } }' instead.\\") + role_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { longestLength: { gt: ... } } }' instead.\\") + role_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { longestLength: { gte: ... } } }' instead.\\") + role_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { longestLength: { lt: ... } } }' instead.\\") + role_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { longestLength: { lte: ... } } }' instead.\\") + role_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { shortestLength: { eq: ... } } }' instead.\\") + role_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { shortestLength: { gt: ... } } }' instead.\\") + role_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { shortestLength: { gte: ... } } }' instead.\\") + role_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { shortestLength: { lt: ... } } }' instead.\\") + role_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { shortestLength: { lte: ... } } }' instead.\\") } input ActedInCreateInput { @@ -1832,18 +2171,20 @@ describe("Directive-preserve", () => { } input ActedInUpdateInput { - role_SET: String + role: StringScalarMutations + role_SET: String @deprecated(reason: \\"Please use the generic mutation 'role: { set: ... } }' instead.\\") } input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - role_CONTAINS: String - role_ENDS_WITH: String - role_EQ: String - role_IN: [String!] - role_STARTS_WITH: String + role: StringScalarFilters + role_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter role: { contains: ... }\\") + role_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter role: { endsWith: ... }\\") + role_EQ: String @deprecated(reason: \\"Please use the relevant generic filter role: { eq: ... }\\") + role_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter role: { in: ... }\\") + role_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter role: { startsWith: ... }\\") } type Actor { @@ -1857,6 +2198,7 @@ describe("Directive-preserve", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1877,6 +2219,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 @@ -1912,21 +2273,22 @@ describe("Directive-preserve", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -1994,6 +2356,17 @@ describe("Directive-preserve", () => { title: StringAggregateSelection! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere @deprecated(reason: \\"Do not use\\") + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere @deprecated(reason: \\"Do not use\\") + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -2003,43 +2376,47 @@ describe("Directive-preserve", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ProductionRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere + actedIn_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere + actedIn_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere + actedIn_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -2079,6 +2456,16 @@ describe("Directive-preserve", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + type IntAggregateSelection { average: Float max: Int @@ -2086,6 +2473,23 @@ describe("Directive-preserve", () => { sum: Int } + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie implements Production { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") @@ -2112,6 +2516,7 @@ describe("Directive-preserve", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -2133,6 +2538,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 @@ -2170,21 +2594,22 @@ describe("Directive-preserve", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -2238,17 +2663,21 @@ describe("Directive-preserve", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] @deprecated(reason: \\"Do not use\\") - runtime_DECREMENT: Int - runtime_INCREMENT: Int - runtime_SET: Int - title_SET: String + runtime: IntScalarMutations + runtime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { decrement: ... } }' instead.\\") + runtime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { increment: ... } }' instead.\\") + runtime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'runtime: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput @deprecated(reason: \\"Do not use\\") + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" @@ -2273,17 +2702,19 @@ describe("Directive-preserve", () => { actors_SINGLE: ActorWhere @deprecated(reason: \\"Do not use\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" actors_SOME: ActorWhere @deprecated(reason: \\"Do not use\\") - runtime_EQ: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + runtime: IntScalarFilters + runtime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { eq: ... }\\") + runtime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gt: ... }\\") + runtime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gte: ... }\\") + runtime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter runtime: { in: ... }\\") + runtime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lt: ... }\\") + runtime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -2341,6 +2772,17 @@ describe("Directive-preserve", () => { Series } + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + \\"\\"\\" Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. \\"\\"\\" @@ -2349,19 +2791,21 @@ describe("Directive-preserve", () => { } input ProductionUpdateInput { - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -2411,6 +2855,7 @@ describe("Directive-preserve", () => { AND: [SeriesActorsAggregateInput!] NOT: SeriesActorsAggregateInput OR: [SeriesActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -2432,6 +2877,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 @@ -2469,21 +2933,22 @@ describe("Directive-preserve", () => { AND: [SeriesActorsNodeAggregationWhereInput!] NOT: SeriesActorsNodeAggregationWhereInput OR: [SeriesActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type SeriesActorsRelationship { @@ -2543,52 +3008,58 @@ describe("Directive-preserve", () => { input SeriesUpdateInput { actors: [SeriesActorsUpdateFieldInput!] - episodes_DECREMENT: Int - episodes_INCREMENT: Int - episodes_SET: Int - title_SET: String + episodes: IntScalarMutations + episodes_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodes: { decrement: ... } }' instead.\\") + episodes_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodes: { increment: ... } }' instead.\\") + episodes_SET: Int @deprecated(reason: \\"Please use the generic mutation 'episodes: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] + actors: ActorRelationshipFilters actorsAggregate: SeriesActorsAggregateInput + actorsConnection: SeriesActorsConnectionFilters \\"\\"\\" Return Series where all of the related SeriesActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: SeriesActorsConnectionWhere + actorsConnection_ALL: SeriesActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where none of the related SeriesActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: SeriesActorsConnectionWhere + actorsConnection_NONE: SeriesActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where one of the related SeriesActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: SeriesActorsConnectionWhere + actorsConnection_SINGLE: SeriesActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where some of the related SeriesActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: SeriesActorsConnectionWhere + actorsConnection_SOME: SeriesActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - episodes_EQ: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + episodes: IntScalarFilters + episodes_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { eq: ... }\\") + episodes_GT: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { gt: ... }\\") + episodes_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { gte: ... }\\") + episodes_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter episodes: { in: ... }\\") + episodes_LT: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { lt: ... }\\") + episodes_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -2604,6 +3075,27 @@ describe("Directive-preserve", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -2682,21 +3174,22 @@ describe("Directive-preserve", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - role_AVERAGE_LENGTH_EQUAL: Float - role_AVERAGE_LENGTH_GT: Float - role_AVERAGE_LENGTH_GTE: Float - role_AVERAGE_LENGTH_LT: Float - role_AVERAGE_LENGTH_LTE: Float - role_LONGEST_LENGTH_EQUAL: Int - role_LONGEST_LENGTH_GT: Int - role_LONGEST_LENGTH_GTE: Int - role_LONGEST_LENGTH_LT: Int - role_LONGEST_LENGTH_LTE: Int - role_SHORTEST_LENGTH_EQUAL: Int - role_SHORTEST_LENGTH_GT: Int - role_SHORTEST_LENGTH_GTE: Int - role_SHORTEST_LENGTH_LT: Int - role_SHORTEST_LENGTH_LTE: Int + role: StringScalarAggregationFilters + role_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'role: { averageLength: { eq: ... } } }' instead.\\") + role_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'role: { averageLength: { gt: ... } } }' instead.\\") + role_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'role: { averageLength: { gte: ... } } }' instead.\\") + role_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'role: { averageLength: { lt: ... } } }' instead.\\") + role_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'role: { averageLength: { lte: ... } } }' instead.\\") + role_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { longestLength: { eq: ... } } }' instead.\\") + role_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { longestLength: { gt: ... } } }' instead.\\") + role_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { longestLength: { gte: ... } } }' instead.\\") + role_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { longestLength: { lt: ... } } }' instead.\\") + role_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { longestLength: { lte: ... } } }' instead.\\") + role_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { shortestLength: { eq: ... } } }' instead.\\") + role_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { shortestLength: { gt: ... } } }' instead.\\") + role_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { shortestLength: { gte: ... } } }' instead.\\") + role_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { shortestLength: { lt: ... } } }' instead.\\") + role_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'role: { shortestLength: { lte: ... } } }' instead.\\") } input ActedInCreateInput { @@ -2708,18 +3201,20 @@ describe("Directive-preserve", () => { } input ActedInUpdateInput { - role_SET: String + role: StringScalarMutations + role_SET: String @deprecated(reason: \\"Please use the generic mutation 'role: { set: ... } }' instead.\\") } input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - role_CONTAINS: String - role_ENDS_WITH: String - role_EQ: String - role_IN: [String!] - role_STARTS_WITH: String + role: StringScalarFilters + role_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter role: { contains: ... }\\") + role_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter role: { endsWith: ... }\\") + role_EQ: String @deprecated(reason: \\"Please use the relevant generic filter role: { eq: ... }\\") + role_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter role: { in: ... }\\") + role_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter role: { startsWith: ... }\\") } type Actor { @@ -2733,6 +3228,7 @@ describe("Directive-preserve", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -2753,6 +3249,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 @@ -2788,21 +3303,22 @@ describe("Directive-preserve", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -2870,6 +3386,17 @@ describe("Directive-preserve", () => { title: StringAggregateSelection! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -2879,43 +3406,47 @@ describe("Directive-preserve", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ProductionRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere + actedIn_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere + actedIn_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere + actedIn_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -2955,6 +3486,16 @@ describe("Directive-preserve", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + type IntAggregateSelection { average: Float max: Int @@ -2962,6 +3503,23 @@ describe("Directive-preserve", () => { sum: Int } + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie implements Production { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -2988,6 +3546,7 @@ describe("Directive-preserve", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -3009,6 +3568,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 @@ -3046,21 +3624,22 @@ describe("Directive-preserve", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -3114,52 +3693,58 @@ describe("Directive-preserve", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - runtime_DECREMENT: Int - runtime_INCREMENT: Int - runtime_SET: Int - title_SET: String + runtime: IntScalarMutations + runtime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { decrement: ... } }' instead.\\") + runtime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { increment: ... } }' instead.\\") + runtime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'runtime: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - runtime_EQ: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + runtime: IntScalarFilters + runtime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { eq: ... }\\") + runtime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gt: ... }\\") + runtime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gte: ... }\\") + runtime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter runtime: { in: ... }\\") + runtime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lt: ... }\\") + runtime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -3217,6 +3802,17 @@ describe("Directive-preserve", () => { Series } + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + \\"\\"\\" Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. \\"\\"\\" @@ -3225,19 +3821,21 @@ describe("Directive-preserve", () => { } input ProductionUpdateInput { - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -3287,6 +3885,7 @@ describe("Directive-preserve", () => { AND: [SeriesActorsAggregateInput!] NOT: SeriesActorsAggregateInput OR: [SeriesActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -3308,6 +3907,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 @@ -3345,21 +3963,22 @@ describe("Directive-preserve", () => { AND: [SeriesActorsNodeAggregationWhereInput!] NOT: SeriesActorsNodeAggregationWhereInput OR: [SeriesActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type SeriesActorsRelationship { @@ -3419,52 +4038,58 @@ describe("Directive-preserve", () => { input SeriesUpdateInput { actors: [SeriesActorsUpdateFieldInput!] - episodes_DECREMENT: Int - episodes_INCREMENT: Int - episodes_SET: Int - title_SET: String + episodes: IntScalarMutations + episodes_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodes: { decrement: ... } }' instead.\\") + episodes_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodes: { increment: ... } }' instead.\\") + episodes_SET: Int @deprecated(reason: \\"Please use the generic mutation 'episodes: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] + actors: ActorRelationshipFilters actorsAggregate: SeriesActorsAggregateInput + actorsConnection: SeriesActorsConnectionFilters \\"\\"\\" Return Series where all of the related SeriesActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: SeriesActorsConnectionWhere + actorsConnection_ALL: SeriesActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where none of the related SeriesActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: SeriesActorsConnectionWhere + actorsConnection_NONE: SeriesActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where one of the related SeriesActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: SeriesActorsConnectionWhere + actorsConnection_SINGLE: SeriesActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where some of the related SeriesActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: SeriesActorsConnectionWhere + actorsConnection_SOME: SeriesActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - episodes_EQ: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + episodes: IntScalarFilters + episodes_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { eq: ... }\\") + episodes_GT: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { gt: ... }\\") + episodes_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { gte: ... }\\") + episodes_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter episodes: { in: ... }\\") + episodes_LT: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { lt: ... }\\") + episodes_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -3480,6 +4105,27 @@ describe("Directive-preserve", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -3588,6 +4234,7 @@ describe("Directive-preserve", () => { AND: [BlogPostsAggregateInput!] NOT: BlogPostsAggregateInput OR: [BlogPostsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -3606,6 +4253,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 } @@ -3638,21 +4304,22 @@ describe("Directive-preserve", () => { AND: [BlogPostsNodeAggregationWhereInput!] NOT: BlogPostsNodeAggregationWhereInput OR: [BlogPostsNodeAggregationWhereInput!] - content_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Do not use post.content\\") - content_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Do not use post.content\\") - content_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Do not use post.content\\") - content_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Do not use post.content\\") - content_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Do not use post.content\\") - content_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Do not use post.content\\") - content_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Do not use post.content\\") - content_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Do not use post.content\\") - content_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Do not use post.content\\") - content_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Do not use post.content\\") - content_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Do not use post.content\\") - content_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Do not use post.content\\") - content_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Do not use post.content\\") - content_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Do not use post.content\\") - content_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Do not use post.content\\") + content: StringScalarAggregationFilters + content_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { eq: ... } } }' instead.\\") + content_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { gt: ... } } }' instead.\\") + content_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { gte: ... } } }' instead.\\") + content_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { lt: ... } } }' instead.\\") + content_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { lte: ... } } }' instead.\\") + content_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { eq: ... } } }' instead.\\") + content_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { gt: ... } } }' instead.\\") + content_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { gte: ... } } }' instead.\\") + content_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { lt: ... } } }' instead.\\") + content_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { lte: ... } } }' instead.\\") + content_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { eq: ... } } }' instead.\\") + content_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { gt: ... } } }' instead.\\") + content_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { gte: ... } } }' instead.\\") + content_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { lt: ... } } }' instead.\\") + content_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { lte: ... } } }' instead.\\") } type BlogPostsRelationship { @@ -3682,43 +4349,47 @@ describe("Directive-preserve", () => { input BlogUpdateInput { posts: [BlogPostsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input BlogWhere { AND: [BlogWhere!] NOT: BlogWhere OR: [BlogWhere!] + posts: PostRelationshipFilters postsAggregate: BlogPostsAggregateInput + postsConnection: BlogPostsConnectionFilters \\"\\"\\" Return Blogs where all of the related BlogPostsConnections match this filter \\"\\"\\" - postsConnection_ALL: BlogPostsConnectionWhere + postsConnection_ALL: BlogPostsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'postsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Blogs where none of the related BlogPostsConnections match this filter \\"\\"\\" - postsConnection_NONE: BlogPostsConnectionWhere + postsConnection_NONE: BlogPostsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'postsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Blogs where one of the related BlogPostsConnections match this filter \\"\\"\\" - postsConnection_SINGLE: BlogPostsConnectionWhere + postsConnection_SINGLE: BlogPostsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'postsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Blogs where some of the related BlogPostsConnections match this filter \\"\\"\\" - postsConnection_SOME: BlogPostsConnectionWhere + postsConnection_SOME: BlogPostsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'postsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Blogs where all of the related Posts match this filter\\"\\"\\" - posts_ALL: PostWhere + posts_ALL: PostWhere @deprecated(reason: \\"Please use the relevant generic filter 'posts: { all: ... }' instead.\\") \\"\\"\\"Return Blogs where none of the related Posts match this filter\\"\\"\\" - posts_NONE: PostWhere + posts_NONE: PostWhere @deprecated(reason: \\"Please use the relevant generic filter 'posts: { none: ... }' instead.\\") \\"\\"\\"Return Blogs where one of the related Posts match this filter\\"\\"\\" - posts_SINGLE: PostWhere + posts_SINGLE: PostWhere @deprecated(reason: \\"Please use the relevant generic filter 'posts: { single: ... }' instead.\\") \\"\\"\\"Return Blogs where some of the related Posts match this filter\\"\\"\\" - posts_SOME: PostWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + posts_SOME: PostWhere @deprecated(reason: \\"Please use the relevant generic filter 'posts: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type BlogsConnection { @@ -3729,6 +4400,17 @@ describe("Directive-preserve", () => { union Content = Blog | Post + input ContentRelationshipFilters { + \\"\\"\\"Filter type where all of the related Contents match this filter\\"\\"\\" + all: ContentWhere @deprecated(reason: \\"Do not use user.content\\") + \\"\\"\\"Filter type where none of the related Contents match this filter\\"\\"\\" + none: ContentWhere @deprecated(reason: \\"Do not use user.content\\") + \\"\\"\\"Filter type where one of the related Contents match this filter\\"\\"\\" + single: ContentWhere @deprecated(reason: \\"Do not use user.content\\") + \\"\\"\\"Filter type where some of the related Contents match this filter\\"\\"\\" + some: ContentWhere @deprecated(reason: \\"Do not use user.content\\") + } + input ContentWhere { Blog: BlogWhere Post: PostWhere @@ -3765,6 +4447,26 @@ describe("Directive-preserve", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Mutation { createBlogs(input: [BlogCreateInput!]!): CreateBlogsMutationResponse! createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! @@ -3807,6 +4509,17 @@ describe("Directive-preserve", () => { node: Post! } + input PostRelationshipFilters { + \\"\\"\\"Filter type where all of the related Posts match this filter\\"\\"\\" + all: PostWhere + \\"\\"\\"Filter type where none of the related Posts match this filter\\"\\"\\" + none: PostWhere + \\"\\"\\"Filter type where one of the related Posts match this filter\\"\\"\\" + single: PostWhere + \\"\\"\\"Filter type where some of the related Posts match this filter\\"\\"\\" + some: PostWhere + } + \\"\\"\\" Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. \\"\\"\\" @@ -3815,6 +4528,7 @@ describe("Directive-preserve", () => { } input PostUpdateInput { + content: StringScalarMutations @deprecated(reason: \\"Do not use post.content\\") content_SET: String @deprecated(reason: \\"Do not use post.content\\") } @@ -3822,6 +4536,7 @@ describe("Directive-preserve", () => { AND: [PostWhere!] NOT: PostWhere OR: [PostWhere!] + content: StringScalarFilters @deprecated(reason: \\"Do not use post.content\\") content_CONTAINS: String @deprecated(reason: \\"Do not use post.content\\") content_ENDS_WITH: String @deprecated(reason: \\"Do not use post.content\\") content_EQ: String @deprecated(reason: \\"Do not use post.content\\") @@ -3861,6 +4576,27 @@ describe("Directive-preserve", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateBlogsMutationResponse { blogs: [Blog!]! info: UpdateInfo! @@ -3947,6 +4683,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 @@ -4036,13 +4791,16 @@ describe("Directive-preserve", () => { input UserUpdateInput { content: UserContentUpdateInput @deprecated(reason: \\"Do not use user.content\\") - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input UserWhere { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] + content: ContentRelationshipFilters + contentConnection: UserContentConnectionFilters \\"\\"\\" Return Users where all of the related UserContentConnections match this filter \\"\\"\\" @@ -4067,11 +4825,12 @@ describe("Directive-preserve", () => { content_SINGLE: ContentWhere @deprecated(reason: \\"Do not use user.content\\") \\"\\"\\"Return Users where some of the related Contents match this filter\\"\\"\\" content_SOME: ContentWhere @deprecated(reason: \\"Do not use user.content\\") - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type UsersConnection { diff --git a/packages/graphql/tests/schema/directives/alias.test.ts b/packages/graphql/tests/schema/directives/alias.test.ts index 4b65fdc3e1..6e625b7a97 100644 --- a/packages/graphql/tests/schema/directives/alias.test.ts +++ b/packages/graphql/tests/schema/directives/alias.test.ts @@ -62,6 +62,7 @@ describe("Alias", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -82,6 +83,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 @@ -117,41 +137,43 @@ describe("Alias", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - rating_AVERAGE_EQUAL: Float - rating_AVERAGE_GT: Float - rating_AVERAGE_GTE: Float - rating_AVERAGE_LT: Float - rating_AVERAGE_LTE: Float - rating_MAX_EQUAL: Float - rating_MAX_GT: Float - rating_MAX_GTE: Float - rating_MAX_LT: Float - rating_MAX_LTE: Float - rating_MIN_EQUAL: Float - rating_MIN_GT: Float - rating_MIN_GTE: Float - rating_MIN_LT: Float - rating_MIN_LTE: Float - rating_SUM_EQUAL: Float - rating_SUM_GT: Float - rating_SUM_GTE: Float - rating_SUM_LT: Float - rating_SUM_LTE: Float - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + rating: FloatScalarAggregationFilters + rating_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'rating: { average: { eq: ... } } }' instead.\\") + rating_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'rating: { average: { gt: ... } } }' instead.\\") + rating_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'rating: { average: { gte: ... } } }' instead.\\") + rating_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'rating: { average: { lt: ... } } }' instead.\\") + rating_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'rating: { average: { lte: ... } } }' instead.\\") + rating_MAX_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'rating: { max: { eq: ... } } }' instead.\\") + rating_MAX_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'rating: { max: { gt: ... } } }' instead.\\") + rating_MAX_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'rating: { max: { gte: ... } } }' instead.\\") + rating_MAX_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'rating: { max: { lt: ... } } }' instead.\\") + rating_MAX_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'rating: { max: { lte: ... } } }' instead.\\") + rating_MIN_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'rating: { min: { eq: ... } } }' instead.\\") + rating_MIN_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'rating: { min: { gt: ... } } }' instead.\\") + rating_MIN_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'rating: { min: { gte: ... } } }' instead.\\") + rating_MIN_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'rating: { min: { lt: ... } } }' instead.\\") + rating_MIN_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'rating: { min: { lte: ... } } }' instead.\\") + rating_SUM_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'rating: { sum: { eq: ... } } }' instead.\\") + rating_SUM_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'rating: { sum: { gt: ... } } }' instead.\\") + rating_SUM_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'rating: { sum: { gte: ... } } }' instead.\\") + rating_SUM_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'rating: { sum: { lt: ... } } }' instead.\\") + rating_SUM_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'rating: { sum: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } \\"\\"\\" @@ -167,41 +189,43 @@ describe("Alias", () => { AND: [ActorActedInPropsAggregationWhereInput!] NOT: ActorActedInPropsAggregationWhereInput OR: [ActorActedInPropsAggregationWhereInput!] - character_AVERAGE_LENGTH_EQUAL: Float - character_AVERAGE_LENGTH_GT: Float - character_AVERAGE_LENGTH_GTE: Float - character_AVERAGE_LENGTH_LT: Float - character_AVERAGE_LENGTH_LTE: Float - character_LONGEST_LENGTH_EQUAL: Int - character_LONGEST_LENGTH_GT: Int - character_LONGEST_LENGTH_GTE: Int - character_LONGEST_LENGTH_LT: Int - character_LONGEST_LENGTH_LTE: Int - character_SHORTEST_LENGTH_EQUAL: Int - character_SHORTEST_LENGTH_GT: Int - character_SHORTEST_LENGTH_GTE: Int - character_SHORTEST_LENGTH_LT: Int - character_SHORTEST_LENGTH_LTE: Int - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_MAX_EQUAL: Int - screenTime_MAX_GT: Int - screenTime_MAX_GTE: Int - screenTime_MAX_LT: Int - screenTime_MAX_LTE: Int - screenTime_MIN_EQUAL: Int - screenTime_MIN_GT: Int - screenTime_MIN_GTE: Int - screenTime_MIN_LT: Int - screenTime_MIN_LTE: Int - screenTime_SUM_EQUAL: Int - screenTime_SUM_GT: Int - screenTime_SUM_GTE: Int - screenTime_SUM_LT: Int - screenTime_SUM_LTE: Int + character: StringScalarAggregationFilters + character_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'character: { averageLength: { eq: ... } } }' instead.\\") + character_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'character: { averageLength: { gt: ... } } }' instead.\\") + character_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'character: { averageLength: { gte: ... } } }' instead.\\") + character_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'character: { averageLength: { lt: ... } } }' instead.\\") + character_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'character: { averageLength: { lte: ... } } }' instead.\\") + character_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'character: { longestLength: { eq: ... } } }' instead.\\") + character_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'character: { longestLength: { gt: ... } } }' instead.\\") + character_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'character: { longestLength: { gte: ... } } }' instead.\\") + character_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'character: { longestLength: { lt: ... } } }' instead.\\") + character_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'character: { longestLength: { lte: ... } } }' instead.\\") + character_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'character: { shortestLength: { eq: ... } } }' instead.\\") + character_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'character: { shortestLength: { gt: ... } } }' instead.\\") + character_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'character: { shortestLength: { gte: ... } } }' instead.\\") + character_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'character: { shortestLength: { lt: ... } } }' instead.\\") + character_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'character: { shortestLength: { lte: ... } } }' instead.\\") + screenTime: IntScalarAggregationFilters + screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { eq: ... } } }' instead.\\") + screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gt: ... } } }' instead.\\") + screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gte: ... } } }' instead.\\") + screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lt: ... } } }' instead.\\") + screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lte: ... } } }' instead.\\") + screenTime_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { eq: ... } } }' instead.\\") + screenTime_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gt: ... } } }' instead.\\") + screenTime_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gte: ... } } }' instead.\\") + screenTime_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lt: ... } } }' instead.\\") + screenTime_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lte: ... } } }' instead.\\") + screenTime_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { eq: ... } } }' instead.\\") + screenTime_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gt: ... } } }' instead.\\") + screenTime_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gte: ... } } }' instead.\\") + screenTime_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lt: ... } } }' instead.\\") + screenTime_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lte: ... } } }' instead.\\") + screenTime_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { eq: ... } } }' instead.\\") + screenTime_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gt: ... } } }' instead.\\") + screenTime_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gte: ... } } }' instead.\\") + screenTime_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lt: ... } } }' instead.\\") + screenTime_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lte: ... } } }' instead.\\") } input ActorActedInPropsCreateInput { @@ -215,27 +239,31 @@ describe("Alias", () => { } input ActorActedInPropsUpdateInput { - character_SET: String - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - screenTime_SET: Int + character: StringScalarMutations + character_SET: String @deprecated(reason: \\"Please use the generic mutation 'character: { set: ... } }' instead.\\") + screenTime: IntScalarMutations + screenTime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { decrement: ... } }' instead.\\") + screenTime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { increment: ... } }' instead.\\") + screenTime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'screenTime: { set: ... } }' instead.\\") } input ActorActedInPropsWhere { AND: [ActorActedInPropsWhere!] NOT: ActorActedInPropsWhere OR: [ActorActedInPropsWhere!] - character_CONTAINS: String - character_ENDS_WITH: String - character_EQ: String - character_IN: [String!] - character_STARTS_WITH: String - screenTime_EQ: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int] - screenTime_LT: Int - screenTime_LTE: Int + character: StringScalarFilters + character_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter character: { contains: ... }\\") + character_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter character: { endsWith: ... }\\") + character_EQ: String @deprecated(reason: \\"Please use the relevant generic filter character: { eq: ... }\\") + character_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter character: { in: ... }\\") + character_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter character: { startsWith: ... }\\") + screenTime: IntScalarFilters + screenTime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { eq: ... }\\") + screenTime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gt: ... }\\") + screenTime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gte: ... }\\") + screenTime_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter screenTime: { in: ... }\\") + screenTime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lt: ... }\\") + screenTime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lte: ... }\\") } type ActorActedInRelationship { @@ -305,49 +333,55 @@ describe("Alias", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - city_SET: String - name_SET: String + city: StringScalarMutations + city_SET: String @deprecated(reason: \\"Please use the generic mutation 'city: { set: ... } }' instead.\\") + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: MovieRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere + actedIn_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere + actedIn_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere + actedIn_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - city_CONTAINS: String - city_ENDS_WITH: String - city_EQ: String - city_IN: [String] - city_STARTS_WITH: String - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + city: StringScalarFilters + city_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter city: { contains: ... }\\") + city_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter city: { endsWith: ... }\\") + city_EQ: String @deprecated(reason: \\"Please use the relevant generic filter city: { eq: ... }\\") + city_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter city: { in: ... }\\") + city_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter city: { startsWith: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -389,6 +423,33 @@ describe("Alias", () => { sum: Float } + \\"\\"\\"Filters for an aggregation of a float field\\"\\"\\" + input FloatScalarAggregationFilters { + average: FloatScalarFilters + max: FloatScalarFilters + min: FloatScalarFilters + sum: FloatScalarFilters + } + + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + type IntAggregateSelection { average: Float max: Int @@ -396,6 +457,31 @@ describe("Alias", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie { rating: Float title: String! @@ -421,6 +507,17 @@ describe("Alias", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -430,29 +527,33 @@ describe("Alias", () => { } input MovieUpdateInput { - rating_ADD: Float - rating_DIVIDE: Float - rating_MULTIPLY: Float - rating_SET: Float - rating_SUBTRACT: Float - title_SET: String + rating: FloatScalarMutations + rating_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'rating: { add: ... } }' instead.\\") + rating_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'rating: { divide: ... } }' instead.\\") + rating_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'rating: { multiply: ... } }' instead.\\") + rating_SET: Float @deprecated(reason: \\"Please use the generic mutation 'rating: { set: ... } }' instead.\\") + rating_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'rating: { subtract: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - rating_EQ: Float - rating_GT: Float - rating_GTE: Float - rating_IN: [Float] - rating_LT: Float - rating_LTE: Float - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + rating: FloatScalarFilters + rating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter rating: { eq: ... }\\") + rating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter rating: { gt: ... }\\") + rating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter rating: { gte: ... }\\") + rating_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter rating: { in: ... }\\") + rating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter rating: { lt: ... }\\") + rating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter rating: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -500,6 +601,27 @@ describe("Alias", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/directives/autogenerate.test.ts b/packages/graphql/tests/schema/directives/autogenerate.test.ts index aac8a7e58e..bd14e3c65f 100644 --- a/packages/graphql/tests/schema/directives/autogenerate.test.ts +++ b/packages/graphql/tests/schema/directives/autogenerate.test.ts @@ -60,9 +60,13 @@ describe("Autogenerate", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID } type Movie { @@ -72,7 +76,6 @@ describe("Autogenerate", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -94,23 +97,26 @@ describe("Autogenerate", () => { } input MovieUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type MoviesConnection { @@ -152,6 +158,20 @@ describe("Autogenerate", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" diff --git a/packages/graphql/tests/schema/directives/customResolver.test.ts b/packages/graphql/tests/schema/directives/customResolver.test.ts index 3308bfef31..06f71e5a86 100644 --- a/packages/graphql/tests/schema/directives/customResolver.test.ts +++ b/packages/graphql/tests/schema/directives/customResolver.test.ts @@ -75,9 +75,18 @@ describe("@customResolver directive", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Mutation { @@ -116,6 +125,20 @@ describe("@customResolver directive", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -141,7 +164,6 @@ describe("@customResolver directive", () => { type UserAggregateSelection { count: Int! - id: IDAggregateSelection! password: StringAggregateSelection! username: StringAggregateSelection! } @@ -186,12 +208,13 @@ describe("@customResolver directive", () => { AND: [UserInterfaceWhere!] NOT: UserInterfaceWhere OR: [UserInterfaceWhere!] - customResolver_CONTAINS: String - customResolver_ENDS_WITH: String - customResolver_EQ: String - customResolver_IN: [String] - customResolver_STARTS_WITH: String - typename_IN: [UserInterfaceImplementation!] + customResolver: StringScalarFilters + customResolver_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter customResolver: { contains: ... }\\") + customResolver_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter customResolver: { endsWith: ... }\\") + customResolver_EQ: String @deprecated(reason: \\"Please use the relevant generic filter customResolver: { eq: ... }\\") + customResolver_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter customResolver: { in: ... }\\") + customResolver_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter customResolver: { startsWith: ... }\\") + typename: [UserInterfaceImplementation!] } type UserInterfacesConnection { @@ -210,30 +233,36 @@ describe("@customResolver directive", () => { } input UserUpdateInput { - id_SET: ID - password_SET: String - username_SET: String + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } input UserWhere { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type UsersConnection { diff --git a/packages/graphql/tests/schema/directives/cypher.test.ts b/packages/graphql/tests/schema/directives/cypher.test.ts index 2f8070406b..98947a7a0a 100644 --- a/packages/graphql/tests/schema/directives/cypher.test.ts +++ b/packages/graphql/tests/schema/directives/cypher.test.ts @@ -112,6 +112,15 @@ describe("Cypher", () => { columnName: "list_of_durations" ) actor: Actor @cypher(statement: "MATCH (this)-[:ACTED_IN]->(a:Actor) RETURN a", columnName: "a") + actors_no_args: [Actor] + @cypher( + statement: """ + MATCH (a:Actor {title: $title}) + RETURN a + LIMIT 1 + """ + columnName: "a" + ) actors(title: String): [Actor] @cypher( statement: """ @@ -150,6 +159,17 @@ describe("Cypher", () => { node: Actor! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -158,18 +178,20 @@ describe("Cypher", () => { } input ActorUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -183,6 +205,41 @@ describe("Cypher", () => { \\"\\"\\" scalar BigInt + \\"\\"\\"BigInt list filters\\"\\"\\" + input BigIntListFilters { + eq: [BigInt!] + includes: BigInt + } + + \\"\\"\\"BigInt filters\\"\\"\\" + input BigIntScalarFilters { + eq: BigInt + gt: BigInt + gte: BigInt + in: [BigInt!] + lt: BigInt + lte: BigInt + } + + \\"\\"\\"Boolean list filters\\"\\"\\" + input BooleanListFilters { + eq: [Boolean!] + } + + \\"\\"\\"Boolean filters\\"\\"\\" + input BooleanScalarFilters { + eq: Boolean + } + + \\"\\"\\"Distance filters for cartesian points\\"\\"\\" + input CartesianDistancePointFilters { + from: CartesianPointInput! + gt: Float + gte: Float + lt: Float + lte: Float + } + \\"\\"\\" A point in a two- or three-dimensional Cartesian coordinate system or in a three-dimensional cylindrical coordinate system. For more information, see https://neo4j.com/docs/graphql/4/type-definitions/types/spatial/#cartesian-point \\"\\"\\" @@ -200,6 +257,13 @@ describe("Cypher", () => { point: CartesianPointInput! } + \\"\\"\\"Cartesian Point filters\\"\\"\\" + input CartesianPointFilters { + distance: CartesianDistancePointFilters + eq: CartesianPointInput + in: [CartesianPointInput!] + } + \\"\\"\\"Input type for a cartesian point\\"\\"\\" input CartesianPointInput { x: Float! @@ -207,6 +271,12 @@ describe("Cypher", () => { z: Float } + \\"\\"\\"CartesianPoint list filters\\"\\"\\" + input CartesianPointListFilters { + eq: [CartesianPointInput!] + includes: CartesianPointInput + } + type CreateActorsMutationResponse { actors: [Actor!]! info: CreateInfo! @@ -228,9 +298,41 @@ describe("Cypher", () => { \\"\\"\\"A date, represented as a 'yyyy-mm-dd' string\\"\\"\\" scalar Date + \\"\\"\\"Date list filters\\"\\"\\" + input DateListFilters { + eq: [Date!] + includes: Date + } + + \\"\\"\\"Date filters\\"\\"\\" + input DateScalarFilters { + eq: Date + gt: Date + gte: Date + in: [Date!] + lt: Date + lte: Date + } + \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" scalar DateTime + \\"\\"\\"DateTime list filters\\"\\"\\" + input DateTimeListFilters { + eq: [DateTime!] + includes: DateTime + } + + \\"\\"\\"DateTime filters\\"\\"\\" + input DateTimeScalarFilters { + eq: DateTime + gt: DateTime + gte: DateTime + in: [DateTime!] + lt: DateTime + lte: DateTime + } + \\"\\"\\" Information about the number of nodes and relationships deleted during a delete mutation \\"\\"\\" @@ -242,22 +344,118 @@ describe("Cypher", () => { \\"\\"\\"A duration, represented as an ISO 8601 duration string\\"\\"\\" scalar Duration - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Duration list filters\\"\\"\\" + input DurationListFilters { + eq: [Duration!] + includes: Duration + } + + \\"\\"\\"Duration filters\\"\\"\\" + input DurationScalarFilters { + eq: Duration + gt: Duration + gte: Duration + in: [Duration!] + lt: Duration + lte: Duration + } + + \\"\\"\\"Float list filters\\"\\"\\" + input FloatListFilters { + eq: [Float!] + includes: Float + } + + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID list filters\\"\\"\\" + input IDListFilters { + eq: [ID!] + includes: ID + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int list filters\\"\\"\\" + input IntListFilters { + eq: [Int!] + includes: Int + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } \\"\\"\\"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'\\"\\"\\" scalar LocalDateTime + \\"\\"\\"LocalDateTime list filters\\"\\"\\" + input LocalDateTimeListFilters { + eq: [LocalDateTime!] + includes: LocalDateTime + } + + \\"\\"\\"LocalDateTime filters\\"\\"\\" + input LocalDateTimeScalarFilters { + eq: LocalDateTime + gt: LocalDateTime + gte: LocalDateTime + in: [LocalDateTime!] + lt: LocalDateTime + lte: LocalDateTime + } + \\"\\"\\" A local time, represented as a time string without timezone information \\"\\"\\" scalar LocalTime + \\"\\"\\"LocalTime list filters\\"\\"\\" + input LocalTimeListFilters { + eq: [LocalTime!] + includes: LocalTime + } + + \\"\\"\\"LocalTime filters\\"\\"\\" + input LocalTimeScalarFilters { + eq: LocalTime + gt: LocalTime + gte: LocalTime + in: [LocalTime!] + lt: LocalTime + lte: LocalTime + } + type Movie { actor: Actor actors(title: String): [Actor] + actors_no_args: [Actor] custom_big_int: BigInt custom_boolean: Boolean custom_cartesian_point: CartesianPoint @@ -291,7 +489,6 @@ describe("Cypher", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -325,7 +522,8 @@ describe("Cypher", () => { } input MovieUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { @@ -333,117 +531,151 @@ describe("Cypher", () => { NOT: MovieWhere OR: [MovieWhere!] actor: ActorWhere - custom_big_int_EQ: BigInt - custom_big_int_GT: BigInt - custom_big_int_GTE: BigInt - custom_big_int_IN: [BigInt] - custom_big_int_LT: BigInt - custom_big_int_LTE: BigInt - custom_boolean_EQ: Boolean - custom_cartesian_point_DISTANCE: CartesianPointDistance - custom_cartesian_point_EQ: CartesianPointInput - custom_cartesian_point_GT: CartesianPointDistance - custom_cartesian_point_GTE: CartesianPointDistance - custom_cartesian_point_IN: [CartesianPointInput] - custom_cartesian_point_LT: CartesianPointDistance - custom_cartesian_point_LTE: CartesianPointDistance - custom_date_EQ: Date - custom_date_GT: Date - custom_date_GTE: Date - custom_date_IN: [Date] - custom_date_LT: Date - custom_date_LTE: Date - custom_datetime_EQ: DateTime - custom_datetime_GT: DateTime - custom_datetime_GTE: DateTime - custom_datetime_IN: [DateTime] - custom_datetime_LT: DateTime - custom_datetime_LTE: DateTime - custom_duration_EQ: Duration - custom_duration_GT: Duration - custom_duration_GTE: Duration - custom_duration_IN: [Duration] - custom_duration_LT: Duration - custom_duration_LTE: Duration - custom_float_EQ: Float - custom_float_GT: Float - custom_float_GTE: Float - custom_float_IN: [Float] - custom_float_LT: Float - custom_float_LTE: Float - custom_id_CONTAINS: ID - custom_id_ENDS_WITH: ID - custom_id_EQ: ID - custom_id_IN: [ID] - custom_id_STARTS_WITH: ID - custom_int_EQ: Int - custom_int_GT: Int - custom_int_GTE: Int - custom_int_IN: [Int] - custom_int_LT: Int - custom_int_LTE: Int - custom_localdatetime_EQ: LocalDateTime - custom_localdatetime_GT: LocalDateTime - custom_localdatetime_GTE: LocalDateTime - custom_localdatetime_IN: [LocalDateTime] - custom_localdatetime_LT: LocalDateTime - custom_localdatetime_LTE: LocalDateTime - custom_localtime_EQ: LocalTime - custom_localtime_GT: LocalTime - custom_localtime_GTE: LocalTime - custom_localtime_IN: [LocalTime] - custom_localtime_LT: LocalTime - custom_localtime_LTE: LocalTime - custom_point_DISTANCE: PointDistance - custom_point_EQ: PointInput - custom_point_GT: PointDistance - custom_point_GTE: PointDistance - custom_point_IN: [PointInput] - custom_point_LT: PointDistance - custom_point_LTE: PointDistance - custom_string_CONTAINS: String - custom_string_ENDS_WITH: String - custom_string_EQ: String - custom_string_IN: [String] - custom_string_STARTS_WITH: String - custom_time_EQ: Time - custom_time_GT: Time - custom_time_GTE: Time - custom_time_IN: [Time] - custom_time_LT: Time - custom_time_LTE: Time - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - list_custom_of_ids_EQ: [ID] - list_custom_of_ids_INCLUDES: ID - list_of_custom_big_ints_EQ: [BigInt] - list_of_custom_big_ints_INCLUDES: BigInt - list_of_custom_booleans_EQ: [Boolean] - list_of_custom_cartesian_points_EQ: [CartesianPointInput] - list_of_custom_cartesian_points_INCLUDES: CartesianPointInput - list_of_custom_dates_EQ: [Date] - list_of_custom_dates_INCLUDES: Date - list_of_custom_datetimes_EQ: [DateTime] - list_of_custom_datetimes_INCLUDES: DateTime - list_of_custom_durations_EQ: [Duration] - list_of_custom_durations_INCLUDES: Duration - list_of_custom_floats_EQ: [Float] - list_of_custom_floats_INCLUDES: Float - list_of_custom_ints_EQ: [Int] - list_of_custom_ints_INCLUDES: Int - list_of_custom_localdatetimes_EQ: [LocalDateTime] - list_of_custom_localdatetimes_INCLUDES: LocalDateTime - list_of_custom_localtimes_EQ: [LocalTime] - list_of_custom_localtimes_INCLUDES: LocalTime - list_of_custom_points_EQ: [PointInput] - list_of_custom_points_INCLUDES: PointInput - list_of_custom_strings_EQ: [String] - list_of_custom_strings_INCLUDES: String - list_of_custom_times_EQ: [Time] - list_of_custom_times_INCLUDES: Time + actors_no_args: ActorRelationshipFilters + actors_no_args_ALL: ActorWhere + actors_no_args_NONE: ActorWhere + actors_no_args_SINGLE: ActorWhere + actors_no_args_SOME: ActorWhere + custom_big_int: BigIntScalarFilters + custom_big_int_EQ: BigInt @deprecated(reason: \\"Please use the relevant generic filter custom_big_int: { eq: ... }\\") + custom_big_int_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter custom_big_int: { gt: ... }\\") + custom_big_int_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter custom_big_int: { gte: ... }\\") + custom_big_int_IN: [BigInt] @deprecated(reason: \\"Please use the relevant generic filter custom_big_int: { in: ... }\\") + custom_big_int_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter custom_big_int: { lt: ... }\\") + custom_big_int_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter custom_big_int: { lte: ... }\\") + custom_boolean: BooleanScalarFilters + custom_boolean_EQ: Boolean @deprecated(reason: \\"Please use the relevant generic filter custom_boolean: { eq: ... }\\") + custom_cartesian_point: CartesianPointFilters + custom_cartesian_point_DISTANCE: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter custom_cartesian_point: { distance: ... }\\") + custom_cartesian_point_EQ: CartesianPointInput @deprecated(reason: \\"Please use the relevant generic filter custom_cartesian_point: { eq: ... }\\") + custom_cartesian_point_GT: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter custom_cartesian_point: { gt: ... }\\") + custom_cartesian_point_GTE: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter custom_cartesian_point: { gte: ... }\\") + custom_cartesian_point_IN: [CartesianPointInput] @deprecated(reason: \\"Please use the relevant generic filter custom_cartesian_point: { in: ... }\\") + custom_cartesian_point_LT: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter custom_cartesian_point: { lt: ... }\\") + custom_cartesian_point_LTE: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter custom_cartesian_point: { lte: ... }\\") + custom_date: DateScalarFilters + custom_date_EQ: Date @deprecated(reason: \\"Please use the relevant generic filter custom_date: { eq: ... }\\") + custom_date_GT: Date @deprecated(reason: \\"Please use the relevant generic filter custom_date: { gt: ... }\\") + custom_date_GTE: Date @deprecated(reason: \\"Please use the relevant generic filter custom_date: { gte: ... }\\") + custom_date_IN: [Date] @deprecated(reason: \\"Please use the relevant generic filter custom_date: { in: ... }\\") + custom_date_LT: Date @deprecated(reason: \\"Please use the relevant generic filter custom_date: { lt: ... }\\") + custom_date_LTE: Date @deprecated(reason: \\"Please use the relevant generic filter custom_date: { lte: ... }\\") + custom_datetime: DateTimeScalarFilters + custom_datetime_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter custom_datetime: { eq: ... }\\") + custom_datetime_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter custom_datetime: { gt: ... }\\") + custom_datetime_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter custom_datetime: { gte: ... }\\") + custom_datetime_IN: [DateTime] @deprecated(reason: \\"Please use the relevant generic filter custom_datetime: { in: ... }\\") + custom_datetime_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter custom_datetime: { lt: ... }\\") + custom_datetime_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter custom_datetime: { lte: ... }\\") + custom_duration: DurationScalarFilters + custom_duration_EQ: Duration @deprecated(reason: \\"Please use the relevant generic filter custom_duration: { eq: ... }\\") + custom_duration_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter custom_duration: { gt: ... }\\") + custom_duration_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter custom_duration: { gte: ... }\\") + custom_duration_IN: [Duration] @deprecated(reason: \\"Please use the relevant generic filter custom_duration: { in: ... }\\") + custom_duration_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter custom_duration: { lt: ... }\\") + custom_duration_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter custom_duration: { lte: ... }\\") + custom_float: FloatScalarFilters + custom_float_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter custom_float: { eq: ... }\\") + custom_float_GT: Float @deprecated(reason: \\"Please use the relevant generic filter custom_float: { gt: ... }\\") + custom_float_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter custom_float: { gte: ... }\\") + custom_float_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter custom_float: { in: ... }\\") + custom_float_LT: Float @deprecated(reason: \\"Please use the relevant generic filter custom_float: { lt: ... }\\") + custom_float_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter custom_float: { lte: ... }\\") + custom_id: IDScalarFilters + custom_id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter custom_id: { contains: ... }\\") + custom_id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter custom_id: { endsWith: ... }\\") + custom_id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter custom_id: { eq: ... }\\") + custom_id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter custom_id: { in: ... }\\") + custom_id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter custom_id: { startsWith: ... }\\") + custom_int: IntScalarFilters + custom_int_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter custom_int: { eq: ... }\\") + custom_int_GT: Int @deprecated(reason: \\"Please use the relevant generic filter custom_int: { gt: ... }\\") + custom_int_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter custom_int: { gte: ... }\\") + custom_int_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter custom_int: { in: ... }\\") + custom_int_LT: Int @deprecated(reason: \\"Please use the relevant generic filter custom_int: { lt: ... }\\") + custom_int_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter custom_int: { lte: ... }\\") + custom_localdatetime: LocalDateTimeScalarFilters + custom_localdatetime_EQ: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter custom_localdatetime: { eq: ... }\\") + custom_localdatetime_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter custom_localdatetime: { gt: ... }\\") + custom_localdatetime_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter custom_localdatetime: { gte: ... }\\") + custom_localdatetime_IN: [LocalDateTime] @deprecated(reason: \\"Please use the relevant generic filter custom_localdatetime: { in: ... }\\") + custom_localdatetime_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter custom_localdatetime: { lt: ... }\\") + custom_localdatetime_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter custom_localdatetime: { lte: ... }\\") + custom_localtime: LocalTimeScalarFilters + custom_localtime_EQ: LocalTime @deprecated(reason: \\"Please use the relevant generic filter custom_localtime: { eq: ... }\\") + custom_localtime_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter custom_localtime: { gt: ... }\\") + custom_localtime_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter custom_localtime: { gte: ... }\\") + custom_localtime_IN: [LocalTime] @deprecated(reason: \\"Please use the relevant generic filter custom_localtime: { in: ... }\\") + custom_localtime_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter custom_localtime: { lt: ... }\\") + custom_localtime_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter custom_localtime: { lte: ... }\\") + custom_point: PointFilters + custom_point_DISTANCE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter custom_point: { distance: ... }\\") + custom_point_EQ: PointInput @deprecated(reason: \\"Please use the relevant generic filter custom_point: { eq: ... }\\") + custom_point_GT: PointDistance @deprecated(reason: \\"Please use the relevant generic filter custom_point: { gt: ... }\\") + custom_point_GTE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter custom_point: { gte: ... }\\") + custom_point_IN: [PointInput] @deprecated(reason: \\"Please use the relevant generic filter custom_point: { in: ... }\\") + custom_point_LT: PointDistance @deprecated(reason: \\"Please use the relevant generic filter custom_point: { lt: ... }\\") + custom_point_LTE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter custom_point: { lte: ... }\\") + custom_string: StringScalarFilters + custom_string_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter custom_string: { contains: ... }\\") + custom_string_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter custom_string: { endsWith: ... }\\") + custom_string_EQ: String @deprecated(reason: \\"Please use the relevant generic filter custom_string: { eq: ... }\\") + custom_string_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter custom_string: { in: ... }\\") + custom_string_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter custom_string: { startsWith: ... }\\") + custom_time: TimeScalarFilters + custom_time_EQ: Time @deprecated(reason: \\"Please use the relevant generic filter custom_time: { eq: ... }\\") + custom_time_GT: Time @deprecated(reason: \\"Please use the relevant generic filter custom_time: { gt: ... }\\") + custom_time_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter custom_time: { gte: ... }\\") + custom_time_IN: [Time] @deprecated(reason: \\"Please use the relevant generic filter custom_time: { in: ... }\\") + custom_time_LT: Time @deprecated(reason: \\"Please use the relevant generic filter custom_time: { lt: ... }\\") + custom_time_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter custom_time: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + list_custom_of_ids: IDListFilters + list_custom_of_ids_EQ: [ID] @deprecated(reason: \\"Please use the relevant generic filter list_custom_of_ids: { eq: ... }\\") + list_custom_of_ids_INCLUDES: ID @deprecated(reason: \\"Please use the relevant generic filter list_custom_of_ids: { includes: ... }\\") + list_of_custom_big_ints: BigIntListFilters + list_of_custom_big_ints_EQ: [BigInt] @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_big_ints: { eq: ... }\\") + list_of_custom_big_ints_INCLUDES: BigInt @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_big_ints: { includes: ... }\\") + list_of_custom_booleans: BooleanListFilters + list_of_custom_booleans_EQ: [Boolean] @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_booleans: { eq: ... }\\") + list_of_custom_cartesian_points: CartesianPointListFilters + list_of_custom_cartesian_points_EQ: [CartesianPointInput] @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_cartesian_points: { eq: ... }\\") + list_of_custom_cartesian_points_INCLUDES: CartesianPointInput @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_cartesian_points: { includes: ... }\\") + list_of_custom_dates: DateListFilters + list_of_custom_dates_EQ: [Date] @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_dates: { eq: ... }\\") + list_of_custom_dates_INCLUDES: Date @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_dates: { includes: ... }\\") + list_of_custom_datetimes: DateTimeListFilters + list_of_custom_datetimes_EQ: [DateTime] @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_datetimes: { eq: ... }\\") + list_of_custom_datetimes_INCLUDES: DateTime @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_datetimes: { includes: ... }\\") + list_of_custom_durations: DurationListFilters + list_of_custom_durations_EQ: [Duration] @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_durations: { eq: ... }\\") + list_of_custom_durations_INCLUDES: Duration @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_durations: { includes: ... }\\") + list_of_custom_floats: FloatListFilters + list_of_custom_floats_EQ: [Float] @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_floats: { eq: ... }\\") + list_of_custom_floats_INCLUDES: Float @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_floats: { includes: ... }\\") + list_of_custom_ints: IntListFilters + list_of_custom_ints_EQ: [Int] @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_ints: { eq: ... }\\") + list_of_custom_ints_INCLUDES: Int @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_ints: { includes: ... }\\") + list_of_custom_localdatetimes: LocalDateTimeListFilters + list_of_custom_localdatetimes_EQ: [LocalDateTime] @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_localdatetimes: { eq: ... }\\") + list_of_custom_localdatetimes_INCLUDES: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_localdatetimes: { includes: ... }\\") + list_of_custom_localtimes: LocalTimeListFilters + list_of_custom_localtimes_EQ: [LocalTime] @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_localtimes: { eq: ... }\\") + list_of_custom_localtimes_INCLUDES: LocalTime @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_localtimes: { includes: ... }\\") + list_of_custom_points: PointListFilters + list_of_custom_points_EQ: [PointInput] @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_points: { eq: ... }\\") + list_of_custom_points_INCLUDES: PointInput @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_points: { includes: ... }\\") + list_of_custom_strings: StringListFilters + list_of_custom_strings_EQ: [String] @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_strings: { eq: ... }\\") + list_of_custom_strings_INCLUDES: String @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_strings: { includes: ... }\\") + list_of_custom_times: TimeListFilters + list_of_custom_times_EQ: [Time] @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_times: { eq: ... }\\") + list_of_custom_times_INCLUDES: Time @deprecated(reason: \\"Please use the relevant generic filter list_of_custom_times: { includes: ... }\\") } type MoviesConnection { @@ -487,6 +719,23 @@ describe("Cypher", () => { point: PointInput! } + \\"\\"\\"Distance filters\\"\\"\\" + input PointDistanceFilters { + eq: Float + from: PointInput! + gt: Float + gte: Float + lt: Float + lte: Float + } + + \\"\\"\\"Point filters\\"\\"\\" + input PointFilters { + distance: PointDistanceFilters + eq: PointInput + in: [PointInput!] + } + \\"\\"\\"Input type for a point\\"\\"\\" input PointInput { height: Float @@ -494,6 +743,12 @@ describe("Cypher", () => { longitude: Float! } + \\"\\"\\"Point list filters\\"\\"\\" + input PointListFilters { + eq: [PointInput!] + includes: PointInput + } + type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): ActorAggregateSelection! @@ -516,9 +771,45 @@ describe("Cypher", () => { shortest: String } + \\"\\"\\"String list filters\\"\\"\\" + input StringListFilters { + eq: [String!] + includes: String + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\"A time, represented as an RFC3339 time string\\"\\"\\" scalar Time + \\"\\"\\"Time list filters\\"\\"\\" + input TimeListFilters { + eq: [Time!] + includes: Time + } + + \\"\\"\\"Time filters\\"\\"\\" + input TimeScalarFilters { + eq: Time + gt: Time + gte: Time + in: [Time!] + lt: Time + lte: Time + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -609,8 +900,9 @@ describe("Cypher", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - custom_cypher_string_list_EQ: [String] - custom_cypher_string_list_INCLUDES: String + custom_cypher_string_list: StringListFilters + custom_cypher_string_list_EQ: [String] @deprecated(reason: \\"Please use the relevant generic filter custom_cypher_string_list: { eq: ... }\\") + custom_cypher_string_list_INCLUDES: String @deprecated(reason: \\"Please use the relevant generic filter custom_cypher_string_list: { includes: ... }\\") } type MoviesConnection { @@ -639,6 +931,12 @@ describe("Cypher", () => { moviesConnection(after: String, first: Int, where: MovieWhere): MoviesConnection! } + \\"\\"\\"String list filters\\"\\"\\" + input StringListFilters { + eq: [String!] + includes: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -851,7 +1149,8 @@ describe("Cypher", () => { } input BlogUpdateInput { - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input BlogWhere { @@ -859,15 +1158,17 @@ describe("Cypher", () => { NOT: BlogWhere OR: [BlogWhere!] post: PostWhere + posts: PostRelationshipFilters posts_ALL: PostWhere posts_NONE: PostWhere posts_SINGLE: PostWhere posts_SOME: PostWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type BlogsConnection { @@ -944,6 +1245,17 @@ describe("Cypher", () => { node: Post! } + input PostRelationshipFilters { + \\"\\"\\"Filter type where all of the related Posts match this filter\\"\\"\\" + all: PostWhere + \\"\\"\\"Filter type where none of the related Posts match this filter\\"\\"\\" + none: PostWhere + \\"\\"\\"Filter type where one of the related Posts match this filter\\"\\"\\" + single: PostWhere + \\"\\"\\"Filter type where some of the related Posts match this filter\\"\\"\\" + some: PostWhere + } + \\"\\"\\" Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. \\"\\"\\" @@ -952,18 +1264,20 @@ describe("Cypher", () => { } input PostUpdateInput { - content_SET: String + content: StringScalarMutations + content_SET: String @deprecated(reason: \\"Please use the generic mutation 'content: { set: ... } }' instead.\\") } input PostWhere { AND: [PostWhere!] NOT: PostWhere OR: [PostWhere!] - content_CONTAINS: String - content_ENDS_WITH: String - content_EQ: String - content_IN: [String] - content_STARTS_WITH: String + content: StringScalarFilters + content_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter content: { contains: ... }\\") + content_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter content: { endsWith: ... }\\") + content_EQ: String @deprecated(reason: \\"Please use the relevant generic filter content: { eq: ... }\\") + content_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter content: { in: ... }\\") + content_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter content: { startsWith: ... }\\") } type PostsConnection { @@ -995,6 +1309,20 @@ describe("Cypher", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateBlogsMutationResponse { blogs: [Blog!]! info: UpdateInfo! @@ -1094,6 +1422,17 @@ describe("Cypher", () => { node: Actor! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -1102,7 +1441,8 @@ describe("Cypher", () => { } input ActorUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { @@ -1110,15 +1450,17 @@ describe("Cypher", () => { NOT: ActorWhere OR: [ActorWhere!] movie: MovieWhere + movies: MovieRelationshipFilters movies_ALL: MovieWhere movies_NONE: MovieWhere movies_SINGLE: MovieWhere movies_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -1174,6 +1516,17 @@ describe("Cypher", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input MovieUpdateInput { \\"\\"\\" Appears because this input type would be empty otherwise because this type is composed of just generated and/or relationship properties. See https://neo4j.com/docs/graphql-manual/current/troubleshooting/faqs/ @@ -1186,6 +1539,7 @@ describe("Cypher", () => { NOT: MovieWhere OR: [MovieWhere!] actor: ActorWhere + actors: ActorRelationshipFilters actors_ALL: ActorWhere actors_NONE: ActorWhere actors_SINGLE: ActorWhere @@ -1237,7 +1591,7 @@ describe("Cypher", () => { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -1271,6 +1625,20 @@ describe("Cypher", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -1365,6 +1733,17 @@ describe("Cypher", () => { node: Actor! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -1373,7 +1752,8 @@ describe("Cypher", () => { } input ActorUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { @@ -1381,15 +1761,17 @@ describe("Cypher", () => { NOT: ActorWhere OR: [ActorWhere!] movie: MovieWhere + movies: MovieRelationshipFilters movies_ALL: MovieWhere movies_NONE: MovieWhere movies_SINGLE: MovieWhere movies_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -1445,6 +1827,17 @@ describe("Cypher", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + input MovieUpdateInput { \\"\\"\\" Appears because this input type would be empty otherwise because this type is composed of just generated and/or relationship properties. See https://neo4j.com/docs/graphql-manual/current/troubleshooting/faqs/ @@ -1457,6 +1850,7 @@ describe("Cypher", () => { NOT: MovieWhere OR: [MovieWhere!] actor: ActorWhere + actors: ActorRelationshipFilters actors_ALL: ActorWhere actors_NONE: ActorWhere actors_SINGLE: ActorWhere @@ -1508,6 +1902,20 @@ describe("Cypher", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -1594,24 +2002,27 @@ describe("Cypher", () => { } input ActorUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - totalScreenTime_EQ: Int - totalScreenTime_GT: Int - totalScreenTime_GTE: Int - totalScreenTime_IN: [Int!] - totalScreenTime_LT: Int - totalScreenTime_LTE: Int + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + totalScreenTime: IntScalarFilters + totalScreenTime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter totalScreenTime: { eq: ... }\\") + totalScreenTime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter totalScreenTime: { gt: ... }\\") + totalScreenTime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter totalScreenTime: { gte: ... }\\") + totalScreenTime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter totalScreenTime: { in: ... }\\") + totalScreenTime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter totalScreenTime: { lt: ... }\\") + totalScreenTime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter totalScreenTime: { lte: ... }\\") } type ActorsConnection { @@ -1646,9 +2057,28 @@ describe("Cypher", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Movie { @@ -1658,7 +2088,6 @@ describe("Cypher", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -1678,18 +2107,20 @@ describe("Cypher", () => { } input MovieUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -1737,6 +2168,20 @@ describe("Cypher", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -1853,15 +2298,17 @@ describe("Cypher", () => { AND: [MovieSubscriptionWhere!] NOT: MovieSubscriptionWhere OR: [MovieSubscriptionWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } input MovieUpdateInput { - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -1875,16 +2322,18 @@ describe("Cypher", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - custom_title_CONTAINS: String - custom_title_ENDS_WITH: String - custom_title_EQ: String - custom_title_IN: [String] - custom_title_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + custom_title: StringScalarFilters + custom_title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter custom_title: { contains: ... }\\") + custom_title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter custom_title: { endsWith: ... }\\") + custom_title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter custom_title: { eq: ... }\\") + custom_title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter custom_title: { in: ... }\\") + custom_title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter custom_title: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -1926,6 +2375,20 @@ describe("Cypher", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Subscription { movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! diff --git a/packages/graphql/tests/schema/directives/default.test.ts b/packages/graphql/tests/schema/directives/default.test.ts index 50a86477c6..c0ae06f4f6 100644 --- a/packages/graphql/tests/schema/directives/default.test.ts +++ b/packages/graphql/tests/schema/directives/default.test.ts @@ -57,6 +57,16 @@ describe("@default directive", () => { mutation: Mutation } + \\"\\"\\"Boolean filters\\"\\"\\" + input BooleanScalarFilters { + eq: Boolean + } + + \\"\\"\\"Boolean mutations\\"\\"\\" + input BooleanScalarMutations { + set: Boolean + } + \\"\\"\\" Information about the number of nodes and relationships created during a create mutation \\"\\"\\" @@ -78,6 +88,21 @@ describe("@default directive", () => { min: DateTime } + \\"\\"\\"DateTime filters\\"\\"\\" + input DateTimeScalarFilters { + eq: DateTime + gt: DateTime + gte: DateTime + in: [DateTime!] + lt: DateTime + lte: DateTime + } + + \\"\\"\\"DateTime mutations\\"\\"\\" + input DateTimeScalarMutations { + set: DateTime + } + \\"\\"\\" Information about the number of nodes and relationships deleted during a delete mutation \\"\\"\\" @@ -93,9 +118,37 @@ describe("@default directive", () => { sum: Float } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -105,12 +158,40 @@ describe("@default directive", () => { sum: Int } + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + enum Location { EVERYWHERE HERE THERE } + \\"\\"\\"Location filters\\"\\"\\" + input LocationEnumScalarFilters { + eq: Location + in: [Location!] + } + + \\"\\"\\"Location mutations\\"\\"\\" + input LocationEnumScalarMutations { + set: Location + } + type Mutation { createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! deleteUsers(where: UserWhere): DeleteInfo! @@ -147,6 +228,20 @@ describe("@default directive", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -177,7 +272,6 @@ describe("@default directive", () => { type UserAggregateSelection { count: Int! fromInterface: StringAggregateSelection! - id: IDAggregateSelection! name: StringAggregateSelection! numberOfFriends: IntAggregateSelection! rating: FloatAggregateSelection! @@ -234,17 +328,19 @@ describe("@default directive", () => { AND: [UserInterfaceWhere!] NOT: UserInterfaceWhere OR: [UserInterfaceWhere!] - fromInterface_CONTAINS: String - fromInterface_ENDS_WITH: String - fromInterface_EQ: String - fromInterface_IN: [String!] - fromInterface_STARTS_WITH: String - toBeOverridden_CONTAINS: String - toBeOverridden_ENDS_WITH: String - toBeOverridden_EQ: String - toBeOverridden_IN: [String!] - toBeOverridden_STARTS_WITH: String - typename_IN: [UserInterfaceImplementation!] + fromInterface: StringScalarFilters + fromInterface_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter fromInterface: { contains: ... }\\") + fromInterface_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter fromInterface: { endsWith: ... }\\") + fromInterface_EQ: String @deprecated(reason: \\"Please use the relevant generic filter fromInterface: { eq: ... }\\") + fromInterface_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter fromInterface: { in: ... }\\") + fromInterface_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter fromInterface: { startsWith: ... }\\") + toBeOverridden: StringScalarFilters + toBeOverridden_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter toBeOverridden: { contains: ... }\\") + toBeOverridden_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter toBeOverridden: { endsWith: ... }\\") + toBeOverridden_EQ: String @deprecated(reason: \\"Please use the relevant generic filter toBeOverridden: { eq: ... }\\") + toBeOverridden_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter toBeOverridden: { in: ... }\\") + toBeOverridden_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter toBeOverridden: { startsWith: ... }\\") + typename: [UserInterfaceImplementation!] } type UserInterfacesConnection { @@ -269,68 +365,86 @@ describe("@default directive", () => { } input UserUpdateInput { - fromInterface_SET: String - id_SET: ID - location_SET: Location - name_SET: String - numberOfFriends_DECREMENT: Int - numberOfFriends_INCREMENT: Int - numberOfFriends_SET: Int - rating_ADD: Float - rating_DIVIDE: Float - rating_MULTIPLY: Float - rating_SET: Float - rating_SUBTRACT: Float - toBeOverridden_SET: String - verifiedDate_SET: DateTime - verified_SET: Boolean + fromInterface: StringScalarMutations + fromInterface_SET: String @deprecated(reason: \\"Please use the generic mutation 'fromInterface: { set: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + location: LocationEnumScalarMutations + location_SET: Location @deprecated(reason: \\"Please use the generic mutation 'location: { set: ... } }' instead.\\") + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") + numberOfFriends: IntScalarMutations + numberOfFriends_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'numberOfFriends: { decrement: ... } }' instead.\\") + numberOfFriends_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'numberOfFriends: { increment: ... } }' instead.\\") + numberOfFriends_SET: Int @deprecated(reason: \\"Please use the generic mutation 'numberOfFriends: { set: ... } }' instead.\\") + rating: FloatScalarMutations + rating_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'rating: { add: ... } }' instead.\\") + rating_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'rating: { divide: ... } }' instead.\\") + rating_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'rating: { multiply: ... } }' instead.\\") + rating_SET: Float @deprecated(reason: \\"Please use the generic mutation 'rating: { set: ... } }' instead.\\") + rating_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'rating: { subtract: ... } }' instead.\\") + toBeOverridden: StringScalarMutations + toBeOverridden_SET: String @deprecated(reason: \\"Please use the generic mutation 'toBeOverridden: { set: ... } }' instead.\\") + verified: BooleanScalarMutations + verifiedDate: DateTimeScalarMutations + verifiedDate_SET: DateTime @deprecated(reason: \\"Please use the generic mutation 'verifiedDate: { set: ... } }' instead.\\") + verified_SET: Boolean @deprecated(reason: \\"Please use the generic mutation 'verified: { set: ... } }' instead.\\") } input UserWhere { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] - fromInterface_CONTAINS: String - fromInterface_ENDS_WITH: String - fromInterface_EQ: String - fromInterface_IN: [String!] - fromInterface_STARTS_WITH: String - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - location_EQ: Location - location_IN: [Location!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String - numberOfFriends_EQ: Int - numberOfFriends_GT: Int - numberOfFriends_GTE: Int - numberOfFriends_IN: [Int!] - numberOfFriends_LT: Int - numberOfFriends_LTE: Int - rating_EQ: Float - rating_GT: Float - rating_GTE: Float - rating_IN: [Float!] - rating_LT: Float - rating_LTE: Float - toBeOverridden_CONTAINS: String - toBeOverridden_ENDS_WITH: String - toBeOverridden_EQ: String - toBeOverridden_IN: [String!] - toBeOverridden_STARTS_WITH: String - verifiedDate_EQ: DateTime - verifiedDate_GT: DateTime - verifiedDate_GTE: DateTime - verifiedDate_IN: [DateTime!] - verifiedDate_LT: DateTime - verifiedDate_LTE: DateTime - verified_EQ: Boolean + fromInterface: StringScalarFilters + fromInterface_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter fromInterface: { contains: ... }\\") + fromInterface_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter fromInterface: { endsWith: ... }\\") + fromInterface_EQ: String @deprecated(reason: \\"Please use the relevant generic filter fromInterface: { eq: ... }\\") + fromInterface_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter fromInterface: { in: ... }\\") + fromInterface_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter fromInterface: { startsWith: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + location: LocationEnumScalarFilters + location_EQ: Location @deprecated(reason: \\"Please use the relevant generic filter location: { eq: ... }\\") + location_IN: [Location!] @deprecated(reason: \\"Please use the relevant generic filter location: { in: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + numberOfFriends: IntScalarFilters + numberOfFriends_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter numberOfFriends: { eq: ... }\\") + numberOfFriends_GT: Int @deprecated(reason: \\"Please use the relevant generic filter numberOfFriends: { gt: ... }\\") + numberOfFriends_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter numberOfFriends: { gte: ... }\\") + numberOfFriends_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter numberOfFriends: { in: ... }\\") + numberOfFriends_LT: Int @deprecated(reason: \\"Please use the relevant generic filter numberOfFriends: { lt: ... }\\") + numberOfFriends_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter numberOfFriends: { lte: ... }\\") + rating: FloatScalarFilters + rating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter rating: { eq: ... }\\") + rating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter rating: { gt: ... }\\") + rating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter rating: { gte: ... }\\") + rating_IN: [Float!] @deprecated(reason: \\"Please use the relevant generic filter rating: { in: ... }\\") + rating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter rating: { lt: ... }\\") + rating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter rating: { lte: ... }\\") + toBeOverridden: StringScalarFilters + toBeOverridden_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter toBeOverridden: { contains: ... }\\") + toBeOverridden_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter toBeOverridden: { endsWith: ... }\\") + toBeOverridden_EQ: String @deprecated(reason: \\"Please use the relevant generic filter toBeOverridden: { eq: ... }\\") + toBeOverridden_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter toBeOverridden: { in: ... }\\") + toBeOverridden_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter toBeOverridden: { startsWith: ... }\\") + verified: BooleanScalarFilters + verifiedDate: DateTimeScalarFilters + verifiedDate_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter verifiedDate: { eq: ... }\\") + verifiedDate_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter verifiedDate: { gt: ... }\\") + verifiedDate_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter verifiedDate: { gte: ... }\\") + verifiedDate_IN: [DateTime!] @deprecated(reason: \\"Please use the relevant generic filter verifiedDate: { in: ... }\\") + verifiedDate_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter verifiedDate: { lt: ... }\\") + verifiedDate_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter verifiedDate: { lte: ... }\\") + verified_EQ: Boolean @deprecated(reason: \\"Please use the relevant generic filter verified: { eq: ... }\\") } type UsersConnection { diff --git a/packages/graphql/tests/schema/directives/filterable.test.ts b/packages/graphql/tests/schema/directives/filterable.test.ts index e005eda61c..f22781fe67 100644 --- a/packages/graphql/tests/schema/directives/filterable.test.ts +++ b/packages/graphql/tests/schema/directives/filterable.test.ts @@ -964,6 +964,7 @@ describe("@filterable directive", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -982,6 +983,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 } @@ -1030,6 +1050,17 @@ describe("@filterable directive", () => { where: ActorMoviesConnectionWhere } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -1042,22 +1073,26 @@ describe("@filterable directive", () => { AND: [ActorSubscriptionWhere!] NOT: ActorSubscriptionWhere OR: [ActorSubscriptionWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } type ActorUpdatedEvent { @@ -1071,41 +1106,45 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type ActorsConnection { @@ -1148,6 +1187,26 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -1169,6 +1228,7 @@ describe("@filterable directive", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1188,6 +1248,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 } @@ -1222,36 +1301,38 @@ describe("@filterable directive", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int + password: StringScalarAggregationFilters + password_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { eq: ... } } }' instead.\\") + password_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { gt: ... } } }' instead.\\") + password_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { gte: ... } } }' instead.\\") + password_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { lt: ... } } }' instead.\\") + password_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { lte: ... } } }' instead.\\") + password_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { eq: ... } } }' instead.\\") + password_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { gt: ... } } }' instead.\\") + password_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { gte: ... } } }' instead.\\") + password_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { lt: ... } } }' instead.\\") + password_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { lte: ... } } }' instead.\\") + password_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { eq: ... } } }' instead.\\") + password_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { gt: ... } } }' instead.\\") + password_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { gte: ... } } }' instead.\\") + password_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { lt: ... } } }' instead.\\") + password_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { lte: ... } } }' instead.\\") + username: StringScalarAggregationFilters + username_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { eq: ... } } }' instead.\\") + username_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { gt: ... } } }' instead.\\") + username_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { gte: ... } } }' instead.\\") + username_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { lt: ... } } }' instead.\\") + username_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { lte: ... } } }' instead.\\") + username_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { eq: ... } } }' instead.\\") + username_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { gt: ... } } }' instead.\\") + username_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { gte: ... } } }' instead.\\") + username_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { lt: ... } } }' instead.\\") + username_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { lte: ... } } }' instead.\\") + username_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { eq: ... } } }' instead.\\") + username_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { gt: ... } } }' instead.\\") + username_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { gte: ... } } }' instead.\\") + username_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { lt: ... } } }' instead.\\") + username_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -1319,6 +1400,17 @@ describe("@filterable directive", () => { title: String } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -1330,16 +1422,18 @@ describe("@filterable directive", () => { AND: [MovieSubscriptionWhere!] NOT: MovieSubscriptionWhere OR: [MovieSubscriptionWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -1353,36 +1447,39 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -1430,6 +1527,27 @@ describe("@filterable directive", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Subscription { actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! @@ -1560,6 +1678,7 @@ describe("@filterable directive", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1579,6 +1698,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 } @@ -1613,21 +1751,22 @@ describe("@filterable directive", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -1648,6 +1787,17 @@ describe("@filterable directive", () => { where: ActorMoviesConnectionWhere } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -1660,22 +1810,26 @@ describe("@filterable directive", () => { AND: [ActorSubscriptionWhere!] NOT: ActorSubscriptionWhere OR: [ActorSubscriptionWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } type ActorUpdatedEvent { @@ -1689,41 +1843,45 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type ActorsConnection { @@ -1766,6 +1924,26 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -1787,6 +1965,7 @@ describe("@filterable directive", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1806,6 +1985,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 } @@ -1840,36 +2038,38 @@ describe("@filterable directive", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int + password: StringScalarAggregationFilters + password_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { eq: ... } } }' instead.\\") + password_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { gt: ... } } }' instead.\\") + password_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { gte: ... } } }' instead.\\") + password_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { lt: ... } } }' instead.\\") + password_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { lte: ... } } }' instead.\\") + password_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { eq: ... } } }' instead.\\") + password_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { gt: ... } } }' instead.\\") + password_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { gte: ... } } }' instead.\\") + password_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { lt: ... } } }' instead.\\") + password_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { lte: ... } } }' instead.\\") + password_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { eq: ... } } }' instead.\\") + password_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { gt: ... } } }' instead.\\") + password_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { gte: ... } } }' instead.\\") + password_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { lt: ... } } }' instead.\\") + password_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { lte: ... } } }' instead.\\") + username: StringScalarAggregationFilters + username_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { eq: ... } } }' instead.\\") + username_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { gt: ... } } }' instead.\\") + username_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { gte: ... } } }' instead.\\") + username_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { lt: ... } } }' instead.\\") + username_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { lte: ... } } }' instead.\\") + username_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { eq: ... } } }' instead.\\") + username_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { gt: ... } } }' instead.\\") + username_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { gte: ... } } }' instead.\\") + username_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { lt: ... } } }' instead.\\") + username_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { lte: ... } } }' instead.\\") + username_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { eq: ... } } }' instead.\\") + username_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { gt: ... } } }' instead.\\") + username_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { gte: ... } } }' instead.\\") + username_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { lt: ... } } }' instead.\\") + username_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -1937,6 +2137,17 @@ describe("@filterable directive", () => { title: String } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -1948,16 +2159,18 @@ describe("@filterable directive", () => { AND: [MovieSubscriptionWhere!] NOT: MovieSubscriptionWhere OR: [MovieSubscriptionWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -1971,36 +2184,39 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -2048,6 +2264,27 @@ describe("@filterable directive", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Subscription { actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! @@ -2178,6 +2415,7 @@ describe("@filterable directive", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -2197,6 +2435,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 } @@ -2231,21 +2488,22 @@ describe("@filterable directive", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -2266,6 +2524,17 @@ describe("@filterable directive", () => { where: ActorMoviesConnectionWhere } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -2278,22 +2547,26 @@ describe("@filterable directive", () => { AND: [ActorSubscriptionWhere!] NOT: ActorSubscriptionWhere OR: [ActorSubscriptionWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } type ActorUpdatedEvent { @@ -2307,41 +2580,45 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type ActorsConnection { @@ -2384,6 +2661,26 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -2405,6 +2702,7 @@ describe("@filterable directive", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -2424,6 +2722,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 } @@ -2458,36 +2775,38 @@ describe("@filterable directive", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int + password: StringScalarAggregationFilters + password_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { eq: ... } } }' instead.\\") + password_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { gt: ... } } }' instead.\\") + password_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { gte: ... } } }' instead.\\") + password_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { lt: ... } } }' instead.\\") + password_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { lte: ... } } }' instead.\\") + password_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { eq: ... } } }' instead.\\") + password_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { gt: ... } } }' instead.\\") + password_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { gte: ... } } }' instead.\\") + password_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { lt: ... } } }' instead.\\") + password_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { lte: ... } } }' instead.\\") + password_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { eq: ... } } }' instead.\\") + password_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { gt: ... } } }' instead.\\") + password_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { gte: ... } } }' instead.\\") + password_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { lt: ... } } }' instead.\\") + password_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { lte: ... } } }' instead.\\") + username: StringScalarAggregationFilters + username_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { eq: ... } } }' instead.\\") + username_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { gt: ... } } }' instead.\\") + username_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { gte: ... } } }' instead.\\") + username_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { lt: ... } } }' instead.\\") + username_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { lte: ... } } }' instead.\\") + username_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { eq: ... } } }' instead.\\") + username_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { gt: ... } } }' instead.\\") + username_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { gte: ... } } }' instead.\\") + username_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { lt: ... } } }' instead.\\") + username_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { lte: ... } } }' instead.\\") + username_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { eq: ... } } }' instead.\\") + username_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { gt: ... } } }' instead.\\") + username_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { gte: ... } } }' instead.\\") + username_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { lt: ... } } }' instead.\\") + username_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -2555,6 +2874,17 @@ describe("@filterable directive", () => { title: String } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -2564,7 +2894,8 @@ describe("@filterable directive", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -2578,31 +2909,33 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") } type MoviesConnection { @@ -2650,6 +2983,27 @@ describe("@filterable directive", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Subscription { actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! @@ -2783,6 +3137,7 @@ describe("@filterable directive", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -2802,6 +3157,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 } @@ -2836,21 +3210,22 @@ describe("@filterable directive", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -2871,6 +3246,17 @@ describe("@filterable directive", () => { where: ActorMoviesConnectionWhere } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -2883,22 +3269,26 @@ describe("@filterable directive", () => { AND: [ActorSubscriptionWhere!] NOT: ActorSubscriptionWhere OR: [ActorSubscriptionWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } type ActorUpdatedEvent { @@ -2912,41 +3302,45 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type ActorsConnection { @@ -2989,6 +3383,26 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -3017,6 +3431,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 } @@ -3112,6 +3545,17 @@ describe("@filterable directive", () => { title: String } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -3123,16 +3567,18 @@ describe("@filterable directive", () => { AND: [MovieSubscriptionWhere!] NOT: MovieSubscriptionWhere OR: [MovieSubscriptionWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -3146,35 +3592,38 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -3222,6 +3671,27 @@ describe("@filterable directive", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Subscription { actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! @@ -3354,6 +3824,7 @@ describe("@filterable directive", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -3373,6 +3844,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 } @@ -3407,21 +3897,22 @@ describe("@filterable directive", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -3442,6 +3933,17 @@ describe("@filterable directive", () => { where: ActorMoviesConnectionWhere } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -3454,22 +3956,26 @@ describe("@filterable directive", () => { AND: [ActorSubscriptionWhere!] NOT: ActorSubscriptionWhere OR: [ActorSubscriptionWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } type ActorUpdatedEvent { @@ -3483,41 +3989,45 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type ActorsConnection { @@ -3560,6 +4070,26 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -3581,6 +4111,7 @@ describe("@filterable directive", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -3600,6 +4131,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 } @@ -3634,36 +4184,38 @@ describe("@filterable directive", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int + password: StringScalarAggregationFilters + password_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { eq: ... } } }' instead.\\") + password_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { gt: ... } } }' instead.\\") + password_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { gte: ... } } }' instead.\\") + password_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { lt: ... } } }' instead.\\") + password_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { lte: ... } } }' instead.\\") + password_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { eq: ... } } }' instead.\\") + password_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { gt: ... } } }' instead.\\") + password_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { gte: ... } } }' instead.\\") + password_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { lt: ... } } }' instead.\\") + password_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { lte: ... } } }' instead.\\") + password_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { eq: ... } } }' instead.\\") + password_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { gt: ... } } }' instead.\\") + password_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { gte: ... } } }' instead.\\") + password_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { lt: ... } } }' instead.\\") + password_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { lte: ... } } }' instead.\\") + username: StringScalarAggregationFilters + username_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { eq: ... } } }' instead.\\") + username_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { gt: ... } } }' instead.\\") + username_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { gte: ... } } }' instead.\\") + username_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { lt: ... } } }' instead.\\") + username_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { lte: ... } } }' instead.\\") + username_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { eq: ... } } }' instead.\\") + username_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { gt: ... } } }' instead.\\") + username_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { gte: ... } } }' instead.\\") + username_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { lt: ... } } }' instead.\\") + username_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { lte: ... } } }' instead.\\") + username_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { eq: ... } } }' instead.\\") + username_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { gt: ... } } }' instead.\\") + username_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { gte: ... } } }' instead.\\") + username_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { lt: ... } } }' instead.\\") + username_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -3731,6 +4283,17 @@ describe("@filterable directive", () => { title: String } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -3742,16 +4305,18 @@ describe("@filterable directive", () => { AND: [MovieSubscriptionWhere!] NOT: MovieSubscriptionWhere OR: [MovieSubscriptionWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -3765,36 +4330,39 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -3842,6 +4410,27 @@ describe("@filterable directive", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Subscription { actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! @@ -3974,6 +4563,7 @@ describe("@filterable directive", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -3993,6 +4583,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 } @@ -4027,21 +4636,22 @@ describe("@filterable directive", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -4074,22 +4684,26 @@ describe("@filterable directive", () => { AND: [ActorSubscriptionWhere!] NOT: ActorSubscriptionWhere OR: [ActorSubscriptionWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } type ActorUpdatedEvent { @@ -4103,41 +4717,45 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type ActorsConnection { @@ -4180,6 +4798,26 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -4201,6 +4839,7 @@ describe("@filterable directive", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -4254,36 +4893,38 @@ describe("@filterable directive", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int + password: StringScalarAggregationFilters + password_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { eq: ... } } }' instead.\\") + password_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { gt: ... } } }' instead.\\") + password_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { gte: ... } } }' instead.\\") + password_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { lt: ... } } }' instead.\\") + password_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { lte: ... } } }' instead.\\") + password_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { eq: ... } } }' instead.\\") + password_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { gt: ... } } }' instead.\\") + password_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { gte: ... } } }' instead.\\") + password_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { lt: ... } } }' instead.\\") + password_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { lte: ... } } }' instead.\\") + password_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { eq: ... } } }' instead.\\") + password_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { gt: ... } } }' instead.\\") + password_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { gte: ... } } }' instead.\\") + password_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { lt: ... } } }' instead.\\") + password_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { lte: ... } } }' instead.\\") + username: StringScalarAggregationFilters + username_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { eq: ... } } }' instead.\\") + username_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { gt: ... } } }' instead.\\") + username_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { gte: ... } } }' instead.\\") + username_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { lt: ... } } }' instead.\\") + username_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { lte: ... } } }' instead.\\") + username_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { eq: ... } } }' instead.\\") + username_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { gt: ... } } }' instead.\\") + username_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { gte: ... } } }' instead.\\") + username_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { lt: ... } } }' instead.\\") + username_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { lte: ... } } }' instead.\\") + username_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { eq: ... } } }' instead.\\") + username_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { gt: ... } } }' instead.\\") + username_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { gte: ... } } }' instead.\\") + username_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { lt: ... } } }' instead.\\") + username_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -4351,6 +4992,17 @@ describe("@filterable directive", () => { title: String } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -4362,16 +5014,18 @@ describe("@filterable directive", () => { AND: [MovieSubscriptionWhere!] NOT: MovieSubscriptionWhere OR: [MovieSubscriptionWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -4386,11 +5040,12 @@ describe("@filterable directive", () => { NOT: MovieWhere OR: [MovieWhere!] actorsAggregate: MovieActorsAggregateInput - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -4438,6 +5093,27 @@ describe("@filterable directive", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Subscription { actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! @@ -4570,6 +5246,7 @@ describe("@filterable directive", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -4589,6 +5266,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 } @@ -4623,21 +5319,22 @@ describe("@filterable directive", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -4658,6 +5355,17 @@ describe("@filterable directive", () => { where: ActorMoviesConnectionWhere } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -4670,22 +5378,26 @@ describe("@filterable directive", () => { AND: [ActorSubscriptionWhere!] NOT: ActorSubscriptionWhere OR: [ActorSubscriptionWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } type ActorUpdatedEvent { @@ -4699,41 +5411,45 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type ActorsConnection { @@ -4776,6 +5492,26 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -4804,6 +5540,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 } @@ -4899,6 +5654,17 @@ describe("@filterable directive", () => { title: String } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -4910,16 +5676,18 @@ describe("@filterable directive", () => { AND: [MovieSubscriptionWhere!] NOT: MovieSubscriptionWhere OR: [MovieSubscriptionWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -4933,35 +5701,38 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -5009,6 +5780,27 @@ describe("@filterable directive", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Subscription { actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! @@ -5134,6 +5926,7 @@ describe("@filterable directive", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -5153,6 +5946,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 } @@ -5187,21 +5999,22 @@ describe("@filterable directive", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -5234,22 +6047,26 @@ describe("@filterable directive", () => { AND: [ActorSubscriptionWhere!] NOT: ActorSubscriptionWhere OR: [ActorSubscriptionWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } type ActorUpdatedEvent { @@ -5263,41 +6080,45 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type ActorsConnection { @@ -5340,6 +6161,26 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @@ -5357,6 +6198,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 } @@ -5459,6 +6319,17 @@ describe("@filterable directive", () => { username: StringAggregateSelection! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -5470,16 +6341,18 @@ describe("@filterable directive", () => { AND: [MovieSubscriptionWhere!] NOT: MovieSubscriptionWhere OR: [MovieSubscriptionWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -5493,35 +6366,38 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -5579,6 +6455,17 @@ describe("@filterable directive", () => { Actor } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -5587,19 +6474,21 @@ describe("@filterable directive", () => { } input PersonUpdateInput { - username_SET: String + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - typename_IN: [PersonImplementation!] - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + typename: [PersonImplementation!] + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type Query { @@ -5622,9 +6511,30 @@ describe("@filterable directive", () => { DESC } - type StringAggregateSelection { - longest: String - shortest: String + type StringAggregateSelection { + longest: String + shortest: String + } + + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String } type Subscription { @@ -5752,6 +6662,7 @@ describe("@filterable directive", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -5771,6 +6682,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 } @@ -5805,21 +6735,22 @@ describe("@filterable directive", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -5852,22 +6783,26 @@ describe("@filterable directive", () => { AND: [ActorSubscriptionWhere!] NOT: ActorSubscriptionWhere OR: [ActorSubscriptionWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } type ActorUpdatedEvent { @@ -5881,41 +6816,45 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type ActorsConnection { @@ -5958,6 +6897,26 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @@ -5969,6 +6928,7 @@ describe("@filterable directive", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -5987,6 +6947,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 } @@ -6019,21 +6998,22 @@ describe("@filterable directive", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int + username: StringScalarAggregationFilters + username_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { eq: ... } } }' instead.\\") + username_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { gt: ... } } }' instead.\\") + username_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { gte: ... } } }' instead.\\") + username_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { lt: ... } } }' instead.\\") + username_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { lte: ... } } }' instead.\\") + username_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { eq: ... } } }' instead.\\") + username_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { gt: ... } } }' instead.\\") + username_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { gte: ... } } }' instead.\\") + username_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { lt: ... } } }' instead.\\") + username_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { lte: ... } } }' instead.\\") + username_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { eq: ... } } }' instead.\\") + username_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { gt: ... } } }' instead.\\") + username_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { gte: ... } } }' instead.\\") + username_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { lt: ... } } }' instead.\\") + username_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -6110,6 +7090,17 @@ describe("@filterable directive", () => { username: StringAggregateSelection! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -6121,16 +7112,18 @@ describe("@filterable directive", () => { AND: [MovieSubscriptionWhere!] NOT: MovieSubscriptionWhere OR: [MovieSubscriptionWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -6144,36 +7137,39 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -6231,6 +7227,17 @@ describe("@filterable directive", () => { Actor } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -6239,19 +7246,21 @@ describe("@filterable directive", () => { } input PersonUpdateInput { - username_SET: String + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - typename_IN: [PersonImplementation!] - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + typename: [PersonImplementation!] + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type Query { @@ -6279,6 +7288,27 @@ describe("@filterable directive", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Subscription { actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! @@ -6404,6 +7434,7 @@ describe("@filterable directive", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -6423,6 +7454,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 } @@ -6457,21 +7507,22 @@ describe("@filterable directive", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -6504,22 +7555,26 @@ describe("@filterable directive", () => { AND: [ActorSubscriptionWhere!] NOT: ActorSubscriptionWhere OR: [ActorSubscriptionWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } type ActorUpdatedEvent { @@ -6533,41 +7588,45 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type ActorsConnection { @@ -6610,6 +7669,26 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @@ -6627,6 +7706,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 } @@ -6729,6 +7827,17 @@ describe("@filterable directive", () => { username: StringAggregateSelection! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -6740,16 +7849,18 @@ describe("@filterable directive", () => { AND: [MovieSubscriptionWhere!] NOT: MovieSubscriptionWhere OR: [MovieSubscriptionWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -6763,35 +7874,38 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -6849,6 +7963,17 @@ describe("@filterable directive", () => { Actor } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -6857,19 +7982,21 @@ describe("@filterable directive", () => { } input PersonUpdateInput { - username_SET: String + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - typename_IN: [PersonImplementation!] - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + typename: [PersonImplementation!] + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type Query { @@ -6897,6 +8024,27 @@ describe("@filterable directive", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Subscription { actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! @@ -7038,6 +8186,7 @@ describe("@filterable directive", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -7057,6 +8206,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 } @@ -7091,21 +8259,22 @@ describe("@filterable directive", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -7138,22 +8307,26 @@ describe("@filterable directive", () => { AND: [ActorSubscriptionWhere!] NOT: ActorSubscriptionWhere OR: [ActorSubscriptionWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } type ActorUpdatedEvent { @@ -7167,41 +8340,45 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type ActorsConnection { @@ -7281,6 +8458,7 @@ describe("@filterable directive", () => { AND: [AppearanceMoviesAggregateInput!] NOT: AppearanceMoviesAggregateInput OR: [AppearanceMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -7300,6 +8478,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 } @@ -7334,21 +8531,22 @@ describe("@filterable directive", () => { AND: [AppearanceMoviesNodeAggregationWhereInput!] NOT: AppearanceMoviesNodeAggregationWhereInput OR: [AppearanceMoviesNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type AppearanceMoviesRelationship { @@ -7381,22 +8579,26 @@ describe("@filterable directive", () => { AND: [AppearanceSubscriptionWhere!] NOT: AppearanceSubscriptionWhere OR: [AppearanceSubscriptionWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } input AppearanceUpdateInput { movies: [AppearanceMoviesUpdateFieldInput!] - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } type AppearanceUpdatedEvent { @@ -7410,41 +8612,45 @@ describe("@filterable directive", () => { AND: [AppearanceWhere!] NOT: AppearanceWhere OR: [AppearanceWhere!] + movies: MovieRelationshipFilters moviesAggregate: AppearanceMoviesAggregateInput + moviesConnection: AppearanceMoviesConnectionFilters \\"\\"\\" Return Appearances where all of the related AppearanceMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: AppearanceMoviesConnectionWhere + moviesConnection_ALL: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Appearances where none of the related AppearanceMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: AppearanceMoviesConnectionWhere + moviesConnection_NONE: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Appearances where one of the related AppearanceMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: AppearanceMoviesConnectionWhere + moviesConnection_SINGLE: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Appearances where some of the related AppearanceMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: AppearanceMoviesConnectionWhere + moviesConnection_SOME: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Appearances where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Appearances where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Appearances where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Appearances where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type AppearancesConnection { @@ -7492,6 +8698,26 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -7597,6 +8823,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 @@ -7674,6 +8919,17 @@ describe("@filterable directive", () => { title: String } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -7685,16 +8941,18 @@ describe("@filterable directive", () => { AND: [MovieSubscriptionWhere!] NOT: MovieSubscriptionWhere OR: [MovieSubscriptionWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } input MovieUpdateInput { actors: MovieActorsUpdateInput - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -7708,35 +8966,38 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -7767,6 +9028,17 @@ describe("@filterable directive", () => { union Person = Actor | Appearance + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input PersonWhere { Actor: ActorWhere Appearance: AppearanceWhere @@ -7798,6 +9070,27 @@ describe("@filterable directive", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Subscription { actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! @@ -7947,6 +9240,7 @@ describe("@filterable directive", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -7966,6 +9260,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 } @@ -8000,21 +9313,22 @@ describe("@filterable directive", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -8047,22 +9361,26 @@ describe("@filterable directive", () => { AND: [ActorSubscriptionWhere!] NOT: ActorSubscriptionWhere OR: [ActorSubscriptionWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } type ActorUpdatedEvent { @@ -8076,41 +9394,45 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type ActorsConnection { @@ -8190,6 +9512,7 @@ describe("@filterable directive", () => { AND: [AppearanceMoviesAggregateInput!] NOT: AppearanceMoviesAggregateInput OR: [AppearanceMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -8209,6 +9532,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 } @@ -8243,21 +9585,22 @@ describe("@filterable directive", () => { AND: [AppearanceMoviesNodeAggregationWhereInput!] NOT: AppearanceMoviesNodeAggregationWhereInput OR: [AppearanceMoviesNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type AppearanceMoviesRelationship { @@ -8290,22 +9633,26 @@ describe("@filterable directive", () => { AND: [AppearanceSubscriptionWhere!] NOT: AppearanceSubscriptionWhere OR: [AppearanceSubscriptionWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } input AppearanceUpdateInput { movies: [AppearanceMoviesUpdateFieldInput!] - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } type AppearanceUpdatedEvent { @@ -8319,41 +9666,45 @@ describe("@filterable directive", () => { AND: [AppearanceWhere!] NOT: AppearanceWhere OR: [AppearanceWhere!] + movies: MovieRelationshipFilters moviesAggregate: AppearanceMoviesAggregateInput + moviesConnection: AppearanceMoviesConnectionFilters \\"\\"\\" Return Appearances where all of the related AppearanceMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: AppearanceMoviesConnectionWhere + moviesConnection_ALL: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Appearances where none of the related AppearanceMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: AppearanceMoviesConnectionWhere + moviesConnection_NONE: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Appearances where one of the related AppearanceMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: AppearanceMoviesConnectionWhere + moviesConnection_SINGLE: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Appearances where some of the related AppearanceMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: AppearanceMoviesConnectionWhere + moviesConnection_SOME: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Appearances where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Appearances where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Appearances where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Appearances where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type AppearancesConnection { @@ -8401,6 +9752,26 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -8506,6 +9877,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 @@ -8583,6 +9973,17 @@ describe("@filterable directive", () => { title: String } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -8594,16 +9995,18 @@ describe("@filterable directive", () => { AND: [MovieSubscriptionWhere!] NOT: MovieSubscriptionWhere OR: [MovieSubscriptionWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } input MovieUpdateInput { actors: MovieActorsUpdateInput - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -8617,35 +10020,38 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -8676,6 +10082,17 @@ describe("@filterable directive", () => { union Person = Actor | Appearance + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input PersonWhere { Actor: ActorWhere Appearance: AppearanceWhere @@ -8707,6 +10124,27 @@ describe("@filterable directive", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Subscription { actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! @@ -8856,6 +10294,7 @@ describe("@filterable directive", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -8875,6 +10314,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 } @@ -8909,21 +10367,22 @@ describe("@filterable directive", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -8956,22 +10415,26 @@ describe("@filterable directive", () => { AND: [ActorSubscriptionWhere!] NOT: ActorSubscriptionWhere OR: [ActorSubscriptionWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } type ActorUpdatedEvent { @@ -8985,41 +10448,45 @@ describe("@filterable directive", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type ActorsConnection { @@ -9099,6 +10566,7 @@ describe("@filterable directive", () => { AND: [AppearanceMoviesAggregateInput!] NOT: AppearanceMoviesAggregateInput OR: [AppearanceMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -9118,6 +10586,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 } @@ -9152,21 +10639,22 @@ describe("@filterable directive", () => { AND: [AppearanceMoviesNodeAggregationWhereInput!] NOT: AppearanceMoviesNodeAggregationWhereInput OR: [AppearanceMoviesNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type AppearanceMoviesRelationship { @@ -9199,22 +10687,26 @@ describe("@filterable directive", () => { AND: [AppearanceSubscriptionWhere!] NOT: AppearanceSubscriptionWhere OR: [AppearanceSubscriptionWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } input AppearanceUpdateInput { movies: [AppearanceMoviesUpdateFieldInput!] - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } type AppearanceUpdatedEvent { @@ -9228,41 +10720,45 @@ describe("@filterable directive", () => { AND: [AppearanceWhere!] NOT: AppearanceWhere OR: [AppearanceWhere!] + movies: MovieRelationshipFilters moviesAggregate: AppearanceMoviesAggregateInput + moviesConnection: AppearanceMoviesConnectionFilters \\"\\"\\" Return Appearances where all of the related AppearanceMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: AppearanceMoviesConnectionWhere + moviesConnection_ALL: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Appearances where none of the related AppearanceMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: AppearanceMoviesConnectionWhere + moviesConnection_NONE: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Appearances where one of the related AppearanceMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: AppearanceMoviesConnectionWhere + moviesConnection_SINGLE: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Appearances where some of the related AppearanceMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: AppearanceMoviesConnectionWhere + moviesConnection_SOME: AppearanceMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Appearances where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Appearances where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Appearances where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Appearances where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type AppearancesConnection { @@ -9310,6 +10806,26 @@ describe("@filterable directive", () => { UPDATE } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, where: PersonWhere): [Person!]! actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -9415,6 +10931,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 @@ -9492,6 +11027,17 @@ describe("@filterable directive", () => { title: String } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -9503,16 +11049,18 @@ describe("@filterable directive", () => { AND: [MovieSubscriptionWhere!] NOT: MovieSubscriptionWhere OR: [MovieSubscriptionWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } input MovieUpdateInput { actors: MovieActorsUpdateInput - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -9526,35 +11074,38 @@ describe("@filterable directive", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -9585,6 +11136,17 @@ describe("@filterable directive", () => { union Person = Actor | Appearance + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + input PersonWhere { Actor: ActorWhere Appearance: AppearanceWhere @@ -9616,6 +11178,27 @@ describe("@filterable directive", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Subscription { actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! diff --git a/packages/graphql/tests/schema/directives/node.test.ts b/packages/graphql/tests/schema/directives/node.test.ts index fb62a8b2db..b627a22409 100644 --- a/packages/graphql/tests/schema/directives/node.test.ts +++ b/packages/graphql/tests/schema/directives/node.test.ts @@ -67,18 +67,20 @@ describe("@node", () => { } input ActorUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -141,6 +143,20 @@ describe("@node", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -211,18 +227,20 @@ describe("@node", () => { } input ActorUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -303,12 +321,13 @@ describe("@node", () => { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -361,18 +380,20 @@ describe("@node", () => { } input SeriesUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -388,6 +409,20 @@ describe("@node", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -460,18 +495,20 @@ describe("@node", () => { } input ActorUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -575,18 +612,20 @@ describe("@node", () => { } input SeriesUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -602,6 +641,20 @@ describe("@node", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/directives/plural.test.ts b/packages/graphql/tests/schema/directives/plural.test.ts index 4108c8a53f..d8d75bbee5 100644 --- a/packages/graphql/tests/schema/directives/plural.test.ts +++ b/packages/graphql/tests/schema/directives/plural.test.ts @@ -97,6 +97,20 @@ describe("Plural option", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Tech { name: String value: String @@ -127,24 +141,28 @@ describe("Plural option", () => { } input TechUpdateInput { - name_SET: String - value_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") + value: StringScalarMutations + value_SET: String @deprecated(reason: \\"Please use the generic mutation 'value: { set: ... } }' instead.\\") } input TechWhere { AND: [TechWhere!] NOT: TechWhere OR: [TechWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - value_CONTAINS: String - value_ENDS_WITH: String - value_EQ: String - value_IN: [String] - value_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + value: StringScalarFilters + value_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter value: { contains: ... }\\") + value_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter value: { endsWith: ... }\\") + value_EQ: String @deprecated(reason: \\"Please use the relevant generic filter value: { eq: ... }\\") + value_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter value: { in: ... }\\") + value_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter value: { startsWith: ... }\\") } type TechsConnection { @@ -243,6 +261,20 @@ describe("Plural option", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Tech { name: String value: String @@ -273,24 +305,28 @@ describe("Plural option", () => { } input TechUpdateInput { - name_SET: String - value_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") + value: StringScalarMutations + value_SET: String @deprecated(reason: \\"Please use the generic mutation 'value: { set: ... } }' instead.\\") } input TechWhere { AND: [TechWhere!] NOT: TechWhere OR: [TechWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - value_CONTAINS: String - value_ENDS_WITH: String - value_EQ: String - value_IN: [String] - value_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + value: StringScalarFilters + value_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter value: { contains: ... }\\") + value_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter value: { endsWith: ... }\\") + value_EQ: String @deprecated(reason: \\"Please use the relevant generic filter value: { eq: ... }\\") + value_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter value: { in: ... }\\") + value_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter value: { startsWith: ... }\\") } type TechsConnection { @@ -389,6 +425,20 @@ describe("Plural option", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Tech { name: String value: String @@ -419,24 +469,28 @@ describe("Plural option", () => { } input TechUpdateInput { - name_SET: String - value_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") + value: StringScalarMutations + value_SET: String @deprecated(reason: \\"Please use the generic mutation 'value: { set: ... } }' instead.\\") } input TechWhere { AND: [TechWhere!] NOT: TechWhere OR: [TechWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - value_CONTAINS: String - value_ENDS_WITH: String - value_EQ: String - value_IN: [String] - value_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + value: StringScalarFilters + value_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter value: { contains: ... }\\") + value_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter value: { endsWith: ... }\\") + value_EQ: String @deprecated(reason: \\"Please use the relevant generic filter value: { eq: ... }\\") + value_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter value: { in: ... }\\") + value_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter value: { startsWith: ... }\\") } type TechnologiesConnection { diff --git a/packages/graphql/tests/schema/directives/populatedBy.test.ts b/packages/graphql/tests/schema/directives/populatedBy.test.ts index ca4a44b421..8aa87ae7ee 100644 --- a/packages/graphql/tests/schema/directives/populatedBy.test.ts +++ b/packages/graphql/tests/schema/directives/populatedBy.test.ts @@ -183,9 +183,18 @@ describe("@populatedBy tests", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -200,7 +209,6 @@ describe("@populatedBy tests", () => { callback2: StringAggregateSelection! callback3: StringAggregateSelection! count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -224,34 +232,40 @@ describe("@populatedBy tests", () => { } input MovieUpdateInput { - callback1_SET: String - id_SET: ID + callback1: StringScalarMutations + callback1_SET: String @deprecated(reason: \\"Please use the generic mutation 'callback1: { set: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - callback1_CONTAINS: String - callback1_ENDS_WITH: String - callback1_EQ: String - callback1_IN: [String!] - callback1_STARTS_WITH: String - callback2_CONTAINS: String - callback2_ENDS_WITH: String - callback2_EQ: String - callback2_IN: [String!] - callback2_STARTS_WITH: String - callback3_CONTAINS: String - callback3_ENDS_WITH: String - callback3_EQ: String - callback3_IN: [String!] - callback3_STARTS_WITH: String - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + callback1: StringScalarFilters + callback1_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter callback1: { contains: ... }\\") + callback1_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter callback1: { endsWith: ... }\\") + callback1_EQ: String @deprecated(reason: \\"Please use the relevant generic filter callback1: { eq: ... }\\") + callback1_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter callback1: { in: ... }\\") + callback1_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter callback1: { startsWith: ... }\\") + callback2: StringScalarFilters + callback2_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter callback2: { contains: ... }\\") + callback2_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter callback2: { endsWith: ... }\\") + callback2_EQ: String @deprecated(reason: \\"Please use the relevant generic filter callback2: { eq: ... }\\") + callback2_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter callback2: { in: ... }\\") + callback2_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter callback2: { startsWith: ... }\\") + callback3: StringScalarFilters + callback3_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter callback3: { contains: ... }\\") + callback3_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter callback3: { endsWith: ... }\\") + callback3_EQ: String @deprecated(reason: \\"Please use the relevant generic filter callback3: { eq: ... }\\") + callback3_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter callback3: { in: ... }\\") + callback3_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter callback3: { startsWith: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -293,6 +307,20 @@ describe("@populatedBy tests", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -366,9 +394,18 @@ describe("@populatedBy tests", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -378,6 +415,23 @@ describe("@populatedBy tests", () => { sum: Int } + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie { callback1: Int! callback2: Int! @@ -390,7 +444,6 @@ describe("@populatedBy tests", () => { callback2: IntAggregateSelection! callback3: IntAggregateSelection! count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -414,39 +467,45 @@ describe("@populatedBy tests", () => { } input MovieUpdateInput { - callback1_DECREMENT: Int - callback1_INCREMENT: Int - callback1_SET: Int - id_SET: ID + callback1: IntScalarMutations + callback1_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'callback1: { decrement: ... } }' instead.\\") + callback1_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'callback1: { increment: ... } }' instead.\\") + callback1_SET: Int @deprecated(reason: \\"Please use the generic mutation 'callback1: { set: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - callback1_EQ: Int - callback1_GT: Int - callback1_GTE: Int - callback1_IN: [Int!] - callback1_LT: Int - callback1_LTE: Int - callback2_EQ: Int - callback2_GT: Int - callback2_GTE: Int - callback2_IN: [Int!] - callback2_LT: Int - callback2_LTE: Int - callback3_EQ: Int - callback3_GT: Int - callback3_GTE: Int - callback3_IN: [Int!] - callback3_LT: Int - callback3_LTE: Int - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + callback1: IntScalarFilters + callback1_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter callback1: { eq: ... }\\") + callback1_GT: Int @deprecated(reason: \\"Please use the relevant generic filter callback1: { gt: ... }\\") + callback1_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter callback1: { gte: ... }\\") + callback1_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter callback1: { in: ... }\\") + callback1_LT: Int @deprecated(reason: \\"Please use the relevant generic filter callback1: { lt: ... }\\") + callback1_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter callback1: { lte: ... }\\") + callback2: IntScalarFilters + callback2_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter callback2: { eq: ... }\\") + callback2_GT: Int @deprecated(reason: \\"Please use the relevant generic filter callback2: { gt: ... }\\") + callback2_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter callback2: { gte: ... }\\") + callback2_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter callback2: { in: ... }\\") + callback2_LT: Int @deprecated(reason: \\"Please use the relevant generic filter callback2: { lt: ... }\\") + callback2_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter callback2: { lte: ... }\\") + callback3: IntScalarFilters + callback3_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter callback3: { eq: ... }\\") + callback3_GT: Int @deprecated(reason: \\"Please use the relevant generic filter callback3: { gt: ... }\\") + callback3_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter callback3: { gte: ... }\\") + callback3_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter callback3: { in: ... }\\") + callback3_LT: Int @deprecated(reason: \\"Please use the relevant generic filter callback3: { lt: ... }\\") + callback3_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter callback3: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -705,13 +764,22 @@ describe("@populatedBy tests", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + type Genre { id: ID! } type GenreAggregateSelection { count: Int! - id: IDAggregateSelection! } input GenreConnectWhere { @@ -727,6 +795,17 @@ describe("@populatedBy tests", () => { node: Genre! } + input GenreRelationshipFilters { + \\"\\"\\"Filter type where all of the related Genres match this filter\\"\\"\\" + all: GenreWhere + \\"\\"\\"Filter type where none of the related Genres match this filter\\"\\"\\" + none: GenreWhere + \\"\\"\\"Filter type where one of the related Genres match this filter\\"\\"\\" + single: GenreWhere + \\"\\"\\"Filter type where some of the related Genres match this filter\\"\\"\\" + some: GenreWhere + } + \\"\\"\\" Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object. \\"\\"\\" @@ -735,18 +814,20 @@ describe("@populatedBy tests", () => { } input GenreUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input GenreWhere { AND: [GenreWhere!] NOT: GenreWhere OR: [GenreWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type GenresConnection { @@ -755,9 +836,28 @@ describe("@populatedBy tests", () => { totalCount: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Movie { @@ -769,7 +869,6 @@ describe("@populatedBy tests", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -789,31 +888,25 @@ describe("@populatedBy tests", () => { type MovieGenreGenresAggregationSelection { count: Int! edge: MovieGenreGenresEdgeAggregateSelection - node: MovieGenreGenresNodeAggregateSelection } type MovieGenreGenresEdgeAggregateSelection { callback1: StringAggregateSelection! callback2: StringAggregateSelection! callback3: StringAggregateSelection! - id: IDAggregateSelection! - } - - type MovieGenreGenresNodeAggregateSelection { - id: IDAggregateSelection! } input MovieGenresAggregateInput { AND: [MovieGenresAggregateInput!] NOT: MovieGenresAggregateInput OR: [MovieGenresAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int count_LT: Int count_LTE: Int edge: RelPropertiesAggregationWhereInput - node: MovieGenresNodeAggregationWhereInput } input MovieGenresConnectFieldInput { @@ -827,6 +920,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 @@ -858,22 +970,6 @@ describe("@populatedBy tests", () => { create: [MovieGenresCreateFieldInput!] } - input MovieGenresNodeAggregationWhereInput { - AND: [MovieGenresNodeAggregationWhereInput!] - NOT: MovieGenresNodeAggregationWhereInput - OR: [MovieGenresNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - } - type MovieGenresRelationship { cursor: String! node: Genre! @@ -903,43 +999,47 @@ describe("@populatedBy tests", () => { input MovieUpdateInput { genres: [MovieGenresUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + genres: GenreRelationshipFilters genresAggregate: MovieGenresAggregateInput + genresConnection: MovieGenresConnectionFilters \\"\\"\\" Return Movies where all of the related MovieGenresConnections match this filter \\"\\"\\" - genresConnection_ALL: MovieGenresConnectionWhere + genresConnection_ALL: MovieGenresConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'genresConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieGenresConnections match this filter \\"\\"\\" - genresConnection_NONE: MovieGenresConnectionWhere + genresConnection_NONE: MovieGenresConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'genresConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieGenresConnections match this filter \\"\\"\\" - genresConnection_SINGLE: MovieGenresConnectionWhere + genresConnection_SINGLE: MovieGenresConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'genresConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieGenresConnections match this filter \\"\\"\\" - genresConnection_SOME: MovieGenresConnectionWhere + genresConnection_SOME: MovieGenresConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'genresConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" - genres_ALL: GenreWhere + genres_ALL: GenreWhere @deprecated(reason: \\"Please use the relevant generic filter 'genres: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" - genres_NONE: GenreWhere + genres_NONE: GenreWhere @deprecated(reason: \\"Please use the relevant generic filter 'genres: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" - genres_SINGLE: GenreWhere + genres_SINGLE: GenreWhere @deprecated(reason: \\"Please use the relevant generic filter 'genres: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" - genres_SOME: GenreWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + genres_SOME: GenreWhere @deprecated(reason: \\"Please use the relevant generic filter 'genres: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -989,61 +1089,54 @@ describe("@populatedBy tests", () => { AND: [RelPropertiesAggregationWhereInput!] NOT: RelPropertiesAggregationWhereInput OR: [RelPropertiesAggregationWhereInput!] - callback1_AVERAGE_LENGTH_EQUAL: Float - callback1_AVERAGE_LENGTH_GT: Float - callback1_AVERAGE_LENGTH_GTE: Float - callback1_AVERAGE_LENGTH_LT: Float - callback1_AVERAGE_LENGTH_LTE: Float - callback1_LONGEST_LENGTH_EQUAL: Int - callback1_LONGEST_LENGTH_GT: Int - callback1_LONGEST_LENGTH_GTE: Int - callback1_LONGEST_LENGTH_LT: Int - callback1_LONGEST_LENGTH_LTE: Int - callback1_SHORTEST_LENGTH_EQUAL: Int - callback1_SHORTEST_LENGTH_GT: Int - callback1_SHORTEST_LENGTH_GTE: Int - callback1_SHORTEST_LENGTH_LT: Int - callback1_SHORTEST_LENGTH_LTE: Int - callback2_AVERAGE_LENGTH_EQUAL: Float - callback2_AVERAGE_LENGTH_GT: Float - callback2_AVERAGE_LENGTH_GTE: Float - callback2_AVERAGE_LENGTH_LT: Float - callback2_AVERAGE_LENGTH_LTE: Float - callback2_LONGEST_LENGTH_EQUAL: Int - callback2_LONGEST_LENGTH_GT: Int - callback2_LONGEST_LENGTH_GTE: Int - callback2_LONGEST_LENGTH_LT: Int - callback2_LONGEST_LENGTH_LTE: Int - callback2_SHORTEST_LENGTH_EQUAL: Int - callback2_SHORTEST_LENGTH_GT: Int - callback2_SHORTEST_LENGTH_GTE: Int - callback2_SHORTEST_LENGTH_LT: Int - callback2_SHORTEST_LENGTH_LTE: Int - callback3_AVERAGE_LENGTH_EQUAL: Float - callback3_AVERAGE_LENGTH_GT: Float - callback3_AVERAGE_LENGTH_GTE: Float - callback3_AVERAGE_LENGTH_LT: Float - callback3_AVERAGE_LENGTH_LTE: Float - callback3_LONGEST_LENGTH_EQUAL: Int - callback3_LONGEST_LENGTH_GT: Int - callback3_LONGEST_LENGTH_GTE: Int - callback3_LONGEST_LENGTH_LT: Int - callback3_LONGEST_LENGTH_LTE: Int - callback3_SHORTEST_LENGTH_EQUAL: Int - callback3_SHORTEST_LENGTH_GT: Int - callback3_SHORTEST_LENGTH_GTE: Int - callback3_SHORTEST_LENGTH_LT: Int - callback3_SHORTEST_LENGTH_LTE: Int - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + callback1: StringScalarAggregationFilters + callback1_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { averageLength: { eq: ... } } }' instead.\\") + callback1_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { averageLength: { gt: ... } } }' instead.\\") + callback1_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { averageLength: { gte: ... } } }' instead.\\") + callback1_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { averageLength: { lt: ... } } }' instead.\\") + callback1_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { averageLength: { lte: ... } } }' instead.\\") + callback1_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { longestLength: { eq: ... } } }' instead.\\") + callback1_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { longestLength: { gt: ... } } }' instead.\\") + callback1_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { longestLength: { gte: ... } } }' instead.\\") + callback1_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { longestLength: { lt: ... } } }' instead.\\") + callback1_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { longestLength: { lte: ... } } }' instead.\\") + callback1_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { shortestLength: { eq: ... } } }' instead.\\") + callback1_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { shortestLength: { gt: ... } } }' instead.\\") + callback1_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { shortestLength: { gte: ... } } }' instead.\\") + callback1_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { shortestLength: { lt: ... } } }' instead.\\") + callback1_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { shortestLength: { lte: ... } } }' instead.\\") + callback2: StringScalarAggregationFilters + callback2_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { averageLength: { eq: ... } } }' instead.\\") + callback2_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { averageLength: { gt: ... } } }' instead.\\") + callback2_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { averageLength: { gte: ... } } }' instead.\\") + callback2_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { averageLength: { lt: ... } } }' instead.\\") + callback2_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { averageLength: { lte: ... } } }' instead.\\") + callback2_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { longestLength: { eq: ... } } }' instead.\\") + callback2_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { longestLength: { gt: ... } } }' instead.\\") + callback2_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { longestLength: { gte: ... } } }' instead.\\") + callback2_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { longestLength: { lt: ... } } }' instead.\\") + callback2_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { longestLength: { lte: ... } } }' instead.\\") + callback2_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { shortestLength: { eq: ... } } }' instead.\\") + callback2_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { shortestLength: { gt: ... } } }' instead.\\") + callback2_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { shortestLength: { gte: ... } } }' instead.\\") + callback2_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { shortestLength: { lt: ... } } }' instead.\\") + callback2_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { shortestLength: { lte: ... } } }' instead.\\") + callback3: StringScalarAggregationFilters + callback3_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { averageLength: { eq: ... } } }' instead.\\") + callback3_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { averageLength: { gt: ... } } }' instead.\\") + callback3_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { averageLength: { gte: ... } } }' instead.\\") + callback3_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { averageLength: { lt: ... } } }' instead.\\") + callback3_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { averageLength: { lte: ... } } }' instead.\\") + callback3_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { longestLength: { eq: ... } } }' instead.\\") + callback3_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { longestLength: { gt: ... } } }' instead.\\") + callback3_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { longestLength: { gte: ... } } }' instead.\\") + callback3_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { longestLength: { lt: ... } } }' instead.\\") + callback3_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { longestLength: { lte: ... } } }' instead.\\") + callback3_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { shortestLength: { eq: ... } } }' instead.\\") + callback3_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { shortestLength: { gt: ... } } }' instead.\\") + callback3_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { shortestLength: { gte: ... } } }' instead.\\") + callback3_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { shortestLength: { lt: ... } } }' instead.\\") + callback3_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { shortestLength: { lte: ... } } }' instead.\\") } input RelPropertiesCreateInput { @@ -1059,34 +1152,40 @@ describe("@populatedBy tests", () => { } input RelPropertiesUpdateInput { - callback1_SET: String - id_SET: ID + callback1: StringScalarMutations + callback1_SET: String @deprecated(reason: \\"Please use the generic mutation 'callback1: { set: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input RelPropertiesWhere { AND: [RelPropertiesWhere!] NOT: RelPropertiesWhere OR: [RelPropertiesWhere!] - callback1_CONTAINS: String - callback1_ENDS_WITH: String - callback1_EQ: String - callback1_IN: [String!] - callback1_STARTS_WITH: String - callback2_CONTAINS: String - callback2_ENDS_WITH: String - callback2_EQ: String - callback2_IN: [String!] - callback2_STARTS_WITH: String - callback3_CONTAINS: String - callback3_ENDS_WITH: String - callback3_EQ: String - callback3_IN: [String!] - callback3_STARTS_WITH: String - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID + callback1: StringScalarFilters + callback1_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter callback1: { contains: ... }\\") + callback1_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter callback1: { endsWith: ... }\\") + callback1_EQ: String @deprecated(reason: \\"Please use the relevant generic filter callback1: { eq: ... }\\") + callback1_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter callback1: { in: ... }\\") + callback1_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter callback1: { startsWith: ... }\\") + callback2: StringScalarFilters + callback2_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter callback2: { contains: ... }\\") + callback2_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter callback2: { endsWith: ... }\\") + callback2_EQ: String @deprecated(reason: \\"Please use the relevant generic filter callback2: { eq: ... }\\") + callback2_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter callback2: { in: ... }\\") + callback2_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter callback2: { startsWith: ... }\\") + callback3: StringScalarFilters + callback3_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter callback3: { contains: ... }\\") + callback3_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter callback3: { endsWith: ... }\\") + callback3_EQ: String @deprecated(reason: \\"Please use the relevant generic filter callback3: { eq: ... }\\") + callback3_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter callback3: { in: ... }\\") + callback3_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter callback3: { startsWith: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -1102,6 +1201,27 @@ describe("@populatedBy tests", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateGenresMutationResponse { genres: [Genre!]! info: UpdateInfo! @@ -1194,13 +1314,22 @@ describe("@populatedBy tests", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + type Genre { id: ID! } type GenreAggregateSelection { count: Int! - id: IDAggregateSelection! } input GenreConnectWhere { @@ -1216,6 +1345,17 @@ describe("@populatedBy tests", () => { node: Genre! } + input GenreRelationshipFilters { + \\"\\"\\"Filter type where all of the related Genres match this filter\\"\\"\\" + all: GenreWhere + \\"\\"\\"Filter type where none of the related Genres match this filter\\"\\"\\" + none: GenreWhere + \\"\\"\\"Filter type where one of the related Genres match this filter\\"\\"\\" + single: GenreWhere + \\"\\"\\"Filter type where some of the related Genres match this filter\\"\\"\\" + some: GenreWhere + } + \\"\\"\\" Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object. \\"\\"\\" @@ -1224,18 +1364,20 @@ describe("@populatedBy tests", () => { } input GenreUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input GenreWhere { AND: [GenreWhere!] NOT: GenreWhere OR: [GenreWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type GenresConnection { @@ -1244,9 +1386,18 @@ describe("@populatedBy tests", () => { totalCount: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -1256,6 +1407,31 @@ describe("@populatedBy tests", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie { genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! genresAggregate(where: GenreWhere): MovieGenreGenresAggregationSelection @@ -1265,7 +1441,6 @@ describe("@populatedBy tests", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -1285,31 +1460,25 @@ describe("@populatedBy tests", () => { type MovieGenreGenresAggregationSelection { count: Int! edge: MovieGenreGenresEdgeAggregateSelection - node: MovieGenreGenresNodeAggregateSelection } type MovieGenreGenresEdgeAggregateSelection { callback1: IntAggregateSelection! callback2: IntAggregateSelection! callback3: IntAggregateSelection! - id: IDAggregateSelection! - } - - type MovieGenreGenresNodeAggregateSelection { - id: IDAggregateSelection! } input MovieGenresAggregateInput { AND: [MovieGenresAggregateInput!] NOT: MovieGenresAggregateInput OR: [MovieGenresAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int count_LT: Int count_LTE: Int edge: RelPropertiesAggregationWhereInput - node: MovieGenresNodeAggregationWhereInput } input MovieGenresConnectFieldInput { @@ -1323,6 +1492,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 @@ -1354,22 +1542,6 @@ describe("@populatedBy tests", () => { create: [MovieGenresCreateFieldInput!] } - input MovieGenresNodeAggregationWhereInput { - AND: [MovieGenresNodeAggregationWhereInput!] - NOT: MovieGenresNodeAggregationWhereInput - OR: [MovieGenresNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - } - type MovieGenresRelationship { cursor: String! node: Genre! @@ -1399,43 +1571,47 @@ describe("@populatedBy tests", () => { input MovieUpdateInput { genres: [MovieGenresUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + genres: GenreRelationshipFilters genresAggregate: MovieGenresAggregateInput + genresConnection: MovieGenresConnectionFilters \\"\\"\\" Return Movies where all of the related MovieGenresConnections match this filter \\"\\"\\" - genresConnection_ALL: MovieGenresConnectionWhere + genresConnection_ALL: MovieGenresConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'genresConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieGenresConnections match this filter \\"\\"\\" - genresConnection_NONE: MovieGenresConnectionWhere + genresConnection_NONE: MovieGenresConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'genresConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieGenresConnections match this filter \\"\\"\\" - genresConnection_SINGLE: MovieGenresConnectionWhere + genresConnection_SINGLE: MovieGenresConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'genresConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieGenresConnections match this filter \\"\\"\\" - genresConnection_SOME: MovieGenresConnectionWhere + genresConnection_SOME: MovieGenresConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'genresConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" - genres_ALL: GenreWhere + genres_ALL: GenreWhere @deprecated(reason: \\"Please use the relevant generic filter 'genres: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" - genres_NONE: GenreWhere + genres_NONE: GenreWhere @deprecated(reason: \\"Please use the relevant generic filter 'genres: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" - genres_SINGLE: GenreWhere + genres_SINGLE: GenreWhere @deprecated(reason: \\"Please use the relevant generic filter 'genres: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" - genres_SOME: GenreWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + genres_SOME: GenreWhere @deprecated(reason: \\"Please use the relevant generic filter 'genres: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -1485,76 +1661,69 @@ describe("@populatedBy tests", () => { AND: [RelPropertiesAggregationWhereInput!] NOT: RelPropertiesAggregationWhereInput OR: [RelPropertiesAggregationWhereInput!] - callback1_AVERAGE_EQUAL: Float - callback1_AVERAGE_GT: Float - callback1_AVERAGE_GTE: Float - callback1_AVERAGE_LT: Float - callback1_AVERAGE_LTE: Float - callback1_MAX_EQUAL: Int - callback1_MAX_GT: Int - callback1_MAX_GTE: Int - callback1_MAX_LT: Int - callback1_MAX_LTE: Int - callback1_MIN_EQUAL: Int - callback1_MIN_GT: Int - callback1_MIN_GTE: Int - callback1_MIN_LT: Int - callback1_MIN_LTE: Int - callback1_SUM_EQUAL: Int - callback1_SUM_GT: Int - callback1_SUM_GTE: Int - callback1_SUM_LT: Int - callback1_SUM_LTE: Int - callback2_AVERAGE_EQUAL: Float - callback2_AVERAGE_GT: Float - callback2_AVERAGE_GTE: Float - callback2_AVERAGE_LT: Float - callback2_AVERAGE_LTE: Float - callback2_MAX_EQUAL: Int - callback2_MAX_GT: Int - callback2_MAX_GTE: Int - callback2_MAX_LT: Int - callback2_MAX_LTE: Int - callback2_MIN_EQUAL: Int - callback2_MIN_GT: Int - callback2_MIN_GTE: Int - callback2_MIN_LT: Int - callback2_MIN_LTE: Int - callback2_SUM_EQUAL: Int - callback2_SUM_GT: Int - callback2_SUM_GTE: Int - callback2_SUM_LT: Int - callback2_SUM_LTE: Int - callback3_AVERAGE_EQUAL: Float - callback3_AVERAGE_GT: Float - callback3_AVERAGE_GTE: Float - callback3_AVERAGE_LT: Float - callback3_AVERAGE_LTE: Float - callback3_MAX_EQUAL: Int - callback3_MAX_GT: Int - callback3_MAX_GTE: Int - callback3_MAX_LT: Int - callback3_MAX_LTE: Int - callback3_MIN_EQUAL: Int - callback3_MIN_GT: Int - callback3_MIN_GTE: Int - callback3_MIN_LT: Int - callback3_MIN_LTE: Int - callback3_SUM_EQUAL: Int - callback3_SUM_GT: Int - callback3_SUM_GTE: Int - callback3_SUM_LT: Int - callback3_SUM_LTE: Int - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + callback1: IntScalarAggregationFilters + callback1_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { average: { eq: ... } } }' instead.\\") + callback1_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { average: { gt: ... } } }' instead.\\") + callback1_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { average: { gte: ... } } }' instead.\\") + callback1_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { average: { lt: ... } } }' instead.\\") + callback1_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { average: { lte: ... } } }' instead.\\") + callback1_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { max: { eq: ... } } }' instead.\\") + callback1_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { max: { gt: ... } } }' instead.\\") + callback1_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { max: { gte: ... } } }' instead.\\") + callback1_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { max: { lt: ... } } }' instead.\\") + callback1_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { max: { lte: ... } } }' instead.\\") + callback1_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { min: { eq: ... } } }' instead.\\") + callback1_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { min: { gt: ... } } }' instead.\\") + callback1_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { min: { gte: ... } } }' instead.\\") + callback1_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { min: { lt: ... } } }' instead.\\") + callback1_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { min: { lte: ... } } }' instead.\\") + callback1_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { sum: { eq: ... } } }' instead.\\") + callback1_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { sum: { gt: ... } } }' instead.\\") + callback1_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { sum: { gte: ... } } }' instead.\\") + callback1_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { sum: { lt: ... } } }' instead.\\") + callback1_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback1: { sum: { lte: ... } } }' instead.\\") + callback2: IntScalarAggregationFilters + callback2_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { average: { eq: ... } } }' instead.\\") + callback2_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { average: { gt: ... } } }' instead.\\") + callback2_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { average: { gte: ... } } }' instead.\\") + callback2_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { average: { lt: ... } } }' instead.\\") + callback2_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { average: { lte: ... } } }' instead.\\") + callback2_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { max: { eq: ... } } }' instead.\\") + callback2_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { max: { gt: ... } } }' instead.\\") + callback2_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { max: { gte: ... } } }' instead.\\") + callback2_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { max: { lt: ... } } }' instead.\\") + callback2_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { max: { lte: ... } } }' instead.\\") + callback2_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { min: { eq: ... } } }' instead.\\") + callback2_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { min: { gt: ... } } }' instead.\\") + callback2_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { min: { gte: ... } } }' instead.\\") + callback2_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { min: { lt: ... } } }' instead.\\") + callback2_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { min: { lte: ... } } }' instead.\\") + callback2_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { sum: { eq: ... } } }' instead.\\") + callback2_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { sum: { gt: ... } } }' instead.\\") + callback2_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { sum: { gte: ... } } }' instead.\\") + callback2_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { sum: { lt: ... } } }' instead.\\") + callback2_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback2: { sum: { lte: ... } } }' instead.\\") + callback3: IntScalarAggregationFilters + callback3_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { average: { eq: ... } } }' instead.\\") + callback3_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { average: { gt: ... } } }' instead.\\") + callback3_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { average: { gte: ... } } }' instead.\\") + callback3_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { average: { lt: ... } } }' instead.\\") + callback3_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { average: { lte: ... } } }' instead.\\") + callback3_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { max: { eq: ... } } }' instead.\\") + callback3_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { max: { gt: ... } } }' instead.\\") + callback3_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { max: { gte: ... } } }' instead.\\") + callback3_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { max: { lt: ... } } }' instead.\\") + callback3_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { max: { lte: ... } } }' instead.\\") + callback3_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { min: { eq: ... } } }' instead.\\") + callback3_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { min: { gt: ... } } }' instead.\\") + callback3_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { min: { gte: ... } } }' instead.\\") + callback3_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { min: { lt: ... } } }' instead.\\") + callback3_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { min: { lte: ... } } }' instead.\\") + callback3_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { sum: { eq: ... } } }' instead.\\") + callback3_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { sum: { gt: ... } } }' instead.\\") + callback3_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { sum: { gte: ... } } }' instead.\\") + callback3_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { sum: { lt: ... } } }' instead.\\") + callback3_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'callback3: { sum: { lte: ... } } }' instead.\\") } input RelPropertiesCreateInput { @@ -1570,39 +1739,45 @@ describe("@populatedBy tests", () => { } input RelPropertiesUpdateInput { - callback1_DECREMENT: Int - callback1_INCREMENT: Int - callback1_SET: Int - id_SET: ID + callback1: IntScalarMutations + callback1_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'callback1: { decrement: ... } }' instead.\\") + callback1_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'callback1: { increment: ... } }' instead.\\") + callback1_SET: Int @deprecated(reason: \\"Please use the generic mutation 'callback1: { set: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input RelPropertiesWhere { AND: [RelPropertiesWhere!] NOT: RelPropertiesWhere OR: [RelPropertiesWhere!] - callback1_EQ: Int - callback1_GT: Int - callback1_GTE: Int - callback1_IN: [Int!] - callback1_LT: Int - callback1_LTE: Int - callback2_EQ: Int - callback2_GT: Int - callback2_GTE: Int - callback2_IN: [Int!] - callback2_LT: Int - callback2_LTE: Int - callback3_EQ: Int - callback3_GT: Int - callback3_GTE: Int - callback3_IN: [Int!] - callback3_LT: Int - callback3_LTE: Int - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID + callback1: IntScalarFilters + callback1_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter callback1: { eq: ... }\\") + callback1_GT: Int @deprecated(reason: \\"Please use the relevant generic filter callback1: { gt: ... }\\") + callback1_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter callback1: { gte: ... }\\") + callback1_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter callback1: { in: ... }\\") + callback1_LT: Int @deprecated(reason: \\"Please use the relevant generic filter callback1: { lt: ... }\\") + callback1_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter callback1: { lte: ... }\\") + callback2: IntScalarFilters + callback2_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter callback2: { eq: ... }\\") + callback2_GT: Int @deprecated(reason: \\"Please use the relevant generic filter callback2: { gt: ... }\\") + callback2_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter callback2: { gte: ... }\\") + callback2_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter callback2: { in: ... }\\") + callback2_LT: Int @deprecated(reason: \\"Please use the relevant generic filter callback2: { lt: ... }\\") + callback2_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter callback2: { lte: ... }\\") + callback3: IntScalarFilters + callback3_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter callback3: { eq: ... }\\") + callback3_GT: Int @deprecated(reason: \\"Please use the relevant generic filter callback3: { gt: ... }\\") + callback3_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter callback3: { gte: ... }\\") + callback3_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter callback3: { in: ... }\\") + callback3_LT: Int @deprecated(reason: \\"Please use the relevant generic filter callback3: { lt: ... }\\") + callback3_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter callback3: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" diff --git a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts index e9d1b208ec..2591cd864e 100644 --- a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts @@ -252,6 +252,17 @@ describe("@relationship directive, aggregate argument", () => { node: Actor! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -261,24 +272,28 @@ describe("@relationship directive, aggregate argument", () => { } input ActorUpdateInput { - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type ActorsConnection { @@ -313,6 +328,26 @@ describe("@relationship directive, aggregate argument", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -323,6 +358,7 @@ describe("@relationship directive, aggregate argument", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -341,6 +377,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 } @@ -373,36 +428,38 @@ describe("@relationship directive, aggregate argument", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int + password: StringScalarAggregationFilters + password_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { eq: ... } } }' instead.\\") + password_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { gt: ... } } }' instead.\\") + password_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { gte: ... } } }' instead.\\") + password_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { lt: ... } } }' instead.\\") + password_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { lte: ... } } }' instead.\\") + password_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { eq: ... } } }' instead.\\") + password_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { gt: ... } } }' instead.\\") + password_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { gte: ... } } }' instead.\\") + password_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { lt: ... } } }' instead.\\") + password_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { lte: ... } } }' instead.\\") + password_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { eq: ... } } }' instead.\\") + password_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { gt: ... } } }' instead.\\") + password_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { gte: ... } } }' instead.\\") + password_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { lt: ... } } }' instead.\\") + password_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { lte: ... } } }' instead.\\") + username: StringScalarAggregationFilters + username_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { eq: ... } } }' instead.\\") + username_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { gt: ... } } }' instead.\\") + username_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { gte: ... } } }' instead.\\") + username_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { lt: ... } } }' instead.\\") + username_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { lte: ... } } }' instead.\\") + username_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { eq: ... } } }' instead.\\") + username_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { gt: ... } } }' instead.\\") + username_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { gte: ... } } }' instead.\\") + username_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { lt: ... } } }' instead.\\") + username_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { lte: ... } } }' instead.\\") + username_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { eq: ... } } }' instead.\\") + username_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { gt: ... } } }' instead.\\") + username_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { gte: ... } } }' instead.\\") + username_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { lt: ... } } }' instead.\\") + username_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -451,43 +508,47 @@ describe("@relationship directive, aggregate argument", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -535,6 +596,27 @@ describe("@relationship directive, aggregate argument", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -604,6 +686,17 @@ describe("@relationship directive, aggregate argument", () => { node: Actor! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -613,24 +706,28 @@ describe("@relationship directive, aggregate argument", () => { } input ActorUpdateInput { - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type ActorsConnection { @@ -665,6 +762,26 @@ describe("@relationship directive, aggregate argument", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -686,6 +803,7 @@ describe("@relationship directive, aggregate argument", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -704,6 +822,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 } @@ -736,36 +873,38 @@ describe("@relationship directive, aggregate argument", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int + password: StringScalarAggregationFilters + password_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { eq: ... } } }' instead.\\") + password_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { gt: ... } } }' instead.\\") + password_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { gte: ... } } }' instead.\\") + password_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { lt: ... } } }' instead.\\") + password_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { lte: ... } } }' instead.\\") + password_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { eq: ... } } }' instead.\\") + password_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { gt: ... } } }' instead.\\") + password_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { gte: ... } } }' instead.\\") + password_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { lt: ... } } }' instead.\\") + password_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { lte: ... } } }' instead.\\") + password_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { eq: ... } } }' instead.\\") + password_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { gt: ... } } }' instead.\\") + password_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { gte: ... } } }' instead.\\") + password_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { lt: ... } } }' instead.\\") + password_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { lte: ... } } }' instead.\\") + username: StringScalarAggregationFilters + username_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { eq: ... } } }' instead.\\") + username_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { gt: ... } } }' instead.\\") + username_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { gte: ... } } }' instead.\\") + username_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { lt: ... } } }' instead.\\") + username_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { lte: ... } } }' instead.\\") + username_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { eq: ... } } }' instead.\\") + username_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { gt: ... } } }' instead.\\") + username_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { gte: ... } } }' instead.\\") + username_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { lt: ... } } }' instead.\\") + username_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { lte: ... } } }' instead.\\") + username_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { eq: ... } } }' instead.\\") + username_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { gt: ... } } }' instead.\\") + username_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { gte: ... } } }' instead.\\") + username_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { lt: ... } } }' instead.\\") + username_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -814,43 +953,47 @@ describe("@relationship directive, aggregate argument", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -898,6 +1041,27 @@ describe("@relationship directive, aggregate argument", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -978,24 +1142,28 @@ describe("@relationship directive, aggregate argument", () => { } input ActorUpdateInput { - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type ActorsConnection { @@ -1030,6 +1198,26 @@ describe("@relationship directive, aggregate argument", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @@ -1040,6 +1228,7 @@ describe("@relationship directive, aggregate argument", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1058,6 +1247,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 } @@ -1090,36 +1298,38 @@ describe("@relationship directive, aggregate argument", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int + password: StringScalarAggregationFilters + password_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { eq: ... } } }' instead.\\") + password_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { gt: ... } } }' instead.\\") + password_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { gte: ... } } }' instead.\\") + password_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { lt: ... } } }' instead.\\") + password_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { lte: ... } } }' instead.\\") + password_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { eq: ... } } }' instead.\\") + password_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { gt: ... } } }' instead.\\") + password_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { gte: ... } } }' instead.\\") + password_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { lt: ... } } }' instead.\\") + password_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { lte: ... } } }' instead.\\") + password_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { eq: ... } } }' instead.\\") + password_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { gt: ... } } }' instead.\\") + password_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { gte: ... } } }' instead.\\") + password_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { lt: ... } } }' instead.\\") + password_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { lte: ... } } }' instead.\\") + username: StringScalarAggregationFilters + username_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { eq: ... } } }' instead.\\") + username_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { gt: ... } } }' instead.\\") + username_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { gte: ... } } }' instead.\\") + username_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { lt: ... } } }' instead.\\") + username_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { lte: ... } } }' instead.\\") + username_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { eq: ... } } }' instead.\\") + username_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { gt: ... } } }' instead.\\") + username_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { gte: ... } } }' instead.\\") + username_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { lt: ... } } }' instead.\\") + username_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { lte: ... } } }' instead.\\") + username_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { eq: ... } } }' instead.\\") + username_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { gt: ... } } }' instead.\\") + username_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { gte: ... } } }' instead.\\") + username_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { lt: ... } } }' instead.\\") + username_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -1168,43 +1378,47 @@ describe("@relationship directive, aggregate argument", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -1264,6 +1478,17 @@ describe("@relationship directive, aggregate argument", () => { Actor } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -1273,25 +1498,29 @@ describe("@relationship directive, aggregate argument", () => { } input PersonUpdateInput { - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - typename_IN: [PersonImplementation!] - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + typename: [PersonImplementation!] + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type Query { @@ -1319,6 +1548,27 @@ describe("@relationship directive, aggregate argument", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -1397,24 +1647,28 @@ describe("@relationship directive, aggregate argument", () => { } input ActorUpdateInput { - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type ActorsConnection { @@ -1449,6 +1703,26 @@ describe("@relationship directive, aggregate argument", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @@ -1460,6 +1734,7 @@ describe("@relationship directive, aggregate argument", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1478,6 +1753,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 } @@ -1510,36 +1804,38 @@ describe("@relationship directive, aggregate argument", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - password_AVERAGE_LENGTH_EQUAL: Float - password_AVERAGE_LENGTH_GT: Float - password_AVERAGE_LENGTH_GTE: Float - password_AVERAGE_LENGTH_LT: Float - password_AVERAGE_LENGTH_LTE: Float - password_LONGEST_LENGTH_EQUAL: Int - password_LONGEST_LENGTH_GT: Int - password_LONGEST_LENGTH_GTE: Int - password_LONGEST_LENGTH_LT: Int - password_LONGEST_LENGTH_LTE: Int - password_SHORTEST_LENGTH_EQUAL: Int - password_SHORTEST_LENGTH_GT: Int - password_SHORTEST_LENGTH_GTE: Int - password_SHORTEST_LENGTH_LT: Int - password_SHORTEST_LENGTH_LTE: Int - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int + password: StringScalarAggregationFilters + password_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { eq: ... } } }' instead.\\") + password_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { gt: ... } } }' instead.\\") + password_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { gte: ... } } }' instead.\\") + password_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { lt: ... } } }' instead.\\") + password_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'password: { averageLength: { lte: ... } } }' instead.\\") + password_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { eq: ... } } }' instead.\\") + password_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { gt: ... } } }' instead.\\") + password_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { gte: ... } } }' instead.\\") + password_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { lt: ... } } }' instead.\\") + password_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { longestLength: { lte: ... } } }' instead.\\") + password_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { eq: ... } } }' instead.\\") + password_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { gt: ... } } }' instead.\\") + password_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { gte: ... } } }' instead.\\") + password_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { lt: ... } } }' instead.\\") + password_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'password: { shortestLength: { lte: ... } } }' instead.\\") + username: StringScalarAggregationFilters + username_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { eq: ... } } }' instead.\\") + username_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { gt: ... } } }' instead.\\") + username_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { gte: ... } } }' instead.\\") + username_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { lt: ... } } }' instead.\\") + username_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'username: { averageLength: { lte: ... } } }' instead.\\") + username_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { eq: ... } } }' instead.\\") + username_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { gt: ... } } }' instead.\\") + username_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { gte: ... } } }' instead.\\") + username_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { lt: ... } } }' instead.\\") + username_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { longestLength: { lte: ... } } }' instead.\\") + username_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { eq: ... } } }' instead.\\") + username_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { gt: ... } } }' instead.\\") + username_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { gte: ... } } }' instead.\\") + username_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { lt: ... } } }' instead.\\") + username_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'username: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -1598,43 +1894,47 @@ describe("@relationship directive, aggregate argument", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -1694,6 +1994,17 @@ describe("@relationship directive, aggregate argument", () => { Actor } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -1703,25 +2014,29 @@ describe("@relationship directive, aggregate argument", () => { } input PersonUpdateInput { - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - typename_IN: [PersonImplementation!] - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + typename: [PersonImplementation!] + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type Query { @@ -1749,6 +2064,27 @@ describe("@relationship directive, aggregate argument", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -1835,24 +2171,28 @@ describe("@relationship directive, aggregate argument", () => { } input ActorUpdateInput { - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type ActorsConnection { @@ -1863,6 +2203,17 @@ describe("@relationship directive, aggregate argument", () => { union CastMember = Actor | Person + input CastMemberRelationshipFilters { + \\"\\"\\"Filter type where all of the related CastMembers match this filter\\"\\"\\" + all: CastMemberWhere + \\"\\"\\"Filter type where none of the related CastMembers match this filter\\"\\"\\" + none: CastMemberWhere + \\"\\"\\"Filter type where one of the related CastMembers match this filter\\"\\"\\" + single: CastMemberWhere + \\"\\"\\"Filter type where some of the related CastMembers match this filter\\"\\"\\" + some: CastMemberWhere + } + input CastMemberWhere { Actor: ActorWhere Person: PersonWhere @@ -1952,6 +2303,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 @@ -2046,42 +2416,46 @@ describe("@relationship directive, aggregate argument", () => { input MovieUpdateInput { actors: MovieActorsUpdateInput - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: CastMemberRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related CastMembers match this filter\\"\\"\\" - actors_ALL: CastMemberWhere + actors_ALL: CastMemberWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related CastMembers match this filter\\"\\"\\" - actors_NONE: CastMemberWhere + actors_NONE: CastMemberWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related CastMembers match this filter\\"\\"\\" - actors_SINGLE: CastMemberWhere + actors_SINGLE: CastMemberWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related CastMembers match this filter\\"\\"\\" - actors_SOME: CastMemberWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + actors_SOME: CastMemberWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -2146,18 +2520,20 @@ describe("@relationship directive, aggregate argument", () => { } input PersonUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type Query { @@ -2186,6 +2562,20 @@ describe("@relationship directive, aggregate argument", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -2274,24 +2664,28 @@ describe("@relationship directive, aggregate argument", () => { } input ActorUpdateInput { - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type ActorsConnection { @@ -2302,6 +2696,17 @@ describe("@relationship directive, aggregate argument", () => { union CastMember = Actor | Person + input CastMemberRelationshipFilters { + \\"\\"\\"Filter type where all of the related CastMembers match this filter\\"\\"\\" + all: CastMemberWhere + \\"\\"\\"Filter type where none of the related CastMembers match this filter\\"\\"\\" + none: CastMemberWhere + \\"\\"\\"Filter type where one of the related CastMembers match this filter\\"\\"\\" + single: CastMemberWhere + \\"\\"\\"Filter type where some of the related CastMembers match this filter\\"\\"\\" + some: CastMemberWhere + } + input CastMemberWhere { Actor: ActorWhere Person: PersonWhere @@ -2391,6 +2796,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 @@ -2485,42 +2909,46 @@ describe("@relationship directive, aggregate argument", () => { input MovieUpdateInput { actors: MovieActorsUpdateInput - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: CastMemberRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related CastMembers match this filter\\"\\"\\" - actors_ALL: CastMemberWhere + actors_ALL: CastMemberWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related CastMembers match this filter\\"\\"\\" - actors_NONE: CastMemberWhere + actors_NONE: CastMemberWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related CastMembers match this filter\\"\\"\\" - actors_SINGLE: CastMemberWhere + actors_SINGLE: CastMemberWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related CastMembers match this filter\\"\\"\\" - actors_SOME: CastMemberWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + actors_SOME: CastMemberWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -2585,18 +3013,20 @@ describe("@relationship directive, aggregate argument", () => { } input PersonUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type Query { @@ -2625,6 +3055,20 @@ describe("@relationship directive, aggregate argument", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! 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 1dcf7c8c8a..34c60e646d 100644 --- a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts @@ -76,9 +76,38 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Movie { @@ -92,6 +121,7 @@ describe("Relationship nested operations", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -106,6 +136,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 } @@ -121,21 +170,22 @@ describe("Relationship nested operations", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -145,7 +195,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -174,43 +223,47 @@ describe("Relationship nested operations", () => { } input MovieUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -260,6 +313,17 @@ describe("Relationship nested operations", () => { node: Person! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -268,18 +332,20 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type Query { @@ -304,6 +370,27 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -372,9 +459,38 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Movie { @@ -388,6 +504,7 @@ describe("Relationship nested operations", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -402,6 +519,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 } @@ -425,21 +561,22 @@ describe("Relationship nested operations", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -454,7 +591,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -485,43 +621,47 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -571,6 +711,17 @@ describe("Relationship nested operations", () => { node: Person! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -579,18 +730,20 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type Query { @@ -615,6 +768,27 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -683,9 +857,38 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Movie { @@ -699,6 +902,7 @@ describe("Relationship nested operations", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -717,6 +921,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 } @@ -736,21 +959,22 @@ describe("Relationship nested operations", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -765,7 +989,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -796,43 +1019,47 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -886,6 +1113,17 @@ describe("Relationship nested operations", () => { node: Person! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -894,18 +1132,20 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type Query { @@ -930,6 +1170,27 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -998,9 +1259,38 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Movie { @@ -1014,6 +1304,7 @@ describe("Relationship nested operations", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1028,6 +1319,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 } @@ -1043,21 +1353,22 @@ describe("Relationship nested operations", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -1076,7 +1387,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -1106,43 +1416,47 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -1192,6 +1506,17 @@ describe("Relationship nested operations", () => { node: Person! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -1200,18 +1525,20 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type Query { @@ -1236,6 +1563,27 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -1304,9 +1652,38 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Movie { @@ -1320,6 +1697,7 @@ describe("Relationship nested operations", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1334,6 +1712,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 } @@ -1353,21 +1750,22 @@ describe("Relationship nested operations", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -1382,7 +1780,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -1416,43 +1813,47 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -1502,6 +1903,17 @@ describe("Relationship nested operations", () => { node: Person! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -1510,18 +1922,20 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type Query { @@ -1546,6 +1960,27 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -1614,9 +2049,38 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Movie { @@ -1630,6 +2094,7 @@ describe("Relationship nested operations", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1644,6 +2109,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 } @@ -1663,21 +2147,22 @@ describe("Relationship nested operations", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -1692,7 +2177,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -1722,43 +2206,47 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -1808,6 +2296,17 @@ describe("Relationship nested operations", () => { node: Person! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -1816,18 +2315,20 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type Query { @@ -1852,6 +2353,27 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -1921,9 +2443,38 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Movie { @@ -1937,6 +2488,7 @@ describe("Relationship nested operations", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1951,6 +2503,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 } @@ -1966,21 +2537,22 @@ describe("Relationship nested operations", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -1990,7 +2562,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -2019,43 +2590,47 @@ describe("Relationship nested operations", () => { } input MovieUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -2105,6 +2680,17 @@ describe("Relationship nested operations", () => { node: Person! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -2113,18 +2699,20 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type Query { @@ -2149,6 +2737,27 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -2219,9 +2828,38 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Movie { @@ -2235,6 +2873,7 @@ describe("Relationship nested operations", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -2249,6 +2888,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 } @@ -2264,31 +2922,22 @@ describe("Relationship nested operations", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -2298,7 +2947,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -2316,7 +2964,6 @@ describe("Relationship nested operations", () => { } type MoviePersonActorsNodeAggregateSelection { - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -2328,43 +2975,47 @@ describe("Relationship nested operations", () => { } input MovieUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -2403,7 +3054,6 @@ describe("Relationship nested operations", () => { type PersonAggregateSelection { count: Int! - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -2416,6 +3066,17 @@ describe("Relationship nested operations", () => { node: Person! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -2425,23 +3086,26 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type Query { @@ -2466,6 +3130,27 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -2535,9 +3220,38 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Movie { @@ -2554,6 +3268,7 @@ describe("Relationship nested operations", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -2572,6 +3287,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 } @@ -2604,21 +3338,22 @@ describe("Relationship nested operations", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -2641,7 +3376,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -2680,6 +3414,7 @@ describe("Relationship nested operations", () => { AND: [MovieProducersAggregateInput!] NOT: MovieProducersAggregateInput OR: [MovieProducersAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -2694,6 +3429,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 } @@ -2713,21 +3467,22 @@ describe("Relationship nested operations", () => { AND: [MovieProducersNodeAggregationWhereInput!] NOT: MovieProducersNodeAggregationWhereInput OR: [MovieProducersNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieProducersRelationship { @@ -2749,7 +3504,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") producers: [MovieProducersUpdateFieldInput!] } @@ -2757,61 +3513,66 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + producers: PersonRelationshipFilters producersAggregate: MovieProducersAggregateInput + producersConnection: MovieProducersConnectionFilters \\"\\"\\" Return Movies where all of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_ALL: MovieProducersConnectionWhere + producersConnection_ALL: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_NONE: MovieProducersConnectionWhere + producersConnection_NONE: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_SINGLE: MovieProducersConnectionWhere + producersConnection_SINGLE: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_SOME: MovieProducersConnectionWhere + producersConnection_SOME: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - producers_ALL: PersonWhere + producers_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - producers_NONE: PersonWhere + producers_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - producers_SINGLE: PersonWhere + producers_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - producers_SOME: PersonWhere + producers_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { some: ... }' instead.\\") } type MoviesConnection { @@ -2865,6 +3626,17 @@ describe("Relationship nested operations", () => { node: Person! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -2873,18 +3645,20 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type Query { @@ -2909,6 +3683,27 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -2978,9 +3773,38 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Movie { @@ -2997,6 +3821,7 @@ describe("Relationship nested operations", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -3011,6 +3836,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 } @@ -3034,21 +3878,22 @@ describe("Relationship nested operations", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -3063,7 +3908,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -3098,6 +3942,7 @@ describe("Relationship nested operations", () => { AND: [MovieProducersAggregateInput!] NOT: MovieProducersAggregateInput OR: [MovieProducersAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -3112,6 +3957,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 } @@ -3131,21 +3995,22 @@ describe("Relationship nested operations", () => { AND: [MovieProducersNodeAggregationWhereInput!] NOT: MovieProducersNodeAggregationWhereInput OR: [MovieProducersNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieProducersRelationship { @@ -3167,7 +4032,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") producers: [MovieProducersUpdateFieldInput!] } @@ -3175,61 +4041,66 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + producers: PersonRelationshipFilters producersAggregate: MovieProducersAggregateInput + producersConnection: MovieProducersConnectionFilters \\"\\"\\" Return Movies where all of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_ALL: MovieProducersConnectionWhere + producersConnection_ALL: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_NONE: MovieProducersConnectionWhere + producersConnection_NONE: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_SINGLE: MovieProducersConnectionWhere + producersConnection_SINGLE: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_SOME: MovieProducersConnectionWhere + producersConnection_SOME: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - producers_ALL: PersonWhere + producers_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - producers_NONE: PersonWhere + producers_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - producers_SINGLE: PersonWhere + producers_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - producers_SOME: PersonWhere + producers_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { some: ... }' instead.\\") } type MoviesConnection { @@ -3279,6 +4150,17 @@ describe("Relationship nested operations", () => { node: Person! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -3287,18 +4169,20 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type Query { @@ -3323,6 +4207,27 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -3409,9 +4314,18 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -3426,6 +4340,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 @@ -3452,7 +4385,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -3472,42 +4404,46 @@ describe("Relationship nested operations", () => { } input MovieUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -3564,18 +4500,20 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type PersonOnesConnection { @@ -3584,6 +4522,17 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + type PersonTwo { nameTwo: String } @@ -3610,18 +4559,20 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - nameTwo_SET: String + nameTwo: StringScalarMutations + nameTwo_SET: String @deprecated(reason: \\"Please use the generic mutation 'nameTwo: { set: ... } }' instead.\\") } input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_EQ: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String + nameTwo: StringScalarFilters + nameTwo_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { contains: ... }\\") + nameTwo_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { endsWith: ... }\\") + nameTwo_EQ: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { eq: ... }\\") + nameTwo_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { in: ... }\\") + nameTwo_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { startsWith: ... }\\") } type PersonTwosConnection { @@ -3661,6 +4612,20 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -3745,9 +4710,18 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -3762,6 +4736,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 @@ -3824,7 +4817,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -3846,42 +4838,46 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: MovieActorsUpdateInput - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -3938,18 +4934,20 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type PersonOnesConnection { @@ -3958,6 +4956,17 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + type PersonTwo { nameTwo: String } @@ -3984,18 +4993,20 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - nameTwo_SET: String + nameTwo: StringScalarMutations + nameTwo_SET: String @deprecated(reason: \\"Please use the generic mutation 'nameTwo: { set: ... } }' instead.\\") } input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_EQ: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String + nameTwo: StringScalarFilters + nameTwo_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { contains: ... }\\") + nameTwo_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { endsWith: ... }\\") + nameTwo_EQ: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { eq: ... }\\") + nameTwo_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { in: ... }\\") + nameTwo_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { startsWith: ... }\\") } type PersonTwosConnection { @@ -4035,6 +5046,20 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -4119,9 +5144,18 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -4136,6 +5170,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 @@ -4198,7 +5251,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -4220,42 +5272,46 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: MovieActorsUpdateInput - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -4316,18 +5372,20 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type PersonOnesConnection { @@ -4336,6 +5394,17 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + type PersonTwo { nameTwo: String } @@ -4366,18 +5435,20 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - nameTwo_SET: String + nameTwo: StringScalarMutations + nameTwo_SET: String @deprecated(reason: \\"Please use the generic mutation 'nameTwo: { set: ... } }' instead.\\") } input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_EQ: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String + nameTwo: StringScalarFilters + nameTwo_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { contains: ... }\\") + nameTwo_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { endsWith: ... }\\") + nameTwo_EQ: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { eq: ... }\\") + nameTwo_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { in: ... }\\") + nameTwo_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { startsWith: ... }\\") } type PersonTwosConnection { @@ -4417,6 +5488,20 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -4501,9 +5586,18 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -4518,6 +5612,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 @@ -4567,7 +5680,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -4588,42 +5700,46 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: MovieActorsUpdateInput - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -4680,18 +5796,20 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type PersonOnesConnection { @@ -4700,6 +5818,17 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + type PersonTwo { nameTwo: String } @@ -4726,18 +5855,20 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - nameTwo_SET: String + nameTwo: StringScalarMutations + nameTwo_SET: String @deprecated(reason: \\"Please use the generic mutation 'nameTwo: { set: ... } }' instead.\\") } input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_EQ: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String + nameTwo: StringScalarFilters + nameTwo_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { contains: ... }\\") + nameTwo_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { endsWith: ... }\\") + nameTwo_EQ: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { eq: ... }\\") + nameTwo_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { in: ... }\\") + nameTwo_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { startsWith: ... }\\") } type PersonTwosConnection { @@ -4777,6 +5908,20 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -4861,9 +6006,18 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -4878,6 +6032,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 @@ -4932,7 +6105,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -4957,42 +6129,46 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: MovieActorsUpdateInput - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -5049,18 +6225,20 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type PersonOnesConnection { @@ -5069,6 +6247,17 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + type PersonTwo { nameTwo: String } @@ -5095,18 +6284,20 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - nameTwo_SET: String + nameTwo: StringScalarMutations + nameTwo_SET: String @deprecated(reason: \\"Please use the generic mutation 'nameTwo: { set: ... } }' instead.\\") } input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_EQ: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String + nameTwo: StringScalarFilters + nameTwo_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { contains: ... }\\") + nameTwo_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { endsWith: ... }\\") + nameTwo_EQ: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { eq: ... }\\") + nameTwo_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { in: ... }\\") + nameTwo_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { startsWith: ... }\\") } type PersonTwosConnection { @@ -5146,6 +6337,20 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -5230,9 +6435,18 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -5247,6 +6461,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 @@ -5296,7 +6529,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -5317,42 +6549,46 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: MovieActorsUpdateInput - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -5409,18 +6645,20 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type PersonOnesConnection { @@ -5429,6 +6667,17 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + type PersonTwo { nameTwo: String } @@ -5455,18 +6704,20 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - nameTwo_SET: String + nameTwo: StringScalarMutations + nameTwo_SET: String @deprecated(reason: \\"Please use the generic mutation 'nameTwo: { set: ... } }' instead.\\") } input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_EQ: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String + nameTwo: StringScalarFilters + nameTwo_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { contains: ... }\\") + nameTwo_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { endsWith: ... }\\") + nameTwo_EQ: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { eq: ... }\\") + nameTwo_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { in: ... }\\") + nameTwo_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { startsWith: ... }\\") } type PersonTwosConnection { @@ -5506,6 +6757,20 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -5591,9 +6856,18 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -5608,6 +6882,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 @@ -5634,7 +6927,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -5654,42 +6946,46 @@ describe("Relationship nested operations", () => { } input MovieUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -5746,18 +7042,20 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type PersonOnesConnection { @@ -5766,6 +7064,17 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + type PersonTwo { nameTwo: String } @@ -5792,18 +7101,20 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - nameTwo_SET: String + nameTwo: StringScalarMutations + nameTwo_SET: String @deprecated(reason: \\"Please use the generic mutation 'nameTwo: { set: ... } }' instead.\\") } input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_EQ: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String + nameTwo: StringScalarFilters + nameTwo_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { contains: ... }\\") + nameTwo_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { endsWith: ... }\\") + nameTwo_EQ: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { eq: ... }\\") + nameTwo_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { in: ... }\\") + nameTwo_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { startsWith: ... }\\") } type PersonTwosConnection { @@ -5843,6 +7154,20 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -5930,9 +7255,18 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -5947,6 +7281,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 @@ -5973,7 +7326,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -5993,42 +7345,46 @@ describe("Relationship nested operations", () => { } input MovieUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -6066,7 +7422,6 @@ describe("Relationship nested operations", () => { type PersonOneAggregateSelection { count: Int! - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -6088,23 +7443,26 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type PersonOnesConnection { @@ -6113,6 +7471,17 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + type PersonTwo { id: ID! nameTwo: String @@ -6120,7 +7489,6 @@ describe("Relationship nested operations", () => { type PersonTwoAggregateSelection { count: Int! - id: IDAggregateSelection! nameTwo: StringAggregateSelection! } @@ -6142,23 +7510,26 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - nameTwo_SET: String + nameTwo: StringScalarMutations + nameTwo_SET: String @deprecated(reason: \\"Please use the generic mutation 'nameTwo: { set: ... } }' instead.\\") } input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_EQ: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + nameTwo: StringScalarFilters + nameTwo_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { contains: ... }\\") + nameTwo_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { endsWith: ... }\\") + nameTwo_EQ: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { eq: ... }\\") + nameTwo_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { in: ... }\\") + nameTwo_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { startsWith: ... }\\") } type PersonTwosConnection { @@ -6198,6 +7569,20 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -6283,9 +7668,18 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -6302,6 +7696,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 @@ -6411,7 +7824,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -6434,6 +7846,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 @@ -6490,7 +7921,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: MovieActorsUpdateInput - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") producers: MovieProducersUpdateInput } @@ -6498,59 +7930,64 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + producers: PersonRelationshipFilters + producersConnection: MovieProducersConnectionFilters \\"\\"\\" Return Movies where all of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_ALL: MovieProducersConnectionWhere + producersConnection_ALL: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_NONE: MovieProducersConnectionWhere + producersConnection_NONE: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_SINGLE: MovieProducersConnectionWhere + producersConnection_SINGLE: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_SOME: MovieProducersConnectionWhere + producersConnection_SOME: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - producers_ALL: PersonWhere + producers_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - producers_NONE: PersonWhere + producers_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - producers_SINGLE: PersonWhere + producers_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - producers_SOME: PersonWhere + producers_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { some: ... }' instead.\\") } type MoviesConnection { @@ -6611,18 +8048,20 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type PersonOnesConnection { @@ -6631,6 +8070,17 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + type PersonTwo { nameTwo: String } @@ -6661,18 +8111,20 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - nameTwo_SET: String + nameTwo: StringScalarMutations + nameTwo_SET: String @deprecated(reason: \\"Please use the generic mutation 'nameTwo: { set: ... } }' instead.\\") } input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_EQ: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String + nameTwo: StringScalarFilters + nameTwo_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { contains: ... }\\") + nameTwo_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { endsWith: ... }\\") + nameTwo_EQ: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { eq: ... }\\") + nameTwo_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { in: ... }\\") + nameTwo_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { startsWith: ... }\\") } type PersonTwosConnection { @@ -6712,6 +8164,20 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -6797,9 +8263,18 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -6816,6 +8291,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 @@ -6878,7 +8372,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -6897,6 +8390,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 @@ -6953,7 +8465,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: MovieActorsUpdateInput - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") producers: MovieProducersUpdateInput } @@ -6961,59 +8474,64 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + producers: PersonRelationshipFilters + producersConnection: MovieProducersConnectionFilters \\"\\"\\" Return Movies where all of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_ALL: MovieProducersConnectionWhere + producersConnection_ALL: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_NONE: MovieProducersConnectionWhere + producersConnection_NONE: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_SINGLE: MovieProducersConnectionWhere + producersConnection_SINGLE: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_SOME: MovieProducersConnectionWhere + producersConnection_SOME: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - producers_ALL: PersonWhere + producers_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - producers_NONE: PersonWhere + producers_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - producers_SINGLE: PersonWhere + producers_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - producers_SOME: PersonWhere + producers_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { some: ... }' instead.\\") } type MoviesConnection { @@ -7070,18 +8588,20 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type PersonOnesConnection { @@ -7090,6 +8610,17 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + type PersonTwo { nameTwo: String } @@ -7116,18 +8647,20 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - nameTwo_SET: String + nameTwo: StringScalarMutations + nameTwo_SET: String @deprecated(reason: \\"Please use the generic mutation 'nameTwo: { set: ... } }' instead.\\") } input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_EQ: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String + nameTwo: StringScalarFilters + nameTwo_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { contains: ... }\\") + nameTwo_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { endsWith: ... }\\") + nameTwo_EQ: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { eq: ... }\\") + nameTwo_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { in: ... }\\") + nameTwo_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { startsWith: ... }\\") } type PersonTwosConnection { @@ -7167,6 +8700,20 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -7261,9 +8808,51 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int list filters\\"\\"\\" + input IntListFilters { + eq: [Int!] + includes: Int + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Mutations for a list for Int\\"\\"\\" + input ListIntMutations { + pop: Int + push: [Int!] + set: [Int!] } type Movie { @@ -7277,6 +8866,7 @@ describe("Relationship nested operations", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -7291,6 +8881,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 } @@ -7306,21 +8915,22 @@ describe("Relationship nested operations", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -7330,7 +8940,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -7359,43 +8968,47 @@ describe("Relationship nested operations", () => { } input MovieUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -7477,23 +9090,27 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name_SET: String - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] - someExtraProp_SET: [Int!] + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") + someExtraProp: ListIntMutations + someExtraProp_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { pop: ... } }' instead.\\") + someExtraProp_PUSH: [Int!] @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { push: ... } }' instead.\\") + someExtraProp_SET: [Int!] @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { set: ... } }' instead.\\") } input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp_EQ: [Int!] - someExtraProp_INCLUDES: Int + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + someExtraProp: IntListFilters + someExtraProp_EQ: [Int!] @deprecated(reason: \\"Please use the relevant generic filter someExtraProp: { eq: ... }\\") + someExtraProp_INCLUDES: Int @deprecated(reason: \\"Please use the relevant generic filter someExtraProp: { includes: ... }\\") } type PersonOnesConnection { @@ -7502,6 +9119,17 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -7535,18 +9163,20 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type PersonTwosConnection { @@ -7559,12 +9189,13 @@ describe("Relationship nested operations", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + typename: [PersonImplementation!] } type Query { @@ -7590,9 +9221,30 @@ describe("Relationship nested operations", () => { DESC } - type StringAggregateSelection { - longest: String - shortest: String + type StringAggregateSelection { + longest: String + shortest: String + } + + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String } \\"\\"\\" @@ -7682,9 +9334,51 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int list filters\\"\\"\\" + input IntListFilters { + eq: [Int!] + includes: Int + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Mutations for a list for Int\\"\\"\\" + input ListIntMutations { + pop: Int + push: [Int!] + set: [Int!] } type Movie { @@ -7698,6 +9392,7 @@ describe("Relationship nested operations", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -7712,6 +9407,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 } @@ -7735,21 +9449,22 @@ describe("Relationship nested operations", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -7764,7 +9479,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -7795,43 +9509,47 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -7918,23 +9636,27 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name_SET: String - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] - someExtraProp_SET: [Int!] + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") + someExtraProp: ListIntMutations + someExtraProp_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { pop: ... } }' instead.\\") + someExtraProp_PUSH: [Int!] @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { push: ... } }' instead.\\") + someExtraProp_SET: [Int!] @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { set: ... } }' instead.\\") } input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp_EQ: [Int!] - someExtraProp_INCLUDES: Int + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + someExtraProp: IntListFilters + someExtraProp_EQ: [Int!] @deprecated(reason: \\"Please use the relevant generic filter someExtraProp: { eq: ... }\\") + someExtraProp_INCLUDES: Int @deprecated(reason: \\"Please use the relevant generic filter someExtraProp: { includes: ... }\\") } type PersonOnesConnection { @@ -7943,6 +9665,17 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -7976,18 +9709,20 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type PersonTwosConnection { @@ -8000,12 +9735,13 @@ describe("Relationship nested operations", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + typename: [PersonImplementation!] } type Query { @@ -8036,6 +9772,27 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -8123,9 +9880,51 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int list filters\\"\\"\\" + input IntListFilters { + eq: [Int!] + includes: Int + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Mutations for a list for Int\\"\\"\\" + input ListIntMutations { + pop: Int + push: [Int!] + set: [Int!] } type Movie { @@ -8139,6 +9938,7 @@ describe("Relationship nested operations", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -8157,6 +9957,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 } @@ -8176,21 +9995,22 @@ describe("Relationship nested operations", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -8205,7 +10025,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -8236,43 +10055,47 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -8358,23 +10181,27 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name_SET: String - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] - someExtraProp_SET: [Int!] + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") + someExtraProp: ListIntMutations + someExtraProp_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { pop: ... } }' instead.\\") + someExtraProp_PUSH: [Int!] @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { push: ... } }' instead.\\") + someExtraProp_SET: [Int!] @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { set: ... } }' instead.\\") } input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp_EQ: [Int!] - someExtraProp_INCLUDES: Int + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + someExtraProp: IntListFilters + someExtraProp_EQ: [Int!] @deprecated(reason: \\"Please use the relevant generic filter someExtraProp: { eq: ... }\\") + someExtraProp_INCLUDES: Int @deprecated(reason: \\"Please use the relevant generic filter someExtraProp: { includes: ... }\\") } type PersonOnesConnection { @@ -8383,6 +10210,17 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -8416,18 +10254,20 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type PersonTwosConnection { @@ -8440,12 +10280,13 @@ describe("Relationship nested operations", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + typename: [PersonImplementation!] } type Query { @@ -8476,6 +10317,27 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -8563,9 +10425,51 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int list filters\\"\\"\\" + input IntListFilters { + eq: [Int!] + includes: Int + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Mutations for a list for Int\\"\\"\\" + input ListIntMutations { + pop: Int + push: [Int!] + set: [Int!] } type Movie { @@ -8579,6 +10483,7 @@ describe("Relationship nested operations", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -8593,6 +10498,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 } @@ -8608,21 +10532,22 @@ describe("Relationship nested operations", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -8641,7 +10566,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -8671,43 +10595,47 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -8789,23 +10717,27 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name_SET: String - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] - someExtraProp_SET: [Int!] + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") + someExtraProp: ListIntMutations + someExtraProp_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { pop: ... } }' instead.\\") + someExtraProp_PUSH: [Int!] @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { push: ... } }' instead.\\") + someExtraProp_SET: [Int!] @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { set: ... } }' instead.\\") } input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp_EQ: [Int!] - someExtraProp_INCLUDES: Int + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + someExtraProp: IntListFilters + someExtraProp_EQ: [Int!] @deprecated(reason: \\"Please use the relevant generic filter someExtraProp: { eq: ... }\\") + someExtraProp_INCLUDES: Int @deprecated(reason: \\"Please use the relevant generic filter someExtraProp: { includes: ... }\\") } type PersonOnesConnection { @@ -8814,6 +10746,17 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -8847,18 +10790,20 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type PersonTwosConnection { @@ -8868,19 +10813,21 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + typename: [PersonImplementation!] } type Query { @@ -8911,6 +10858,27 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -8998,9 +10966,51 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int list filters\\"\\"\\" + input IntListFilters { + eq: [Int!] + includes: Int + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Mutations for a list for Int\\"\\"\\" + input ListIntMutations { + pop: Int + push: [Int!] + set: [Int!] } type Movie { @@ -9014,6 +11024,7 @@ describe("Relationship nested operations", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -9028,6 +11039,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 } @@ -9047,21 +11077,22 @@ describe("Relationship nested operations", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -9076,7 +11107,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -9110,43 +11140,47 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -9228,23 +11262,27 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name_SET: String - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] - someExtraProp_SET: [Int!] + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") + someExtraProp: ListIntMutations + someExtraProp_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { pop: ... } }' instead.\\") + someExtraProp_PUSH: [Int!] @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { push: ... } }' instead.\\") + someExtraProp_SET: [Int!] @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { set: ... } }' instead.\\") } input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp_EQ: [Int!] - someExtraProp_INCLUDES: Int + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + someExtraProp: IntListFilters + someExtraProp_EQ: [Int!] @deprecated(reason: \\"Please use the relevant generic filter someExtraProp: { eq: ... }\\") + someExtraProp_INCLUDES: Int @deprecated(reason: \\"Please use the relevant generic filter someExtraProp: { includes: ... }\\") } type PersonOnesConnection { @@ -9253,6 +11291,17 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -9286,18 +11335,20 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type PersonTwosConnection { @@ -9310,12 +11361,13 @@ describe("Relationship nested operations", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + typename: [PersonImplementation!] } type Query { @@ -9346,6 +11398,27 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -9433,9 +11506,51 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int list filters\\"\\"\\" + input IntListFilters { + eq: [Int!] + includes: Int + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Mutations for a list for Int\\"\\"\\" + input ListIntMutations { + pop: Int + push: [Int!] + set: [Int!] } type Movie { @@ -9449,6 +11564,7 @@ describe("Relationship nested operations", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -9463,6 +11579,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 } @@ -9482,21 +11617,22 @@ describe("Relationship nested operations", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -9511,7 +11647,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -9541,43 +11676,47 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -9659,23 +11798,27 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name_SET: String - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] - someExtraProp_SET: [Int!] + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") + someExtraProp: ListIntMutations + someExtraProp_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { pop: ... } }' instead.\\") + someExtraProp_PUSH: [Int!] @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { push: ... } }' instead.\\") + someExtraProp_SET: [Int!] @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { set: ... } }' instead.\\") } input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp_EQ: [Int!] - someExtraProp_INCLUDES: Int + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + someExtraProp: IntListFilters + someExtraProp_EQ: [Int!] @deprecated(reason: \\"Please use the relevant generic filter someExtraProp: { eq: ... }\\") + someExtraProp_INCLUDES: Int @deprecated(reason: \\"Please use the relevant generic filter someExtraProp: { includes: ... }\\") } type PersonOnesConnection { @@ -9684,6 +11827,17 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -9717,18 +11871,20 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type PersonTwosConnection { @@ -9741,12 +11897,13 @@ describe("Relationship nested operations", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + typename: [PersonImplementation!] } type Query { @@ -9777,6 +11934,27 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -9865,9 +12043,51 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int list filters\\"\\"\\" + input IntListFilters { + eq: [Int!] + includes: Int + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Mutations for a list for Int\\"\\"\\" + input ListIntMutations { + pop: Int + push: [Int!] + set: [Int!] } type Movie { @@ -9884,6 +12104,7 @@ describe("Relationship nested operations", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -9902,6 +12123,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 } @@ -9934,21 +12174,22 @@ describe("Relationship nested operations", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -9971,7 +12212,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -10010,6 +12250,7 @@ describe("Relationship nested operations", () => { AND: [MovieProducersAggregateInput!] NOT: MovieProducersAggregateInput OR: [MovieProducersAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -10024,6 +12265,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 } @@ -10043,21 +12303,22 @@ describe("Relationship nested operations", () => { AND: [MovieProducersNodeAggregationWhereInput!] NOT: MovieProducersNodeAggregationWhereInput OR: [MovieProducersNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieProducersRelationship { @@ -10079,7 +12340,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") producers: [MovieProducersUpdateFieldInput!] } @@ -10087,61 +12349,66 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + producers: PersonRelationshipFilters producersAggregate: MovieProducersAggregateInput + producersConnection: MovieProducersConnectionFilters \\"\\"\\" Return Movies where all of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_ALL: MovieProducersConnectionWhere + producersConnection_ALL: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_NONE: MovieProducersConnectionWhere + producersConnection_NONE: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_SINGLE: MovieProducersConnectionWhere + producersConnection_SINGLE: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_SOME: MovieProducersConnectionWhere + producersConnection_SOME: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - producers_ALL: PersonWhere + producers_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - producers_NONE: PersonWhere + producers_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - producers_SINGLE: PersonWhere + producers_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - producers_SOME: PersonWhere + producers_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { some: ... }' instead.\\") } type MoviesConnection { @@ -10232,23 +12499,27 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name_SET: String - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] - someExtraProp_SET: [Int!] + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") + someExtraProp: ListIntMutations + someExtraProp_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { pop: ... } }' instead.\\") + someExtraProp_PUSH: [Int!] @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { push: ... } }' instead.\\") + someExtraProp_SET: [Int!] @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { set: ... } }' instead.\\") } input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp_EQ: [Int!] - someExtraProp_INCLUDES: Int + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + someExtraProp: IntListFilters + someExtraProp_EQ: [Int!] @deprecated(reason: \\"Please use the relevant generic filter someExtraProp: { eq: ... }\\") + someExtraProp_INCLUDES: Int @deprecated(reason: \\"Please use the relevant generic filter someExtraProp: { includes: ... }\\") } type PersonOnesConnection { @@ -10257,6 +12528,17 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -10290,18 +12572,20 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type PersonTwosConnection { @@ -10311,19 +12595,21 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + typename: [PersonImplementation!] } type Query { @@ -10354,6 +12640,27 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -10443,9 +12750,51 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int list filters\\"\\"\\" + input IntListFilters { + eq: [Int!] + includes: Int + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Mutations for a list for Int\\"\\"\\" + input ListIntMutations { + pop: Int + push: [Int!] + set: [Int!] } type Movie { @@ -10462,6 +12811,7 @@ describe("Relationship nested operations", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -10476,6 +12826,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 } @@ -10503,21 +12872,22 @@ describe("Relationship nested operations", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -10533,7 +12903,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -10572,6 +12941,7 @@ describe("Relationship nested operations", () => { AND: [MovieProducersAggregateInput!] NOT: MovieProducersAggregateInput OR: [MovieProducersAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -10586,6 +12956,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 } @@ -10605,21 +12994,22 @@ describe("Relationship nested operations", () => { AND: [MovieProducersNodeAggregationWhereInput!] NOT: MovieProducersNodeAggregationWhereInput OR: [MovieProducersNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieProducersRelationship { @@ -10641,7 +13031,8 @@ describe("Relationship nested operations", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") producers: [MovieProducersUpdateFieldInput!] } @@ -10649,61 +13040,66 @@ describe("Relationship nested operations", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + producers: PersonRelationshipFilters producersAggregate: MovieProducersAggregateInput + producersConnection: MovieProducersConnectionFilters \\"\\"\\" Return Movies where all of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_ALL: MovieProducersConnectionWhere + producersConnection_ALL: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_NONE: MovieProducersConnectionWhere + producersConnection_NONE: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_SINGLE: MovieProducersConnectionWhere + producersConnection_SINGLE: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieProducersConnections match this filter \\"\\"\\" - producersConnection_SOME: MovieProducersConnectionWhere + producersConnection_SOME: MovieProducersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'producersConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - producers_ALL: PersonWhere + producers_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - producers_NONE: PersonWhere + producers_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - producers_SINGLE: PersonWhere + producers_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - producers_SOME: PersonWhere + producers_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'producers: { some: ... }' instead.\\") } type MoviesConnection { @@ -10790,23 +13186,27 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name_SET: String - someExtraProp_POP: Int - someExtraProp_PUSH: [Int!] - someExtraProp_SET: [Int!] + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") + someExtraProp: ListIntMutations + someExtraProp_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { pop: ... } }' instead.\\") + someExtraProp_PUSH: [Int!] @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { push: ... } }' instead.\\") + someExtraProp_SET: [Int!] @deprecated(reason: \\"Please use the generic mutation 'someExtraProp: { set: ... } }' instead.\\") } input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - someExtraProp_EQ: [Int!] - someExtraProp_INCLUDES: Int + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + someExtraProp: IntListFilters + someExtraProp_EQ: [Int!] @deprecated(reason: \\"Please use the relevant generic filter someExtraProp: { eq: ... }\\") + someExtraProp_INCLUDES: Int @deprecated(reason: \\"Please use the relevant generic filter someExtraProp: { includes: ... }\\") } type PersonOnesConnection { @@ -10815,6 +13215,17 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -10848,18 +13259,20 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type PersonTwosConnection { @@ -10872,12 +13285,13 @@ describe("Relationship nested operations", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + typename: [PersonImplementation!] } type Query { @@ -10908,6 +13322,27 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" diff --git a/packages/graphql/tests/schema/directives/relationship-properties.test.ts b/packages/graphql/tests/schema/directives/relationship-properties.test.ts index feab88944d..61605dd344 100644 --- a/packages/graphql/tests/schema/directives/relationship-properties.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-properties.test.ts @@ -65,26 +65,27 @@ describe("Relationship-properties", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_MAX_EQUAL: Int - screenTime_MAX_GT: Int - screenTime_MAX_GTE: Int - screenTime_MAX_LT: Int - screenTime_MAX_LTE: Int - screenTime_MIN_EQUAL: Int - screenTime_MIN_GT: Int - screenTime_MIN_GTE: Int - screenTime_MIN_LT: Int - screenTime_MIN_LTE: Int - screenTime_SUM_EQUAL: Int - screenTime_SUM_GT: Int - screenTime_SUM_GTE: Int - screenTime_SUM_LT: Int - screenTime_SUM_LTE: Int + screenTime: IntScalarAggregationFilters + screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { eq: ... } } }' instead.\\") + screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gt: ... } } }' instead.\\") + screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gte: ... } } }' instead.\\") + screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lt: ... } } }' instead.\\") + screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lte: ... } } }' instead.\\") + screenTime_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { eq: ... } } }' instead.\\") + screenTime_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gt: ... } } }' instead.\\") + screenTime_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gte: ... } } }' instead.\\") + screenTime_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lt: ... } } }' instead.\\") + screenTime_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lte: ... } } }' instead.\\") + screenTime_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { eq: ... } } }' instead.\\") + screenTime_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gt: ... } } }' instead.\\") + screenTime_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gte: ... } } }' instead.\\") + screenTime_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lt: ... } } }' instead.\\") + screenTime_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lte: ... } } }' instead.\\") + screenTime_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { eq: ... } } }' instead.\\") + screenTime_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gt: ... } } }' instead.\\") + screenTime_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gte: ... } } }' instead.\\") + screenTime_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lt: ... } } }' instead.\\") + screenTime_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lte: ... } } }' instead.\\") } input ActedInCreateInput { @@ -100,30 +101,36 @@ describe("Relationship-properties", () => { } input ActedInUpdateInput { - leadRole_SET: Boolean - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - screenTime_SET: Int - startDate_SET: Date + leadRole: BooleanScalarMutations + leadRole_SET: Boolean @deprecated(reason: \\"Please use the generic mutation 'leadRole: { set: ... } }' instead.\\") + screenTime: IntScalarMutations + screenTime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { decrement: ... } }' instead.\\") + screenTime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { increment: ... } }' instead.\\") + screenTime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'screenTime: { set: ... } }' instead.\\") + startDate: DateScalarMutations + startDate_SET: Date @deprecated(reason: \\"Please use the generic mutation 'startDate: { set: ... } }' instead.\\") } input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - leadRole_EQ: Boolean - screenTime_EQ: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int - startDate_EQ: Date - startDate_GT: Date - startDate_GTE: Date - startDate_IN: [Date!] - startDate_LT: Date - startDate_LTE: Date + leadRole: BooleanScalarFilters + leadRole_EQ: Boolean @deprecated(reason: \\"Please use the relevant generic filter leadRole: { eq: ... }\\") + screenTime: IntScalarFilters + screenTime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { eq: ... }\\") + screenTime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gt: ... }\\") + screenTime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gte: ... }\\") + screenTime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter screenTime: { in: ... }\\") + screenTime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lt: ... }\\") + screenTime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lte: ... }\\") + startDate: DateScalarFilters + startDate_EQ: Date @deprecated(reason: \\"Please use the relevant generic filter startDate: { eq: ... }\\") + startDate_GT: Date @deprecated(reason: \\"Please use the relevant generic filter startDate: { gt: ... }\\") + startDate_GTE: Date @deprecated(reason: \\"Please use the relevant generic filter startDate: { gte: ... }\\") + startDate_IN: [Date!] @deprecated(reason: \\"Please use the relevant generic filter startDate: { in: ... }\\") + startDate_LT: Date @deprecated(reason: \\"Please use the relevant generic filter startDate: { lt: ... }\\") + startDate_LTE: Date @deprecated(reason: \\"Please use the relevant generic filter startDate: { lte: ... }\\") } type Actor { @@ -182,6 +189,7 @@ describe("Relationship-properties", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -203,6 +211,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 @@ -240,21 +267,22 @@ describe("Relationship-properties", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -277,6 +305,17 @@ describe("Relationship-properties", () => { where: ActorMoviesConnectionWhere } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -286,43 +325,47 @@ describe("Relationship-properties", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -331,6 +374,16 @@ describe("Relationship-properties", () => { totalCount: Int! } + \\"\\"\\"Boolean filters\\"\\"\\" + input BooleanScalarFilters { + eq: Boolean + } + + \\"\\"\\"Boolean mutations\\"\\"\\" + input BooleanScalarMutations { + set: Boolean + } + type CreateActorsMutationResponse { actors: [Actor!]! info: CreateInfo! @@ -352,6 +405,21 @@ describe("Relationship-properties", () => { \\"\\"\\"A date, represented as a 'yyyy-mm-dd' string\\"\\"\\" scalar Date + \\"\\"\\"Date filters\\"\\"\\" + input DateScalarFilters { + eq: Date + gt: Date + gte: Date + in: [Date!] + lt: Date + lte: Date + } + + \\"\\"\\"Date mutations\\"\\"\\" + input DateScalarMutations { + set: Date + } + \\"\\"\\" Information about the number of nodes and relationships deleted during a delete mutation \\"\\"\\" @@ -360,6 +428,16 @@ describe("Relationship-properties", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + type IntAggregateSelection { average: Float max: Int @@ -367,6 +445,31 @@ describe("Relationship-properties", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -392,6 +495,7 @@ describe("Relationship-properties", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -413,6 +517,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 @@ -450,21 +573,22 @@ describe("Relationship-properties", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -518,6 +642,17 @@ describe("Relationship-properties", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -527,43 +662,47 @@ describe("Relationship-properties", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -611,6 +750,27 @@ describe("Relationship-properties", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -675,46 +835,38 @@ describe("Relationship-properties", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_MAX_EQUAL: Int - screenTime_MAX_GT: Int - screenTime_MAX_GTE: Int - screenTime_MAX_LT: Int - screenTime_MAX_LTE: Int - screenTime_MIN_EQUAL: Int - screenTime_MIN_GT: Int - screenTime_MIN_GTE: Int - screenTime_MIN_LT: Int - screenTime_MIN_LTE: Int - screenTime_SUM_EQUAL: Int - screenTime_SUM_GT: Int - screenTime_SUM_GTE: Int - screenTime_SUM_LT: Int - screenTime_SUM_LTE: Int - timestamp_MAX_EQUAL: DateTime - timestamp_MAX_GT: DateTime - timestamp_MAX_GTE: DateTime - timestamp_MAX_LT: DateTime - timestamp_MAX_LTE: DateTime - timestamp_MIN_EQUAL: DateTime - timestamp_MIN_GT: DateTime - timestamp_MIN_GTE: DateTime - timestamp_MIN_LT: DateTime - timestamp_MIN_LTE: DateTime + screenTime: IntScalarAggregationFilters + screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { eq: ... } } }' instead.\\") + screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gt: ... } } }' instead.\\") + screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gte: ... } } }' instead.\\") + screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lt: ... } } }' instead.\\") + screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lte: ... } } }' instead.\\") + screenTime_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { eq: ... } } }' instead.\\") + screenTime_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gt: ... } } }' instead.\\") + screenTime_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gte: ... } } }' instead.\\") + screenTime_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lt: ... } } }' instead.\\") + screenTime_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lte: ... } } }' instead.\\") + screenTime_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { eq: ... } } }' instead.\\") + screenTime_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gt: ... } } }' instead.\\") + screenTime_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gte: ... } } }' instead.\\") + screenTime_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lt: ... } } }' instead.\\") + screenTime_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lte: ... } } }' instead.\\") + screenTime_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { eq: ... } } }' instead.\\") + screenTime_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gt: ... } } }' instead.\\") + screenTime_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gte: ... } } }' instead.\\") + screenTime_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lt: ... } } }' instead.\\") + screenTime_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lte: ... } } }' instead.\\") + timestamp: DateTimeScalarAggregationFilters + timestamp_MAX_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'timestamp: { max: { eq: ... } } }' instead.\\") + timestamp_MAX_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'timestamp: { max: { gt: ... } } }' instead.\\") + timestamp_MAX_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'timestamp: { max: { gte: ... } } }' instead.\\") + timestamp_MAX_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'timestamp: { max: { lt: ... } } }' instead.\\") + timestamp_MAX_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'timestamp: { max: { lte: ... } } }' instead.\\") + timestamp_MIN_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'timestamp: { min: { eq: ... } } }' instead.\\") + timestamp_MIN_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'timestamp: { min: { gt: ... } } }' instead.\\") + timestamp_MIN_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'timestamp: { min: { gte: ... } } }' instead.\\") + timestamp_MIN_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'timestamp: { min: { lt: ... } } }' instead.\\") + timestamp_MIN_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'timestamp: { min: { lte: ... } } }' instead.\\") } input ActedInCreateInput { @@ -728,32 +880,36 @@ describe("Relationship-properties", () => { } input ActedInUpdateInput { - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - screenTime_SET: Int + screenTime: IntScalarMutations + screenTime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { decrement: ... } }' instead.\\") + screenTime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { increment: ... } }' instead.\\") + screenTime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'screenTime: { set: ... } }' instead.\\") } input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - screenTime_EQ: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int - timestamp_EQ: DateTime - timestamp_GT: DateTime - timestamp_GTE: DateTime - timestamp_IN: [DateTime!] - timestamp_LT: DateTime - timestamp_LTE: DateTime + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + screenTime: IntScalarFilters + screenTime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { eq: ... }\\") + screenTime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gt: ... }\\") + screenTime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gte: ... }\\") + screenTime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter screenTime: { in: ... }\\") + screenTime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lt: ... }\\") + screenTime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lte: ... }\\") + timestamp: DateTimeScalarFilters + timestamp_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter timestamp: { eq: ... }\\") + timestamp_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter timestamp: { gt: ... }\\") + timestamp_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter timestamp: { gte: ... }\\") + timestamp_IN: [DateTime!] @deprecated(reason: \\"Please use the relevant generic filter timestamp: { in: ... }\\") + timestamp_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter timestamp: { lt: ... }\\") + timestamp_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter timestamp: { lte: ... }\\") } type Actor { @@ -801,7 +957,6 @@ describe("Relationship-properties", () => { } type ActorMovieMoviesEdgeAggregateSelection { - id: IDAggregateSelection! screenTime: IntAggregateSelection! timestamp: DateTimeAggregateSelection! } @@ -814,6 +969,7 @@ describe("Relationship-properties", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -835,6 +991,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 @@ -872,21 +1047,22 @@ describe("Relationship-properties", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -909,6 +1085,17 @@ describe("Relationship-properties", () => { where: ActorMoviesConnectionWhere } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -918,43 +1105,47 @@ describe("Relationship-properties", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -989,6 +1180,22 @@ describe("Relationship-properties", () => { min: DateTime } + \\"\\"\\"Filters for an aggregation of an DateTime input field\\"\\"\\" + input DateTimeScalarAggregationFilters { + max: DateTimeScalarFilters + min: DateTimeScalarFilters + } + + \\"\\"\\"DateTime filters\\"\\"\\" + input DateTimeScalarFilters { + eq: DateTime + gt: DateTime + gte: DateTime + in: [DateTime!] + lt: DateTime + lte: DateTime + } + \\"\\"\\" Information about the number of nodes and relationships deleted during a delete mutation \\"\\"\\" @@ -997,9 +1204,23 @@ describe("Relationship-properties", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID } type IntAggregateSelection { @@ -1009,6 +1230,31 @@ describe("Relationship-properties", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -1023,7 +1269,6 @@ describe("Relationship-properties", () => { } type MovieActorActorsEdgeAggregateSelection { - id: IDAggregateSelection! screenTime: IntAggregateSelection! timestamp: DateTimeAggregateSelection! } @@ -1036,6 +1281,7 @@ describe("Relationship-properties", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1057,6 +1303,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 @@ -1094,21 +1359,22 @@ describe("Relationship-properties", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -1162,6 +1428,17 @@ describe("Relationship-properties", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -1171,43 +1448,47 @@ describe("Relationship-properties", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -1255,6 +1536,27 @@ describe("Relationship-properties", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -1317,26 +1619,17 @@ describe("Relationship-properties", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - timestamp_MAX_EQUAL: DateTime - timestamp_MAX_GT: DateTime - timestamp_MAX_GTE: DateTime - timestamp_MAX_LT: DateTime - timestamp_MAX_LTE: DateTime - timestamp_MIN_EQUAL: DateTime - timestamp_MIN_GT: DateTime - timestamp_MIN_GTE: DateTime - timestamp_MIN_LT: DateTime - timestamp_MIN_LTE: DateTime + timestamp: DateTimeScalarAggregationFilters + timestamp_MAX_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'timestamp: { max: { eq: ... } } }' instead.\\") + timestamp_MAX_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'timestamp: { max: { gt: ... } } }' instead.\\") + timestamp_MAX_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'timestamp: { max: { gte: ... } } }' instead.\\") + timestamp_MAX_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'timestamp: { max: { lt: ... } } }' instead.\\") + timestamp_MAX_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'timestamp: { max: { lte: ... } } }' instead.\\") + timestamp_MIN_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'timestamp: { min: { eq: ... } } }' instead.\\") + timestamp_MIN_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'timestamp: { min: { gt: ... } } }' instead.\\") + timestamp_MIN_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'timestamp: { min: { gte: ... } } }' instead.\\") + timestamp_MIN_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'timestamp: { min: { lt: ... } } }' instead.\\") + timestamp_MIN_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'timestamp: { min: { lte: ... } } }' instead.\\") } input ActedInSort { @@ -1348,17 +1641,19 @@ describe("Relationship-properties", () => { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - timestamp_EQ: DateTime - timestamp_GT: DateTime - timestamp_GTE: DateTime - timestamp_IN: [DateTime!] - timestamp_LT: DateTime - timestamp_LTE: DateTime + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + timestamp: DateTimeScalarFilters + timestamp_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter timestamp: { eq: ... }\\") + timestamp_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter timestamp: { gt: ... }\\") + timestamp_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter timestamp: { gte: ... }\\") + timestamp_IN: [DateTime!] @deprecated(reason: \\"Please use the relevant generic filter timestamp: { in: ... }\\") + timestamp_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter timestamp: { lt: ... }\\") + timestamp_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter timestamp: { lte: ... }\\") } type Actor { @@ -1406,7 +1701,6 @@ describe("Relationship-properties", () => { } type ActorMovieMoviesEdgeAggregateSelection { - id: IDAggregateSelection! timestamp: DateTimeAggregateSelection! } @@ -1418,6 +1712,7 @@ describe("Relationship-properties", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1438,6 +1733,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 @@ -1474,21 +1788,22 @@ describe("Relationship-properties", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -1510,6 +1825,17 @@ describe("Relationship-properties", () => { where: ActorMoviesConnectionWhere } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -1519,43 +1845,47 @@ describe("Relationship-properties", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -1590,6 +1920,22 @@ describe("Relationship-properties", () => { min: DateTime } + \\"\\"\\"Filters for an aggregation of an DateTime input field\\"\\"\\" + input DateTimeScalarAggregationFilters { + max: DateTimeScalarFilters + min: DateTimeScalarFilters + } + + \\"\\"\\"DateTime filters\\"\\"\\" + input DateTimeScalarFilters { + eq: DateTime + gt: DateTime + gte: DateTime + in: [DateTime!] + lt: DateTime + lte: DateTime + } + \\"\\"\\" Information about the number of nodes and relationships deleted during a delete mutation \\"\\"\\" @@ -1598,9 +1944,33 @@ describe("Relationship-properties", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Movie { @@ -1617,7 +1987,6 @@ describe("Relationship-properties", () => { } type MovieActorActorsEdgeAggregateSelection { - id: IDAggregateSelection! timestamp: DateTimeAggregateSelection! } @@ -1629,6 +1998,7 @@ describe("Relationship-properties", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1649,6 +2019,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 @@ -1685,21 +2074,22 @@ describe("Relationship-properties", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -1752,6 +2142,17 @@ describe("Relationship-properties", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -1761,43 +2162,47 @@ describe("Relationship-properties", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -1845,6 +2250,27 @@ describe("Relationship-properties", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/directives/relationship.test.ts b/packages/graphql/tests/schema/directives/relationship.test.ts index 0da8509c87..f3fc4a7a28 100644 --- a/packages/graphql/tests/schema/directives/relationship.test.ts +++ b/packages/graphql/tests/schema/directives/relationship.test.ts @@ -84,23 +84,18 @@ describe("Relationship", () => { type ActorMovieMoviesAggregationSelection { count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesNodeAggregateSelection { - id: IDAggregateSelection! } input ActorMoviesAggregateInput { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int count_LT: Int count_LTE: Int - node: ActorMoviesNodeAggregationWhereInput } input ActorMoviesConnectFieldInput { @@ -114,6 +109,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 } @@ -144,22 +158,6 @@ describe("Relationship", () => { create: [ActorMoviesCreateFieldInput!] } - input ActorMoviesNodeAggregationWhereInput { - AND: [ActorMoviesNodeAggregationWhereInput!] - NOT: ActorMoviesNodeAggregationWhereInput - OR: [ActorMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - } - type ActorMoviesRelationship { cursor: String! node: Movie! @@ -178,6 +176,17 @@ describe("Relationship", () => { where: ActorMoviesConnectionWhere } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -187,43 +196,47 @@ describe("Relationship", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -258,9 +271,38 @@ describe("Relationship", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Movie { @@ -283,6 +325,7 @@ describe("Relationship", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -302,6 +345,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 } @@ -336,21 +398,22 @@ describe("Relationship", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -373,7 +436,6 @@ describe("Relationship", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieConnectInput { @@ -402,6 +464,17 @@ describe("Relationship", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -411,43 +484,47 @@ describe("Relationship", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -495,6 +572,27 @@ describe("Relationship", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/directives/selectable.test.ts b/packages/graphql/tests/schema/directives/selectable.test.ts index 404066d319..1caf5630f7 100644 --- a/packages/graphql/tests/schema/directives/selectable.test.ts +++ b/packages/graphql/tests/schema/directives/selectable.test.ts @@ -89,24 +89,28 @@ describe("@selectable", () => { } input MovieUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -148,6 +152,20 @@ describe("@selectable", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -230,24 +248,28 @@ describe("@selectable", () => { } input MovieUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -289,6 +311,20 @@ describe("@selectable", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -370,24 +406,28 @@ describe("@selectable", () => { } input MovieUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -429,6 +469,20 @@ describe("@selectable", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -539,21 +593,25 @@ describe("@selectable", () => { AND: [MovieSubscriptionWhere!] NOT: MovieSubscriptionWhere OR: [MovieSubscriptionWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } input MovieUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -567,16 +625,18 @@ describe("@selectable", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -618,6 +678,20 @@ describe("@selectable", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Subscription { movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! @@ -673,6 +747,7 @@ describe("@selectable", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -685,6 +760,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 @@ -713,36 +807,38 @@ describe("@selectable", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + description: StringScalarAggregationFilters + description_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { eq: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gte: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lte: ... } } }' instead.\\") + description_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { eq: ... } } }' instead.\\") + description_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gt: ... } } }' instead.\\") + description_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gte: ... } } }' instead.\\") + description_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lt: ... } } }' instead.\\") + description_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { eq: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } input ActorActedInUpdateConnectionInput { @@ -796,43 +892,47 @@ describe("@selectable", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: MovieRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere + actedIn_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere + actedIn_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere + actedIn_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -867,6 +967,26 @@ describe("@selectable", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { description: String title: String! @@ -892,6 +1012,17 @@ describe("@selectable", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -901,24 +1032,28 @@ describe("@selectable", () => { } input MovieUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -966,6 +1101,27 @@ describe("@selectable", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -1020,6 +1176,7 @@ describe("@selectable", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1038,6 +1195,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 } @@ -1070,36 +1246,38 @@ describe("@selectable", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + description: StringScalarAggregationFilters + description_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { eq: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gte: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lte: ... } } }' instead.\\") + description_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { eq: ... } } }' instead.\\") + description_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gt: ... } } }' instead.\\") + description_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gte: ... } } }' instead.\\") + description_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lt: ... } } }' instead.\\") + description_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { eq: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -1158,43 +1336,47 @@ describe("@selectable", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: MovieRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere + actedIn_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere + actedIn_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere + actedIn_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -1229,6 +1411,26 @@ describe("@selectable", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { description: String title: String! @@ -1254,6 +1456,17 @@ describe("@selectable", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -1263,24 +1476,28 @@ describe("@selectable", () => { } input MovieUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -1328,6 +1545,27 @@ describe("@selectable", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -1385,6 +1623,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 @@ -1515,42 +1772,46 @@ describe("@selectable", () => { input ActorUpdateInput { actedIn: ActorActedInUpdateInput - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ProductionRelationshipFilters + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere + actedIn_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere + actedIn_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere + actedIn_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -1624,24 +1885,28 @@ describe("@selectable", () => { } input MovieUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -1672,6 +1937,17 @@ describe("@selectable", () => { union Production = Movie | Series + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ProductionWhere { Movie: MovieWhere Series: SeriesWhere @@ -1730,24 +2006,28 @@ describe("@selectable", () => { } input SeriesUpdateInput { - description_SET: String - name_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -1763,6 +2043,20 @@ describe("@selectable", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -1830,6 +2124,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 @@ -1965,42 +2278,46 @@ describe("@selectable", () => { input ActorUpdateInput { actedIn: ActorActedInUpdateInput - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ProductionRelationshipFilters + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere + actedIn_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere + actedIn_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere + actedIn_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -2074,24 +2391,28 @@ describe("@selectable", () => { } input MovieUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -2122,6 +2443,17 @@ describe("@selectable", () => { union Production = Movie | Series + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ProductionWhere { Movie: MovieWhere Series: SeriesWhere @@ -2180,24 +2512,28 @@ describe("@selectable", () => { } input SeriesUpdateInput { - description_SET: String - name_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -2213,6 +2549,20 @@ describe("@selectable", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -2283,6 +2633,7 @@ describe("@selectable", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -2295,6 +2646,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 @@ -2323,36 +2693,38 @@ describe("@selectable", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + description: StringScalarAggregationFilters + description_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { eq: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gte: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lte: ... } } }' instead.\\") + description_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { eq: ... } } }' instead.\\") + description_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gt: ... } } }' instead.\\") + description_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gte: ... } } }' instead.\\") + description_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lt: ... } } }' instead.\\") + description_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { eq: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } input ActorActedInUpdateConnectionInput { @@ -2406,43 +2778,47 @@ describe("@selectable", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ProductionRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere + actedIn_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere + actedIn_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere + actedIn_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -2482,6 +2858,26 @@ describe("@selectable", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie implements Production { description: String title: String! @@ -2512,24 +2908,28 @@ describe("@selectable", () => { } input MovieUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -2588,6 +2988,17 @@ describe("@selectable", () => { Series } + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + \\"\\"\\" Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. \\"\\"\\" @@ -2597,25 +3008,29 @@ describe("@selectable", () => { } input ProductionUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -2675,24 +3090,28 @@ describe("@selectable", () => { } input SeriesUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -2708,6 +3127,27 @@ describe("@selectable", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -2777,6 +3217,7 @@ describe("@selectable", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -2795,6 +3236,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 } @@ -2827,36 +3287,38 @@ describe("@selectable", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + description: StringScalarAggregationFilters + description_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { eq: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gte: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lte: ... } } }' instead.\\") + description_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { eq: ... } } }' instead.\\") + description_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gt: ... } } }' instead.\\") + description_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gte: ... } } }' instead.\\") + description_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lt: ... } } }' instead.\\") + description_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { eq: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -2915,43 +3377,47 @@ describe("@selectable", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ProductionRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere + actedIn_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere + actedIn_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere + actedIn_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -2991,6 +3457,26 @@ describe("@selectable", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie implements Production { description: String title: String! @@ -3021,24 +3507,28 @@ describe("@selectable", () => { } input MovieUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -3097,6 +3587,17 @@ describe("@selectable", () => { Series } + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + \\"\\"\\" Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. \\"\\"\\" @@ -3106,25 +3607,29 @@ describe("@selectable", () => { } input ProductionUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -3184,24 +3689,28 @@ describe("@selectable", () => { } input SeriesUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -3217,6 +3726,27 @@ describe("@selectable", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/directives/settable.test.ts b/packages/graphql/tests/schema/directives/settable.test.ts index 61178399d6..e50fbcb212 100644 --- a/packages/graphql/tests/schema/directives/settable.test.ts +++ b/packages/graphql/tests/schema/directives/settable.test.ts @@ -89,24 +89,28 @@ describe("@settable", () => { } input MovieUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -148,6 +152,20 @@ describe("@settable", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -231,23 +249,26 @@ describe("@settable", () => { } input MovieUpdateInput { - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -289,6 +310,20 @@ describe("@settable", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -400,20 +435,23 @@ describe("@settable", () => { AND: [MovieSubscriptionWhere!] NOT: MovieSubscriptionWhere OR: [MovieSubscriptionWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } input MovieUpdateInput { - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -427,16 +465,18 @@ describe("@settable", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -478,6 +518,20 @@ describe("@settable", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Subscription { movieCreated(where: MovieSubscriptionWhere): MovieCreatedEvent! movieDeleted(where: MovieSubscriptionWhere): MovieDeletedEvent! @@ -535,6 +589,7 @@ describe("@settable", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -553,6 +608,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 } @@ -580,36 +654,38 @@ describe("@settable", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + description: StringScalarAggregationFilters + description_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { eq: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gte: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lte: ... } } }' instead.\\") + description_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { eq: ... } } }' instead.\\") + description_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gt: ... } } }' instead.\\") + description_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gte: ... } } }' instead.\\") + description_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lt: ... } } }' instead.\\") + description_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { eq: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -667,43 +743,47 @@ describe("@settable", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: MovieRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere + actedIn_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere + actedIn_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere + actedIn_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -738,6 +818,26 @@ describe("@settable", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { description: String title: String! @@ -763,6 +863,17 @@ describe("@settable", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -772,24 +883,28 @@ describe("@settable", () => { } input MovieUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -837,6 +952,27 @@ describe("@settable", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -892,6 +1028,7 @@ describe("@settable", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -910,6 +1047,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 } @@ -938,36 +1094,38 @@ describe("@settable", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + description: StringScalarAggregationFilters + description_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { eq: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gte: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lte: ... } } }' instead.\\") + description_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { eq: ... } } }' instead.\\") + description_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gt: ... } } }' instead.\\") + description_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gte: ... } } }' instead.\\") + description_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lt: ... } } }' instead.\\") + description_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { eq: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -1012,43 +1170,47 @@ describe("@settable", () => { } input ActorUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: MovieRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere + actedIn_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere + actedIn_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere + actedIn_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -1083,6 +1245,26 @@ describe("@settable", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { description: String title: String! @@ -1108,6 +1290,17 @@ describe("@settable", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -1117,24 +1310,28 @@ describe("@settable", () => { } input MovieUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -1182,6 +1379,27 @@ describe("@settable", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -1236,6 +1454,7 @@ describe("@settable", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1255,6 +1474,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 } @@ -1289,36 +1527,38 @@ describe("@settable", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + description: StringScalarAggregationFilters + description_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { eq: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gte: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lte: ... } } }' instead.\\") + description_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { eq: ... } } }' instead.\\") + description_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gt: ... } } }' instead.\\") + description_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gte: ... } } }' instead.\\") + description_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lt: ... } } }' instead.\\") + description_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { eq: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -1367,6 +1607,17 @@ describe("@settable", () => { title: StringAggregateSelection! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -1375,43 +1626,47 @@ describe("@settable", () => { } input ActorUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: MovieRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere + actedIn_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere + actedIn_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere + actedIn_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -1446,6 +1701,26 @@ describe("@settable", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -1467,6 +1742,7 @@ describe("@settable", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1486,6 +1762,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 } @@ -1520,21 +1815,22 @@ describe("@settable", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -1588,6 +1884,17 @@ describe("@settable", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -1598,49 +1905,55 @@ describe("@settable", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -1688,6 +2001,27 @@ describe("@settable", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -1742,6 +2076,7 @@ describe("@settable", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1761,6 +2096,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 } @@ -1790,36 +2144,38 @@ describe("@settable", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + description: StringScalarAggregationFilters + description_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { eq: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gte: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lte: ... } } }' instead.\\") + description_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { eq: ... } } }' instead.\\") + description_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gt: ... } } }' instead.\\") + description_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gte: ... } } }' instead.\\") + description_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lt: ... } } }' instead.\\") + description_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { eq: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -1880,6 +2236,17 @@ describe("@settable", () => { title: StringAggregateSelection! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -1889,43 +2256,47 @@ describe("@settable", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: MovieRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere + actedIn_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere + actedIn_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere + actedIn_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -1960,6 +2331,26 @@ describe("@settable", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -1981,6 +2372,7 @@ describe("@settable", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -2000,6 +2392,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 } @@ -2034,21 +2445,22 @@ describe("@settable", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -2102,6 +2514,17 @@ describe("@settable", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -2112,49 +2535,55 @@ describe("@settable", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -2202,6 +2631,27 @@ describe("@settable", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -2266,6 +2716,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 @@ -2385,42 +2854,46 @@ describe("@settable", () => { input ActorUpdateInput { actedIn: ActorActedInUpdateInput - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ProductionRelationshipFilters + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere + actedIn_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere + actedIn_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere + actedIn_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -2494,24 +2967,28 @@ describe("@settable", () => { } input MovieUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -2542,6 +3019,17 @@ describe("@settable", () => { union Production = Movie | Series + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ProductionWhere { Movie: MovieWhere Series: SeriesWhere @@ -2600,24 +3088,28 @@ describe("@settable", () => { } input SeriesUpdateInput { - description_SET: String - name_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -2633,6 +3125,20 @@ describe("@settable", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -2701,6 +3207,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 @@ -2796,42 +3321,46 @@ describe("@settable", () => { } input ActorUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ProductionRelationshipFilters + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere + actedIn_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere + actedIn_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere + actedIn_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -2905,24 +3434,28 @@ describe("@settable", () => { } input MovieUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -2953,6 +3486,17 @@ describe("@settable", () => { union Production = Movie | Series + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ProductionWhere { Movie: MovieWhere Series: SeriesWhere @@ -3011,24 +3555,28 @@ describe("@settable", () => { } input SeriesUpdateInput { - description_SET: String - name_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -3044,6 +3592,20 @@ describe("@settable", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -3116,6 +3678,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 @@ -3231,6 +3812,17 @@ describe("@settable", () => { node: Actor! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -3239,42 +3831,46 @@ describe("@settable", () => { } input ActorUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ProductionRelationshipFilters + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere + actedIn_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere + actedIn_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere + actedIn_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -3314,6 +3910,26 @@ describe("@settable", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -3335,6 +3951,7 @@ describe("@settable", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -3354,6 +3971,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 } @@ -3388,21 +4024,22 @@ describe("@settable", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -3466,49 +4103,55 @@ describe("@settable", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -3539,6 +4182,17 @@ describe("@settable", () => { union Production = Movie | Series + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ProductionWhere { Movie: MovieWhere Series: SeriesWhere @@ -3597,24 +4251,28 @@ describe("@settable", () => { } input SeriesUpdateInput { - description_SET: String - name_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -3630,6 +4288,27 @@ describe("@settable", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -3702,6 +4381,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 @@ -3832,6 +4530,17 @@ describe("@settable", () => { node: Actor! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -3841,42 +4550,46 @@ describe("@settable", () => { input ActorUpdateInput { actedIn: ActorActedInUpdateInput - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ProductionRelationshipFilters + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere + actedIn_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere + actedIn_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere + actedIn_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -3916,6 +4629,26 @@ describe("@settable", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -3937,6 +4670,7 @@ describe("@settable", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -3956,6 +4690,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 } @@ -3990,21 +4743,22 @@ describe("@settable", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -4068,49 +4822,55 @@ describe("@settable", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -4141,6 +4901,17 @@ describe("@settable", () => { union Production = Movie | Series + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + input ProductionWhere { Movie: MovieWhere Series: SeriesWhere @@ -4199,24 +4970,28 @@ describe("@settable", () => { } input SeriesUpdateInput { - description_SET: String - name_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -4232,6 +5007,27 @@ describe("@settable", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -4304,6 +5100,7 @@ describe("@settable", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -4322,6 +5119,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 } @@ -4349,36 +5165,38 @@ describe("@settable", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + description: StringScalarAggregationFilters + description_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { eq: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gte: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lte: ... } } }' instead.\\") + description_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { eq: ... } } }' instead.\\") + description_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gt: ... } } }' instead.\\") + description_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gte: ... } } }' instead.\\") + description_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lt: ... } } }' instead.\\") + description_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { eq: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -4436,43 +5254,47 @@ describe("@settable", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ProductionRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere + actedIn_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere + actedIn_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere + actedIn_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -4512,6 +5334,26 @@ describe("@settable", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie implements Production { description: String title: String! @@ -4542,24 +5384,28 @@ describe("@settable", () => { } input MovieUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -4618,6 +5464,17 @@ describe("@settable", () => { Series } + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + \\"\\"\\" Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. \\"\\"\\" @@ -4627,25 +5484,29 @@ describe("@settable", () => { } input ProductionUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -4705,24 +5566,28 @@ describe("@settable", () => { } input SeriesUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -4738,6 +5603,27 @@ describe("@settable", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -4808,6 +5694,7 @@ describe("@settable", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -4826,6 +5713,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 } @@ -4854,36 +5760,38 @@ describe("@settable", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + description: StringScalarAggregationFilters + description_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { eq: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gte: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lte: ... } } }' instead.\\") + description_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { eq: ... } } }' instead.\\") + description_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gt: ... } } }' instead.\\") + description_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gte: ... } } }' instead.\\") + description_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lt: ... } } }' instead.\\") + description_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { eq: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -4928,43 +5836,47 @@ describe("@settable", () => { } input ActorUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ProductionRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere + actedIn_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere + actedIn_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere + actedIn_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -5004,6 +5916,26 @@ describe("@settable", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie implements Production { description: String title: String! @@ -5034,24 +5966,28 @@ describe("@settable", () => { } input MovieUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -5110,6 +6046,17 @@ describe("@settable", () => { Series } + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + \\"\\"\\" Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. \\"\\"\\" @@ -5122,17 +6069,19 @@ describe("@settable", () => { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -5192,24 +6141,28 @@ describe("@settable", () => { } input SeriesUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -5225,6 +6178,27 @@ describe("@settable", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -5296,6 +6270,7 @@ describe("@settable", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -5315,6 +6290,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 } @@ -5349,36 +6343,38 @@ describe("@settable", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + description: StringScalarAggregationFilters + description_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { eq: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gte: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lte: ... } } }' instead.\\") + description_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { eq: ... } } }' instead.\\") + description_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gt: ... } } }' instead.\\") + description_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gte: ... } } }' instead.\\") + description_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lt: ... } } }' instead.\\") + description_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { eq: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -5427,6 +6423,17 @@ describe("@settable", () => { title: StringAggregateSelection! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -5435,43 +6442,47 @@ describe("@settable", () => { } input ActorUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ProductionRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere + actedIn_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere + actedIn_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere + actedIn_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -5511,6 +6522,26 @@ describe("@settable", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie implements Production { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -5532,6 +6563,7 @@ describe("@settable", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -5545,6 +6577,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! } @@ -5558,21 +6609,22 @@ describe("@settable", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } input MovieActorsUpdateConnectionInput { @@ -5619,49 +6671,55 @@ describe("@settable", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere + actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere + actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere + actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -5701,6 +6759,7 @@ describe("@settable", () => { AND: [ProductionActorsAggregateInput!] NOT: ProductionActorsAggregateInput OR: [ProductionActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -5720,6 +6779,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 } @@ -5745,21 +6823,22 @@ describe("@settable", () => { AND: [ProductionActorsNodeAggregationWhereInput!] NOT: ProductionActorsNodeAggregationWhereInput OR: [ProductionActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type ProductionActorsRelationship { @@ -5804,6 +6883,17 @@ describe("@settable", () => { Series } + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + \\"\\"\\" Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. \\"\\"\\" @@ -5816,42 +6906,46 @@ describe("@settable", () => { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] + actors: ActorRelationshipFilters actorsAggregate: ProductionActorsAggregateInput + actorsConnection: ProductionActorsConnectionFilters \\"\\"\\" Return Productions where all of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere + actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where none of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where one of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere + actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where some of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere + actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Productions where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Productions where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Productions where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Productions where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -5896,6 +6990,7 @@ describe("@settable", () => { AND: [SeriesActorsAggregateInput!] NOT: SeriesActorsAggregateInput OR: [SeriesActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -5909,6 +7004,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! } @@ -5922,21 +7036,22 @@ describe("@settable", () => { AND: [SeriesActorsNodeAggregationWhereInput!] NOT: SeriesActorsNodeAggregationWhereInput OR: [SeriesActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } input SeriesActorsUpdateConnectionInput { @@ -5989,49 +7104,55 @@ describe("@settable", () => { input SeriesUpdateInput { actors: [SeriesActorsUpdateFieldInput!] - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] + actors: ActorRelationshipFilters actorsAggregate: SeriesActorsAggregateInput + actorsConnection: SeriesActorsConnectionFilters \\"\\"\\" Return Series where all of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere + actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where none of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where one of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere + actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where some of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere + actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -6047,6 +7168,27 @@ describe("@settable", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -6118,6 +7260,7 @@ describe("@settable", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -6137,6 +7280,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 } @@ -6166,36 +7328,38 @@ describe("@settable", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + description: StringScalarAggregationFilters + description_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { eq: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gte: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lte: ... } } }' instead.\\") + description_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { eq: ... } } }' instead.\\") + description_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gt: ... } } }' instead.\\") + description_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gte: ... } } }' instead.\\") + description_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lt: ... } } }' instead.\\") + description_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { eq: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -6256,6 +7420,17 @@ describe("@settable", () => { title: StringAggregateSelection! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -6265,43 +7440,47 @@ describe("@settable", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ProductionRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere + actedIn_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere + actedIn_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere + actedIn_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -6341,6 +7520,26 @@ describe("@settable", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie implements Production { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -6362,6 +7561,7 @@ describe("@settable", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -6375,6 +7575,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! } @@ -6388,21 +7607,22 @@ describe("@settable", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } input MovieActorsUpdateConnectionInput { @@ -6449,49 +7669,55 @@ describe("@settable", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere + actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere + actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere + actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -6531,6 +7757,7 @@ describe("@settable", () => { AND: [ProductionActorsAggregateInput!] NOT: ProductionActorsAggregateInput OR: [ProductionActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -6550,6 +7777,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 } @@ -6579,21 +7825,22 @@ describe("@settable", () => { AND: [ProductionActorsNodeAggregationWhereInput!] NOT: ProductionActorsNodeAggregationWhereInput OR: [ProductionActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type ProductionActorsRelationship { @@ -6651,6 +7898,17 @@ describe("@settable", () => { Series } + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + \\"\\"\\" Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. \\"\\"\\" @@ -6661,50 +7919,56 @@ describe("@settable", () => { input ProductionUpdateInput { actors: [ProductionActorsUpdateFieldInput!] - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] + actors: ActorRelationshipFilters actorsAggregate: ProductionActorsAggregateInput + actorsConnection: ProductionActorsConnectionFilters \\"\\"\\" Return Productions where all of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere + actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where none of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where one of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere + actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where some of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere + actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Productions where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Productions where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Productions where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Productions where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -6749,6 +8013,7 @@ describe("@settable", () => { AND: [SeriesActorsAggregateInput!] NOT: SeriesActorsAggregateInput OR: [SeriesActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -6762,6 +8027,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! } @@ -6775,21 +8059,22 @@ describe("@settable", () => { AND: [SeriesActorsNodeAggregationWhereInput!] NOT: SeriesActorsNodeAggregationWhereInput OR: [SeriesActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } input SeriesActorsUpdateConnectionInput { @@ -6842,49 +8127,55 @@ describe("@settable", () => { input SeriesUpdateInput { actors: [SeriesActorsUpdateFieldInput!] - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] + actors: ActorRelationshipFilters actorsAggregate: SeriesActorsAggregateInput + actorsConnection: SeriesActorsConnectionFilters \\"\\"\\" Return Series where all of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere + actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where none of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where one of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere + actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where some of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere + actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -6900,6 +8191,27 @@ describe("@settable", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/directives/timestamps.test.ts b/packages/graphql/tests/schema/directives/timestamps.test.ts index 3045510210..d43cfd0f07 100644 --- a/packages/graphql/tests/schema/directives/timestamps.test.ts +++ b/packages/graphql/tests/schema/directives/timestamps.test.ts @@ -61,6 +61,21 @@ describe("Timestamps", () => { min: DateTime } + \\"\\"\\"DateTime filters\\"\\"\\" + input DateTimeScalarFilters { + eq: DateTime + gt: DateTime + gte: DateTime + in: [DateTime!] + lt: DateTime + lte: DateTime + } + + \\"\\"\\"DateTime mutations\\"\\"\\" + input DateTimeScalarMutations { + set: DateTime + } + \\"\\"\\" Information about the number of nodes and relationships deleted during a delete mutation \\"\\"\\" @@ -69,9 +84,18 @@ describe("Timestamps", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -83,7 +107,6 @@ describe("Timestamps", () => { type MovieAggregateSelection { count: Int! createdAt: DateTimeAggregateSelection! - id: IDAggregateSelection! updatedAt: DateTimeAggregateSelection! } @@ -107,31 +130,36 @@ describe("Timestamps", () => { } input MovieUpdateInput { - createdAt_SET: DateTime - id_SET: ID + createdAt: DateTimeScalarMutations + createdAt_SET: DateTime @deprecated(reason: \\"Please use the generic mutation 'createdAt: { set: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - createdAt_EQ: DateTime - createdAt_GT: DateTime - createdAt_GTE: DateTime - createdAt_IN: [DateTime!] - createdAt_LT: DateTime - createdAt_LTE: DateTime - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - updatedAt_EQ: DateTime - updatedAt_GT: DateTime - updatedAt_GTE: DateTime - updatedAt_IN: [DateTime!] - updatedAt_LT: DateTime - updatedAt_LTE: DateTime + createdAt: DateTimeScalarFilters + createdAt_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { eq: ... }\\") + createdAt_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { gt: ... }\\") + createdAt_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { gte: ... }\\") + createdAt_IN: [DateTime!] @deprecated(reason: \\"Please use the relevant generic filter createdAt: { in: ... }\\") + createdAt_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { lt: ... }\\") + createdAt_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + updatedAt: DateTimeScalarFilters + updatedAt_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter updatedAt: { eq: ... }\\") + updatedAt_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter updatedAt: { gt: ... }\\") + updatedAt_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter updatedAt: { gte: ... }\\") + updatedAt_IN: [DateTime!] @deprecated(reason: \\"Please use the relevant generic filter updatedAt: { in: ... }\\") + updatedAt_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter updatedAt: { lt: ... }\\") + updatedAt_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter updatedAt: { lte: ... }\\") } type MoviesConnection { diff --git a/packages/graphql/tests/schema/enum.test.ts b/packages/graphql/tests/schema/enum.test.ts index f49b964daa..6c64a02db1 100644 --- a/packages/graphql/tests/schema/enum.test.ts +++ b/packages/graphql/tests/schema/enum.test.ts @@ -90,15 +90,17 @@ describe("Enum", () => { } input MovieUpdateInput { - status_SET: Status + status: StatusEnumScalarMutations + status_SET: Status @deprecated(reason: \\"Please use the generic mutation 'status: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - status_EQ: Status - status_IN: [Status] + status: StatusEnumScalarFilters + status_EQ: Status @deprecated(reason: \\"Please use the relevant generic filter status: { eq: ... }\\") + status_IN: [Status] @deprecated(reason: \\"Please use the relevant generic filter status: { in: ... }\\") } type MoviesConnection { @@ -141,6 +143,17 @@ describe("Enum", () => { PENDING } + \\"\\"\\"Status filters\\"\\"\\" + input StatusEnumScalarFilters { + eq: Status + in: [Status!] + } + + \\"\\"\\"Status mutations\\"\\"\\" + input StatusEnumScalarMutations { + set: Status + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" diff --git a/packages/graphql/tests/schema/extend.test.ts b/packages/graphql/tests/schema/extend.test.ts index 218b68aaf0..f46e54932e 100644 --- a/packages/graphql/tests/schema/extend.test.ts +++ b/packages/graphql/tests/schema/extend.test.ts @@ -63,9 +63,18 @@ describe("Extend", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -75,7 +84,6 @@ describe("Extend", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -98,24 +106,28 @@ describe("Extend", () => { } input MovieUpdateInput { - id_SET: ID - name_SET: String + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type MoviesConnection { @@ -157,6 +169,20 @@ describe("Extend", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" diff --git a/packages/graphql/tests/schema/federation.test.ts b/packages/graphql/tests/schema/federation.test.ts index 1c5c2d14c1..b93ccf3d2e 100644 --- a/packages/graphql/tests/schema/federation.test.ts +++ b/packages/graphql/tests/schema/federation.test.ts @@ -95,6 +95,26 @@ describe("Apollo Federation", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Mutation { createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! @shareable @@ -128,6 +148,7 @@ describe("Apollo Federation", () => { AND: [PostAuthorAggregateInput!] NOT: PostAuthorAggregateInput OR: [PostAuthorAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -147,6 +168,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 } @@ -181,21 +221,22 @@ describe("Apollo Federation", () => { AND: [PostAuthorNodeAggregationWhereInput!] NOT: PostAuthorNodeAggregationWhereInput OR: [PostAuthorNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type PostAuthorRelationship { @@ -242,6 +283,17 @@ describe("Apollo Federation", () => { node: Post! } + input PostRelationshipFilters { + \\"\\"\\"Filter type where all of the related Posts match this filter\\"\\"\\" + all: PostWhere + \\"\\"\\"Filter type where none of the related Posts match this filter\\"\\"\\" + none: PostWhere + \\"\\"\\"Filter type where one of the related Posts match this filter\\"\\"\\" + single: PostWhere + \\"\\"\\"Filter type where some of the related Posts match this filter\\"\\"\\" + some: PostWhere + } + \\"\\"\\" Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. \\"\\"\\" @@ -251,7 +303,8 @@ describe("Apollo Federation", () => { input PostUpdateInput { author: [PostAuthorUpdateFieldInput!] - content_SET: String + content: StringScalarMutations + content_SET: String @deprecated(reason: \\"Please use the generic mutation 'content: { set: ... } }' instead.\\") } type PostUserAuthorAggregationSelection { @@ -267,36 +320,39 @@ describe("Apollo Federation", () => { AND: [PostWhere!] NOT: PostWhere OR: [PostWhere!] + author: UserRelationshipFilters authorAggregate: PostAuthorAggregateInput + authorConnection: PostAuthorConnectionFilters \\"\\"\\" Return Posts where all of the related PostAuthorConnections match this filter \\"\\"\\" - authorConnection_ALL: PostAuthorConnectionWhere + authorConnection_ALL: PostAuthorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'authorConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Posts where none of the related PostAuthorConnections match this filter \\"\\"\\" - authorConnection_NONE: PostAuthorConnectionWhere + authorConnection_NONE: PostAuthorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'authorConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Posts where one of the related PostAuthorConnections match this filter \\"\\"\\" - authorConnection_SINGLE: PostAuthorConnectionWhere + authorConnection_SINGLE: PostAuthorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'authorConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Posts where some of the related PostAuthorConnections match this filter \\"\\"\\" - authorConnection_SOME: PostAuthorConnectionWhere + authorConnection_SOME: PostAuthorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'authorConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Posts where all of the related Users match this filter\\"\\"\\" - author_ALL: UserWhere + author_ALL: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'author: { all: ... }' instead.\\") \\"\\"\\"Return Posts where none of the related Users match this filter\\"\\"\\" - author_NONE: UserWhere + author_NONE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'author: { none: ... }' instead.\\") \\"\\"\\"Return Posts where one of the related Users match this filter\\"\\"\\" - author_SINGLE: UserWhere + author_SINGLE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'author: { single: ... }' instead.\\") \\"\\"\\"Return Posts where some of the related Users match this filter\\"\\"\\" - author_SOME: UserWhere - content_CONTAINS: String - content_ENDS_WITH: String - content_EQ: String - content_IN: [String!] - content_STARTS_WITH: String + author_SOME: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'author: { some: ... }' instead.\\") + content: StringScalarFilters + content_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter content: { contains: ... }\\") + content_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter content: { endsWith: ... }\\") + content_EQ: String @deprecated(reason: \\"Please use the relevant generic filter content: { eq: ... }\\") + content_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter content: { in: ... }\\") + content_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter content: { startsWith: ... }\\") } type PostsConnection { @@ -328,6 +384,27 @@ describe("Apollo Federation", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -399,6 +476,7 @@ describe("Apollo Federation", () => { AND: [UserPostsAggregateInput!] NOT: UserPostsAggregateInput OR: [UserPostsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -418,6 +496,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 } @@ -452,21 +549,22 @@ describe("Apollo Federation", () => { AND: [UserPostsNodeAggregationWhereInput!] NOT: UserPostsNodeAggregationWhereInput OR: [UserPostsNodeAggregationWhereInput!] - content_AVERAGE_LENGTH_EQUAL: Float - content_AVERAGE_LENGTH_GT: Float - content_AVERAGE_LENGTH_GTE: Float - content_AVERAGE_LENGTH_LT: Float - content_AVERAGE_LENGTH_LTE: Float - content_LONGEST_LENGTH_EQUAL: Int - content_LONGEST_LENGTH_GT: Int - content_LONGEST_LENGTH_GTE: Int - content_LONGEST_LENGTH_LT: Int - content_LONGEST_LENGTH_LTE: Int - content_SHORTEST_LENGTH_EQUAL: Int - content_SHORTEST_LENGTH_GT: Int - content_SHORTEST_LENGTH_GTE: Int - content_SHORTEST_LENGTH_LT: Int - content_SHORTEST_LENGTH_LTE: Int + content: StringScalarAggregationFilters + content_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { eq: ... } } }' instead.\\") + content_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { gt: ... } } }' instead.\\") + content_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { gte: ... } } }' instead.\\") + content_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { lt: ... } } }' instead.\\") + content_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { lte: ... } } }' instead.\\") + content_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { eq: ... } } }' instead.\\") + content_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { gt: ... } } }' instead.\\") + content_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { gte: ... } } }' instead.\\") + content_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { lt: ... } } }' instead.\\") + content_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { lte: ... } } }' instead.\\") + content_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { eq: ... } } }' instead.\\") + content_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { gt: ... } } }' instead.\\") + content_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { gte: ... } } }' instead.\\") + content_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { lt: ... } } }' instead.\\") + content_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { lte: ... } } }' instead.\\") } type UserPostsRelationship { @@ -487,6 +585,17 @@ describe("Apollo Federation", () => { where: UserPostsConnectionWhere } + input UserRelationshipFilters { + \\"\\"\\"Filter type where all of the related Users match this filter\\"\\"\\" + all: UserWhere + \\"\\"\\"Filter type where none of the related Users match this filter\\"\\"\\" + none: UserWhere + \\"\\"\\"Filter type where one of the related Users match this filter\\"\\"\\" + single: UserWhere + \\"\\"\\"Filter type where some of the related Users match this filter\\"\\"\\" + some: UserWhere + } + \\"\\"\\" Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. \\"\\"\\" @@ -495,7 +604,8 @@ describe("Apollo Federation", () => { } input UserUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") posts: [UserPostsUpdateFieldInput!] } @@ -503,36 +613,39 @@ describe("Apollo Federation", () => { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + posts: PostRelationshipFilters postsAggregate: UserPostsAggregateInput + postsConnection: UserPostsConnectionFilters \\"\\"\\" Return Users where all of the related UserPostsConnections match this filter \\"\\"\\" - postsConnection_ALL: UserPostsConnectionWhere + postsConnection_ALL: UserPostsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'postsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Users where none of the related UserPostsConnections match this filter \\"\\"\\" - postsConnection_NONE: UserPostsConnectionWhere + postsConnection_NONE: UserPostsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'postsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Users where one of the related UserPostsConnections match this filter \\"\\"\\" - postsConnection_SINGLE: UserPostsConnectionWhere + postsConnection_SINGLE: UserPostsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'postsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Users where some of the related UserPostsConnections match this filter \\"\\"\\" - postsConnection_SOME: UserPostsConnectionWhere + postsConnection_SOME: UserPostsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'postsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Users where all of the related Posts match this filter\\"\\"\\" - posts_ALL: PostWhere + posts_ALL: PostWhere @deprecated(reason: \\"Please use the relevant generic filter 'posts: { all: ... }' instead.\\") \\"\\"\\"Return Users where none of the related Posts match this filter\\"\\"\\" - posts_NONE: PostWhere + posts_NONE: PostWhere @deprecated(reason: \\"Please use the relevant generic filter 'posts: { none: ... }' instead.\\") \\"\\"\\"Return Users where one of the related Posts match this filter\\"\\"\\" - posts_SINGLE: PostWhere + posts_SINGLE: PostWhere @deprecated(reason: \\"Please use the relevant generic filter 'posts: { single: ... }' instead.\\") \\"\\"\\"Return Users where some of the related Posts match this filter\\"\\"\\" - posts_SOME: PostWhere + posts_SOME: PostWhere @deprecated(reason: \\"Please use the relevant generic filter 'posts: { some: ... }' instead.\\") } type UsersConnection @shareable { @@ -635,6 +748,26 @@ describe("Apollo Federation", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Mutation { createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! @@ -668,6 +801,7 @@ describe("Apollo Federation", () => { AND: [PostAuthorAggregateInput!] NOT: PostAuthorAggregateInput OR: [PostAuthorAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -686,6 +820,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 } @@ -718,21 +871,22 @@ describe("Apollo Federation", () => { AND: [PostAuthorNodeAggregationWhereInput!] NOT: PostAuthorNodeAggregationWhereInput OR: [PostAuthorNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type PostAuthorRelationship { @@ -776,7 +930,8 @@ describe("Apollo Federation", () => { input PostUpdateInput { author: [PostAuthorUpdateFieldInput!] - content_SET: String + content: StringScalarMutations + content_SET: String @deprecated(reason: \\"Please use the generic mutation 'content: { set: ... } }' instead.\\") } type PostUserAuthorAggregationSelection { @@ -792,36 +947,39 @@ describe("Apollo Federation", () => { AND: [PostWhere!] NOT: PostWhere OR: [PostWhere!] + author: UserRelationshipFilters authorAggregate: PostAuthorAggregateInput + authorConnection: PostAuthorConnectionFilters \\"\\"\\" Return Posts where all of the related PostAuthorConnections match this filter \\"\\"\\" - authorConnection_ALL: PostAuthorConnectionWhere + authorConnection_ALL: PostAuthorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'authorConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Posts where none of the related PostAuthorConnections match this filter \\"\\"\\" - authorConnection_NONE: PostAuthorConnectionWhere + authorConnection_NONE: PostAuthorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'authorConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Posts where one of the related PostAuthorConnections match this filter \\"\\"\\" - authorConnection_SINGLE: PostAuthorConnectionWhere + authorConnection_SINGLE: PostAuthorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'authorConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Posts where some of the related PostAuthorConnections match this filter \\"\\"\\" - authorConnection_SOME: PostAuthorConnectionWhere + authorConnection_SOME: PostAuthorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'authorConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Posts where all of the related Users match this filter\\"\\"\\" - author_ALL: UserWhere + author_ALL: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'author: { all: ... }' instead.\\") \\"\\"\\"Return Posts where none of the related Users match this filter\\"\\"\\" - author_NONE: UserWhere + author_NONE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'author: { none: ... }' instead.\\") \\"\\"\\"Return Posts where one of the related Users match this filter\\"\\"\\" - author_SINGLE: UserWhere + author_SINGLE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'author: { single: ... }' instead.\\") \\"\\"\\"Return Posts where some of the related Users match this filter\\"\\"\\" - author_SOME: UserWhere - content_CONTAINS: String - content_ENDS_WITH: String - content_EQ: String - content_IN: [String!] - content_STARTS_WITH: String + author_SOME: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'author: { some: ... }' instead.\\") + content: StringScalarFilters + content_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter content: { contains: ... }\\") + content_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter content: { endsWith: ... }\\") + content_EQ: String @deprecated(reason: \\"Please use the relevant generic filter content: { eq: ... }\\") + content_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter content: { in: ... }\\") + content_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter content: { startsWith: ... }\\") } type PostsConnection { @@ -854,6 +1012,27 @@ describe("Apollo Federation", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -896,6 +1075,17 @@ describe("Apollo Federation", () => { node: User! } + input UserRelationshipFilters { + \\"\\"\\"Filter type where all of the related Users match this filter\\"\\"\\" + all: UserWhere + \\"\\"\\"Filter type where none of the related Users match this filter\\"\\"\\" + none: UserWhere + \\"\\"\\"Filter type where one of the related Users match this filter\\"\\"\\" + single: UserWhere + \\"\\"\\"Filter type where some of the related Users match this filter\\"\\"\\" + some: UserWhere + } + \\"\\"\\" Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. \\"\\"\\" @@ -904,18 +1094,20 @@ describe("Apollo Federation", () => { } input UserUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input UserWhere { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type UsersConnection { diff --git a/packages/graphql/tests/schema/fulltext.test.ts b/packages/graphql/tests/schema/fulltext.test.ts index 864b94a3f4..2338f489b9 100644 --- a/packages/graphql/tests/schema/fulltext.test.ts +++ b/packages/graphql/tests/schema/fulltext.test.ts @@ -122,24 +122,28 @@ describe("@fulltext schema", () => { } input MovieUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -189,6 +193,20 @@ describe("@fulltext schema", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" diff --git a/packages/graphql/tests/schema/global-node.test.ts b/packages/graphql/tests/schema/global-node.test.ts index 944634cce0..6617cacd88 100644 --- a/packages/graphql/tests/schema/global-node.test.ts +++ b/packages/graphql/tests/schema/global-node.test.ts @@ -60,9 +60,18 @@ describe("Node Interface Types", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie implements Node { @@ -73,7 +82,6 @@ describe("Node Interface Types", () => { type MovieAggregateSelection { count: Int! - imdb: IDAggregateSelection! title: StringAggregateSelection! } @@ -96,8 +104,10 @@ describe("Node Interface Types", () => { } input MovieUpdateInput { - imdb_SET: ID - title_SET: String + imdb: IDScalarMutations + imdb_SET: ID @deprecated(reason: \\"Please use the generic mutation 'imdb: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { @@ -105,16 +115,18 @@ describe("Node Interface Types", () => { NOT: MovieWhere OR: [MovieWhere!] id: ID - imdb_CONTAINS: ID - imdb_ENDS_WITH: ID - imdb_EQ: ID - imdb_IN: [ID!] - imdb_STARTS_WITH: ID - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + imdb: IDScalarFilters + imdb_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter imdb: { contains: ... }\\") + imdb_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter imdb: { endsWith: ... }\\") + imdb_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter imdb: { eq: ... }\\") + imdb_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter imdb: { in: ... }\\") + imdb_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter imdb: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -167,6 +179,20 @@ describe("Node Interface Types", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" diff --git a/packages/graphql/tests/schema/inheritance.test.ts b/packages/graphql/tests/schema/inheritance.test.ts index d50e72aff3..d4665a351f 100644 --- a/packages/graphql/tests/schema/inheritance.test.ts +++ b/packages/graphql/tests/schema/inheritance.test.ts @@ -88,6 +88,7 @@ describe("inheritance", () => { AND: [ActorFriendsAggregateInput!] NOT: ActorFriendsAggregateInput OR: [ActorFriendsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -103,6 +104,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! @@ -127,21 +147,22 @@ describe("inheritance", () => { AND: [ActorFriendsNodeAggregationWhereInput!] NOT: ActorFriendsNodeAggregationWhereInput OR: [ActorFriendsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } input ActorFriendsUpdateConnectionInput { @@ -181,43 +202,47 @@ describe("inheritance", () => { input ActorUpdateInput { friends: [ActorFriendsUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + friends: PersonRelationshipFilters friendsAggregate: ActorFriendsAggregateInput + friendsConnection: ActorFriendsConnectionFilters \\"\\"\\" Return Actors where all of the related PersonFriendsConnections match this filter \\"\\"\\" - friendsConnection_ALL: PersonFriendsConnectionWhere + friendsConnection_ALL: PersonFriendsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'friendsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related PersonFriendsConnections match this filter \\"\\"\\" - friendsConnection_NONE: PersonFriendsConnectionWhere + friendsConnection_NONE: PersonFriendsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'friendsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related PersonFriendsConnections match this filter \\"\\"\\" - friendsConnection_SINGLE: PersonFriendsConnectionWhere + friendsConnection_SINGLE: PersonFriendsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'friendsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related PersonFriendsConnections match this filter \\"\\"\\" - friendsConnection_SOME: PersonFriendsConnectionWhere + friendsConnection_SOME: PersonFriendsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'friendsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related People match this filter\\"\\"\\" - friends_ALL: PersonWhere + friends_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'friends: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related People match this filter\\"\\"\\" - friends_NONE: PersonWhere + friends_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'friends: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related People match this filter\\"\\"\\" - friends_SINGLE: PersonWhere + friends_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'friends: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related People match this filter\\"\\"\\" - friends_SOME: PersonWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + friends_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'friends: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -247,6 +272,16 @@ describe("inheritance", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + \\"\\"\\" The edge properties for the following fields: * Actor.friends @@ -259,26 +294,27 @@ describe("inheritance", () => { AND: [FriendsWithAggregationWhereInput!] NOT: FriendsWithAggregationWhereInput OR: [FriendsWithAggregationWhereInput!] - since_AVERAGE_EQUAL: Float - since_AVERAGE_GT: Float - since_AVERAGE_GTE: Float - since_AVERAGE_LT: Float - since_AVERAGE_LTE: Float - since_MAX_EQUAL: Int - since_MAX_GT: Int - since_MAX_GTE: Int - since_MAX_LT: Int - since_MAX_LTE: Int - since_MIN_EQUAL: Int - since_MIN_GT: Int - since_MIN_GTE: Int - since_MIN_LT: Int - since_MIN_LTE: Int - since_SUM_EQUAL: Int - since_SUM_GT: Int - since_SUM_GTE: Int - since_SUM_LT: Int - since_SUM_LTE: Int + since: IntScalarAggregationFilters + since_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'since: { average: { eq: ... } } }' instead.\\") + since_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'since: { average: { gt: ... } } }' instead.\\") + since_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'since: { average: { gte: ... } } }' instead.\\") + since_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'since: { average: { lt: ... } } }' instead.\\") + since_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'since: { average: { lte: ... } } }' instead.\\") + since_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'since: { max: { eq: ... } } }' instead.\\") + since_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'since: { max: { gt: ... } } }' instead.\\") + since_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'since: { max: { gte: ... } } }' instead.\\") + since_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'since: { max: { lt: ... } } }' instead.\\") + since_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'since: { max: { lte: ... } } }' instead.\\") + since_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'since: { min: { eq: ... } } }' instead.\\") + since_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'since: { min: { gt: ... } } }' instead.\\") + since_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'since: { min: { gte: ... } } }' instead.\\") + since_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'since: { min: { lt: ... } } }' instead.\\") + since_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'since: { min: { lte: ... } } }' instead.\\") + since_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'since: { sum: { eq: ... } } }' instead.\\") + since_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'since: { sum: { gt: ... } } }' instead.\\") + since_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'since: { sum: { gte: ... } } }' instead.\\") + since_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'since: { sum: { lt: ... } } }' instead.\\") + since_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'since: { sum: { lte: ... } } }' instead.\\") } input FriendsWithCreateInput { @@ -290,21 +326,23 @@ describe("inheritance", () => { } input FriendsWithUpdateInput { - since_DECREMENT: Int - since_INCREMENT: Int - since_SET: Int + since: IntScalarMutations + since_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'since: { decrement: ... } }' instead.\\") + since_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'since: { increment: ... } }' instead.\\") + since_SET: Int @deprecated(reason: \\"Please use the generic mutation 'since: { set: ... } }' instead.\\") } input FriendsWithWhere { AND: [FriendsWithWhere!] NOT: FriendsWithWhere OR: [FriendsWithWhere!] - since_EQ: Int - since_GT: Int - since_GTE: Int - since_IN: [Int] - since_LT: Int - since_LTE: Int + since: IntScalarFilters + since_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter since: { eq: ... }\\") + since_GT: Int @deprecated(reason: \\"Please use the relevant generic filter since: { gt: ... }\\") + since_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter since: { gte: ... }\\") + since_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter since: { in: ... }\\") + since_LT: Int @deprecated(reason: \\"Please use the relevant generic filter since: { lt: ... }\\") + since_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter since: { lte: ... }\\") } type IntAggregateSelection { @@ -314,6 +352,31 @@ describe("inheritance", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Mutation { createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! @@ -374,6 +437,7 @@ describe("inheritance", () => { AND: [PersonFriendsAggregateInput!] NOT: PersonFriendsAggregateInput OR: [PersonFriendsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -395,6 +459,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 @@ -467,21 +550,22 @@ describe("inheritance", () => { AND: [PersonFriendsNodeAggregationWhereInput!] NOT: PersonFriendsNodeAggregationWhereInput OR: [PersonFriendsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type PersonFriendsRelationship { @@ -510,6 +594,17 @@ describe("inheritance", () => { Actor } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -519,6 +614,7 @@ describe("inheritance", () => { input PersonUpdateInput { friends: [PersonFriendsUpdateFieldInput!] + name: StringScalarMutations name_SET: String } @@ -526,37 +622,40 @@ describe("inheritance", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] + friends: PersonRelationshipFilters friendsAggregate: PersonFriendsAggregateInput + friendsConnection: PersonFriendsConnectionFilters \\"\\"\\" Return People where all of the related PersonFriendsConnections match this filter \\"\\"\\" - friendsConnection_ALL: PersonFriendsConnectionWhere + friendsConnection_ALL: PersonFriendsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'friendsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return People where none of the related PersonFriendsConnections match this filter \\"\\"\\" - friendsConnection_NONE: PersonFriendsConnectionWhere + friendsConnection_NONE: PersonFriendsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'friendsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return People where one of the related PersonFriendsConnections match this filter \\"\\"\\" - friendsConnection_SINGLE: PersonFriendsConnectionWhere + friendsConnection_SINGLE: PersonFriendsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'friendsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return People where some of the related PersonFriendsConnections match this filter \\"\\"\\" - friendsConnection_SOME: PersonFriendsConnectionWhere + friendsConnection_SOME: PersonFriendsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'friendsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return People where all of the related People match this filter\\"\\"\\" - friends_ALL: PersonWhere + friends_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'friends: { all: ... }' instead.\\") \\"\\"\\"Return People where none of the related People match this filter\\"\\"\\" - friends_NONE: PersonWhere + friends_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'friends: { none: ... }' instead.\\") \\"\\"\\"Return People where one of the related People match this filter\\"\\"\\" - friends_SINGLE: PersonWhere + friends_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'friends: { single: ... }' instead.\\") \\"\\"\\"Return People where some of the related People match this filter\\"\\"\\" - friends_SOME: PersonWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + friends_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'friends: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + typename: [PersonImplementation!] } type Query { @@ -581,6 +680,27 @@ describe("inheritance", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/inputs.test.ts b/packages/graphql/tests/schema/inputs.test.ts index c69e92e60f..aed9b70780 100644 --- a/packages/graphql/tests/schema/inputs.test.ts +++ b/packages/graphql/tests/schema/inputs.test.ts @@ -67,9 +67,18 @@ describe("Inputs", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -78,7 +87,6 @@ describe("Inputs", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -98,18 +106,20 @@ describe("Inputs", () => { } input MovieUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { diff --git a/packages/graphql/tests/schema/interface-relationships.test.ts b/packages/graphql/tests/schema/interface-relationships.test.ts index ae2885e087..8657de6b3e 100644 --- a/packages/graphql/tests/schema/interface-relationships.test.ts +++ b/packages/graphql/tests/schema/interface-relationships.test.ts @@ -69,26 +69,27 @@ describe("Interface Relationships", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_MAX_EQUAL: Int - screenTime_MAX_GT: Int - screenTime_MAX_GTE: Int - screenTime_MAX_LT: Int - screenTime_MAX_LTE: Int - screenTime_MIN_EQUAL: Int - screenTime_MIN_GT: Int - screenTime_MIN_GTE: Int - screenTime_MIN_LT: Int - screenTime_MIN_LTE: Int - screenTime_SUM_EQUAL: Int - screenTime_SUM_GT: Int - screenTime_SUM_GTE: Int - screenTime_SUM_LT: Int - screenTime_SUM_LTE: Int + screenTime: IntScalarAggregationFilters + screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { eq: ... } } }' instead.\\") + screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gt: ... } } }' instead.\\") + screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gte: ... } } }' instead.\\") + screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lt: ... } } }' instead.\\") + screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lte: ... } } }' instead.\\") + screenTime_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { eq: ... } } }' instead.\\") + screenTime_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gt: ... } } }' instead.\\") + screenTime_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gte: ... } } }' instead.\\") + screenTime_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lt: ... } } }' instead.\\") + screenTime_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lte: ... } } }' instead.\\") + screenTime_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { eq: ... } } }' instead.\\") + screenTime_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gt: ... } } }' instead.\\") + screenTime_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gte: ... } } }' instead.\\") + screenTime_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lt: ... } } }' instead.\\") + screenTime_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lte: ... } } }' instead.\\") + screenTime_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { eq: ... } } }' instead.\\") + screenTime_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gt: ... } } }' instead.\\") + screenTime_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gte: ... } } }' instead.\\") + screenTime_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lt: ... } } }' instead.\\") + screenTime_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lte: ... } } }' instead.\\") } input ActedInCreateInput { @@ -100,21 +101,23 @@ describe("Interface Relationships", () => { } input ActedInUpdateInput { - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - screenTime_SET: Int + screenTime: IntScalarMutations + screenTime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { decrement: ... } }' instead.\\") + screenTime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { increment: ... } }' instead.\\") + screenTime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'screenTime: { set: ... } }' instead.\\") } input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime_EQ: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int + screenTime: IntScalarFilters + screenTime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { eq: ... }\\") + screenTime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gt: ... }\\") + screenTime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gte: ... }\\") + screenTime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter screenTime: { in: ... }\\") + screenTime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lt: ... }\\") + screenTime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lte: ... }\\") } type Actor { @@ -128,6 +131,7 @@ describe("Interface Relationships", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -148,6 +152,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 @@ -183,21 +206,22 @@ describe("Interface Relationships", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -262,43 +286,47 @@ describe("Interface Relationships", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ProductionRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere + actedIn_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere + actedIn_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere + actedIn_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -338,6 +366,16 @@ describe("Interface Relationships", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + type IntAggregateSelection { average: Float max: Int @@ -345,6 +383,31 @@ describe("Interface Relationships", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie implements Production { runtime: Int! title: String! @@ -375,27 +438,31 @@ describe("Interface Relationships", () => { } input MovieUpdateInput { - runtime_DECREMENT: Int - runtime_INCREMENT: Int - runtime_SET: Int - title_SET: String + runtime: IntScalarMutations + runtime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { decrement: ... } }' instead.\\") + runtime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { increment: ... } }' instead.\\") + runtime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'runtime: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - runtime_EQ: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + runtime: IntScalarFilters + runtime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { eq: ... }\\") + runtime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gt: ... }\\") + runtime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gte: ... }\\") + runtime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter runtime: { in: ... }\\") + runtime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lt: ... }\\") + runtime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -452,6 +519,17 @@ describe("Interface Relationships", () => { Series } + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + \\"\\"\\" Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. \\"\\"\\" @@ -460,19 +538,21 @@ describe("Interface Relationships", () => { } input ProductionUpdateInput { - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -532,27 +612,31 @@ describe("Interface Relationships", () => { } input SeriesUpdateInput { - episodes_DECREMENT: Int - episodes_INCREMENT: Int - episodes_SET: Int - title_SET: String + episodes: IntScalarMutations + episodes_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodes: { decrement: ... } }' instead.\\") + episodes_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodes: { increment: ... } }' instead.\\") + episodes_SET: Int @deprecated(reason: \\"Please use the generic mutation 'episodes: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] - episodes_EQ: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + episodes: IntScalarFilters + episodes_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { eq: ... }\\") + episodes_GT: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { gt: ... }\\") + episodes_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { gte: ... }\\") + episodes_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter episodes: { in: ... }\\") + episodes_LT: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { lt: ... }\\") + episodes_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -568,6 +652,27 @@ describe("Interface Relationships", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -652,26 +757,27 @@ describe("Interface Relationships", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_MAX_EQUAL: Int - screenTime_MAX_GT: Int - screenTime_MAX_GTE: Int - screenTime_MAX_LT: Int - screenTime_MAX_LTE: Int - screenTime_MIN_EQUAL: Int - screenTime_MIN_GT: Int - screenTime_MIN_GTE: Int - screenTime_MIN_LT: Int - screenTime_MIN_LTE: Int - screenTime_SUM_EQUAL: Int - screenTime_SUM_GT: Int - screenTime_SUM_GTE: Int - screenTime_SUM_LT: Int - screenTime_SUM_LTE: Int + screenTime: IntScalarAggregationFilters + screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { eq: ... } } }' instead.\\") + screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gt: ... } } }' instead.\\") + screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gte: ... } } }' instead.\\") + screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lt: ... } } }' instead.\\") + screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lte: ... } } }' instead.\\") + screenTime_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { eq: ... } } }' instead.\\") + screenTime_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gt: ... } } }' instead.\\") + screenTime_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gte: ... } } }' instead.\\") + screenTime_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lt: ... } } }' instead.\\") + screenTime_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lte: ... } } }' instead.\\") + screenTime_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { eq: ... } } }' instead.\\") + screenTime_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gt: ... } } }' instead.\\") + screenTime_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gte: ... } } }' instead.\\") + screenTime_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lt: ... } } }' instead.\\") + screenTime_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lte: ... } } }' instead.\\") + screenTime_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { eq: ... } } }' instead.\\") + screenTime_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gt: ... } } }' instead.\\") + screenTime_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gte: ... } } }' instead.\\") + screenTime_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lt: ... } } }' instead.\\") + screenTime_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lte: ... } } }' instead.\\") } input ActedInCreateInput { @@ -683,21 +789,23 @@ describe("Interface Relationships", () => { } input ActedInUpdateInput { - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - screenTime_SET: Int + screenTime: IntScalarMutations + screenTime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { decrement: ... } }' instead.\\") + screenTime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { increment: ... } }' instead.\\") + screenTime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'screenTime: { set: ... } }' instead.\\") } input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime_EQ: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int + screenTime: IntScalarFilters + screenTime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { eq: ... }\\") + screenTime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gt: ... }\\") + screenTime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gte: ... }\\") + screenTime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter screenTime: { in: ... }\\") + screenTime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lt: ... }\\") + screenTime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lte: ... }\\") } type Actor { @@ -711,6 +819,7 @@ describe("Interface Relationships", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -732,6 +841,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 @@ -769,21 +897,22 @@ describe("Interface Relationships", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -851,6 +980,17 @@ describe("Interface Relationships", () => { title: StringAggregateSelection! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -860,43 +1000,47 @@ describe("Interface Relationships", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ProductionRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere + actedIn_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere + actedIn_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere + actedIn_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -979,10 +1123,22 @@ describe("Interface Relationships", () => { node: Episode! } + input EpisodeRelationshipFilters { + \\"\\"\\"Filter type where all of the related Episodes match this filter\\"\\"\\" + all: EpisodeWhere + \\"\\"\\"Filter type where none of the related Episodes match this filter\\"\\"\\" + none: EpisodeWhere + \\"\\"\\"Filter type where one of the related Episodes match this filter\\"\\"\\" + single: EpisodeWhere + \\"\\"\\"Filter type where some of the related Episodes match this filter\\"\\"\\" + some: EpisodeWhere + } + input EpisodeSeriesAggregateInput { AND: [EpisodeSeriesAggregateInput!] NOT: EpisodeSeriesAggregateInput OR: [EpisodeSeriesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1002,6 +1158,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 } @@ -1036,41 +1211,43 @@ describe("Interface Relationships", () => { AND: [EpisodeSeriesNodeAggregationWhereInput!] NOT: EpisodeSeriesNodeAggregationWhereInput OR: [EpisodeSeriesNodeAggregationWhereInput!] - episodeCount_AVERAGE_EQUAL: Float - episodeCount_AVERAGE_GT: Float - episodeCount_AVERAGE_GTE: Float - episodeCount_AVERAGE_LT: Float - episodeCount_AVERAGE_LTE: Float - episodeCount_MAX_EQUAL: Int - episodeCount_MAX_GT: Int - episodeCount_MAX_GTE: Int - episodeCount_MAX_LT: Int - episodeCount_MAX_LTE: Int - episodeCount_MIN_EQUAL: Int - episodeCount_MIN_GT: Int - episodeCount_MIN_GTE: Int - episodeCount_MIN_LT: Int - episodeCount_MIN_LTE: Int - episodeCount_SUM_EQUAL: Int - episodeCount_SUM_GT: Int - episodeCount_SUM_GTE: Int - episodeCount_SUM_LT: Int - episodeCount_SUM_LTE: Int - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + episodeCount: IntScalarAggregationFilters + episodeCount_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { average: { eq: ... } } }' instead.\\") + episodeCount_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { average: { gt: ... } } }' instead.\\") + episodeCount_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { average: { gte: ... } } }' instead.\\") + episodeCount_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { average: { lt: ... } } }' instead.\\") + episodeCount_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { average: { lte: ... } } }' instead.\\") + episodeCount_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { max: { eq: ... } } }' instead.\\") + episodeCount_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { max: { gt: ... } } }' instead.\\") + episodeCount_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { max: { gte: ... } } }' instead.\\") + episodeCount_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { max: { lt: ... } } }' instead.\\") + episodeCount_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { max: { lte: ... } } }' instead.\\") + episodeCount_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { min: { eq: ... } } }' instead.\\") + episodeCount_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { min: { gt: ... } } }' instead.\\") + episodeCount_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { min: { gte: ... } } }' instead.\\") + episodeCount_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { min: { lt: ... } } }' instead.\\") + episodeCount_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { min: { lte: ... } } }' instead.\\") + episodeCount_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { sum: { eq: ... } } }' instead.\\") + episodeCount_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { sum: { gt: ... } } }' instead.\\") + episodeCount_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { sum: { gte: ... } } }' instead.\\") + episodeCount_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { sum: { lt: ... } } }' instead.\\") + episodeCount_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { sum: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type EpisodeSeriesRelationship { @@ -1109,9 +1286,10 @@ describe("Interface Relationships", () => { } input EpisodeUpdateInput { - runtime_DECREMENT: Int - runtime_INCREMENT: Int - runtime_SET: Int + runtime: IntScalarMutations + runtime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { decrement: ... } }' instead.\\") + runtime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { increment: ... } }' instead.\\") + runtime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'runtime: { set: ... } }' instead.\\") series: [EpisodeSeriesUpdateFieldInput!] } @@ -1119,37 +1297,40 @@ describe("Interface Relationships", () => { AND: [EpisodeWhere!] NOT: EpisodeWhere OR: [EpisodeWhere!] - runtime_EQ: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int + runtime: IntScalarFilters + runtime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { eq: ... }\\") + runtime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gt: ... }\\") + runtime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gte: ... }\\") + runtime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter runtime: { in: ... }\\") + runtime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lt: ... }\\") + runtime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lte: ... }\\") + series: SeriesRelationshipFilters seriesAggregate: EpisodeSeriesAggregateInput + seriesConnection: EpisodeSeriesConnectionFilters \\"\\"\\" Return Episodes where all of the related EpisodeSeriesConnections match this filter \\"\\"\\" - seriesConnection_ALL: EpisodeSeriesConnectionWhere + seriesConnection_ALL: EpisodeSeriesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'seriesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Episodes where none of the related EpisodeSeriesConnections match this filter \\"\\"\\" - seriesConnection_NONE: EpisodeSeriesConnectionWhere + seriesConnection_NONE: EpisodeSeriesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'seriesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Episodes where one of the related EpisodeSeriesConnections match this filter \\"\\"\\" - seriesConnection_SINGLE: EpisodeSeriesConnectionWhere + seriesConnection_SINGLE: EpisodeSeriesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'seriesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Episodes where some of the related EpisodeSeriesConnections match this filter \\"\\"\\" - seriesConnection_SOME: EpisodeSeriesConnectionWhere + seriesConnection_SOME: EpisodeSeriesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'seriesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Episodes where all of the related Series match this filter\\"\\"\\" - series_ALL: SeriesWhere + series_ALL: SeriesWhere @deprecated(reason: \\"Please use the relevant generic filter 'series: { all: ... }' instead.\\") \\"\\"\\"Return Episodes where none of the related Series match this filter\\"\\"\\" - series_NONE: SeriesWhere + series_NONE: SeriesWhere @deprecated(reason: \\"Please use the relevant generic filter 'series: { none: ... }' instead.\\") \\"\\"\\"Return Episodes where one of the related Series match this filter\\"\\"\\" - series_SINGLE: SeriesWhere + series_SINGLE: SeriesWhere @deprecated(reason: \\"Please use the relevant generic filter 'series: { single: ... }' instead.\\") \\"\\"\\"Return Episodes where some of the related Series match this filter\\"\\"\\" - series_SOME: SeriesWhere + series_SOME: SeriesWhere @deprecated(reason: \\"Please use the relevant generic filter 'series: { some: ... }' instead.\\") } type EpisodesConnection { @@ -1158,6 +1339,16 @@ describe("Interface Relationships", () => { totalCount: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + type IntAggregateSelection { average: Float max: Int @@ -1165,6 +1356,31 @@ describe("Interface Relationships", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie implements Production { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -1191,6 +1407,7 @@ describe("Interface Relationships", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1206,6 +1423,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! @@ -1220,21 +1456,22 @@ describe("Interface Relationships", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } input MovieActorsUpdateConnectionInput { @@ -1282,52 +1519,58 @@ describe("Interface Relationships", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - runtime_DECREMENT: Int - runtime_INCREMENT: Int - runtime_SET: Int - title_SET: String + runtime: IntScalarMutations + runtime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { decrement: ... } }' instead.\\") + runtime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { increment: ... } }' instead.\\") + runtime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'runtime: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere + actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere + actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere + actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - runtime_EQ: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + runtime: IntScalarFilters + runtime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { eq: ... }\\") + runtime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gt: ... }\\") + runtime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gte: ... }\\") + runtime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter runtime: { in: ... }\\") + runtime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lt: ... }\\") + runtime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -1369,6 +1612,7 @@ describe("Interface Relationships", () => { AND: [ProductionActorsAggregateInput!] NOT: ProductionActorsAggregateInput OR: [ProductionActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1390,6 +1634,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 @@ -1467,21 +1730,22 @@ describe("Interface Relationships", () => { AND: [ProductionActorsNodeAggregationWhereInput!] NOT: ProductionActorsNodeAggregationWhereInput OR: [ProductionActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type ProductionActorsRelationship { @@ -1542,6 +1806,17 @@ describe("Interface Relationships", () => { Series } + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + \\"\\"\\" Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. \\"\\"\\" @@ -1551,44 +1826,48 @@ describe("Interface Relationships", () => { input ProductionUpdateInput { actors: [ProductionActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] + actors: ActorRelationshipFilters actorsAggregate: ProductionActorsAggregateInput + actorsConnection: ProductionActorsConnectionFilters \\"\\"\\" Return Productions where all of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere + actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where none of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where one of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere + actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where some of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere + actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Productions where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Productions where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Productions where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Productions where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -1644,6 +1923,7 @@ describe("Interface Relationships", () => { AND: [SeriesActorsAggregateInput!] NOT: SeriesActorsAggregateInput OR: [SeriesActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1659,6 +1939,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! @@ -1673,21 +1972,22 @@ describe("Interface Relationships", () => { AND: [SeriesActorsNodeAggregationWhereInput!] NOT: SeriesActorsNodeAggregationWhereInput OR: [SeriesActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } input SeriesActorsUpdateConnectionInput { @@ -1760,6 +2060,7 @@ describe("Interface Relationships", () => { AND: [SeriesEpisodesAggregateInput!] NOT: SeriesEpisodesAggregateInput OR: [SeriesEpisodesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1779,6 +2080,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 } @@ -1813,26 +2133,27 @@ describe("Interface Relationships", () => { AND: [SeriesEpisodesNodeAggregationWhereInput!] NOT: SeriesEpisodesNodeAggregationWhereInput OR: [SeriesEpisodesNodeAggregationWhereInput!] - runtime_AVERAGE_EQUAL: Float - runtime_AVERAGE_GT: Float - runtime_AVERAGE_GTE: Float - runtime_AVERAGE_LT: Float - runtime_AVERAGE_LTE: Float - runtime_MAX_EQUAL: Int - runtime_MAX_GT: Int - runtime_MAX_GTE: Int - runtime_MAX_LT: Int - runtime_MAX_LTE: Int - runtime_MIN_EQUAL: Int - runtime_MIN_GT: Int - runtime_MIN_GTE: Int - runtime_MIN_LT: Int - runtime_MIN_LTE: Int - runtime_SUM_EQUAL: Int - runtime_SUM_GT: Int - runtime_SUM_GTE: Int - runtime_SUM_LT: Int - runtime_SUM_LTE: Int + runtime: IntScalarAggregationFilters + runtime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { eq: ... } } }' instead.\\") + runtime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { gt: ... } } }' instead.\\") + runtime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { gte: ... } } }' instead.\\") + runtime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { lt: ... } } }' instead.\\") + runtime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { lte: ... } } }' instead.\\") + runtime_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { eq: ... } } }' instead.\\") + runtime_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { gt: ... } } }' instead.\\") + runtime_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { gte: ... } } }' instead.\\") + runtime_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { lt: ... } } }' instead.\\") + runtime_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { lte: ... } } }' instead.\\") + runtime_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { eq: ... } } }' instead.\\") + runtime_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { gt: ... } } }' instead.\\") + runtime_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { gte: ... } } }' instead.\\") + runtime_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { lt: ... } } }' instead.\\") + runtime_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { lte: ... } } }' instead.\\") + runtime_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { eq: ... } } }' instead.\\") + runtime_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { gt: ... } } }' instead.\\") + runtime_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { gte: ... } } }' instead.\\") + runtime_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { lt: ... } } }' instead.\\") + runtime_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { lte: ... } } }' instead.\\") } type SeriesEpisodesRelationship { @@ -1853,6 +2174,17 @@ describe("Interface Relationships", () => { where: SeriesEpisodesConnectionWhere } + input SeriesRelationshipFilters { + \\"\\"\\"Filter type where all of the related Series match this filter\\"\\"\\" + all: SeriesWhere + \\"\\"\\"Filter type where none of the related Series match this filter\\"\\"\\" + none: SeriesWhere + \\"\\"\\"Filter type where one of the related Series match this filter\\"\\"\\" + single: SeriesWhere + \\"\\"\\"Filter type where some of the related Series match this filter\\"\\"\\" + some: SeriesWhere + } + \\"\\"\\" Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. \\"\\"\\" @@ -1863,78 +2195,86 @@ describe("Interface Relationships", () => { input SeriesUpdateInput { actors: [SeriesActorsUpdateFieldInput!] - episodeCount_DECREMENT: Int - episodeCount_INCREMENT: Int - episodeCount_SET: Int + episodeCount: IntScalarMutations + episodeCount_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodeCount: { decrement: ... } }' instead.\\") + episodeCount_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodeCount: { increment: ... } }' instead.\\") + episodeCount_SET: Int @deprecated(reason: \\"Please use the generic mutation 'episodeCount: { set: ... } }' instead.\\") episodes: [SeriesEpisodesUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] + actors: ActorRelationshipFilters actorsAggregate: SeriesActorsAggregateInput + actorsConnection: SeriesActorsConnectionFilters \\"\\"\\" Return Series where all of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere + actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where none of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where one of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere + actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where some of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere + actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - episodeCount_EQ: Int - episodeCount_GT: Int - episodeCount_GTE: Int - episodeCount_IN: [Int!] - episodeCount_LT: Int - episodeCount_LTE: Int + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + episodeCount: IntScalarFilters + episodeCount_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter episodeCount: { eq: ... }\\") + episodeCount_GT: Int @deprecated(reason: \\"Please use the relevant generic filter episodeCount: { gt: ... }\\") + episodeCount_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodeCount: { gte: ... }\\") + episodeCount_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter episodeCount: { in: ... }\\") + episodeCount_LT: Int @deprecated(reason: \\"Please use the relevant generic filter episodeCount: { lt: ... }\\") + episodeCount_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodeCount: { lte: ... }\\") + episodes: EpisodeRelationshipFilters episodesAggregate: SeriesEpisodesAggregateInput + episodesConnection: SeriesEpisodesConnectionFilters \\"\\"\\" Return Series where all of the related SeriesEpisodesConnections match this filter \\"\\"\\" - episodesConnection_ALL: SeriesEpisodesConnectionWhere + episodesConnection_ALL: SeriesEpisodesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'episodesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where none of the related SeriesEpisodesConnections match this filter \\"\\"\\" - episodesConnection_NONE: SeriesEpisodesConnectionWhere + episodesConnection_NONE: SeriesEpisodesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'episodesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where one of the related SeriesEpisodesConnections match this filter \\"\\"\\" - episodesConnection_SINGLE: SeriesEpisodesConnectionWhere + episodesConnection_SINGLE: SeriesEpisodesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'episodesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where some of the related SeriesEpisodesConnections match this filter \\"\\"\\" - episodesConnection_SOME: SeriesEpisodesConnectionWhere + episodesConnection_SOME: SeriesEpisodesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'episodesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Series where all of the related Episodes match this filter\\"\\"\\" - episodes_ALL: EpisodeWhere + episodes_ALL: EpisodeWhere @deprecated(reason: \\"Please use the relevant generic filter 'episodes: { all: ... }' instead.\\") \\"\\"\\"Return Series where none of the related Episodes match this filter\\"\\"\\" - episodes_NONE: EpisodeWhere + episodes_NONE: EpisodeWhere @deprecated(reason: \\"Please use the relevant generic filter 'episodes: { none: ... }' instead.\\") \\"\\"\\"Return Series where one of the related Episodes match this filter\\"\\"\\" - episodes_SINGLE: EpisodeWhere + episodes_SINGLE: EpisodeWhere @deprecated(reason: \\"Please use the relevant generic filter 'episodes: { single: ... }' instead.\\") \\"\\"\\"Return Series where some of the related Episodes match this filter\\"\\"\\" - episodes_SOME: EpisodeWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + episodes_SOME: EpisodeWhere @deprecated(reason: \\"Please use the relevant generic filter 'episodes: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -1950,6 +2290,27 @@ describe("Interface Relationships", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -2042,26 +2403,27 @@ describe("Interface Relationships", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_MAX_EQUAL: Int - screenTime_MAX_GT: Int - screenTime_MAX_GTE: Int - screenTime_MAX_LT: Int - screenTime_MAX_LTE: Int - screenTime_MIN_EQUAL: Int - screenTime_MIN_GT: Int - screenTime_MIN_GTE: Int - screenTime_MIN_LT: Int - screenTime_MIN_LTE: Int - screenTime_SUM_EQUAL: Int - screenTime_SUM_GT: Int - screenTime_SUM_GTE: Int - screenTime_SUM_LT: Int - screenTime_SUM_LTE: Int + screenTime: IntScalarAggregationFilters + screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { eq: ... } } }' instead.\\") + screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gt: ... } } }' instead.\\") + screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gte: ... } } }' instead.\\") + screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lt: ... } } }' instead.\\") + screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lte: ... } } }' instead.\\") + screenTime_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { eq: ... } } }' instead.\\") + screenTime_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gt: ... } } }' instead.\\") + screenTime_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gte: ... } } }' instead.\\") + screenTime_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lt: ... } } }' instead.\\") + screenTime_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lte: ... } } }' instead.\\") + screenTime_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { eq: ... } } }' instead.\\") + screenTime_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gt: ... } } }' instead.\\") + screenTime_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gte: ... } } }' instead.\\") + screenTime_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lt: ... } } }' instead.\\") + screenTime_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lte: ... } } }' instead.\\") + screenTime_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { eq: ... } } }' instead.\\") + screenTime_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gt: ... } } }' instead.\\") + screenTime_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gte: ... } } }' instead.\\") + screenTime_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lt: ... } } }' instead.\\") + screenTime_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lte: ... } } }' instead.\\") } input ActedInCreateInput { @@ -2073,21 +2435,23 @@ describe("Interface Relationships", () => { } input ActedInUpdateInput { - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - screenTime_SET: Int + screenTime: IntScalarMutations + screenTime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { decrement: ... } }' instead.\\") + screenTime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { increment: ... } }' instead.\\") + screenTime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'screenTime: { set: ... } }' instead.\\") } input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime_EQ: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int + screenTime: IntScalarFilters + screenTime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { eq: ... }\\") + screenTime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gt: ... }\\") + screenTime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gte: ... }\\") + screenTime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter screenTime: { in: ... }\\") + screenTime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lt: ... }\\") + screenTime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lte: ... }\\") } type Actor { @@ -2101,6 +2465,7 @@ describe("Interface Relationships", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -2122,6 +2487,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 @@ -2159,21 +2543,22 @@ describe("Interface Relationships", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -2241,6 +2626,17 @@ describe("Interface Relationships", () => { title: StringAggregateSelection! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -2250,43 +2646,47 @@ describe("Interface Relationships", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ProductionRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere + actedIn_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere + actedIn_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere + actedIn_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -2369,10 +2769,22 @@ describe("Interface Relationships", () => { node: Episode! } + input EpisodeRelationshipFilters { + \\"\\"\\"Filter type where all of the related Episodes match this filter\\"\\"\\" + all: EpisodeWhere + \\"\\"\\"Filter type where none of the related Episodes match this filter\\"\\"\\" + none: EpisodeWhere + \\"\\"\\"Filter type where one of the related Episodes match this filter\\"\\"\\" + single: EpisodeWhere + \\"\\"\\"Filter type where some of the related Episodes match this filter\\"\\"\\" + some: EpisodeWhere + } + input EpisodeSeriesAggregateInput { AND: [EpisodeSeriesAggregateInput!] NOT: EpisodeSeriesAggregateInput OR: [EpisodeSeriesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -2392,6 +2804,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 } @@ -2426,41 +2857,43 @@ describe("Interface Relationships", () => { AND: [EpisodeSeriesNodeAggregationWhereInput!] NOT: EpisodeSeriesNodeAggregationWhereInput OR: [EpisodeSeriesNodeAggregationWhereInput!] - episodeCount_AVERAGE_EQUAL: Float - episodeCount_AVERAGE_GT: Float - episodeCount_AVERAGE_GTE: Float - episodeCount_AVERAGE_LT: Float - episodeCount_AVERAGE_LTE: Float - episodeCount_MAX_EQUAL: Int - episodeCount_MAX_GT: Int - episodeCount_MAX_GTE: Int - episodeCount_MAX_LT: Int - episodeCount_MAX_LTE: Int - episodeCount_MIN_EQUAL: Int - episodeCount_MIN_GT: Int - episodeCount_MIN_GTE: Int - episodeCount_MIN_LT: Int - episodeCount_MIN_LTE: Int - episodeCount_SUM_EQUAL: Int - episodeCount_SUM_GT: Int - episodeCount_SUM_GTE: Int - episodeCount_SUM_LT: Int - episodeCount_SUM_LTE: Int - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + episodeCount: IntScalarAggregationFilters + episodeCount_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { average: { eq: ... } } }' instead.\\") + episodeCount_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { average: { gt: ... } } }' instead.\\") + episodeCount_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { average: { gte: ... } } }' instead.\\") + episodeCount_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { average: { lt: ... } } }' instead.\\") + episodeCount_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { average: { lte: ... } } }' instead.\\") + episodeCount_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { max: { eq: ... } } }' instead.\\") + episodeCount_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { max: { gt: ... } } }' instead.\\") + episodeCount_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { max: { gte: ... } } }' instead.\\") + episodeCount_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { max: { lt: ... } } }' instead.\\") + episodeCount_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { max: { lte: ... } } }' instead.\\") + episodeCount_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { min: { eq: ... } } }' instead.\\") + episodeCount_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { min: { gt: ... } } }' instead.\\") + episodeCount_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { min: { gte: ... } } }' instead.\\") + episodeCount_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { min: { lt: ... } } }' instead.\\") + episodeCount_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { min: { lte: ... } } }' instead.\\") + episodeCount_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { sum: { eq: ... } } }' instead.\\") + episodeCount_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { sum: { gt: ... } } }' instead.\\") + episodeCount_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { sum: { gte: ... } } }' instead.\\") + episodeCount_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { sum: { lt: ... } } }' instead.\\") + episodeCount_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeCount: { sum: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type EpisodeSeriesRelationship { @@ -2499,9 +2932,10 @@ describe("Interface Relationships", () => { } input EpisodeUpdateInput { - runtime_DECREMENT: Int - runtime_INCREMENT: Int - runtime_SET: Int + runtime: IntScalarMutations + runtime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { decrement: ... } }' instead.\\") + runtime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { increment: ... } }' instead.\\") + runtime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'runtime: { set: ... } }' instead.\\") series: [EpisodeSeriesUpdateFieldInput!] } @@ -2509,37 +2943,40 @@ describe("Interface Relationships", () => { AND: [EpisodeWhere!] NOT: EpisodeWhere OR: [EpisodeWhere!] - runtime_EQ: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int + runtime: IntScalarFilters + runtime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { eq: ... }\\") + runtime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gt: ... }\\") + runtime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gte: ... }\\") + runtime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter runtime: { in: ... }\\") + runtime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lt: ... }\\") + runtime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lte: ... }\\") + series: SeriesRelationshipFilters seriesAggregate: EpisodeSeriesAggregateInput + seriesConnection: EpisodeSeriesConnectionFilters \\"\\"\\" Return Episodes where all of the related EpisodeSeriesConnections match this filter \\"\\"\\" - seriesConnection_ALL: EpisodeSeriesConnectionWhere + seriesConnection_ALL: EpisodeSeriesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'seriesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Episodes where none of the related EpisodeSeriesConnections match this filter \\"\\"\\" - seriesConnection_NONE: EpisodeSeriesConnectionWhere + seriesConnection_NONE: EpisodeSeriesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'seriesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Episodes where one of the related EpisodeSeriesConnections match this filter \\"\\"\\" - seriesConnection_SINGLE: EpisodeSeriesConnectionWhere + seriesConnection_SINGLE: EpisodeSeriesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'seriesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Episodes where some of the related EpisodeSeriesConnections match this filter \\"\\"\\" - seriesConnection_SOME: EpisodeSeriesConnectionWhere + seriesConnection_SOME: EpisodeSeriesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'seriesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Episodes where all of the related Series match this filter\\"\\"\\" - series_ALL: SeriesWhere + series_ALL: SeriesWhere @deprecated(reason: \\"Please use the relevant generic filter 'series: { all: ... }' instead.\\") \\"\\"\\"Return Episodes where none of the related Series match this filter\\"\\"\\" - series_NONE: SeriesWhere + series_NONE: SeriesWhere @deprecated(reason: \\"Please use the relevant generic filter 'series: { none: ... }' instead.\\") \\"\\"\\"Return Episodes where one of the related Series match this filter\\"\\"\\" - series_SINGLE: SeriesWhere + series_SINGLE: SeriesWhere @deprecated(reason: \\"Please use the relevant generic filter 'series: { single: ... }' instead.\\") \\"\\"\\"Return Episodes where some of the related Series match this filter\\"\\"\\" - series_SOME: SeriesWhere + series_SOME: SeriesWhere @deprecated(reason: \\"Please use the relevant generic filter 'series: { some: ... }' instead.\\") } type EpisodesConnection { @@ -2548,6 +2985,16 @@ describe("Interface Relationships", () => { totalCount: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + type IntAggregateSelection { average: Float max: Int @@ -2555,6 +3002,31 @@ describe("Interface Relationships", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie implements Production { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -2581,6 +3053,7 @@ describe("Interface Relationships", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -2596,6 +3069,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! @@ -2610,21 +3102,22 @@ describe("Interface Relationships", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } input MovieActorsUpdateConnectionInput { @@ -2672,52 +3165,58 @@ describe("Interface Relationships", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - runtime_DECREMENT: Int - runtime_INCREMENT: Int - runtime_SET: Int - title_SET: String + runtime: IntScalarMutations + runtime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { decrement: ... } }' instead.\\") + runtime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { increment: ... } }' instead.\\") + runtime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'runtime: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere + actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere + actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere + actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - runtime_EQ: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + runtime: IntScalarFilters + runtime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { eq: ... }\\") + runtime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gt: ... }\\") + runtime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gte: ... }\\") + runtime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter runtime: { in: ... }\\") + runtime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lt: ... }\\") + runtime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -2759,6 +3258,7 @@ describe("Interface Relationships", () => { AND: [ProductionActorsAggregateInput!] NOT: ProductionActorsAggregateInput OR: [ProductionActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -2780,6 +3280,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 @@ -2877,21 +3396,22 @@ describe("Interface Relationships", () => { AND: [ProductionActorsNodeAggregationWhereInput!] NOT: ProductionActorsNodeAggregationWhereInput OR: [ProductionActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type ProductionActorsRelationship { @@ -2952,6 +3472,17 @@ describe("Interface Relationships", () => { Series } + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + \\"\\"\\" Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. \\"\\"\\" @@ -2961,44 +3492,48 @@ describe("Interface Relationships", () => { input ProductionUpdateInput { actors: [ProductionActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] + actors: ActorRelationshipFilters actorsAggregate: ProductionActorsAggregateInput + actorsConnection: ProductionActorsConnectionFilters \\"\\"\\" Return Productions where all of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere + actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where none of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where one of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere + actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where some of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere + actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Productions where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Productions where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Productions where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Productions where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -3054,6 +3589,7 @@ describe("Interface Relationships", () => { AND: [SeriesActorsAggregateInput!] NOT: SeriesActorsAggregateInput OR: [SeriesActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -3069,6 +3605,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! @@ -3083,21 +3638,22 @@ describe("Interface Relationships", () => { AND: [SeriesActorsNodeAggregationWhereInput!] NOT: SeriesActorsNodeAggregationWhereInput OR: [SeriesActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } input SeriesActorsUpdateConnectionInput { @@ -3170,6 +3726,7 @@ describe("Interface Relationships", () => { AND: [SeriesEpisodesAggregateInput!] NOT: SeriesEpisodesAggregateInput OR: [SeriesEpisodesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -3189,6 +3746,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 } @@ -3223,26 +3799,27 @@ describe("Interface Relationships", () => { AND: [SeriesEpisodesNodeAggregationWhereInput!] NOT: SeriesEpisodesNodeAggregationWhereInput OR: [SeriesEpisodesNodeAggregationWhereInput!] - runtime_AVERAGE_EQUAL: Float - runtime_AVERAGE_GT: Float - runtime_AVERAGE_GTE: Float - runtime_AVERAGE_LT: Float - runtime_AVERAGE_LTE: Float - runtime_MAX_EQUAL: Int - runtime_MAX_GT: Int - runtime_MAX_GTE: Int - runtime_MAX_LT: Int - runtime_MAX_LTE: Int - runtime_MIN_EQUAL: Int - runtime_MIN_GT: Int - runtime_MIN_GTE: Int - runtime_MIN_LT: Int - runtime_MIN_LTE: Int - runtime_SUM_EQUAL: Int - runtime_SUM_GT: Int - runtime_SUM_GTE: Int - runtime_SUM_LT: Int - runtime_SUM_LTE: Int + runtime: IntScalarAggregationFilters + runtime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { eq: ... } } }' instead.\\") + runtime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { gt: ... } } }' instead.\\") + runtime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { gte: ... } } }' instead.\\") + runtime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { lt: ... } } }' instead.\\") + runtime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { lte: ... } } }' instead.\\") + runtime_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { eq: ... } } }' instead.\\") + runtime_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { gt: ... } } }' instead.\\") + runtime_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { gte: ... } } }' instead.\\") + runtime_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { lt: ... } } }' instead.\\") + runtime_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { lte: ... } } }' instead.\\") + runtime_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { eq: ... } } }' instead.\\") + runtime_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { gt: ... } } }' instead.\\") + runtime_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { gte: ... } } }' instead.\\") + runtime_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { lt: ... } } }' instead.\\") + runtime_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { lte: ... } } }' instead.\\") + runtime_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { eq: ... } } }' instead.\\") + runtime_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { gt: ... } } }' instead.\\") + runtime_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { gte: ... } } }' instead.\\") + runtime_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { lt: ... } } }' instead.\\") + runtime_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { lte: ... } } }' instead.\\") } type SeriesEpisodesRelationship { @@ -3263,6 +3840,17 @@ describe("Interface Relationships", () => { where: SeriesEpisodesConnectionWhere } + input SeriesRelationshipFilters { + \\"\\"\\"Filter type where all of the related Series match this filter\\"\\"\\" + all: SeriesWhere + \\"\\"\\"Filter type where none of the related Series match this filter\\"\\"\\" + none: SeriesWhere + \\"\\"\\"Filter type where one of the related Series match this filter\\"\\"\\" + single: SeriesWhere + \\"\\"\\"Filter type where some of the related Series match this filter\\"\\"\\" + some: SeriesWhere + } + \\"\\"\\" Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. \\"\\"\\" @@ -3273,78 +3861,86 @@ describe("Interface Relationships", () => { input SeriesUpdateInput { actors: [SeriesActorsUpdateFieldInput!] - episodeCount_DECREMENT: Int - episodeCount_INCREMENT: Int - episodeCount_SET: Int + episodeCount: IntScalarMutations + episodeCount_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodeCount: { decrement: ... } }' instead.\\") + episodeCount_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodeCount: { increment: ... } }' instead.\\") + episodeCount_SET: Int @deprecated(reason: \\"Please use the generic mutation 'episodeCount: { set: ... } }' instead.\\") episodes: [SeriesEpisodesUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] + actors: ActorRelationshipFilters actorsAggregate: SeriesActorsAggregateInput + actorsConnection: SeriesActorsConnectionFilters \\"\\"\\" Return Series where all of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: ProductionActorsConnectionWhere + actorsConnection_ALL: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where none of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: ProductionActorsConnectionWhere + actorsConnection_NONE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where one of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: ProductionActorsConnectionWhere + actorsConnection_SINGLE: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where some of the related ProductionActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: ProductionActorsConnectionWhere + actorsConnection_SOME: ProductionActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - episodeCount_EQ: Int - episodeCount_GT: Int - episodeCount_GTE: Int - episodeCount_IN: [Int!] - episodeCount_LT: Int - episodeCount_LTE: Int + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + episodeCount: IntScalarFilters + episodeCount_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter episodeCount: { eq: ... }\\") + episodeCount_GT: Int @deprecated(reason: \\"Please use the relevant generic filter episodeCount: { gt: ... }\\") + episodeCount_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodeCount: { gte: ... }\\") + episodeCount_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter episodeCount: { in: ... }\\") + episodeCount_LT: Int @deprecated(reason: \\"Please use the relevant generic filter episodeCount: { lt: ... }\\") + episodeCount_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodeCount: { lte: ... }\\") + episodes: EpisodeRelationshipFilters episodesAggregate: SeriesEpisodesAggregateInput + episodesConnection: SeriesEpisodesConnectionFilters \\"\\"\\" Return Series where all of the related SeriesEpisodesConnections match this filter \\"\\"\\" - episodesConnection_ALL: SeriesEpisodesConnectionWhere + episodesConnection_ALL: SeriesEpisodesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'episodesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where none of the related SeriesEpisodesConnections match this filter \\"\\"\\" - episodesConnection_NONE: SeriesEpisodesConnectionWhere + episodesConnection_NONE: SeriesEpisodesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'episodesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where one of the related SeriesEpisodesConnections match this filter \\"\\"\\" - episodesConnection_SINGLE: SeriesEpisodesConnectionWhere + episodesConnection_SINGLE: SeriesEpisodesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'episodesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where some of the related SeriesEpisodesConnections match this filter \\"\\"\\" - episodesConnection_SOME: SeriesEpisodesConnectionWhere + episodesConnection_SOME: SeriesEpisodesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'episodesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Series where all of the related Episodes match this filter\\"\\"\\" - episodes_ALL: EpisodeWhere + episodes_ALL: EpisodeWhere @deprecated(reason: \\"Please use the relevant generic filter 'episodes: { all: ... }' instead.\\") \\"\\"\\"Return Series where none of the related Episodes match this filter\\"\\"\\" - episodes_NONE: EpisodeWhere + episodes_NONE: EpisodeWhere @deprecated(reason: \\"Please use the relevant generic filter 'episodes: { none: ... }' instead.\\") \\"\\"\\"Return Series where one of the related Episodes match this filter\\"\\"\\" - episodes_SINGLE: EpisodeWhere + episodes_SINGLE: EpisodeWhere @deprecated(reason: \\"Please use the relevant generic filter 'episodes: { single: ... }' instead.\\") \\"\\"\\"Return Series where some of the related Episodes match this filter\\"\\"\\" - episodes_SOME: EpisodeWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + episodes_SOME: EpisodeWhere @deprecated(reason: \\"Please use the relevant generic filter 'episodes: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -3367,26 +3963,27 @@ describe("Interface Relationships", () => { AND: [StarredInAggregationWhereInput!] NOT: StarredInAggregationWhereInput OR: [StarredInAggregationWhereInput!] - seasons_AVERAGE_EQUAL: Float - seasons_AVERAGE_GT: Float - seasons_AVERAGE_GTE: Float - seasons_AVERAGE_LT: Float - seasons_AVERAGE_LTE: Float - seasons_MAX_EQUAL: Int - seasons_MAX_GT: Int - seasons_MAX_GTE: Int - seasons_MAX_LT: Int - seasons_MAX_LTE: Int - seasons_MIN_EQUAL: Int - seasons_MIN_GT: Int - seasons_MIN_GTE: Int - seasons_MIN_LT: Int - seasons_MIN_LTE: Int - seasons_SUM_EQUAL: Int - seasons_SUM_GT: Int - seasons_SUM_GTE: Int - seasons_SUM_LT: Int - seasons_SUM_LTE: Int + seasons: IntScalarAggregationFilters + seasons_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'seasons: { average: { eq: ... } } }' instead.\\") + seasons_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'seasons: { average: { gt: ... } } }' instead.\\") + seasons_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'seasons: { average: { gte: ... } } }' instead.\\") + seasons_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'seasons: { average: { lt: ... } } }' instead.\\") + seasons_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'seasons: { average: { lte: ... } } }' instead.\\") + seasons_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'seasons: { max: { eq: ... } } }' instead.\\") + seasons_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'seasons: { max: { gt: ... } } }' instead.\\") + seasons_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'seasons: { max: { gte: ... } } }' instead.\\") + seasons_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'seasons: { max: { lt: ... } } }' instead.\\") + seasons_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'seasons: { max: { lte: ... } } }' instead.\\") + seasons_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'seasons: { min: { eq: ... } } }' instead.\\") + seasons_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'seasons: { min: { gt: ... } } }' instead.\\") + seasons_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'seasons: { min: { gte: ... } } }' instead.\\") + seasons_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'seasons: { min: { lt: ... } } }' instead.\\") + seasons_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'seasons: { min: { lte: ... } } }' instead.\\") + seasons_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'seasons: { sum: { eq: ... } } }' instead.\\") + seasons_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'seasons: { sum: { gt: ... } } }' instead.\\") + seasons_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'seasons: { sum: { gte: ... } } }' instead.\\") + seasons_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'seasons: { sum: { lt: ... } } }' instead.\\") + seasons_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'seasons: { sum: { lte: ... } } }' instead.\\") } input StarredInCreateInput { @@ -3398,21 +3995,23 @@ describe("Interface Relationships", () => { } input StarredInUpdateInput { - seasons_DECREMENT: Int - seasons_INCREMENT: Int - seasons_SET: Int + seasons: IntScalarMutations + seasons_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'seasons: { decrement: ... } }' instead.\\") + seasons_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'seasons: { increment: ... } }' instead.\\") + seasons_SET: Int @deprecated(reason: \\"Please use the generic mutation 'seasons: { set: ... } }' instead.\\") } input StarredInWhere { AND: [StarredInWhere!] NOT: StarredInWhere OR: [StarredInWhere!] - seasons_EQ: Int - seasons_GT: Int - seasons_GTE: Int - seasons_IN: [Int!] - seasons_LT: Int - seasons_LTE: Int + seasons: IntScalarFilters + seasons_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter seasons: { eq: ... }\\") + seasons_GT: Int @deprecated(reason: \\"Please use the relevant generic filter seasons: { gt: ... }\\") + seasons_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter seasons: { gte: ... }\\") + seasons_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter seasons: { in: ... }\\") + seasons_LT: Int @deprecated(reason: \\"Please use the relevant generic filter seasons: { lt: ... }\\") + seasons_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter seasons: { lte: ... }\\") } type StringAggregateSelection { @@ -3420,6 +4019,27 @@ describe("Interface Relationships", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -3537,6 +4157,26 @@ describe("Interface Relationships", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + interface Interface1 { field1: String! interface2(limit: Int, offset: Int, sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! @@ -3583,6 +4223,7 @@ describe("Interface Relationships", () => { AND: [Interface1Interface2AggregateInput!] NOT: Interface1Interface2AggregateInput OR: [Interface1Interface2AggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -3601,6 +4242,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 } @@ -3628,21 +4288,22 @@ describe("Interface Relationships", () => { AND: [Interface1Interface2NodeAggregationWhereInput!] NOT: Interface1Interface2NodeAggregationWhereInput OR: [Interface1Interface2NodeAggregationWhereInput!] - field2_AVERAGE_LENGTH_EQUAL: Float - field2_AVERAGE_LENGTH_GT: Float - field2_AVERAGE_LENGTH_GTE: Float - field2_AVERAGE_LENGTH_LT: Float - field2_AVERAGE_LENGTH_LTE: Float - field2_LONGEST_LENGTH_EQUAL: Int - field2_LONGEST_LENGTH_GT: Int - field2_LONGEST_LENGTH_GTE: Int - field2_LONGEST_LENGTH_LT: Int - field2_LONGEST_LENGTH_LTE: Int - field2_SHORTEST_LENGTH_EQUAL: Int - field2_SHORTEST_LENGTH_GT: Int - field2_SHORTEST_LENGTH_GTE: Int - field2_SHORTEST_LENGTH_LT: Int - field2_SHORTEST_LENGTH_LTE: Int + field2: StringScalarAggregationFilters + field2_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { eq: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { gt: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { gte: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { lt: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { lte: ... } } }' instead.\\") + field2_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { eq: ... } } }' instead.\\") + field2_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { gt: ... } } }' instead.\\") + field2_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { gte: ... } } }' instead.\\") + field2_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { lt: ... } } }' instead.\\") + field2_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { lte: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { eq: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { gt: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { gte: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { lt: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { lte: ... } } }' instead.\\") } type Interface1Interface2Relationship { @@ -3663,6 +4324,17 @@ describe("Interface Relationships", () => { where: Interface1Interface2ConnectionWhere } + input Interface1RelationshipFilters { + \\"\\"\\"Filter type where all of the related Interface1s match this filter\\"\\"\\" + all: Interface1Where + \\"\\"\\"Filter type where none of the related Interface1s match this filter\\"\\"\\" + none: Interface1Where + \\"\\"\\"Filter type where one of the related Interface1s match this filter\\"\\"\\" + single: Interface1Where + \\"\\"\\"Filter type where some of the related Interface1s match this filter\\"\\"\\" + some: Interface1Where + } + \\"\\"\\" Fields to sort Interface1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Interface1Sort object. \\"\\"\\" @@ -3671,7 +4343,8 @@ describe("Interface Relationships", () => { } input Interface1UpdateInput { - field1_SET: String + field1: StringScalarMutations + field1_SET: String @deprecated(reason: \\"Please use the generic mutation 'field1: { set: ... } }' instead.\\") interface2: [Interface1Interface2UpdateFieldInput!] } @@ -3679,45 +4352,48 @@ describe("Interface Relationships", () => { AND: [Interface1Where!] NOT: Interface1Where OR: [Interface1Where!] - field1_CONTAINS: String - field1_ENDS_WITH: String - field1_EQ: String - field1_IN: [String!] - field1_STARTS_WITH: String + field1: StringScalarFilters + field1_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter field1: { contains: ... }\\") + field1_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { endsWith: ... }\\") + field1_EQ: String @deprecated(reason: \\"Please use the relevant generic filter field1: { eq: ... }\\") + field1_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter field1: { in: ... }\\") + field1_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { startsWith: ... }\\") + interface2: Interface2RelationshipFilters interface2Aggregate: Interface1Interface2AggregateInput + interface2Connection: Interface1Interface2ConnectionFilters \\"\\"\\" Return Interface1s where all of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_ALL: Interface1Interface2ConnectionWhere + interface2Connection_ALL: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Interface1s where none of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_NONE: Interface1Interface2ConnectionWhere + interface2Connection_NONE: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Interface1s where one of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_SINGLE: Interface1Interface2ConnectionWhere + interface2Connection_SINGLE: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Interface1s where some of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_SOME: Interface1Interface2ConnectionWhere + interface2Connection_SOME: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { some: { node: ... } } }' instead.\\") \\"\\"\\" Return Interface1s where all of the related Interface2s match this filter \\"\\"\\" - interface2_ALL: Interface2Where + interface2_ALL: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { all: ... }' instead.\\") \\"\\"\\" Return Interface1s where none of the related Interface2s match this filter \\"\\"\\" - interface2_NONE: Interface2Where + interface2_NONE: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { none: ... }' instead.\\") \\"\\"\\" Return Interface1s where one of the related Interface2s match this filter \\"\\"\\" - interface2_SINGLE: Interface2Where + interface2_SINGLE: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { single: ... }' instead.\\") \\"\\"\\" Return Interface1s where some of the related Interface2s match this filter \\"\\"\\" - interface2_SOME: Interface2Where - typename_IN: [Interface1Implementation!] + interface2_SOME: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { some: ... }' instead.\\") + typename: [Interface1Implementation!] } type Interface1sConnection { @@ -3754,6 +4430,17 @@ describe("Interface Relationships", () => { Type2Interface2 } + input Interface2RelationshipFilters { + \\"\\"\\"Filter type where all of the related Interface2s match this filter\\"\\"\\" + all: Interface2Where + \\"\\"\\"Filter type where none of the related Interface2s match this filter\\"\\"\\" + none: Interface2Where + \\"\\"\\"Filter type where one of the related Interface2s match this filter\\"\\"\\" + single: Interface2Where + \\"\\"\\"Filter type where some of the related Interface2s match this filter\\"\\"\\" + some: Interface2Where + } + \\"\\"\\" Fields to sort Interface2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Interface2Sort object. \\"\\"\\" @@ -3762,19 +4449,21 @@ describe("Interface Relationships", () => { } input Interface2UpdateInput { - field2_SET: String + field2: StringScalarMutations + field2_SET: String @deprecated(reason: \\"Please use the generic mutation 'field2: { set: ... } }' instead.\\") } input Interface2Where { AND: [Interface2Where!] NOT: Interface2Where OR: [Interface2Where!] - field2_CONTAINS: String - field2_ENDS_WITH: String - field2_EQ: String - field2_IN: [String] - field2_STARTS_WITH: String - typename_IN: [Interface2Implementation!] + field2: StringScalarFilters + field2_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter field2: { contains: ... }\\") + field2_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field2: { endsWith: ... }\\") + field2_EQ: String @deprecated(reason: \\"Please use the relevant generic filter field2: { eq: ... }\\") + field2_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter field2: { in: ... }\\") + field2_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field2: { startsWith: ... }\\") + typename: [Interface2Implementation!] } type Interface2sConnection { @@ -3846,6 +4535,27 @@ describe("Interface Relationships", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Type1 { field1: String! interface1(limit: Int, offset: Int, sort: [Interface1Sort!], where: Interface1Where): [Interface1!]! @@ -3883,6 +4593,7 @@ describe("Interface Relationships", () => { AND: [Type1Interface1AggregateInput!] NOT: Type1Interface1AggregateInput OR: [Type1Interface1AggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -3907,6 +4618,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 } @@ -3964,6 +4694,7 @@ describe("Interface Relationships", () => { AND: [Type1Interface1Interface2AggregateInput!] NOT: Type1Interface1Interface2AggregateInput OR: [Type1Interface1Interface2AggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -3976,6 +4707,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! } @@ -4006,21 +4756,22 @@ describe("Interface Relationships", () => { AND: [Type1Interface1Interface2NodeAggregationWhereInput!] NOT: Type1Interface1Interface2NodeAggregationWhereInput OR: [Type1Interface1Interface2NodeAggregationWhereInput!] - field2_AVERAGE_LENGTH_EQUAL: Float - field2_AVERAGE_LENGTH_GT: Float - field2_AVERAGE_LENGTH_GTE: Float - field2_AVERAGE_LENGTH_LT: Float - field2_AVERAGE_LENGTH_LTE: Float - field2_LONGEST_LENGTH_EQUAL: Int - field2_LONGEST_LENGTH_GT: Int - field2_LONGEST_LENGTH_GTE: Int - field2_LONGEST_LENGTH_LT: Int - field2_LONGEST_LENGTH_LTE: Int - field2_SHORTEST_LENGTH_EQUAL: Int - field2_SHORTEST_LENGTH_GT: Int - field2_SHORTEST_LENGTH_GTE: Int - field2_SHORTEST_LENGTH_LT: Int - field2_SHORTEST_LENGTH_LTE: Int + field2: StringScalarAggregationFilters + field2_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { eq: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { gt: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { gte: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { lt: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { lte: ... } } }' instead.\\") + field2_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { eq: ... } } }' instead.\\") + field2_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { gt: ... } } }' instead.\\") + field2_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { gte: ... } } }' instead.\\") + field2_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { lt: ... } } }' instead.\\") + field2_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { lte: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { eq: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { gt: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { gte: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { lt: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { lte: ... } } }' instead.\\") } input Type1Interface1Interface2UpdateConnectionInput { @@ -4040,21 +4791,22 @@ describe("Interface Relationships", () => { AND: [Type1Interface1NodeAggregationWhereInput!] NOT: Type1Interface1NodeAggregationWhereInput OR: [Type1Interface1NodeAggregationWhereInput!] - field1_AVERAGE_LENGTH_EQUAL: Float - field1_AVERAGE_LENGTH_GT: Float - field1_AVERAGE_LENGTH_GTE: Float - field1_AVERAGE_LENGTH_LT: Float - field1_AVERAGE_LENGTH_LTE: Float - field1_LONGEST_LENGTH_EQUAL: Int - field1_LONGEST_LENGTH_GT: Int - field1_LONGEST_LENGTH_GTE: Int - field1_LONGEST_LENGTH_LT: Int - field1_LONGEST_LENGTH_LTE: Int - field1_SHORTEST_LENGTH_EQUAL: Int - field1_SHORTEST_LENGTH_GT: Int - field1_SHORTEST_LENGTH_GTE: Int - field1_SHORTEST_LENGTH_LT: Int - field1_SHORTEST_LENGTH_LTE: Int + field1: StringScalarAggregationFilters + field1_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'field1: { averageLength: { eq: ... } } }' instead.\\") + field1_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field1: { averageLength: { gt: ... } } }' instead.\\") + field1_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field1: { averageLength: { gte: ... } } }' instead.\\") + field1_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field1: { averageLength: { lt: ... } } }' instead.\\") + field1_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field1: { averageLength: { lte: ... } } }' instead.\\") + field1_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { longestLength: { eq: ... } } }' instead.\\") + field1_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { longestLength: { gt: ... } } }' instead.\\") + field1_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { longestLength: { gte: ... } } }' instead.\\") + field1_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { longestLength: { lt: ... } } }' instead.\\") + field1_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { longestLength: { lte: ... } } }' instead.\\") + field1_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { shortestLength: { eq: ... } } }' instead.\\") + field1_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { shortestLength: { gt: ... } } }' instead.\\") + field1_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { shortestLength: { gte: ... } } }' instead.\\") + field1_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { shortestLength: { lt: ... } } }' instead.\\") + field1_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { shortestLength: { lte: ... } } }' instead.\\") } type Type1Interface1Relationship { @@ -4083,7 +4835,8 @@ describe("Interface Relationships", () => { } input Type1Interface1UpdateInput { - field1_SET: String + field1: StringScalarMutations + field1_SET: String @deprecated(reason: \\"Please use the generic mutation 'field1: { set: ... } }' instead.\\") interface2: [Type1Interface1Interface2UpdateFieldInput!] } @@ -4091,44 +4844,47 @@ describe("Interface Relationships", () => { AND: [Type1Interface1Where!] NOT: Type1Interface1Where OR: [Type1Interface1Where!] - field1_CONTAINS: String - field1_ENDS_WITH: String - field1_EQ: String - field1_IN: [String!] - field1_STARTS_WITH: String + field1: StringScalarFilters + field1_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter field1: { contains: ... }\\") + field1_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { endsWith: ... }\\") + field1_EQ: String @deprecated(reason: \\"Please use the relevant generic filter field1: { eq: ... }\\") + field1_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter field1: { in: ... }\\") + field1_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { startsWith: ... }\\") + interface2: Interface2RelationshipFilters interface2Aggregate: Type1Interface1Interface2AggregateInput + interface2Connection: Type1Interface1Interface2ConnectionFilters \\"\\"\\" Return Type1Interface1s where all of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_ALL: Interface1Interface2ConnectionWhere + interface2Connection_ALL: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Type1Interface1s where none of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_NONE: Interface1Interface2ConnectionWhere + interface2Connection_NONE: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Type1Interface1s where one of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_SINGLE: Interface1Interface2ConnectionWhere + interface2Connection_SINGLE: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Type1Interface1s where some of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_SOME: Interface1Interface2ConnectionWhere + interface2Connection_SOME: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { some: { node: ... } } }' instead.\\") \\"\\"\\" Return Type1Interface1s where all of the related Interface2s match this filter \\"\\"\\" - interface2_ALL: Interface2Where + interface2_ALL: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { all: ... }' instead.\\") \\"\\"\\" Return Type1Interface1s where none of the related Interface2s match this filter \\"\\"\\" - interface2_NONE: Interface2Where + interface2_NONE: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { none: ... }' instead.\\") \\"\\"\\" Return Type1Interface1s where one of the related Interface2s match this filter \\"\\"\\" - interface2_SINGLE: Interface2Where + interface2_SINGLE: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { single: ... }' instead.\\") \\"\\"\\" Return Type1Interface1s where some of the related Interface2s match this filter \\"\\"\\" - interface2_SOME: Interface2Where + interface2_SOME: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { some: ... }' instead.\\") } type Type1Interface1sConnection { @@ -4163,18 +4919,20 @@ describe("Interface Relationships", () => { } input Type1Interface2UpdateInput { - field2_SET: String + field2: StringScalarMutations + field2_SET: String @deprecated(reason: \\"Please use the generic mutation 'field2: { set: ... } }' instead.\\") } input Type1Interface2Where { AND: [Type1Interface2Where!] NOT: Type1Interface2Where OR: [Type1Interface2Where!] - field2_CONTAINS: String - field2_ENDS_WITH: String - field2_EQ: String - field2_IN: [String!] - field2_STARTS_WITH: String + field2: StringScalarFilters + field2_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter field2: { contains: ... }\\") + field2_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field2: { endsWith: ... }\\") + field2_EQ: String @deprecated(reason: \\"Please use the relevant generic filter field2: { eq: ... }\\") + field2_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter field2: { in: ... }\\") + field2_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field2: { startsWith: ... }\\") } type Type1Interface2sConnection { @@ -4191,7 +4949,8 @@ describe("Interface Relationships", () => { } input Type1UpdateInput { - field1_SET: String + field1: StringScalarMutations + field1_SET: String @deprecated(reason: \\"Please use the generic mutation 'field1: { set: ... } }' instead.\\") interface1: [Type1Interface1UpdateFieldInput!] } @@ -4199,36 +4958,39 @@ describe("Interface Relationships", () => { AND: [Type1Where!] NOT: Type1Where OR: [Type1Where!] - field1_CONTAINS: String - field1_ENDS_WITH: String - field1_EQ: String - field1_IN: [String!] - field1_STARTS_WITH: String + field1: StringScalarFilters + field1_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter field1: { contains: ... }\\") + field1_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { endsWith: ... }\\") + field1_EQ: String @deprecated(reason: \\"Please use the relevant generic filter field1: { eq: ... }\\") + field1_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter field1: { in: ... }\\") + field1_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { startsWith: ... }\\") + interface1: Interface1RelationshipFilters interface1Aggregate: Type1Interface1AggregateInput + interface1Connection: Type1Interface1ConnectionFilters \\"\\"\\" Return Type1s where all of the related Type1Interface1Connections match this filter \\"\\"\\" - interface1Connection_ALL: Type1Interface1ConnectionWhere + interface1Connection_ALL: Type1Interface1ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface1Connection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Type1s where none of the related Type1Interface1Connections match this filter \\"\\"\\" - interface1Connection_NONE: Type1Interface1ConnectionWhere + interface1Connection_NONE: Type1Interface1ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface1Connection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Type1s where one of the related Type1Interface1Connections match this filter \\"\\"\\" - interface1Connection_SINGLE: Type1Interface1ConnectionWhere + interface1Connection_SINGLE: Type1Interface1ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface1Connection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Type1s where some of the related Type1Interface1Connections match this filter \\"\\"\\" - interface1Connection_SOME: Type1Interface1ConnectionWhere + interface1Connection_SOME: Type1Interface1ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface1Connection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Type1s where all of the related Interface1s match this filter\\"\\"\\" - interface1_ALL: Interface1Where + interface1_ALL: Interface1Where @deprecated(reason: \\"Please use the relevant generic filter 'interface1: { all: ... }' instead.\\") \\"\\"\\"Return Type1s where none of the related Interface1s match this filter\\"\\"\\" - interface1_NONE: Interface1Where + interface1_NONE: Interface1Where @deprecated(reason: \\"Please use the relevant generic filter 'interface1: { none: ... }' instead.\\") \\"\\"\\"Return Type1s where one of the related Interface1s match this filter\\"\\"\\" - interface1_SINGLE: Interface1Where + interface1_SINGLE: Interface1Where @deprecated(reason: \\"Please use the relevant generic filter 'interface1: { single: ... }' instead.\\") \\"\\"\\"Return Type1s where some of the related Interface1s match this filter\\"\\"\\" - interface1_SOME: Interface1Where + interface1_SOME: Interface1Where @deprecated(reason: \\"Please use the relevant generic filter 'interface1: { some: ... }' instead.\\") } type Type1sConnection { @@ -4267,6 +5029,7 @@ describe("Interface Relationships", () => { AND: [Type2Interface1Interface2AggregateInput!] NOT: Type2Interface1Interface2AggregateInput OR: [Type2Interface1Interface2AggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -4279,6 +5042,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! } @@ -4309,21 +5091,22 @@ describe("Interface Relationships", () => { AND: [Type2Interface1Interface2NodeAggregationWhereInput!] NOT: Type2Interface1Interface2NodeAggregationWhereInput OR: [Type2Interface1Interface2NodeAggregationWhereInput!] - field2_AVERAGE_LENGTH_EQUAL: Float - field2_AVERAGE_LENGTH_GT: Float - field2_AVERAGE_LENGTH_GTE: Float - field2_AVERAGE_LENGTH_LT: Float - field2_AVERAGE_LENGTH_LTE: Float - field2_LONGEST_LENGTH_EQUAL: Int - field2_LONGEST_LENGTH_GT: Int - field2_LONGEST_LENGTH_GTE: Int - field2_LONGEST_LENGTH_LT: Int - field2_LONGEST_LENGTH_LTE: Int - field2_SHORTEST_LENGTH_EQUAL: Int - field2_SHORTEST_LENGTH_GT: Int - field2_SHORTEST_LENGTH_GTE: Int - field2_SHORTEST_LENGTH_LT: Int - field2_SHORTEST_LENGTH_LTE: Int + field2: StringScalarAggregationFilters + field2_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { eq: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { gt: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { gte: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { lt: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { lte: ... } } }' instead.\\") + field2_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { eq: ... } } }' instead.\\") + field2_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { gt: ... } } }' instead.\\") + field2_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { gte: ... } } }' instead.\\") + field2_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { lt: ... } } }' instead.\\") + field2_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { lte: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { eq: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { gt: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { gte: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { lt: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { lte: ... } } }' instead.\\") } input Type2Interface1Interface2UpdateConnectionInput { @@ -4347,7 +5130,8 @@ describe("Interface Relationships", () => { } input Type2Interface1UpdateInput { - field1_SET: String + field1: StringScalarMutations + field1_SET: String @deprecated(reason: \\"Please use the generic mutation 'field1: { set: ... } }' instead.\\") interface2: [Type2Interface1Interface2UpdateFieldInput!] } @@ -4355,44 +5139,47 @@ describe("Interface Relationships", () => { AND: [Type2Interface1Where!] NOT: Type2Interface1Where OR: [Type2Interface1Where!] - field1_CONTAINS: String - field1_ENDS_WITH: String - field1_EQ: String - field1_IN: [String!] - field1_STARTS_WITH: String + field1: StringScalarFilters + field1_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter field1: { contains: ... }\\") + field1_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { endsWith: ... }\\") + field1_EQ: String @deprecated(reason: \\"Please use the relevant generic filter field1: { eq: ... }\\") + field1_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter field1: { in: ... }\\") + field1_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { startsWith: ... }\\") + interface2: Interface2RelationshipFilters interface2Aggregate: Type2Interface1Interface2AggregateInput + interface2Connection: Type2Interface1Interface2ConnectionFilters \\"\\"\\" Return Type2Interface1s where all of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_ALL: Interface1Interface2ConnectionWhere + interface2Connection_ALL: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Type2Interface1s where none of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_NONE: Interface1Interface2ConnectionWhere + interface2Connection_NONE: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Type2Interface1s where one of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_SINGLE: Interface1Interface2ConnectionWhere + interface2Connection_SINGLE: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Type2Interface1s where some of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_SOME: Interface1Interface2ConnectionWhere + interface2Connection_SOME: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { some: { node: ... } } }' instead.\\") \\"\\"\\" Return Type2Interface1s where all of the related Interface2s match this filter \\"\\"\\" - interface2_ALL: Interface2Where + interface2_ALL: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { all: ... }' instead.\\") \\"\\"\\" Return Type2Interface1s where none of the related Interface2s match this filter \\"\\"\\" - interface2_NONE: Interface2Where + interface2_NONE: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { none: ... }' instead.\\") \\"\\"\\" Return Type2Interface1s where one of the related Interface2s match this filter \\"\\"\\" - interface2_SINGLE: Interface2Where + interface2_SINGLE: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { single: ... }' instead.\\") \\"\\"\\" Return Type2Interface1s where some of the related Interface2s match this filter \\"\\"\\" - interface2_SOME: Interface2Where + interface2_SOME: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { some: ... }' instead.\\") } type Type2Interface1sConnection { @@ -4427,18 +5214,20 @@ describe("Interface Relationships", () => { } input Type2Interface2UpdateInput { - field2_SET: String + field2: StringScalarMutations + field2_SET: String @deprecated(reason: \\"Please use the generic mutation 'field2: { set: ... } }' instead.\\") } input Type2Interface2Where { AND: [Type2Interface2Where!] NOT: Type2Interface2Where OR: [Type2Interface2Where!] - field2_CONTAINS: String - field2_ENDS_WITH: String - field2_EQ: String - field2_IN: [String!] - field2_STARTS_WITH: String + field2: StringScalarFilters + field2_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter field2: { contains: ... }\\") + field2_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field2: { endsWith: ... }\\") + field2_EQ: String @deprecated(reason: \\"Please use the relevant generic filter field2: { eq: ... }\\") + field2_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter field2: { in: ... }\\") + field2_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field2: { startsWith: ... }\\") } type Type2Interface2sConnection { @@ -4578,6 +5367,16 @@ describe("Interface Relationships", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + type IntAggregateSelection { average: Float max: Int @@ -4585,6 +5384,31 @@ describe("Interface Relationships", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + interface Interface1 { field1: String! interface2(limit: Int, offset: Int, sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! @@ -4631,6 +5455,7 @@ describe("Interface Relationships", () => { AND: [Interface1Interface2AggregateInput!] NOT: Interface1Interface2AggregateInput OR: [Interface1Interface2AggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -4651,6 +5476,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 @@ -4726,21 +5570,22 @@ describe("Interface Relationships", () => { AND: [Interface1Interface2NodeAggregationWhereInput!] NOT: Interface1Interface2NodeAggregationWhereInput OR: [Interface1Interface2NodeAggregationWhereInput!] - field2_AVERAGE_LENGTH_EQUAL: Float - field2_AVERAGE_LENGTH_GT: Float - field2_AVERAGE_LENGTH_GTE: Float - field2_AVERAGE_LENGTH_LT: Float - field2_AVERAGE_LENGTH_LTE: Float - field2_LONGEST_LENGTH_EQUAL: Int - field2_LONGEST_LENGTH_GT: Int - field2_LONGEST_LENGTH_GTE: Int - field2_LONGEST_LENGTH_LT: Int - field2_LONGEST_LENGTH_LTE: Int - field2_SHORTEST_LENGTH_EQUAL: Int - field2_SHORTEST_LENGTH_GT: Int - field2_SHORTEST_LENGTH_GTE: Int - field2_SHORTEST_LENGTH_LT: Int - field2_SHORTEST_LENGTH_LTE: Int + field2: StringScalarAggregationFilters + field2_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { eq: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { gt: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { gte: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { lt: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { lte: ... } } }' instead.\\") + field2_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { eq: ... } } }' instead.\\") + field2_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { gt: ... } } }' instead.\\") + field2_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { gte: ... } } }' instead.\\") + field2_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { lt: ... } } }' instead.\\") + field2_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { lte: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { eq: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { gt: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { gte: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { lt: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { lte: ... } } }' instead.\\") } type Interface1Interface2Relationship { @@ -4765,6 +5610,17 @@ describe("Interface Relationships", () => { where: Interface1Interface2ConnectionWhere } + input Interface1RelationshipFilters { + \\"\\"\\"Filter type where all of the related Interface1s match this filter\\"\\"\\" + all: Interface1Where + \\"\\"\\"Filter type where none of the related Interface1s match this filter\\"\\"\\" + none: Interface1Where + \\"\\"\\"Filter type where one of the related Interface1s match this filter\\"\\"\\" + single: Interface1Where + \\"\\"\\"Filter type where some of the related Interface1s match this filter\\"\\"\\" + some: Interface1Where + } + \\"\\"\\" Fields to sort Interface1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Interface1Sort object. \\"\\"\\" @@ -4773,7 +5629,8 @@ describe("Interface Relationships", () => { } input Interface1UpdateInput { - field1_SET: String + field1: StringScalarMutations + field1_SET: String @deprecated(reason: \\"Please use the generic mutation 'field1: { set: ... } }' instead.\\") interface2: [Interface1Interface2UpdateFieldInput!] } @@ -4781,45 +5638,48 @@ describe("Interface Relationships", () => { AND: [Interface1Where!] NOT: Interface1Where OR: [Interface1Where!] - field1_CONTAINS: String - field1_ENDS_WITH: String - field1_EQ: String - field1_IN: [String!] - field1_STARTS_WITH: String + field1: StringScalarFilters + field1_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter field1: { contains: ... }\\") + field1_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { endsWith: ... }\\") + field1_EQ: String @deprecated(reason: \\"Please use the relevant generic filter field1: { eq: ... }\\") + field1_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter field1: { in: ... }\\") + field1_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { startsWith: ... }\\") + interface2: Interface2RelationshipFilters interface2Aggregate: Interface1Interface2AggregateInput + interface2Connection: Interface1Interface2ConnectionFilters \\"\\"\\" Return Interface1s where all of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_ALL: Interface1Interface2ConnectionWhere + interface2Connection_ALL: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Interface1s where none of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_NONE: Interface1Interface2ConnectionWhere + interface2Connection_NONE: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Interface1s where one of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_SINGLE: Interface1Interface2ConnectionWhere + interface2Connection_SINGLE: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Interface1s where some of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_SOME: Interface1Interface2ConnectionWhere + interface2Connection_SOME: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { some: { node: ... } } }' instead.\\") \\"\\"\\" Return Interface1s where all of the related Interface2s match this filter \\"\\"\\" - interface2_ALL: Interface2Where + interface2_ALL: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { all: ... }' instead.\\") \\"\\"\\" Return Interface1s where none of the related Interface2s match this filter \\"\\"\\" - interface2_NONE: Interface2Where + interface2_NONE: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { none: ... }' instead.\\") \\"\\"\\" Return Interface1s where one of the related Interface2s match this filter \\"\\"\\" - interface2_SINGLE: Interface2Where + interface2_SINGLE: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { single: ... }' instead.\\") \\"\\"\\" Return Interface1s where some of the related Interface2s match this filter \\"\\"\\" - interface2_SOME: Interface2Where - typename_IN: [Interface1Implementation!] + interface2_SOME: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { some: ... }' instead.\\") + typename: [Interface1Implementation!] } type Interface1sConnection { @@ -4856,6 +5716,17 @@ describe("Interface Relationships", () => { Type2Interface2 } + input Interface2RelationshipFilters { + \\"\\"\\"Filter type where all of the related Interface2s match this filter\\"\\"\\" + all: Interface2Where + \\"\\"\\"Filter type where none of the related Interface2s match this filter\\"\\"\\" + none: Interface2Where + \\"\\"\\"Filter type where one of the related Interface2s match this filter\\"\\"\\" + single: Interface2Where + \\"\\"\\"Filter type where some of the related Interface2s match this filter\\"\\"\\" + some: Interface2Where + } + \\"\\"\\" Fields to sort Interface2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Interface2Sort object. \\"\\"\\" @@ -4864,19 +5735,21 @@ describe("Interface Relationships", () => { } input Interface2UpdateInput { - field2_SET: String + field2: StringScalarMutations + field2_SET: String @deprecated(reason: \\"Please use the generic mutation 'field2: { set: ... } }' instead.\\") } input Interface2Where { AND: [Interface2Where!] NOT: Interface2Where OR: [Interface2Where!] - field2_CONTAINS: String - field2_ENDS_WITH: String - field2_EQ: String - field2_IN: [String] - field2_STARTS_WITH: String - typename_IN: [Interface2Implementation!] + field2: StringScalarFilters + field2_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter field2: { contains: ... }\\") + field2_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field2: { endsWith: ... }\\") + field2_EQ: String @deprecated(reason: \\"Please use the relevant generic filter field2: { eq: ... }\\") + field2_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter field2: { in: ... }\\") + field2_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field2: { startsWith: ... }\\") + typename: [Interface2Implementation!] } type Interface2sConnection { @@ -4924,26 +5797,27 @@ describe("Interface Relationships", () => { AND: [PropsAggregationWhereInput!] NOT: PropsAggregationWhereInput OR: [PropsAggregationWhereInput!] - propsField_AVERAGE_EQUAL: Float - propsField_AVERAGE_GT: Float - propsField_AVERAGE_GTE: Float - propsField_AVERAGE_LT: Float - propsField_AVERAGE_LTE: Float - propsField_MAX_EQUAL: Int - propsField_MAX_GT: Int - propsField_MAX_GTE: Int - propsField_MAX_LT: Int - propsField_MAX_LTE: Int - propsField_MIN_EQUAL: Int - propsField_MIN_GT: Int - propsField_MIN_GTE: Int - propsField_MIN_LT: Int - propsField_MIN_LTE: Int - propsField_SUM_EQUAL: Int - propsField_SUM_GT: Int - propsField_SUM_GTE: Int - propsField_SUM_LT: Int - propsField_SUM_LTE: Int + propsField: IntScalarAggregationFilters + propsField_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'propsField: { average: { eq: ... } } }' instead.\\") + propsField_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'propsField: { average: { gt: ... } } }' instead.\\") + propsField_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'propsField: { average: { gte: ... } } }' instead.\\") + propsField_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'propsField: { average: { lt: ... } } }' instead.\\") + propsField_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'propsField: { average: { lte: ... } } }' instead.\\") + propsField_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'propsField: { max: { eq: ... } } }' instead.\\") + propsField_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'propsField: { max: { gt: ... } } }' instead.\\") + propsField_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'propsField: { max: { gte: ... } } }' instead.\\") + propsField_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'propsField: { max: { lt: ... } } }' instead.\\") + propsField_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'propsField: { max: { lte: ... } } }' instead.\\") + propsField_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'propsField: { min: { eq: ... } } }' instead.\\") + propsField_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'propsField: { min: { gt: ... } } }' instead.\\") + propsField_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'propsField: { min: { gte: ... } } }' instead.\\") + propsField_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'propsField: { min: { lt: ... } } }' instead.\\") + propsField_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'propsField: { min: { lte: ... } } }' instead.\\") + propsField_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'propsField: { sum: { eq: ... } } }' instead.\\") + propsField_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'propsField: { sum: { gt: ... } } }' instead.\\") + propsField_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'propsField: { sum: { gte: ... } } }' instead.\\") + propsField_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'propsField: { sum: { lt: ... } } }' instead.\\") + propsField_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'propsField: { sum: { lte: ... } } }' instead.\\") } input PropsCreateInput { @@ -4955,21 +5829,23 @@ describe("Interface Relationships", () => { } input PropsUpdateInput { - propsField_DECREMENT: Int - propsField_INCREMENT: Int - propsField_SET: Int + propsField: IntScalarMutations + propsField_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'propsField: { decrement: ... } }' instead.\\") + propsField_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'propsField: { increment: ... } }' instead.\\") + propsField_SET: Int @deprecated(reason: \\"Please use the generic mutation 'propsField: { set: ... } }' instead.\\") } input PropsWhere { AND: [PropsWhere!] NOT: PropsWhere OR: [PropsWhere!] - propsField_EQ: Int - propsField_GT: Int - propsField_GTE: Int - propsField_IN: [Int!] - propsField_LT: Int - propsField_LTE: Int + propsField: IntScalarFilters + propsField_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter propsField: { eq: ... }\\") + propsField_GT: Int @deprecated(reason: \\"Please use the relevant generic filter propsField: { gt: ... }\\") + propsField_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter propsField: { gte: ... }\\") + propsField_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter propsField: { in: ... }\\") + propsField_LT: Int @deprecated(reason: \\"Please use the relevant generic filter propsField: { lt: ... }\\") + propsField_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter propsField: { lte: ... }\\") } type Query { @@ -5009,6 +5885,27 @@ describe("Interface Relationships", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Type1 { field1: String! interface1(limit: Int, offset: Int, sort: [Interface1Sort!], where: Interface1Where): [Interface1!]! @@ -5046,6 +5943,7 @@ describe("Interface Relationships", () => { AND: [Type1Interface1AggregateInput!] NOT: Type1Interface1AggregateInput OR: [Type1Interface1AggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -5070,6 +5968,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 } @@ -5127,6 +6044,7 @@ describe("Interface Relationships", () => { AND: [Type1Interface1Interface2AggregateInput!] NOT: Type1Interface1Interface2AggregateInput OR: [Type1Interface1Interface2AggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -5141,6 +6059,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! @@ -5177,21 +6114,22 @@ describe("Interface Relationships", () => { AND: [Type1Interface1Interface2NodeAggregationWhereInput!] NOT: Type1Interface1Interface2NodeAggregationWhereInput OR: [Type1Interface1Interface2NodeAggregationWhereInput!] - field2_AVERAGE_LENGTH_EQUAL: Float - field2_AVERAGE_LENGTH_GT: Float - field2_AVERAGE_LENGTH_GTE: Float - field2_AVERAGE_LENGTH_LT: Float - field2_AVERAGE_LENGTH_LTE: Float - field2_LONGEST_LENGTH_EQUAL: Int - field2_LONGEST_LENGTH_GT: Int - field2_LONGEST_LENGTH_GTE: Int - field2_LONGEST_LENGTH_LT: Int - field2_LONGEST_LENGTH_LTE: Int - field2_SHORTEST_LENGTH_EQUAL: Int - field2_SHORTEST_LENGTH_GT: Int - field2_SHORTEST_LENGTH_GTE: Int - field2_SHORTEST_LENGTH_LT: Int - field2_SHORTEST_LENGTH_LTE: Int + field2: StringScalarAggregationFilters + field2_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { eq: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { gt: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { gte: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { lt: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { lte: ... } } }' instead.\\") + field2_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { eq: ... } } }' instead.\\") + field2_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { gt: ... } } }' instead.\\") + field2_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { gte: ... } } }' instead.\\") + field2_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { lt: ... } } }' instead.\\") + field2_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { lte: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { eq: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { gt: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { gte: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { lt: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { lte: ... } } }' instead.\\") } input Type1Interface1Interface2UpdateConnectionInput { @@ -5212,21 +6150,22 @@ describe("Interface Relationships", () => { AND: [Type1Interface1NodeAggregationWhereInput!] NOT: Type1Interface1NodeAggregationWhereInput OR: [Type1Interface1NodeAggregationWhereInput!] - field1_AVERAGE_LENGTH_EQUAL: Float - field1_AVERAGE_LENGTH_GT: Float - field1_AVERAGE_LENGTH_GTE: Float - field1_AVERAGE_LENGTH_LT: Float - field1_AVERAGE_LENGTH_LTE: Float - field1_LONGEST_LENGTH_EQUAL: Int - field1_LONGEST_LENGTH_GT: Int - field1_LONGEST_LENGTH_GTE: Int - field1_LONGEST_LENGTH_LT: Int - field1_LONGEST_LENGTH_LTE: Int - field1_SHORTEST_LENGTH_EQUAL: Int - field1_SHORTEST_LENGTH_GT: Int - field1_SHORTEST_LENGTH_GTE: Int - field1_SHORTEST_LENGTH_LT: Int - field1_SHORTEST_LENGTH_LTE: Int + field1: StringScalarAggregationFilters + field1_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'field1: { averageLength: { eq: ... } } }' instead.\\") + field1_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field1: { averageLength: { gt: ... } } }' instead.\\") + field1_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field1: { averageLength: { gte: ... } } }' instead.\\") + field1_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field1: { averageLength: { lt: ... } } }' instead.\\") + field1_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field1: { averageLength: { lte: ... } } }' instead.\\") + field1_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { longestLength: { eq: ... } } }' instead.\\") + field1_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { longestLength: { gt: ... } } }' instead.\\") + field1_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { longestLength: { gte: ... } } }' instead.\\") + field1_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { longestLength: { lt: ... } } }' instead.\\") + field1_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { longestLength: { lte: ... } } }' instead.\\") + field1_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { shortestLength: { eq: ... } } }' instead.\\") + field1_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { shortestLength: { gt: ... } } }' instead.\\") + field1_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { shortestLength: { gte: ... } } }' instead.\\") + field1_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { shortestLength: { lt: ... } } }' instead.\\") + field1_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { shortestLength: { lte: ... } } }' instead.\\") } type Type1Interface1Relationship { @@ -5255,7 +6194,8 @@ describe("Interface Relationships", () => { } input Type1Interface1UpdateInput { - field1_SET: String + field1: StringScalarMutations + field1_SET: String @deprecated(reason: \\"Please use the generic mutation 'field1: { set: ... } }' instead.\\") interface2: [Type1Interface1Interface2UpdateFieldInput!] } @@ -5263,44 +6203,47 @@ describe("Interface Relationships", () => { AND: [Type1Interface1Where!] NOT: Type1Interface1Where OR: [Type1Interface1Where!] - field1_CONTAINS: String - field1_ENDS_WITH: String - field1_EQ: String - field1_IN: [String!] - field1_STARTS_WITH: String + field1: StringScalarFilters + field1_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter field1: { contains: ... }\\") + field1_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { endsWith: ... }\\") + field1_EQ: String @deprecated(reason: \\"Please use the relevant generic filter field1: { eq: ... }\\") + field1_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter field1: { in: ... }\\") + field1_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { startsWith: ... }\\") + interface2: Interface2RelationshipFilters interface2Aggregate: Type1Interface1Interface2AggregateInput + interface2Connection: Type1Interface1Interface2ConnectionFilters \\"\\"\\" Return Type1Interface1s where all of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_ALL: Interface1Interface2ConnectionWhere + interface2Connection_ALL: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Type1Interface1s where none of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_NONE: Interface1Interface2ConnectionWhere + interface2Connection_NONE: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Type1Interface1s where one of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_SINGLE: Interface1Interface2ConnectionWhere + interface2Connection_SINGLE: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Type1Interface1s where some of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_SOME: Interface1Interface2ConnectionWhere + interface2Connection_SOME: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { some: { node: ... } } }' instead.\\") \\"\\"\\" Return Type1Interface1s where all of the related Interface2s match this filter \\"\\"\\" - interface2_ALL: Interface2Where + interface2_ALL: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { all: ... }' instead.\\") \\"\\"\\" Return Type1Interface1s where none of the related Interface2s match this filter \\"\\"\\" - interface2_NONE: Interface2Where + interface2_NONE: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { none: ... }' instead.\\") \\"\\"\\" Return Type1Interface1s where one of the related Interface2s match this filter \\"\\"\\" - interface2_SINGLE: Interface2Where + interface2_SINGLE: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { single: ... }' instead.\\") \\"\\"\\" Return Type1Interface1s where some of the related Interface2s match this filter \\"\\"\\" - interface2_SOME: Interface2Where + interface2_SOME: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { some: ... }' instead.\\") } type Type1Interface1sConnection { @@ -5335,18 +6278,20 @@ describe("Interface Relationships", () => { } input Type1Interface2UpdateInput { - field2_SET: String + field2: StringScalarMutations + field2_SET: String @deprecated(reason: \\"Please use the generic mutation 'field2: { set: ... } }' instead.\\") } input Type1Interface2Where { AND: [Type1Interface2Where!] NOT: Type1Interface2Where OR: [Type1Interface2Where!] - field2_CONTAINS: String - field2_ENDS_WITH: String - field2_EQ: String - field2_IN: [String!] - field2_STARTS_WITH: String + field2: StringScalarFilters + field2_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter field2: { contains: ... }\\") + field2_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field2: { endsWith: ... }\\") + field2_EQ: String @deprecated(reason: \\"Please use the relevant generic filter field2: { eq: ... }\\") + field2_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter field2: { in: ... }\\") + field2_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field2: { startsWith: ... }\\") } type Type1Interface2sConnection { @@ -5363,7 +6308,8 @@ describe("Interface Relationships", () => { } input Type1UpdateInput { - field1_SET: String + field1: StringScalarMutations + field1_SET: String @deprecated(reason: \\"Please use the generic mutation 'field1: { set: ... } }' instead.\\") interface1: [Type1Interface1UpdateFieldInput!] } @@ -5371,36 +6317,39 @@ describe("Interface Relationships", () => { AND: [Type1Where!] NOT: Type1Where OR: [Type1Where!] - field1_CONTAINS: String - field1_ENDS_WITH: String - field1_EQ: String - field1_IN: [String!] - field1_STARTS_WITH: String + field1: StringScalarFilters + field1_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter field1: { contains: ... }\\") + field1_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { endsWith: ... }\\") + field1_EQ: String @deprecated(reason: \\"Please use the relevant generic filter field1: { eq: ... }\\") + field1_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter field1: { in: ... }\\") + field1_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { startsWith: ... }\\") + interface1: Interface1RelationshipFilters interface1Aggregate: Type1Interface1AggregateInput + interface1Connection: Type1Interface1ConnectionFilters \\"\\"\\" Return Type1s where all of the related Type1Interface1Connections match this filter \\"\\"\\" - interface1Connection_ALL: Type1Interface1ConnectionWhere + interface1Connection_ALL: Type1Interface1ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface1Connection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Type1s where none of the related Type1Interface1Connections match this filter \\"\\"\\" - interface1Connection_NONE: Type1Interface1ConnectionWhere + interface1Connection_NONE: Type1Interface1ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface1Connection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Type1s where one of the related Type1Interface1Connections match this filter \\"\\"\\" - interface1Connection_SINGLE: Type1Interface1ConnectionWhere + interface1Connection_SINGLE: Type1Interface1ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface1Connection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Type1s where some of the related Type1Interface1Connections match this filter \\"\\"\\" - interface1Connection_SOME: Type1Interface1ConnectionWhere + interface1Connection_SOME: Type1Interface1ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface1Connection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Type1s where all of the related Interface1s match this filter\\"\\"\\" - interface1_ALL: Interface1Where + interface1_ALL: Interface1Where @deprecated(reason: \\"Please use the relevant generic filter 'interface1: { all: ... }' instead.\\") \\"\\"\\"Return Type1s where none of the related Interface1s match this filter\\"\\"\\" - interface1_NONE: Interface1Where + interface1_NONE: Interface1Where @deprecated(reason: \\"Please use the relevant generic filter 'interface1: { none: ... }' instead.\\") \\"\\"\\"Return Type1s where one of the related Interface1s match this filter\\"\\"\\" - interface1_SINGLE: Interface1Where + interface1_SINGLE: Interface1Where @deprecated(reason: \\"Please use the relevant generic filter 'interface1: { single: ... }' instead.\\") \\"\\"\\"Return Type1s where some of the related Interface1s match this filter\\"\\"\\" - interface1_SOME: Interface1Where + interface1_SOME: Interface1Where @deprecated(reason: \\"Please use the relevant generic filter 'interface1: { some: ... }' instead.\\") } type Type1sConnection { @@ -5439,6 +6388,7 @@ describe("Interface Relationships", () => { AND: [Type2Interface1Interface2AggregateInput!] NOT: Type2Interface1Interface2AggregateInput OR: [Type2Interface1Interface2AggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -5453,6 +6403,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! @@ -5489,21 +6458,22 @@ describe("Interface Relationships", () => { AND: [Type2Interface1Interface2NodeAggregationWhereInput!] NOT: Type2Interface1Interface2NodeAggregationWhereInput OR: [Type2Interface1Interface2NodeAggregationWhereInput!] - field2_AVERAGE_LENGTH_EQUAL: Float - field2_AVERAGE_LENGTH_GT: Float - field2_AVERAGE_LENGTH_GTE: Float - field2_AVERAGE_LENGTH_LT: Float - field2_AVERAGE_LENGTH_LTE: Float - field2_LONGEST_LENGTH_EQUAL: Int - field2_LONGEST_LENGTH_GT: Int - field2_LONGEST_LENGTH_GTE: Int - field2_LONGEST_LENGTH_LT: Int - field2_LONGEST_LENGTH_LTE: Int - field2_SHORTEST_LENGTH_EQUAL: Int - field2_SHORTEST_LENGTH_GT: Int - field2_SHORTEST_LENGTH_GTE: Int - field2_SHORTEST_LENGTH_LT: Int - field2_SHORTEST_LENGTH_LTE: Int + field2: StringScalarAggregationFilters + field2_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { eq: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { gt: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { gte: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { lt: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { lte: ... } } }' instead.\\") + field2_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { eq: ... } } }' instead.\\") + field2_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { gt: ... } } }' instead.\\") + field2_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { gte: ... } } }' instead.\\") + field2_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { lt: ... } } }' instead.\\") + field2_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { lte: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { eq: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { gt: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { gte: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { lt: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { lte: ... } } }' instead.\\") } input Type2Interface1Interface2UpdateConnectionInput { @@ -5528,7 +6498,8 @@ describe("Interface Relationships", () => { } input Type2Interface1UpdateInput { - field1_SET: String + field1: StringScalarMutations + field1_SET: String @deprecated(reason: \\"Please use the generic mutation 'field1: { set: ... } }' instead.\\") interface2: [Type2Interface1Interface2UpdateFieldInput!] } @@ -5536,44 +6507,47 @@ describe("Interface Relationships", () => { AND: [Type2Interface1Where!] NOT: Type2Interface1Where OR: [Type2Interface1Where!] - field1_CONTAINS: String - field1_ENDS_WITH: String - field1_EQ: String - field1_IN: [String!] - field1_STARTS_WITH: String + field1: StringScalarFilters + field1_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter field1: { contains: ... }\\") + field1_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { endsWith: ... }\\") + field1_EQ: String @deprecated(reason: \\"Please use the relevant generic filter field1: { eq: ... }\\") + field1_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter field1: { in: ... }\\") + field1_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { startsWith: ... }\\") + interface2: Interface2RelationshipFilters interface2Aggregate: Type2Interface1Interface2AggregateInput + interface2Connection: Type2Interface1Interface2ConnectionFilters \\"\\"\\" Return Type2Interface1s where all of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_ALL: Interface1Interface2ConnectionWhere + interface2Connection_ALL: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Type2Interface1s where none of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_NONE: Interface1Interface2ConnectionWhere + interface2Connection_NONE: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Type2Interface1s where one of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_SINGLE: Interface1Interface2ConnectionWhere + interface2Connection_SINGLE: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Type2Interface1s where some of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_SOME: Interface1Interface2ConnectionWhere + interface2Connection_SOME: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { some: { node: ... } } }' instead.\\") \\"\\"\\" Return Type2Interface1s where all of the related Interface2s match this filter \\"\\"\\" - interface2_ALL: Interface2Where + interface2_ALL: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { all: ... }' instead.\\") \\"\\"\\" Return Type2Interface1s where none of the related Interface2s match this filter \\"\\"\\" - interface2_NONE: Interface2Where + interface2_NONE: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { none: ... }' instead.\\") \\"\\"\\" Return Type2Interface1s where one of the related Interface2s match this filter \\"\\"\\" - interface2_SINGLE: Interface2Where + interface2_SINGLE: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { single: ... }' instead.\\") \\"\\"\\" Return Type2Interface1s where some of the related Interface2s match this filter \\"\\"\\" - interface2_SOME: Interface2Where + interface2_SOME: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { some: ... }' instead.\\") } type Type2Interface1sConnection { @@ -5608,18 +6582,20 @@ describe("Interface Relationships", () => { } input Type2Interface2UpdateInput { - field2_SET: String + field2: StringScalarMutations + field2_SET: String @deprecated(reason: \\"Please use the generic mutation 'field2: { set: ... } }' instead.\\") } input Type2Interface2Where { AND: [Type2Interface2Where!] NOT: Type2Interface2Where OR: [Type2Interface2Where!] - field2_CONTAINS: String - field2_ENDS_WITH: String - field2_EQ: String - field2_IN: [String!] - field2_STARTS_WITH: String + field2: StringScalarFilters + field2_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter field2: { contains: ... }\\") + field2_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field2: { endsWith: ... }\\") + field2_EQ: String @deprecated(reason: \\"Please use the relevant generic filter field2: { eq: ... }\\") + field2_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter field2: { in: ... }\\") + field2_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field2: { startsWith: ... }\\") } type Type2Interface2sConnection { @@ -5765,6 +6741,16 @@ describe("Interface Relationships", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + type IntAggregateSelection { average: Float max: Int @@ -5772,6 +6758,31 @@ describe("Interface Relationships", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + interface Interface1 { field1: String! interface2(limit: Int, offset: Int, sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! @@ -5818,6 +6829,7 @@ describe("Interface Relationships", () => { AND: [Interface1Interface2AggregateInput!] NOT: Interface1Interface2AggregateInput OR: [Interface1Interface2AggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -5838,6 +6850,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 @@ -5933,21 +6964,22 @@ describe("Interface Relationships", () => { AND: [Interface1Interface2NodeAggregationWhereInput!] NOT: Interface1Interface2NodeAggregationWhereInput OR: [Interface1Interface2NodeAggregationWhereInput!] - field2_AVERAGE_LENGTH_EQUAL: Float - field2_AVERAGE_LENGTH_GT: Float - field2_AVERAGE_LENGTH_GTE: Float - field2_AVERAGE_LENGTH_LT: Float - field2_AVERAGE_LENGTH_LTE: Float - field2_LONGEST_LENGTH_EQUAL: Int - field2_LONGEST_LENGTH_GT: Int - field2_LONGEST_LENGTH_GTE: Int - field2_LONGEST_LENGTH_LT: Int - field2_LONGEST_LENGTH_LTE: Int - field2_SHORTEST_LENGTH_EQUAL: Int - field2_SHORTEST_LENGTH_GT: Int - field2_SHORTEST_LENGTH_GTE: Int - field2_SHORTEST_LENGTH_LT: Int - field2_SHORTEST_LENGTH_LTE: Int + field2: StringScalarAggregationFilters + field2_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { eq: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { gt: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { gte: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { lt: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { lte: ... } } }' instead.\\") + field2_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { eq: ... } } }' instead.\\") + field2_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { gt: ... } } }' instead.\\") + field2_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { gte: ... } } }' instead.\\") + field2_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { lt: ... } } }' instead.\\") + field2_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { lte: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { eq: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { gt: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { gte: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { lt: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { lte: ... } } }' instead.\\") } type Interface1Interface2Relationship { @@ -5972,6 +7004,17 @@ describe("Interface Relationships", () => { where: Interface1Interface2ConnectionWhere } + input Interface1RelationshipFilters { + \\"\\"\\"Filter type where all of the related Interface1s match this filter\\"\\"\\" + all: Interface1Where + \\"\\"\\"Filter type where none of the related Interface1s match this filter\\"\\"\\" + none: Interface1Where + \\"\\"\\"Filter type where one of the related Interface1s match this filter\\"\\"\\" + single: Interface1Where + \\"\\"\\"Filter type where some of the related Interface1s match this filter\\"\\"\\" + some: Interface1Where + } + \\"\\"\\" Fields to sort Interface1s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Interface1Sort object. \\"\\"\\" @@ -5980,7 +7023,8 @@ describe("Interface Relationships", () => { } input Interface1UpdateInput { - field1_SET: String + field1: StringScalarMutations + field1_SET: String @deprecated(reason: \\"Please use the generic mutation 'field1: { set: ... } }' instead.\\") interface2: [Interface1Interface2UpdateFieldInput!] } @@ -5988,45 +7032,48 @@ describe("Interface Relationships", () => { AND: [Interface1Where!] NOT: Interface1Where OR: [Interface1Where!] - field1_CONTAINS: String - field1_ENDS_WITH: String - field1_EQ: String - field1_IN: [String!] - field1_STARTS_WITH: String + field1: StringScalarFilters + field1_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter field1: { contains: ... }\\") + field1_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { endsWith: ... }\\") + field1_EQ: String @deprecated(reason: \\"Please use the relevant generic filter field1: { eq: ... }\\") + field1_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter field1: { in: ... }\\") + field1_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { startsWith: ... }\\") + interface2: Interface2RelationshipFilters interface2Aggregate: Interface1Interface2AggregateInput + interface2Connection: Interface1Interface2ConnectionFilters \\"\\"\\" Return Interface1s where all of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_ALL: Interface1Interface2ConnectionWhere + interface2Connection_ALL: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Interface1s where none of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_NONE: Interface1Interface2ConnectionWhere + interface2Connection_NONE: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Interface1s where one of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_SINGLE: Interface1Interface2ConnectionWhere + interface2Connection_SINGLE: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Interface1s where some of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_SOME: Interface1Interface2ConnectionWhere + interface2Connection_SOME: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { some: { node: ... } } }' instead.\\") \\"\\"\\" Return Interface1s where all of the related Interface2s match this filter \\"\\"\\" - interface2_ALL: Interface2Where + interface2_ALL: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { all: ... }' instead.\\") \\"\\"\\" Return Interface1s where none of the related Interface2s match this filter \\"\\"\\" - interface2_NONE: Interface2Where + interface2_NONE: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { none: ... }' instead.\\") \\"\\"\\" Return Interface1s where one of the related Interface2s match this filter \\"\\"\\" - interface2_SINGLE: Interface2Where + interface2_SINGLE: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { single: ... }' instead.\\") \\"\\"\\" Return Interface1s where some of the related Interface2s match this filter \\"\\"\\" - interface2_SOME: Interface2Where - typename_IN: [Interface1Implementation!] + interface2_SOME: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { some: ... }' instead.\\") + typename: [Interface1Implementation!] } type Interface1sConnection { @@ -6063,6 +7110,17 @@ describe("Interface Relationships", () => { Type2Interface2 } + input Interface2RelationshipFilters { + \\"\\"\\"Filter type where all of the related Interface2s match this filter\\"\\"\\" + all: Interface2Where + \\"\\"\\"Filter type where none of the related Interface2s match this filter\\"\\"\\" + none: Interface2Where + \\"\\"\\"Filter type where one of the related Interface2s match this filter\\"\\"\\" + single: Interface2Where + \\"\\"\\"Filter type where some of the related Interface2s match this filter\\"\\"\\" + some: Interface2Where + } + \\"\\"\\" Fields to sort Interface2s by. The order in which sorts are applied is not guaranteed when specifying many fields in one Interface2Sort object. \\"\\"\\" @@ -6071,19 +7129,21 @@ describe("Interface Relationships", () => { } input Interface2UpdateInput { - field2_SET: String + field2: StringScalarMutations + field2_SET: String @deprecated(reason: \\"Please use the generic mutation 'field2: { set: ... } }' instead.\\") } input Interface2Where { AND: [Interface2Where!] NOT: Interface2Where OR: [Interface2Where!] - field2_CONTAINS: String - field2_ENDS_WITH: String - field2_EQ: String - field2_IN: [String] - field2_STARTS_WITH: String - typename_IN: [Interface2Implementation!] + field2: StringScalarFilters + field2_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter field2: { contains: ... }\\") + field2_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field2: { endsWith: ... }\\") + field2_EQ: String @deprecated(reason: \\"Please use the relevant generic filter field2: { eq: ... }\\") + field2_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter field2: { in: ... }\\") + field2_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field2: { startsWith: ... }\\") + typename: [Interface2Implementation!] } type Interface2sConnection { @@ -6155,6 +7215,27 @@ describe("Interface Relationships", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Type1 { field1: String! interface1(limit: Int, offset: Int, sort: [Interface1Sort!], where: Interface1Where): [Interface1!]! @@ -6192,6 +7273,7 @@ describe("Interface Relationships", () => { AND: [Type1Interface1AggregateInput!] NOT: Type1Interface1AggregateInput OR: [Type1Interface1AggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -6216,6 +7298,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 } @@ -6273,6 +7374,7 @@ describe("Interface Relationships", () => { AND: [Type1Interface1Interface2AggregateInput!] NOT: Type1Interface1Interface2AggregateInput OR: [Type1Interface1Interface2AggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -6287,6 +7389,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! @@ -6323,21 +7444,22 @@ describe("Interface Relationships", () => { AND: [Type1Interface1Interface2NodeAggregationWhereInput!] NOT: Type1Interface1Interface2NodeAggregationWhereInput OR: [Type1Interface1Interface2NodeAggregationWhereInput!] - field2_AVERAGE_LENGTH_EQUAL: Float - field2_AVERAGE_LENGTH_GT: Float - field2_AVERAGE_LENGTH_GTE: Float - field2_AVERAGE_LENGTH_LT: Float - field2_AVERAGE_LENGTH_LTE: Float - field2_LONGEST_LENGTH_EQUAL: Int - field2_LONGEST_LENGTH_GT: Int - field2_LONGEST_LENGTH_GTE: Int - field2_LONGEST_LENGTH_LT: Int - field2_LONGEST_LENGTH_LTE: Int - field2_SHORTEST_LENGTH_EQUAL: Int - field2_SHORTEST_LENGTH_GT: Int - field2_SHORTEST_LENGTH_GTE: Int - field2_SHORTEST_LENGTH_LT: Int - field2_SHORTEST_LENGTH_LTE: Int + field2: StringScalarAggregationFilters + field2_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { eq: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { gt: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { gte: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { lt: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { lte: ... } } }' instead.\\") + field2_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { eq: ... } } }' instead.\\") + field2_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { gt: ... } } }' instead.\\") + field2_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { gte: ... } } }' instead.\\") + field2_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { lt: ... } } }' instead.\\") + field2_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { lte: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { eq: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { gt: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { gte: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { lt: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { lte: ... } } }' instead.\\") } input Type1Interface1Interface2UpdateConnectionInput { @@ -6358,21 +7480,22 @@ describe("Interface Relationships", () => { AND: [Type1Interface1NodeAggregationWhereInput!] NOT: Type1Interface1NodeAggregationWhereInput OR: [Type1Interface1NodeAggregationWhereInput!] - field1_AVERAGE_LENGTH_EQUAL: Float - field1_AVERAGE_LENGTH_GT: Float - field1_AVERAGE_LENGTH_GTE: Float - field1_AVERAGE_LENGTH_LT: Float - field1_AVERAGE_LENGTH_LTE: Float - field1_LONGEST_LENGTH_EQUAL: Int - field1_LONGEST_LENGTH_GT: Int - field1_LONGEST_LENGTH_GTE: Int - field1_LONGEST_LENGTH_LT: Int - field1_LONGEST_LENGTH_LTE: Int - field1_SHORTEST_LENGTH_EQUAL: Int - field1_SHORTEST_LENGTH_GT: Int - field1_SHORTEST_LENGTH_GTE: Int - field1_SHORTEST_LENGTH_LT: Int - field1_SHORTEST_LENGTH_LTE: Int + field1: StringScalarAggregationFilters + field1_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'field1: { averageLength: { eq: ... } } }' instead.\\") + field1_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field1: { averageLength: { gt: ... } } }' instead.\\") + field1_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field1: { averageLength: { gte: ... } } }' instead.\\") + field1_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field1: { averageLength: { lt: ... } } }' instead.\\") + field1_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field1: { averageLength: { lte: ... } } }' instead.\\") + field1_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { longestLength: { eq: ... } } }' instead.\\") + field1_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { longestLength: { gt: ... } } }' instead.\\") + field1_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { longestLength: { gte: ... } } }' instead.\\") + field1_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { longestLength: { lt: ... } } }' instead.\\") + field1_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { longestLength: { lte: ... } } }' instead.\\") + field1_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { shortestLength: { eq: ... } } }' instead.\\") + field1_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { shortestLength: { gt: ... } } }' instead.\\") + field1_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { shortestLength: { gte: ... } } }' instead.\\") + field1_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { shortestLength: { lt: ... } } }' instead.\\") + field1_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field1: { shortestLength: { lte: ... } } }' instead.\\") } type Type1Interface1Relationship { @@ -6401,7 +7524,8 @@ describe("Interface Relationships", () => { } input Type1Interface1UpdateInput { - field1_SET: String + field1: StringScalarMutations + field1_SET: String @deprecated(reason: \\"Please use the generic mutation 'field1: { set: ... } }' instead.\\") interface2: [Type1Interface1Interface2UpdateFieldInput!] } @@ -6409,44 +7533,47 @@ describe("Interface Relationships", () => { AND: [Type1Interface1Where!] NOT: Type1Interface1Where OR: [Type1Interface1Where!] - field1_CONTAINS: String - field1_ENDS_WITH: String - field1_EQ: String - field1_IN: [String!] - field1_STARTS_WITH: String + field1: StringScalarFilters + field1_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter field1: { contains: ... }\\") + field1_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { endsWith: ... }\\") + field1_EQ: String @deprecated(reason: \\"Please use the relevant generic filter field1: { eq: ... }\\") + field1_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter field1: { in: ... }\\") + field1_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { startsWith: ... }\\") + interface2: Interface2RelationshipFilters interface2Aggregate: Type1Interface1Interface2AggregateInput + interface2Connection: Type1Interface1Interface2ConnectionFilters \\"\\"\\" Return Type1Interface1s where all of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_ALL: Interface1Interface2ConnectionWhere + interface2Connection_ALL: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Type1Interface1s where none of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_NONE: Interface1Interface2ConnectionWhere + interface2Connection_NONE: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Type1Interface1s where one of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_SINGLE: Interface1Interface2ConnectionWhere + interface2Connection_SINGLE: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Type1Interface1s where some of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_SOME: Interface1Interface2ConnectionWhere + interface2Connection_SOME: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { some: { node: ... } } }' instead.\\") \\"\\"\\" Return Type1Interface1s where all of the related Interface2s match this filter \\"\\"\\" - interface2_ALL: Interface2Where + interface2_ALL: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { all: ... }' instead.\\") \\"\\"\\" Return Type1Interface1s where none of the related Interface2s match this filter \\"\\"\\" - interface2_NONE: Interface2Where + interface2_NONE: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { none: ... }' instead.\\") \\"\\"\\" Return Type1Interface1s where one of the related Interface2s match this filter \\"\\"\\" - interface2_SINGLE: Interface2Where + interface2_SINGLE: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { single: ... }' instead.\\") \\"\\"\\" Return Type1Interface1s where some of the related Interface2s match this filter \\"\\"\\" - interface2_SOME: Interface2Where + interface2_SOME: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { some: ... }' instead.\\") } type Type1Interface1sConnection { @@ -6481,18 +7608,20 @@ describe("Interface Relationships", () => { } input Type1Interface2UpdateInput { - field2_SET: String + field2: StringScalarMutations + field2_SET: String @deprecated(reason: \\"Please use the generic mutation 'field2: { set: ... } }' instead.\\") } input Type1Interface2Where { AND: [Type1Interface2Where!] NOT: Type1Interface2Where OR: [Type1Interface2Where!] - field2_CONTAINS: String - field2_ENDS_WITH: String - field2_EQ: String - field2_IN: [String!] - field2_STARTS_WITH: String + field2: StringScalarFilters + field2_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter field2: { contains: ... }\\") + field2_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field2: { endsWith: ... }\\") + field2_EQ: String @deprecated(reason: \\"Please use the relevant generic filter field2: { eq: ... }\\") + field2_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter field2: { in: ... }\\") + field2_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field2: { startsWith: ... }\\") } type Type1Interface2sConnection { @@ -6513,26 +7642,27 @@ describe("Interface Relationships", () => { AND: [Type1PropsAggregationWhereInput!] NOT: Type1PropsAggregationWhereInput OR: [Type1PropsAggregationWhereInput!] - type1Field_AVERAGE_EQUAL: Float - type1Field_AVERAGE_GT: Float - type1Field_AVERAGE_GTE: Float - type1Field_AVERAGE_LT: Float - type1Field_AVERAGE_LTE: Float - type1Field_MAX_EQUAL: Int - type1Field_MAX_GT: Int - type1Field_MAX_GTE: Int - type1Field_MAX_LT: Int - type1Field_MAX_LTE: Int - type1Field_MIN_EQUAL: Int - type1Field_MIN_GT: Int - type1Field_MIN_GTE: Int - type1Field_MIN_LT: Int - type1Field_MIN_LTE: Int - type1Field_SUM_EQUAL: Int - type1Field_SUM_GT: Int - type1Field_SUM_GTE: Int - type1Field_SUM_LT: Int - type1Field_SUM_LTE: Int + type1Field: IntScalarAggregationFilters + type1Field_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'type1Field: { average: { eq: ... } } }' instead.\\") + type1Field_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'type1Field: { average: { gt: ... } } }' instead.\\") + type1Field_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'type1Field: { average: { gte: ... } } }' instead.\\") + type1Field_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'type1Field: { average: { lt: ... } } }' instead.\\") + type1Field_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'type1Field: { average: { lte: ... } } }' instead.\\") + type1Field_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'type1Field: { max: { eq: ... } } }' instead.\\") + type1Field_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'type1Field: { max: { gt: ... } } }' instead.\\") + type1Field_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'type1Field: { max: { gte: ... } } }' instead.\\") + type1Field_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'type1Field: { max: { lt: ... } } }' instead.\\") + type1Field_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'type1Field: { max: { lte: ... } } }' instead.\\") + type1Field_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'type1Field: { min: { eq: ... } } }' instead.\\") + type1Field_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'type1Field: { min: { gt: ... } } }' instead.\\") + type1Field_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'type1Field: { min: { gte: ... } } }' instead.\\") + type1Field_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'type1Field: { min: { lt: ... } } }' instead.\\") + type1Field_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'type1Field: { min: { lte: ... } } }' instead.\\") + type1Field_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'type1Field: { sum: { eq: ... } } }' instead.\\") + type1Field_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'type1Field: { sum: { gt: ... } } }' instead.\\") + type1Field_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'type1Field: { sum: { gte: ... } } }' instead.\\") + type1Field_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'type1Field: { sum: { lt: ... } } }' instead.\\") + type1Field_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'type1Field: { sum: { lte: ... } } }' instead.\\") } input Type1PropsCreateInput { @@ -6544,21 +7674,23 @@ describe("Interface Relationships", () => { } input Type1PropsUpdateInput { - type1Field_DECREMENT: Int - type1Field_INCREMENT: Int - type1Field_SET: Int + type1Field: IntScalarMutations + type1Field_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'type1Field: { decrement: ... } }' instead.\\") + type1Field_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'type1Field: { increment: ... } }' instead.\\") + type1Field_SET: Int @deprecated(reason: \\"Please use the generic mutation 'type1Field: { set: ... } }' instead.\\") } input Type1PropsWhere { AND: [Type1PropsWhere!] NOT: Type1PropsWhere OR: [Type1PropsWhere!] - type1Field_EQ: Int - type1Field_GT: Int - type1Field_GTE: Int - type1Field_IN: [Int!] - type1Field_LT: Int - type1Field_LTE: Int + type1Field: IntScalarFilters + type1Field_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter type1Field: { eq: ... }\\") + type1Field_GT: Int @deprecated(reason: \\"Please use the relevant generic filter type1Field: { gt: ... }\\") + type1Field_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter type1Field: { gte: ... }\\") + type1Field_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter type1Field: { in: ... }\\") + type1Field_LT: Int @deprecated(reason: \\"Please use the relevant generic filter type1Field: { lt: ... }\\") + type1Field_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter type1Field: { lte: ... }\\") } \\"\\"\\" @@ -6569,7 +7701,8 @@ describe("Interface Relationships", () => { } input Type1UpdateInput { - field1_SET: String + field1: StringScalarMutations + field1_SET: String @deprecated(reason: \\"Please use the generic mutation 'field1: { set: ... } }' instead.\\") interface1: [Type1Interface1UpdateFieldInput!] } @@ -6577,36 +7710,39 @@ describe("Interface Relationships", () => { AND: [Type1Where!] NOT: Type1Where OR: [Type1Where!] - field1_CONTAINS: String - field1_ENDS_WITH: String - field1_EQ: String - field1_IN: [String!] - field1_STARTS_WITH: String + field1: StringScalarFilters + field1_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter field1: { contains: ... }\\") + field1_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { endsWith: ... }\\") + field1_EQ: String @deprecated(reason: \\"Please use the relevant generic filter field1: { eq: ... }\\") + field1_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter field1: { in: ... }\\") + field1_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { startsWith: ... }\\") + interface1: Interface1RelationshipFilters interface1Aggregate: Type1Interface1AggregateInput + interface1Connection: Type1Interface1ConnectionFilters \\"\\"\\" Return Type1s where all of the related Type1Interface1Connections match this filter \\"\\"\\" - interface1Connection_ALL: Type1Interface1ConnectionWhere + interface1Connection_ALL: Type1Interface1ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface1Connection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Type1s where none of the related Type1Interface1Connections match this filter \\"\\"\\" - interface1Connection_NONE: Type1Interface1ConnectionWhere + interface1Connection_NONE: Type1Interface1ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface1Connection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Type1s where one of the related Type1Interface1Connections match this filter \\"\\"\\" - interface1Connection_SINGLE: Type1Interface1ConnectionWhere + interface1Connection_SINGLE: Type1Interface1ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface1Connection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Type1s where some of the related Type1Interface1Connections match this filter \\"\\"\\" - interface1Connection_SOME: Type1Interface1ConnectionWhere + interface1Connection_SOME: Type1Interface1ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface1Connection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Type1s where all of the related Interface1s match this filter\\"\\"\\" - interface1_ALL: Interface1Where + interface1_ALL: Interface1Where @deprecated(reason: \\"Please use the relevant generic filter 'interface1: { all: ... }' instead.\\") \\"\\"\\"Return Type1s where none of the related Interface1s match this filter\\"\\"\\" - interface1_NONE: Interface1Where + interface1_NONE: Interface1Where @deprecated(reason: \\"Please use the relevant generic filter 'interface1: { none: ... }' instead.\\") \\"\\"\\"Return Type1s where one of the related Interface1s match this filter\\"\\"\\" - interface1_SINGLE: Interface1Where + interface1_SINGLE: Interface1Where @deprecated(reason: \\"Please use the relevant generic filter 'interface1: { single: ... }' instead.\\") \\"\\"\\"Return Type1s where some of the related Interface1s match this filter\\"\\"\\" - interface1_SOME: Interface1Where + interface1_SOME: Interface1Where @deprecated(reason: \\"Please use the relevant generic filter 'interface1: { some: ... }' instead.\\") } type Type1sConnection { @@ -6645,6 +7781,7 @@ describe("Interface Relationships", () => { AND: [Type2Interface1Interface2AggregateInput!] NOT: Type2Interface1Interface2AggregateInput OR: [Type2Interface1Interface2AggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -6659,6 +7796,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! @@ -6695,21 +7851,22 @@ describe("Interface Relationships", () => { AND: [Type2Interface1Interface2NodeAggregationWhereInput!] NOT: Type2Interface1Interface2NodeAggregationWhereInput OR: [Type2Interface1Interface2NodeAggregationWhereInput!] - field2_AVERAGE_LENGTH_EQUAL: Float - field2_AVERAGE_LENGTH_GT: Float - field2_AVERAGE_LENGTH_GTE: Float - field2_AVERAGE_LENGTH_LT: Float - field2_AVERAGE_LENGTH_LTE: Float - field2_LONGEST_LENGTH_EQUAL: Int - field2_LONGEST_LENGTH_GT: Int - field2_LONGEST_LENGTH_GTE: Int - field2_LONGEST_LENGTH_LT: Int - field2_LONGEST_LENGTH_LTE: Int - field2_SHORTEST_LENGTH_EQUAL: Int - field2_SHORTEST_LENGTH_GT: Int - field2_SHORTEST_LENGTH_GTE: Int - field2_SHORTEST_LENGTH_LT: Int - field2_SHORTEST_LENGTH_LTE: Int + field2: StringScalarAggregationFilters + field2_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { eq: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { gt: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { gte: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { lt: ... } } }' instead.\\") + field2_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'field2: { averageLength: { lte: ... } } }' instead.\\") + field2_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { eq: ... } } }' instead.\\") + field2_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { gt: ... } } }' instead.\\") + field2_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { gte: ... } } }' instead.\\") + field2_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { lt: ... } } }' instead.\\") + field2_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { longestLength: { lte: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { eq: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { gt: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { gte: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { lt: ... } } }' instead.\\") + field2_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'field2: { shortestLength: { lte: ... } } }' instead.\\") } input Type2Interface1Interface2UpdateConnectionInput { @@ -6734,7 +7891,8 @@ describe("Interface Relationships", () => { } input Type2Interface1UpdateInput { - field1_SET: String + field1: StringScalarMutations + field1_SET: String @deprecated(reason: \\"Please use the generic mutation 'field1: { set: ... } }' instead.\\") interface2: [Type2Interface1Interface2UpdateFieldInput!] } @@ -6742,44 +7900,47 @@ describe("Interface Relationships", () => { AND: [Type2Interface1Where!] NOT: Type2Interface1Where OR: [Type2Interface1Where!] - field1_CONTAINS: String - field1_ENDS_WITH: String - field1_EQ: String - field1_IN: [String!] - field1_STARTS_WITH: String + field1: StringScalarFilters + field1_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter field1: { contains: ... }\\") + field1_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { endsWith: ... }\\") + field1_EQ: String @deprecated(reason: \\"Please use the relevant generic filter field1: { eq: ... }\\") + field1_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter field1: { in: ... }\\") + field1_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field1: { startsWith: ... }\\") + interface2: Interface2RelationshipFilters interface2Aggregate: Type2Interface1Interface2AggregateInput + interface2Connection: Type2Interface1Interface2ConnectionFilters \\"\\"\\" Return Type2Interface1s where all of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_ALL: Interface1Interface2ConnectionWhere + interface2Connection_ALL: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Type2Interface1s where none of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_NONE: Interface1Interface2ConnectionWhere + interface2Connection_NONE: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Type2Interface1s where one of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_SINGLE: Interface1Interface2ConnectionWhere + interface2Connection_SINGLE: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Type2Interface1s where some of the related Interface1Interface2Connections match this filter \\"\\"\\" - interface2Connection_SOME: Interface1Interface2ConnectionWhere + interface2Connection_SOME: Interface1Interface2ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'interface2Connection: { some: { node: ... } } }' instead.\\") \\"\\"\\" Return Type2Interface1s where all of the related Interface2s match this filter \\"\\"\\" - interface2_ALL: Interface2Where + interface2_ALL: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { all: ... }' instead.\\") \\"\\"\\" Return Type2Interface1s where none of the related Interface2s match this filter \\"\\"\\" - interface2_NONE: Interface2Where + interface2_NONE: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { none: ... }' instead.\\") \\"\\"\\" Return Type2Interface1s where one of the related Interface2s match this filter \\"\\"\\" - interface2_SINGLE: Interface2Where + interface2_SINGLE: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { single: ... }' instead.\\") \\"\\"\\" Return Type2Interface1s where some of the related Interface2s match this filter \\"\\"\\" - interface2_SOME: Interface2Where + interface2_SOME: Interface2Where @deprecated(reason: \\"Please use the relevant generic filter 'interface2: { some: ... }' instead.\\") } type Type2Interface1sConnection { @@ -6814,18 +7975,20 @@ describe("Interface Relationships", () => { } input Type2Interface2UpdateInput { - field2_SET: String + field2: StringScalarMutations + field2_SET: String @deprecated(reason: \\"Please use the generic mutation 'field2: { set: ... } }' instead.\\") } input Type2Interface2Where { AND: [Type2Interface2Where!] NOT: Type2Interface2Where OR: [Type2Interface2Where!] - field2_CONTAINS: String - field2_ENDS_WITH: String - field2_EQ: String - field2_IN: [String!] - field2_STARTS_WITH: String + field2: StringScalarFilters + field2_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter field2: { contains: ... }\\") + field2_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field2: { endsWith: ... }\\") + field2_EQ: String @deprecated(reason: \\"Please use the relevant generic filter field2: { eq: ... }\\") + field2_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter field2: { in: ... }\\") + field2_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter field2: { startsWith: ... }\\") } type Type2Interface2sConnection { @@ -6846,26 +8009,27 @@ describe("Interface Relationships", () => { AND: [Type2PropsAggregationWhereInput!] NOT: Type2PropsAggregationWhereInput OR: [Type2PropsAggregationWhereInput!] - type2Field_AVERAGE_EQUAL: Float - type2Field_AVERAGE_GT: Float - type2Field_AVERAGE_GTE: Float - type2Field_AVERAGE_LT: Float - type2Field_AVERAGE_LTE: Float - type2Field_MAX_EQUAL: Int - type2Field_MAX_GT: Int - type2Field_MAX_GTE: Int - type2Field_MAX_LT: Int - type2Field_MAX_LTE: Int - type2Field_MIN_EQUAL: Int - type2Field_MIN_GT: Int - type2Field_MIN_GTE: Int - type2Field_MIN_LT: Int - type2Field_MIN_LTE: Int - type2Field_SUM_EQUAL: Int - type2Field_SUM_GT: Int - type2Field_SUM_GTE: Int - type2Field_SUM_LT: Int - type2Field_SUM_LTE: Int + type2Field: IntScalarAggregationFilters + type2Field_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'type2Field: { average: { eq: ... } } }' instead.\\") + type2Field_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'type2Field: { average: { gt: ... } } }' instead.\\") + type2Field_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'type2Field: { average: { gte: ... } } }' instead.\\") + type2Field_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'type2Field: { average: { lt: ... } } }' instead.\\") + type2Field_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'type2Field: { average: { lte: ... } } }' instead.\\") + type2Field_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'type2Field: { max: { eq: ... } } }' instead.\\") + type2Field_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'type2Field: { max: { gt: ... } } }' instead.\\") + type2Field_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'type2Field: { max: { gte: ... } } }' instead.\\") + type2Field_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'type2Field: { max: { lt: ... } } }' instead.\\") + type2Field_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'type2Field: { max: { lte: ... } } }' instead.\\") + type2Field_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'type2Field: { min: { eq: ... } } }' instead.\\") + type2Field_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'type2Field: { min: { gt: ... } } }' instead.\\") + type2Field_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'type2Field: { min: { gte: ... } } }' instead.\\") + type2Field_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'type2Field: { min: { lt: ... } } }' instead.\\") + type2Field_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'type2Field: { min: { lte: ... } } }' instead.\\") + type2Field_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'type2Field: { sum: { eq: ... } } }' instead.\\") + type2Field_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'type2Field: { sum: { gt: ... } } }' instead.\\") + type2Field_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'type2Field: { sum: { gte: ... } } }' instead.\\") + type2Field_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'type2Field: { sum: { lt: ... } } }' instead.\\") + type2Field_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'type2Field: { sum: { lte: ... } } }' instead.\\") } input Type2PropsCreateInput { @@ -6877,21 +8041,23 @@ describe("Interface Relationships", () => { } input Type2PropsUpdateInput { - type2Field_DECREMENT: Int - type2Field_INCREMENT: Int - type2Field_SET: Int + type2Field: IntScalarMutations + type2Field_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'type2Field: { decrement: ... } }' instead.\\") + type2Field_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'type2Field: { increment: ... } }' instead.\\") + type2Field_SET: Int @deprecated(reason: \\"Please use the generic mutation 'type2Field: { set: ... } }' instead.\\") } input Type2PropsWhere { AND: [Type2PropsWhere!] NOT: Type2PropsWhere OR: [Type2PropsWhere!] - type2Field_EQ: Int - type2Field_GT: Int - type2Field_GTE: Int - type2Field_IN: [Int!] - type2Field_LT: Int - type2Field_LTE: Int + type2Field: IntScalarFilters + type2Field_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter type2Field: { eq: ... }\\") + type2Field_GT: Int @deprecated(reason: \\"Please use the relevant generic filter type2Field: { gt: ... }\\") + type2Field_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter type2Field: { gte: ... }\\") + type2Field_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter type2Field: { in: ... }\\") + type2Field_LT: Int @deprecated(reason: \\"Please use the relevant generic filter type2Field: { lt: ... }\\") + type2Field_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter type2Field: { lte: ... }\\") } \\"\\"\\" @@ -6988,7 +8154,6 @@ describe("Interface Relationships", () => { type CommentAggregateSelection { content: StringAggregateSelection! count: Int! - id: IDAggregateSelection! } input CommentConnectInput { @@ -7011,6 +8176,7 @@ describe("Interface Relationships", () => { AND: [CommentCreatorAggregateInput!] NOT: CommentCreatorAggregateInput OR: [CommentCreatorAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -7024,6 +8190,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! } @@ -7037,31 +8222,22 @@ describe("Interface Relationships", () => { AND: [CommentCreatorNodeAggregationWhereInput!] NOT: CommentCreatorNodeAggregationWhereInput OR: [CommentCreatorNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } input CommentCreatorUpdateConnectionInput { @@ -7096,6 +8272,7 @@ describe("Interface Relationships", () => { AND: [CommentPostAggregateInput!] NOT: CommentPostAggregateInput OR: [CommentPostAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -7115,6 +8292,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 } @@ -7149,31 +8345,22 @@ describe("Interface Relationships", () => { AND: [CommentPostNodeAggregationWhereInput!] NOT: CommentPostNodeAggregationWhereInput OR: [CommentPostNodeAggregationWhereInput!] - content_AVERAGE_LENGTH_EQUAL: Float - content_AVERAGE_LENGTH_GT: Float - content_AVERAGE_LENGTH_GTE: Float - content_AVERAGE_LENGTH_LT: Float - content_AVERAGE_LENGTH_LTE: Float - content_LONGEST_LENGTH_EQUAL: Int - content_LONGEST_LENGTH_GT: Int - content_LONGEST_LENGTH_GTE: Int - content_LONGEST_LENGTH_LT: Int - content_LONGEST_LENGTH_LTE: Int - content_SHORTEST_LENGTH_EQUAL: Int - content_SHORTEST_LENGTH_GT: Int - content_SHORTEST_LENGTH_GTE: Int - content_SHORTEST_LENGTH_LT: Int - content_SHORTEST_LENGTH_LTE: Int - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + content: StringScalarAggregationFilters + content_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { eq: ... } } }' instead.\\") + content_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { gt: ... } } }' instead.\\") + content_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { gte: ... } } }' instead.\\") + content_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { lt: ... } } }' instead.\\") + content_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { lte: ... } } }' instead.\\") + content_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { eq: ... } } }' instead.\\") + content_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { gt: ... } } }' instead.\\") + content_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { gte: ... } } }' instead.\\") + content_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { lt: ... } } }' instead.\\") + content_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { lte: ... } } }' instead.\\") + content_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { eq: ... } } }' instead.\\") + content_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { gt: ... } } }' instead.\\") + content_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { gte: ... } } }' instead.\\") + content_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { lt: ... } } }' instead.\\") + content_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { lte: ... } } }' instead.\\") } type CommentPostPostAggregationSelection { @@ -7183,7 +8370,6 @@ describe("Interface Relationships", () => { type CommentPostPostNodeAggregateSelection { content: StringAggregateSelection! - id: IDAggregateSelection! } type CommentPostRelationship { @@ -7204,6 +8390,17 @@ describe("Interface Relationships", () => { where: CommentPostConnectionWhere } + input CommentRelationshipFilters { + \\"\\"\\"Filter type where all of the related Comments match this filter\\"\\"\\" + all: CommentWhere + \\"\\"\\"Filter type where none of the related Comments match this filter\\"\\"\\" + none: CommentWhere + \\"\\"\\"Filter type where one of the related Comments match this filter\\"\\"\\" + single: CommentWhere + \\"\\"\\"Filter type where some of the related Comments match this filter\\"\\"\\" + some: CommentWhere + } + \\"\\"\\" Fields to sort Comments by. The order in which sorts are applied is not guaranteed when specifying many fields in one CommentSort object. \\"\\"\\" @@ -7213,9 +8410,11 @@ describe("Interface Relationships", () => { } input CommentUpdateInput { - content_SET: String + content: StringScalarMutations + content_SET: String @deprecated(reason: \\"Please use the generic mutation 'content: { set: ... } }' instead.\\") creator: [CommentCreatorUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") post: [CommentPostUpdateFieldInput!] } @@ -7225,7 +8424,6 @@ describe("Interface Relationships", () => { } type CommentUserCreatorNodeAggregateSelection { - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -7233,66 +8431,72 @@ describe("Interface Relationships", () => { AND: [CommentWhere!] NOT: CommentWhere OR: [CommentWhere!] - content_CONTAINS: String - content_ENDS_WITH: String - content_EQ: String - content_IN: [String] - content_STARTS_WITH: String + content: StringScalarFilters + content_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter content: { contains: ... }\\") + content_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter content: { endsWith: ... }\\") + content_EQ: String @deprecated(reason: \\"Please use the relevant generic filter content: { eq: ... }\\") + content_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter content: { in: ... }\\") + content_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter content: { startsWith: ... }\\") + creator: UserRelationshipFilters creatorAggregate: CommentCreatorAggregateInput + creatorConnection: CommentCreatorConnectionFilters \\"\\"\\" Return Comments where all of the related ContentCreatorConnections match this filter \\"\\"\\" - creatorConnection_ALL: ContentCreatorConnectionWhere + creatorConnection_ALL: ContentCreatorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'creatorConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Comments where none of the related ContentCreatorConnections match this filter \\"\\"\\" - creatorConnection_NONE: ContentCreatorConnectionWhere + creatorConnection_NONE: ContentCreatorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'creatorConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Comments where one of the related ContentCreatorConnections match this filter \\"\\"\\" - creatorConnection_SINGLE: ContentCreatorConnectionWhere + creatorConnection_SINGLE: ContentCreatorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'creatorConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Comments where some of the related ContentCreatorConnections match this filter \\"\\"\\" - creatorConnection_SOME: ContentCreatorConnectionWhere + creatorConnection_SOME: ContentCreatorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'creatorConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Comments where all of the related Users match this filter\\"\\"\\" - creator_ALL: UserWhere + creator_ALL: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'creator: { all: ... }' instead.\\") \\"\\"\\"Return Comments where none of the related Users match this filter\\"\\"\\" - creator_NONE: UserWhere + creator_NONE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'creator: { none: ... }' instead.\\") \\"\\"\\"Return Comments where one of the related Users match this filter\\"\\"\\" - creator_SINGLE: UserWhere + creator_SINGLE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'creator: { single: ... }' instead.\\") \\"\\"\\"Return Comments where some of the related Users match this filter\\"\\"\\" - creator_SOME: UserWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + creator_SOME: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'creator: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + post: PostRelationshipFilters postAggregate: CommentPostAggregateInput + postConnection: CommentPostConnectionFilters \\"\\"\\" Return Comments where all of the related CommentPostConnections match this filter \\"\\"\\" - postConnection_ALL: CommentPostConnectionWhere + postConnection_ALL: CommentPostConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'postConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Comments where none of the related CommentPostConnections match this filter \\"\\"\\" - postConnection_NONE: CommentPostConnectionWhere + postConnection_NONE: CommentPostConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'postConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Comments where one of the related CommentPostConnections match this filter \\"\\"\\" - postConnection_SINGLE: CommentPostConnectionWhere + postConnection_SINGLE: CommentPostConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'postConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Comments where some of the related CommentPostConnections match this filter \\"\\"\\" - postConnection_SOME: CommentPostConnectionWhere + postConnection_SOME: CommentPostConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'postConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Comments where all of the related Posts match this filter\\"\\"\\" - post_ALL: PostWhere + post_ALL: PostWhere @deprecated(reason: \\"Please use the relevant generic filter 'post: { all: ... }' instead.\\") \\"\\"\\"Return Comments where none of the related Posts match this filter\\"\\"\\" - post_NONE: PostWhere + post_NONE: PostWhere @deprecated(reason: \\"Please use the relevant generic filter 'post: { none: ... }' instead.\\") \\"\\"\\"Return Comments where one of the related Posts match this filter\\"\\"\\" - post_SINGLE: PostWhere + post_SINGLE: PostWhere @deprecated(reason: \\"Please use the relevant generic filter 'post: { single: ... }' instead.\\") \\"\\"\\"Return Comments where some of the related Posts match this filter\\"\\"\\" - post_SOME: PostWhere + post_SOME: PostWhere @deprecated(reason: \\"Please use the relevant generic filter 'post: { some: ... }' instead.\\") } type CommentsConnection { @@ -7311,7 +8515,6 @@ describe("Interface Relationships", () => { type ContentAggregateSelection { content: StringAggregateSelection! count: Int! - id: IDAggregateSelection! } input ContentConnectInput { @@ -7331,6 +8534,7 @@ describe("Interface Relationships", () => { AND: [ContentCreatorAggregateInput!] NOT: ContentCreatorAggregateInput OR: [ContentCreatorAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -7350,6 +8554,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 } @@ -7379,31 +8602,22 @@ describe("Interface Relationships", () => { AND: [ContentCreatorNodeAggregationWhereInput!] NOT: ContentCreatorNodeAggregationWhereInput OR: [ContentCreatorNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type ContentCreatorRelationship { @@ -7442,6 +8656,17 @@ describe("Interface Relationships", () => { Post } + input ContentRelationshipFilters { + \\"\\"\\"Filter type where all of the related Contents match this filter\\"\\"\\" + all: ContentWhere + \\"\\"\\"Filter type where none of the related Contents match this filter\\"\\"\\" + none: ContentWhere + \\"\\"\\"Filter type where one of the related Contents match this filter\\"\\"\\" + single: ContentWhere + \\"\\"\\"Filter type where some of the related Contents match this filter\\"\\"\\" + some: ContentWhere + } + \\"\\"\\" Fields to sort Contents by. The order in which sorts are applied is not guaranteed when specifying many fields in one ContentSort object. \\"\\"\\" @@ -7451,51 +8676,57 @@ describe("Interface Relationships", () => { } input ContentUpdateInput { - content_SET: String + content: StringScalarMutations + content_SET: String @deprecated(reason: \\"Please use the generic mutation 'content: { set: ... } }' instead.\\") creator: [ContentCreatorUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input ContentWhere { AND: [ContentWhere!] NOT: ContentWhere OR: [ContentWhere!] - content_CONTAINS: String - content_ENDS_WITH: String - content_EQ: String - content_IN: [String] - content_STARTS_WITH: String + content: StringScalarFilters + content_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter content: { contains: ... }\\") + content_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter content: { endsWith: ... }\\") + content_EQ: String @deprecated(reason: \\"Please use the relevant generic filter content: { eq: ... }\\") + content_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter content: { in: ... }\\") + content_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter content: { startsWith: ... }\\") + creator: UserRelationshipFilters creatorAggregate: ContentCreatorAggregateInput + creatorConnection: ContentCreatorConnectionFilters \\"\\"\\" Return Contents where all of the related ContentCreatorConnections match this filter \\"\\"\\" - creatorConnection_ALL: ContentCreatorConnectionWhere + creatorConnection_ALL: ContentCreatorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'creatorConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Contents where none of the related ContentCreatorConnections match this filter \\"\\"\\" - creatorConnection_NONE: ContentCreatorConnectionWhere + creatorConnection_NONE: ContentCreatorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'creatorConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Contents where one of the related ContentCreatorConnections match this filter \\"\\"\\" - creatorConnection_SINGLE: ContentCreatorConnectionWhere + creatorConnection_SINGLE: ContentCreatorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'creatorConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Contents where some of the related ContentCreatorConnections match this filter \\"\\"\\" - creatorConnection_SOME: ContentCreatorConnectionWhere + creatorConnection_SOME: ContentCreatorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'creatorConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Contents where all of the related Users match this filter\\"\\"\\" - creator_ALL: UserWhere + creator_ALL: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'creator: { all: ... }' instead.\\") \\"\\"\\"Return Contents where none of the related Users match this filter\\"\\"\\" - creator_NONE: UserWhere + creator_NONE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'creator: { none: ... }' instead.\\") \\"\\"\\"Return Contents where one of the related Users match this filter\\"\\"\\" - creator_SINGLE: UserWhere + creator_SINGLE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'creator: { single: ... }' instead.\\") \\"\\"\\"Return Contents where some of the related Users match this filter\\"\\"\\" - creator_SOME: UserWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - typename_IN: [ContentImplementation!] + creator_SOME: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'creator: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + typename: [ContentImplementation!] } type ContentsConnection { @@ -7535,9 +8766,38 @@ describe("Interface Relationships", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Mutation { @@ -7574,7 +8834,6 @@ describe("Interface Relationships", () => { type PostAggregateSelection { content: StringAggregateSelection! count: Int! - id: IDAggregateSelection! } type PostCommentCommentsAggregationSelection { @@ -7584,13 +8843,13 @@ describe("Interface Relationships", () => { type PostCommentCommentsNodeAggregateSelection { content: StringAggregateSelection! - id: IDAggregateSelection! } input PostCommentsAggregateInput { AND: [PostCommentsAggregateInput!] NOT: PostCommentsAggregateInput OR: [PostCommentsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -7610,6 +8869,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 } @@ -7644,31 +8922,22 @@ describe("Interface Relationships", () => { AND: [PostCommentsNodeAggregationWhereInput!] NOT: PostCommentsNodeAggregationWhereInput OR: [PostCommentsNodeAggregationWhereInput!] - content_AVERAGE_LENGTH_EQUAL: Float - content_AVERAGE_LENGTH_GT: Float - content_AVERAGE_LENGTH_GTE: Float - content_AVERAGE_LENGTH_LT: Float - content_AVERAGE_LENGTH_LTE: Float - content_LONGEST_LENGTH_EQUAL: Int - content_LONGEST_LENGTH_GT: Int - content_LONGEST_LENGTH_GTE: Int - content_LONGEST_LENGTH_LT: Int - content_LONGEST_LENGTH_LTE: Int - content_SHORTEST_LENGTH_EQUAL: Int - content_SHORTEST_LENGTH_GT: Int - content_SHORTEST_LENGTH_GTE: Int - content_SHORTEST_LENGTH_LT: Int - content_SHORTEST_LENGTH_LTE: Int - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + content: StringScalarAggregationFilters + content_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { eq: ... } } }' instead.\\") + content_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { gt: ... } } }' instead.\\") + content_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { gte: ... } } }' instead.\\") + content_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { lt: ... } } }' instead.\\") + content_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { lte: ... } } }' instead.\\") + content_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { eq: ... } } }' instead.\\") + content_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { gt: ... } } }' instead.\\") + content_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { gte: ... } } }' instead.\\") + content_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { lt: ... } } }' instead.\\") + content_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { lte: ... } } }' instead.\\") + content_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { eq: ... } } }' instead.\\") + content_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { gt: ... } } }' instead.\\") + content_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { gte: ... } } }' instead.\\") + content_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { lt: ... } } }' instead.\\") + content_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { lte: ... } } }' instead.\\") } type PostCommentsRelationship { @@ -7709,6 +8978,7 @@ describe("Interface Relationships", () => { AND: [PostCreatorAggregateInput!] NOT: PostCreatorAggregateInput OR: [PostCreatorAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -7722,6 +8992,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! } @@ -7735,31 +9024,22 @@ describe("Interface Relationships", () => { AND: [PostCreatorNodeAggregationWhereInput!] NOT: PostCreatorNodeAggregationWhereInput OR: [PostCreatorNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } input PostCreatorUpdateConnectionInput { @@ -7790,6 +9070,17 @@ describe("Interface Relationships", () => { node: Post! } + input PostRelationshipFilters { + \\"\\"\\"Filter type where all of the related Posts match this filter\\"\\"\\" + all: PostWhere + \\"\\"\\"Filter type where none of the related Posts match this filter\\"\\"\\" + none: PostWhere + \\"\\"\\"Filter type where one of the related Posts match this filter\\"\\"\\" + single: PostWhere + \\"\\"\\"Filter type where some of the related Posts match this filter\\"\\"\\" + some: PostWhere + } + \\"\\"\\" Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. \\"\\"\\" @@ -7800,9 +9091,11 @@ describe("Interface Relationships", () => { input PostUpdateInput { comments: [PostCommentsUpdateFieldInput!] - content_SET: String + content: StringScalarMutations + content_SET: String @deprecated(reason: \\"Please use the generic mutation 'content: { set: ... } }' instead.\\") creator: [PostCreatorUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } type PostUserCreatorAggregationSelection { @@ -7811,7 +9104,6 @@ describe("Interface Relationships", () => { } type PostUserCreatorNodeAggregateSelection { - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -7819,66 +9111,72 @@ describe("Interface Relationships", () => { AND: [PostWhere!] NOT: PostWhere OR: [PostWhere!] + comments: CommentRelationshipFilters commentsAggregate: PostCommentsAggregateInput + commentsConnection: PostCommentsConnectionFilters \\"\\"\\" Return Posts where all of the related PostCommentsConnections match this filter \\"\\"\\" - commentsConnection_ALL: PostCommentsConnectionWhere + commentsConnection_ALL: PostCommentsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'commentsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Posts where none of the related PostCommentsConnections match this filter \\"\\"\\" - commentsConnection_NONE: PostCommentsConnectionWhere + commentsConnection_NONE: PostCommentsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'commentsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Posts where one of the related PostCommentsConnections match this filter \\"\\"\\" - commentsConnection_SINGLE: PostCommentsConnectionWhere + commentsConnection_SINGLE: PostCommentsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'commentsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Posts where some of the related PostCommentsConnections match this filter \\"\\"\\" - commentsConnection_SOME: PostCommentsConnectionWhere + commentsConnection_SOME: PostCommentsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'commentsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Posts where all of the related Comments match this filter\\"\\"\\" - comments_ALL: CommentWhere + comments_ALL: CommentWhere @deprecated(reason: \\"Please use the relevant generic filter 'comments: { all: ... }' instead.\\") \\"\\"\\"Return Posts where none of the related Comments match this filter\\"\\"\\" - comments_NONE: CommentWhere + comments_NONE: CommentWhere @deprecated(reason: \\"Please use the relevant generic filter 'comments: { none: ... }' instead.\\") \\"\\"\\"Return Posts where one of the related Comments match this filter\\"\\"\\" - comments_SINGLE: CommentWhere + comments_SINGLE: CommentWhere @deprecated(reason: \\"Please use the relevant generic filter 'comments: { single: ... }' instead.\\") \\"\\"\\"Return Posts where some of the related Comments match this filter\\"\\"\\" - comments_SOME: CommentWhere - content_CONTAINS: String - content_ENDS_WITH: String - content_EQ: String - content_IN: [String] - content_STARTS_WITH: String + comments_SOME: CommentWhere @deprecated(reason: \\"Please use the relevant generic filter 'comments: { some: ... }' instead.\\") + content: StringScalarFilters + content_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter content: { contains: ... }\\") + content_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter content: { endsWith: ... }\\") + content_EQ: String @deprecated(reason: \\"Please use the relevant generic filter content: { eq: ... }\\") + content_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter content: { in: ... }\\") + content_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter content: { startsWith: ... }\\") + creator: UserRelationshipFilters creatorAggregate: PostCreatorAggregateInput + creatorConnection: PostCreatorConnectionFilters \\"\\"\\" Return Posts where all of the related ContentCreatorConnections match this filter \\"\\"\\" - creatorConnection_ALL: ContentCreatorConnectionWhere + creatorConnection_ALL: ContentCreatorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'creatorConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Posts where none of the related ContentCreatorConnections match this filter \\"\\"\\" - creatorConnection_NONE: ContentCreatorConnectionWhere + creatorConnection_NONE: ContentCreatorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'creatorConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Posts where one of the related ContentCreatorConnections match this filter \\"\\"\\" - creatorConnection_SINGLE: ContentCreatorConnectionWhere + creatorConnection_SINGLE: ContentCreatorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'creatorConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Posts where some of the related ContentCreatorConnections match this filter \\"\\"\\" - creatorConnection_SOME: ContentCreatorConnectionWhere + creatorConnection_SOME: ContentCreatorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'creatorConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Posts where all of the related Users match this filter\\"\\"\\" - creator_ALL: UserWhere + creator_ALL: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'creator: { all: ... }' instead.\\") \\"\\"\\"Return Posts where none of the related Users match this filter\\"\\"\\" - creator_NONE: UserWhere + creator_NONE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'creator: { none: ... }' instead.\\") \\"\\"\\"Return Posts where one of the related Users match this filter\\"\\"\\" - creator_SINGLE: UserWhere + creator_SINGLE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'creator: { single: ... }' instead.\\") \\"\\"\\"Return Posts where some of the related Users match this filter\\"\\"\\" - creator_SOME: UserWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + creator_SOME: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'creator: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type PostsConnection { @@ -7915,6 +9213,27 @@ describe("Interface Relationships", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateCommentsMutationResponse { comments: [Comment!]! info: UpdateInfo! @@ -7950,7 +9269,6 @@ describe("Interface Relationships", () => { type UserAggregateSelection { count: Int! - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -7966,6 +9284,7 @@ describe("Interface Relationships", () => { AND: [UserContentAggregateInput!] NOT: UserContentAggregateInput OR: [UserContentAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -7985,6 +9304,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 } @@ -8003,7 +9341,6 @@ describe("Interface Relationships", () => { type UserContentContentNodeAggregateSelection { content: StringAggregateSelection! - id: IDAggregateSelection! } input UserContentCreateFieldInput { @@ -8029,31 +9366,22 @@ describe("Interface Relationships", () => { AND: [UserContentNodeAggregationWhereInput!] NOT: UserContentNodeAggregationWhereInput OR: [UserContentNodeAggregationWhereInput!] - content_AVERAGE_LENGTH_EQUAL: Float - content_AVERAGE_LENGTH_GT: Float - content_AVERAGE_LENGTH_GTE: Float - content_AVERAGE_LENGTH_LT: Float - content_AVERAGE_LENGTH_LTE: Float - content_LONGEST_LENGTH_EQUAL: Int - content_LONGEST_LENGTH_GT: Int - content_LONGEST_LENGTH_GTE: Int - content_LONGEST_LENGTH_LT: Int - content_LONGEST_LENGTH_LTE: Int - content_SHORTEST_LENGTH_EQUAL: Int - content_SHORTEST_LENGTH_GT: Int - content_SHORTEST_LENGTH_GTE: Int - content_SHORTEST_LENGTH_LT: Int - content_SHORTEST_LENGTH_LTE: Int - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + content: StringScalarAggregationFilters + content_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { eq: ... } } }' instead.\\") + content_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { gt: ... } } }' instead.\\") + content_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { gte: ... } } }' instead.\\") + content_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { lt: ... } } }' instead.\\") + content_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'content: { averageLength: { lte: ... } } }' instead.\\") + content_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { eq: ... } } }' instead.\\") + content_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { gt: ... } } }' instead.\\") + content_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { gte: ... } } }' instead.\\") + content_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { lt: ... } } }' instead.\\") + content_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { longestLength: { lte: ... } } }' instead.\\") + content_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { eq: ... } } }' instead.\\") + content_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { gt: ... } } }' instead.\\") + content_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { gte: ... } } }' instead.\\") + content_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { lt: ... } } }' instead.\\") + content_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'content: { shortestLength: { lte: ... } } }' instead.\\") } type UserContentRelationship { @@ -8093,6 +9421,17 @@ describe("Interface Relationships", () => { node: User! } + input UserRelationshipFilters { + \\"\\"\\"Filter type where all of the related Users match this filter\\"\\"\\" + all: UserWhere + \\"\\"\\"Filter type where none of the related Users match this filter\\"\\"\\" + none: UserWhere + \\"\\"\\"Filter type where one of the related Users match this filter\\"\\"\\" + single: UserWhere + \\"\\"\\"Filter type where some of the related Users match this filter\\"\\"\\" + some: UserWhere + } + \\"\\"\\" Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. \\"\\"\\" @@ -8103,49 +9442,55 @@ describe("Interface Relationships", () => { input UserUpdateInput { content: [UserContentUpdateFieldInput!] - id_SET: ID - name_SET: String + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input UserWhere { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] + content: ContentRelationshipFilters contentAggregate: UserContentAggregateInput + contentConnection: UserContentConnectionFilters \\"\\"\\" Return Users where all of the related UserContentConnections match this filter \\"\\"\\" - contentConnection_ALL: UserContentConnectionWhere + contentConnection_ALL: UserContentConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'contentConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Users where none of the related UserContentConnections match this filter \\"\\"\\" - contentConnection_NONE: UserContentConnectionWhere + contentConnection_NONE: UserContentConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'contentConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Users where one of the related UserContentConnections match this filter \\"\\"\\" - contentConnection_SINGLE: UserContentConnectionWhere + contentConnection_SINGLE: UserContentConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'contentConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Users where some of the related UserContentConnections match this filter \\"\\"\\" - contentConnection_SOME: UserContentConnectionWhere + contentConnection_SOME: UserContentConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'contentConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Users where all of the related Contents match this filter\\"\\"\\" - content_ALL: ContentWhere + content_ALL: ContentWhere @deprecated(reason: \\"Please use the relevant generic filter 'content: { all: ... }' instead.\\") \\"\\"\\"Return Users where none of the related Contents match this filter\\"\\"\\" - content_NONE: ContentWhere + content_NONE: ContentWhere @deprecated(reason: \\"Please use the relevant generic filter 'content: { none: ... }' instead.\\") \\"\\"\\"Return Users where one of the related Contents match this filter\\"\\"\\" - content_SINGLE: ContentWhere + content_SINGLE: ContentWhere @deprecated(reason: \\"Please use the relevant generic filter 'content: { single: ... }' instead.\\") \\"\\"\\"Return Users where some of the related Contents match this filter\\"\\"\\" - content_SOME: ContentWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + content_SOME: ContentWhere @deprecated(reason: \\"Please use the relevant generic filter 'content: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type UsersConnection { @@ -8216,26 +9561,27 @@ describe("Interface Relationships", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_MAX_EQUAL: Int - screenTime_MAX_GT: Int - screenTime_MAX_GTE: Int - screenTime_MAX_LT: Int - screenTime_MAX_LTE: Int - screenTime_MIN_EQUAL: Int - screenTime_MIN_GT: Int - screenTime_MIN_GTE: Int - screenTime_MIN_LT: Int - screenTime_MIN_LTE: Int - screenTime_SUM_EQUAL: Int - screenTime_SUM_GT: Int - screenTime_SUM_GTE: Int - screenTime_SUM_LT: Int - screenTime_SUM_LTE: Int + screenTime: IntScalarAggregationFilters + screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { eq: ... } } }' instead.\\") + screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gt: ... } } }' instead.\\") + screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gte: ... } } }' instead.\\") + screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lt: ... } } }' instead.\\") + screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lte: ... } } }' instead.\\") + screenTime_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { eq: ... } } }' instead.\\") + screenTime_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gt: ... } } }' instead.\\") + screenTime_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gte: ... } } }' instead.\\") + screenTime_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lt: ... } } }' instead.\\") + screenTime_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lte: ... } } }' instead.\\") + screenTime_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { eq: ... } } }' instead.\\") + screenTime_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gt: ... } } }' instead.\\") + screenTime_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gte: ... } } }' instead.\\") + screenTime_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lt: ... } } }' instead.\\") + screenTime_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lte: ... } } }' instead.\\") + screenTime_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { eq: ... } } }' instead.\\") + screenTime_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gt: ... } } }' instead.\\") + screenTime_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gte: ... } } }' instead.\\") + screenTime_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lt: ... } } }' instead.\\") + screenTime_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lte: ... } } }' instead.\\") } input ActedInCreateInput { @@ -8247,21 +9593,23 @@ describe("Interface Relationships", () => { } input ActedInUpdateInput { - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - screenTime_SET: Int + screenTime: IntScalarMutations + screenTime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { decrement: ... } }' instead.\\") + screenTime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { increment: ... } }' instead.\\") + screenTime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'screenTime: { set: ... } }' instead.\\") } input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime_EQ: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int + screenTime: IntScalarFilters + screenTime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { eq: ... }\\") + screenTime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gt: ... }\\") + screenTime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gte: ... }\\") + screenTime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter screenTime: { in: ... }\\") + screenTime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lt: ... }\\") + screenTime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lte: ... }\\") } type Actor { @@ -8275,6 +9623,7 @@ describe("Interface Relationships", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -8296,6 +9645,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 @@ -8333,21 +9701,22 @@ describe("Interface Relationships", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -8401,6 +9770,17 @@ describe("Interface Relationships", () => { node: Actor! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + type ActorShowActedInAggregationSelection { count: Int! edge: ActorShowActedInEdgeAggregateSelection @@ -8424,43 +9804,47 @@ describe("Interface Relationships", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ShowRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Shows match this filter\\"\\"\\" - actedIn_ALL: ShowWhere + actedIn_ALL: ShowWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Shows match this filter\\"\\"\\" - actedIn_NONE: ShowWhere + actedIn_NONE: ShowWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Shows match this filter\\"\\"\\" - actedIn_SINGLE: ShowWhere + actedIn_SINGLE: ShowWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Shows match this filter\\"\\"\\" - actedIn_SOME: ShowWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: ShowWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -8500,6 +9884,16 @@ describe("Interface Relationships", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + type IntAggregateSelection { average: Float max: Int @@ -8507,6 +9901,31 @@ describe("Interface Relationships", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie implements Production & Show { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -8533,6 +9952,7 @@ describe("Interface Relationships", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -8548,6 +9968,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! @@ -8562,21 +10001,22 @@ describe("Interface Relationships", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } input MovieActorsUpdateConnectionInput { @@ -8624,52 +10064,58 @@ describe("Interface Relationships", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - runtime_DECREMENT: Int - runtime_INCREMENT: Int - runtime_SET: Int - title_SET: String + runtime: IntScalarMutations + runtime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { decrement: ... } }' instead.\\") + runtime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { increment: ... } }' instead.\\") + runtime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'runtime: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: ShowActorsConnectionWhere + actorsConnection_ALL: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: ShowActorsConnectionWhere + actorsConnection_NONE: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: ShowActorsConnectionWhere + actorsConnection_SINGLE: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: ShowActorsConnectionWhere + actorsConnection_SOME: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - runtime_EQ: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + runtime: IntScalarFilters + runtime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { eq: ... }\\") + runtime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gt: ... }\\") + runtime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gte: ... }\\") + runtime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter runtime: { in: ... }\\") + runtime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lt: ... }\\") + runtime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -8729,12 +10175,13 @@ describe("Interface Relationships", () => { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -8787,6 +10234,7 @@ describe("Interface Relationships", () => { AND: [SeriesActorsAggregateInput!] NOT: SeriesActorsAggregateInput OR: [SeriesActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -8802,6 +10250,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! @@ -8816,21 +10283,22 @@ describe("Interface Relationships", () => { AND: [SeriesActorsNodeAggregationWhereInput!] NOT: SeriesActorsNodeAggregationWhereInput OR: [SeriesActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } input SeriesActorsUpdateConnectionInput { @@ -8884,52 +10352,58 @@ describe("Interface Relationships", () => { input SeriesUpdateInput { actors: [SeriesActorsUpdateFieldInput!] - episodeCount_DECREMENT: Int - episodeCount_INCREMENT: Int - episodeCount_SET: Int - title_SET: String + episodeCount: IntScalarMutations + episodeCount_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodeCount: { decrement: ... } }' instead.\\") + episodeCount_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodeCount: { increment: ... } }' instead.\\") + episodeCount_SET: Int @deprecated(reason: \\"Please use the generic mutation 'episodeCount: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] + actors: ActorRelationshipFilters actorsAggregate: SeriesActorsAggregateInput + actorsConnection: SeriesActorsConnectionFilters \\"\\"\\" Return Series where all of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: ShowActorsConnectionWhere + actorsConnection_ALL: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where none of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: ShowActorsConnectionWhere + actorsConnection_NONE: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where one of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: ShowActorsConnectionWhere + actorsConnection_SINGLE: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where some of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: ShowActorsConnectionWhere + actorsConnection_SOME: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - episodeCount_EQ: Int - episodeCount_GT: Int - episodeCount_GTE: Int - episodeCount_IN: [Int!] - episodeCount_LT: Int - episodeCount_LTE: Int - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + episodeCount: IntScalarFilters + episodeCount_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter episodeCount: { eq: ... }\\") + episodeCount_GT: Int @deprecated(reason: \\"Please use the relevant generic filter episodeCount: { gt: ... }\\") + episodeCount_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodeCount: { gte: ... }\\") + episodeCount_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter episodeCount: { in: ... }\\") + episodeCount_LT: Int @deprecated(reason: \\"Please use the relevant generic filter episodeCount: { lt: ... }\\") + episodeCount_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodeCount: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } interface Show { @@ -8942,6 +10416,7 @@ describe("Interface Relationships", () => { AND: [ShowActorsAggregateInput!] NOT: ShowActorsAggregateInput OR: [ShowActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -8963,6 +10438,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 @@ -9060,21 +10554,22 @@ describe("Interface Relationships", () => { AND: [ShowActorsNodeAggregationWhereInput!] NOT: ShowActorsNodeAggregationWhereInput OR: [ShowActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type ShowActorsRelationship { @@ -9135,6 +10630,17 @@ describe("Interface Relationships", () => { Series } + input ShowRelationshipFilters { + \\"\\"\\"Filter type where all of the related Shows match this filter\\"\\"\\" + all: ShowWhere + \\"\\"\\"Filter type where none of the related Shows match this filter\\"\\"\\" + none: ShowWhere + \\"\\"\\"Filter type where one of the related Shows match this filter\\"\\"\\" + single: ShowWhere + \\"\\"\\"Filter type where some of the related Shows match this filter\\"\\"\\" + some: ShowWhere + } + \\"\\"\\" Fields to sort Shows by. The order in which sorts are applied is not guaranteed when specifying many fields in one ShowSort object. \\"\\"\\" @@ -9144,44 +10650,48 @@ describe("Interface Relationships", () => { input ShowUpdateInput { actors: [ShowActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input ShowWhere { AND: [ShowWhere!] NOT: ShowWhere OR: [ShowWhere!] + actors: ActorRelationshipFilters actorsAggregate: ShowActorsAggregateInput + actorsConnection: ShowActorsConnectionFilters \\"\\"\\" Return Shows where all of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: ShowActorsConnectionWhere + actorsConnection_ALL: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Shows where none of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: ShowActorsConnectionWhere + actorsConnection_NONE: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Shows where one of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: ShowActorsConnectionWhere + actorsConnection_SINGLE: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Shows where some of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: ShowActorsConnectionWhere + actorsConnection_SOME: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Shows where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Shows where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Shows where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Shows where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ShowImplementation!] + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + typename: [ShowImplementation!] } type ShowsConnection { @@ -9210,26 +10720,27 @@ describe("Interface Relationships", () => { AND: [StarredInAggregationWhereInput!] NOT: StarredInAggregationWhereInput OR: [StarredInAggregationWhereInput!] - episodeNr_AVERAGE_EQUAL: Float - episodeNr_AVERAGE_GT: Float - episodeNr_AVERAGE_GTE: Float - episodeNr_AVERAGE_LT: Float - episodeNr_AVERAGE_LTE: Float - episodeNr_MAX_EQUAL: Int - episodeNr_MAX_GT: Int - episodeNr_MAX_GTE: Int - episodeNr_MAX_LT: Int - episodeNr_MAX_LTE: Int - episodeNr_MIN_EQUAL: Int - episodeNr_MIN_GT: Int - episodeNr_MIN_GTE: Int - episodeNr_MIN_LT: Int - episodeNr_MIN_LTE: Int - episodeNr_SUM_EQUAL: Int - episodeNr_SUM_GT: Int - episodeNr_SUM_GTE: Int - episodeNr_SUM_LT: Int - episodeNr_SUM_LTE: Int + episodeNr: IntScalarAggregationFilters + episodeNr_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'episodeNr: { average: { eq: ... } } }' instead.\\") + episodeNr_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'episodeNr: { average: { gt: ... } } }' instead.\\") + episodeNr_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'episodeNr: { average: { gte: ... } } }' instead.\\") + episodeNr_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'episodeNr: { average: { lt: ... } } }' instead.\\") + episodeNr_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'episodeNr: { average: { lte: ... } } }' instead.\\") + episodeNr_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeNr: { max: { eq: ... } } }' instead.\\") + episodeNr_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeNr: { max: { gt: ... } } }' instead.\\") + episodeNr_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeNr: { max: { gte: ... } } }' instead.\\") + episodeNr_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeNr: { max: { lt: ... } } }' instead.\\") + episodeNr_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeNr: { max: { lte: ... } } }' instead.\\") + episodeNr_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeNr: { min: { eq: ... } } }' instead.\\") + episodeNr_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeNr: { min: { gt: ... } } }' instead.\\") + episodeNr_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeNr: { min: { gte: ... } } }' instead.\\") + episodeNr_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeNr: { min: { lt: ... } } }' instead.\\") + episodeNr_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeNr: { min: { lte: ... } } }' instead.\\") + episodeNr_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeNr: { sum: { eq: ... } } }' instead.\\") + episodeNr_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeNr: { sum: { gt: ... } } }' instead.\\") + episodeNr_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeNr: { sum: { gte: ... } } }' instead.\\") + episodeNr_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeNr: { sum: { lt: ... } } }' instead.\\") + episodeNr_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'episodeNr: { sum: { lte: ... } } }' instead.\\") } input StarredInCreateInput { @@ -9241,21 +10752,23 @@ describe("Interface Relationships", () => { } input StarredInUpdateInput { - episodeNr_DECREMENT: Int - episodeNr_INCREMENT: Int - episodeNr_SET: Int + episodeNr: IntScalarMutations + episodeNr_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodeNr: { decrement: ... } }' instead.\\") + episodeNr_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodeNr: { increment: ... } }' instead.\\") + episodeNr_SET: Int @deprecated(reason: \\"Please use the generic mutation 'episodeNr: { set: ... } }' instead.\\") } input StarredInWhere { AND: [StarredInWhere!] NOT: StarredInWhere OR: [StarredInWhere!] - episodeNr_EQ: Int - episodeNr_GT: Int - episodeNr_GTE: Int - episodeNr_IN: [Int!] - episodeNr_LT: Int - episodeNr_LTE: Int + episodeNr: IntScalarFilters + episodeNr_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter episodeNr: { eq: ... }\\") + episodeNr_GT: Int @deprecated(reason: \\"Please use the relevant generic filter episodeNr: { gt: ... }\\") + episodeNr_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodeNr: { gte: ... }\\") + episodeNr_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter episodeNr: { in: ... }\\") + episodeNr_LT: Int @deprecated(reason: \\"Please use the relevant generic filter episodeNr: { lt: ... }\\") + episodeNr_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodeNr: { lte: ... }\\") } type StringAggregateSelection { @@ -9263,6 +10776,27 @@ describe("Interface Relationships", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/interfaces.test.ts b/packages/graphql/tests/schema/interfaces.test.ts index 2244f7337d..2676b68ea1 100644 --- a/packages/graphql/tests/schema/interfaces.test.ts +++ b/packages/graphql/tests/schema/interfaces.test.ts @@ -75,9 +75,28 @@ describe("Interfaces", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Movie implements MovieNode { @@ -91,7 +110,6 @@ describe("Interfaces", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieConnectInput { @@ -122,23 +140,18 @@ describe("Interfaces", () => { type MovieMovieMoviesAggregationSelection { count: Int! - node: MovieMovieMoviesNodeAggregateSelection - } - - type MovieMovieMoviesNodeAggregateSelection { - id: IDAggregateSelection! } input MovieMoviesAggregateInput { AND: [MovieMoviesAggregateInput!] NOT: MovieMoviesAggregateInput OR: [MovieMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int count_LT: Int count_LTE: Int - node: MovieMoviesNodeAggregationWhereInput } input MovieMoviesConnectFieldInput { @@ -146,6 +159,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! } @@ -155,22 +187,6 @@ describe("Interfaces", () => { create: [MovieMoviesCreateFieldInput!] } - input MovieMoviesNodeAggregationWhereInput { - AND: [MovieMoviesNodeAggregationWhereInput!] - NOT: MovieMoviesNodeAggregationWhereInput - OR: [MovieMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - } - input MovieMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -193,7 +209,6 @@ describe("Interfaces", () => { type MovieNodeAggregateSelection { count: Int! - id: IDAggregateSelection! } type MovieNodeEdge { @@ -209,12 +224,12 @@ describe("Interfaces", () => { AND: [MovieNodeMoviesAggregateInput!] NOT: MovieNodeMoviesAggregateInput OR: [MovieNodeMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int count_LT: Int count_LTE: Int - node: MovieNodeMoviesNodeAggregationWhereInput } type MovieNodeMoviesConnection { @@ -223,6 +238,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 } @@ -244,22 +278,6 @@ describe("Interfaces", () => { where: MovieNodeMoviesConnectionWhere } - input MovieNodeMoviesNodeAggregationWhereInput { - AND: [MovieNodeMoviesNodeAggregationWhereInput!] - NOT: MovieNodeMoviesNodeAggregationWhereInput - OR: [MovieNodeMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - } - type MovieNodeMoviesRelationship { cursor: String! node: Movie! @@ -276,37 +294,40 @@ describe("Interfaces", () => { AND: [MovieNodeWhere!] NOT: MovieNodeWhere OR: [MovieNodeWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + movies: MovieRelationshipFilters moviesAggregate: MovieNodeMoviesAggregateInput + moviesConnection: MovieNodeMoviesConnectionFilters \\"\\"\\" Return MovieNodes where all of the related MovieNodeMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: MovieNodeMoviesConnectionWhere + moviesConnection_ALL: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return MovieNodes where none of the related MovieNodeMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: MovieNodeMoviesConnectionWhere + moviesConnection_NONE: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return MovieNodes where one of the related MovieNodeMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: MovieNodeMoviesConnectionWhere + moviesConnection_SINGLE: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return MovieNodes where some of the related MovieNodeMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: MovieNodeMoviesConnectionWhere + moviesConnection_SOME: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return MovieNodes where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return MovieNodes where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return MovieNodes where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return MovieNodes where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - typename_IN: [MovieNodeImplementation!] + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + typename: [MovieNodeImplementation!] } type MovieNodesConnection { @@ -315,6 +336,17 @@ describe("Interfaces", () => { totalCount: Int! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -323,7 +355,8 @@ describe("Interfaces", () => { } input MovieUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") movies: [MovieMoviesUpdateFieldInput!] } @@ -331,40 +364,44 @@ describe("Interfaces", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + customQuery: MovieRelationshipFilters customQuery_ALL: MovieWhere customQuery_NONE: MovieWhere customQuery_SINGLE: MovieWhere customQuery_SOME: MovieWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + movies: MovieRelationshipFilters moviesAggregate: MovieMoviesAggregateInput + moviesConnection: MovieMoviesConnectionFilters \\"\\"\\" Return Movies where all of the related MovieNodeMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: MovieNodeMoviesConnectionWhere + moviesConnection_ALL: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieNodeMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: MovieNodeMoviesConnectionWhere + moviesConnection_NONE: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieNodeMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: MovieNodeMoviesConnectionWhere + moviesConnection_SINGLE: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieNodeMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: MovieNodeMoviesConnectionWhere + moviesConnection_SOME: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") } type MoviesConnection { @@ -476,9 +513,28 @@ describe("Interfaces", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Movie implements MovieNode { @@ -492,7 +548,6 @@ describe("Interfaces", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieConnectInput { @@ -523,23 +578,18 @@ describe("Interfaces", () => { type MovieMovieMoviesAggregationSelection { count: Int! - node: MovieMovieMoviesNodeAggregateSelection - } - - type MovieMovieMoviesNodeAggregateSelection { - id: IDAggregateSelection! } input MovieMoviesAggregateInput { AND: [MovieMoviesAggregateInput!] NOT: MovieMoviesAggregateInput OR: [MovieMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int count_LT: Int count_LTE: Int - node: MovieMoviesNodeAggregationWhereInput } input MovieMoviesConnectFieldInput { @@ -547,6 +597,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! } @@ -556,22 +625,6 @@ describe("Interfaces", () => { create: [MovieMoviesCreateFieldInput!] } - input MovieMoviesNodeAggregationWhereInput { - AND: [MovieMoviesNodeAggregationWhereInput!] - NOT: MovieMoviesNodeAggregationWhereInput - OR: [MovieMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - } - input MovieMoviesUpdateConnectionInput { node: MovieUpdateInput } @@ -594,7 +647,6 @@ describe("Interfaces", () => { type MovieNodeAggregateSelection { count: Int! - id: IDAggregateSelection! } type MovieNodeEdge { @@ -610,12 +662,12 @@ describe("Interfaces", () => { AND: [MovieNodeMoviesAggregateInput!] NOT: MovieNodeMoviesAggregateInput OR: [MovieNodeMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int count_LT: Int count_LTE: Int - node: MovieNodeMoviesNodeAggregationWhereInput } type MovieNodeMoviesConnection { @@ -624,6 +676,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 } @@ -645,22 +716,6 @@ describe("Interfaces", () => { where: MovieNodeMoviesConnectionWhere } - input MovieNodeMoviesNodeAggregationWhereInput { - AND: [MovieNodeMoviesNodeAggregationWhereInput!] - NOT: MovieNodeMoviesNodeAggregationWhereInput - OR: [MovieNodeMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - } - type MovieNodeMoviesRelationship { cursor: String! node: Movie! @@ -677,37 +732,40 @@ describe("Interfaces", () => { AND: [MovieNodeWhere!] NOT: MovieNodeWhere OR: [MovieNodeWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + movies: MovieRelationshipFilters moviesAggregate: MovieNodeMoviesAggregateInput + moviesConnection: MovieNodeMoviesConnectionFilters \\"\\"\\" Return MovieNodes where all of the related MovieNodeMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: MovieNodeMoviesConnectionWhere + moviesConnection_ALL: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return MovieNodes where none of the related MovieNodeMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: MovieNodeMoviesConnectionWhere + moviesConnection_NONE: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return MovieNodes where one of the related MovieNodeMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: MovieNodeMoviesConnectionWhere + moviesConnection_SINGLE: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return MovieNodes where some of the related MovieNodeMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: MovieNodeMoviesConnectionWhere + moviesConnection_SOME: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return MovieNodes where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return MovieNodes where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return MovieNodes where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return MovieNodes where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - typename_IN: [MovieNodeImplementation!] + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + typename: [MovieNodeImplementation!] } type MovieNodesConnection { @@ -716,6 +774,17 @@ describe("Interfaces", () => { totalCount: Int! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -724,7 +793,8 @@ describe("Interfaces", () => { } input MovieUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") movies: [MovieMoviesUpdateFieldInput!] } @@ -732,40 +802,44 @@ describe("Interfaces", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + customQuery: MovieRelationshipFilters customQuery_ALL: MovieWhere customQuery_NONE: MovieWhere customQuery_SINGLE: MovieWhere customQuery_SOME: MovieWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + movies: MovieRelationshipFilters moviesAggregate: MovieMoviesAggregateInput + moviesConnection: MovieMoviesConnectionFilters \\"\\"\\" Return Movies where all of the related MovieNodeMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: MovieNodeMoviesConnectionWhere + moviesConnection_ALL: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieNodeMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: MovieNodeMoviesConnectionWhere + moviesConnection_NONE: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieNodeMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: MovieNodeMoviesConnectionWhere + moviesConnection_SINGLE: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieNodeMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: MovieNodeMoviesConnectionWhere + moviesConnection_SOME: MovieNodeMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") } type MoviesConnection { diff --git a/packages/graphql/tests/schema/issues/1038.test.ts b/packages/graphql/tests/schema/issues/1038.test.ts index 7612cca2cc..1142dd44e1 100644 --- a/packages/graphql/tests/schema/issues/1038.test.ts +++ b/packages/graphql/tests/schema/issues/1038.test.ts @@ -74,24 +74,28 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { } input AWSAccountUpdateInput { - accountName_SET: String - code_SET: String + accountName: StringScalarMutations + accountName_SET: String @deprecated(reason: \\"Please use the generic mutation 'accountName: { set: ... } }' instead.\\") + code: StringScalarMutations + code_SET: String @deprecated(reason: \\"Please use the generic mutation 'code: { set: ... } }' instead.\\") } input AWSAccountWhere { AND: [AWSAccountWhere!] NOT: AWSAccountWhere OR: [AWSAccountWhere!] - accountName_CONTAINS: String - accountName_ENDS_WITH: String - accountName_EQ: String - accountName_IN: [String] - accountName_STARTS_WITH: String - code_CONTAINS: String - code_ENDS_WITH: String - code_EQ: String - code_IN: [String] - code_STARTS_WITH: String + accountName: StringScalarFilters + accountName_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter accountName: { contains: ... }\\") + accountName_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter accountName: { endsWith: ... }\\") + accountName_EQ: String @deprecated(reason: \\"Please use the relevant generic filter accountName: { eq: ... }\\") + accountName_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter accountName: { in: ... }\\") + accountName_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter accountName: { startsWith: ... }\\") + code: StringScalarFilters + code_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter code: { contains: ... }\\") + code_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter code: { endsWith: ... }\\") + code_EQ: String @deprecated(reason: \\"Please use the relevant generic filter code: { eq: ... }\\") + code_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter code: { in: ... }\\") + code_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter code: { startsWith: ... }\\") } type AwsAccountsConnection { @@ -148,24 +152,28 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { } input DNSZoneUpdateInput { - awsId_SET: String - zoneType_SET: String + awsId: StringScalarMutations + awsId_SET: String @deprecated(reason: \\"Please use the generic mutation 'awsId: { set: ... } }' instead.\\") + zoneType: StringScalarMutations + zoneType_SET: String @deprecated(reason: \\"Please use the generic mutation 'zoneType: { set: ... } }' instead.\\") } input DNSZoneWhere { AND: [DNSZoneWhere!] NOT: DNSZoneWhere OR: [DNSZoneWhere!] - awsId_CONTAINS: String - awsId_ENDS_WITH: String - awsId_EQ: String - awsId_IN: [String] - awsId_STARTS_WITH: String - zoneType_CONTAINS: String - zoneType_ENDS_WITH: String - zoneType_EQ: String - zoneType_IN: [String] - zoneType_STARTS_WITH: String + awsId: StringScalarFilters + awsId_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter awsId: { contains: ... }\\") + awsId_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter awsId: { endsWith: ... }\\") + awsId_EQ: String @deprecated(reason: \\"Please use the relevant generic filter awsId: { eq: ... }\\") + awsId_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter awsId: { in: ... }\\") + awsId_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter awsId: { startsWith: ... }\\") + zoneType: StringScalarFilters + zoneType_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter zoneType: { contains: ... }\\") + zoneType_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter zoneType: { endsWith: ... }\\") + zoneType_EQ: String @deprecated(reason: \\"Please use the relevant generic filter zoneType: { eq: ... }\\") + zoneType_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter zoneType: { in: ... }\\") + zoneType_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter zoneType: { startsWith: ... }\\") } \\"\\"\\" @@ -221,6 +229,20 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateAwsAccountsMutationResponse { awsAccounts: [AWSAccount!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/issues/1182.test.ts b/packages/graphql/tests/schema/issues/1182.test.ts index dc55b6dad0..4cb219ee7b 100644 --- a/packages/graphql/tests/schema/issues/1182.test.ts +++ b/packages/graphql/tests/schema/issues/1182.test.ts @@ -57,7 +57,6 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { type ActorAggregateSelection { count: Int! dob: DateTimeAggregateSelection! - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -76,6 +75,17 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { node: Actor! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -87,38 +97,45 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { } input ActorUpdateInput { - dob_SET: DateTime - homeAddress_SET: PointInput - name_SET: String + dob: DateTimeScalarMutations + dob_SET: DateTime @deprecated(reason: \\"Please use the generic mutation 'dob: { set: ... } }' instead.\\") + homeAddress: PointMutations + homeAddress_SET: PointInput @deprecated(reason: \\"Please use the generic mutation 'homeAddress: { set: ... } }' instead.\\") + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - dob_EQ: DateTime - dob_GT: DateTime - dob_GTE: DateTime - dob_IN: [DateTime!] - dob_LT: DateTime - dob_LTE: DateTime - homeAddress_DISTANCE: PointDistance - homeAddress_EQ: PointInput - homeAddress_GT: PointDistance - homeAddress_GTE: PointDistance - homeAddress_IN: [PointInput!] - homeAddress_LT: PointDistance - homeAddress_LTE: PointDistance - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + dob: DateTimeScalarFilters + dob_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter dob: { eq: ... }\\") + dob_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter dob: { gt: ... }\\") + dob_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter dob: { gte: ... }\\") + dob_IN: [DateTime!] @deprecated(reason: \\"Please use the relevant generic filter dob: { in: ... }\\") + dob_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter dob: { lt: ... }\\") + dob_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter dob: { lte: ... }\\") + homeAddress: PointFilters + homeAddress_DISTANCE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter homeAddress: { distance: ... }\\") + homeAddress_EQ: PointInput @deprecated(reason: \\"Please use the relevant generic filter homeAddress: { eq: ... }\\") + homeAddress_GT: PointDistance @deprecated(reason: \\"Please use the relevant generic filter homeAddress: { gt: ... }\\") + homeAddress_GTE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter homeAddress: { gte: ... }\\") + homeAddress_IN: [PointInput!] @deprecated(reason: \\"Please use the relevant generic filter homeAddress: { in: ... }\\") + homeAddress_LT: PointDistance @deprecated(reason: \\"Please use the relevant generic filter homeAddress: { lt: ... }\\") + homeAddress_LTE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter homeAddress: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -153,6 +170,27 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { min: DateTime } + \\"\\"\\"Filters for an aggregation of an DateTime input field\\"\\"\\" + input DateTimeScalarAggregationFilters { + max: DateTimeScalarFilters + min: DateTimeScalarFilters + } + + \\"\\"\\"DateTime filters\\"\\"\\" + input DateTimeScalarFilters { + eq: DateTime + gt: DateTime + gte: DateTime + in: [DateTime!] + lt: DateTime + lte: DateTime + } + + \\"\\"\\"DateTime mutations\\"\\"\\" + input DateTimeScalarMutations { + set: DateTime + } + \\"\\"\\" Information about the number of nodes and relationships deleted during a delete mutation \\"\\"\\" @@ -161,9 +199,33 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Movie { @@ -181,7 +243,6 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { type MovieActorActorsNodeAggregateSelection { dob: DateTimeAggregateSelection! - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -189,6 +250,7 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -207,6 +269,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 } @@ -239,41 +320,33 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - dob_MAX_EQUAL: DateTime - dob_MAX_GT: DateTime - dob_MAX_GTE: DateTime - dob_MAX_LT: DateTime - dob_MAX_LTE: DateTime - dob_MIN_EQUAL: DateTime - dob_MIN_GT: DateTime - dob_MIN_GTE: DateTime - dob_MIN_LT: DateTime - dob_MIN_LTE: DateTime - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + dob: DateTimeScalarAggregationFilters + dob_MAX_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'dob: { max: { eq: ... } } }' instead.\\") + dob_MAX_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'dob: { max: { gt: ... } } }' instead.\\") + dob_MAX_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'dob: { max: { gte: ... } } }' instead.\\") + dob_MAX_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'dob: { max: { lt: ... } } }' instead.\\") + dob_MAX_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'dob: { max: { lte: ... } } }' instead.\\") + dob_MIN_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'dob: { min: { eq: ... } } }' instead.\\") + dob_MIN_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'dob: { min: { gt: ... } } }' instead.\\") + dob_MIN_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'dob: { min: { gte: ... } } }' instead.\\") + dob_MIN_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'dob: { min: { lt: ... } } }' instead.\\") + dob_MIN_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'dob: { min: { lte: ... } } }' instead.\\") + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -296,7 +369,6 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! title: StringAggregateSelection! } @@ -324,48 +396,53 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -409,6 +486,23 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { point: PointInput! } + \\"\\"\\"Distance filters\\"\\"\\" + input PointDistanceFilters { + eq: Float + from: PointInput! + gt: Float + gte: Float + lt: Float + lte: Float + } + + \\"\\"\\"Point filters\\"\\"\\" + input PointFilters { + distance: PointDistanceFilters + eq: PointInput + in: [PointInput!] + } + \\"\\"\\"Input type for a point\\"\\"\\" input PointInput { height: Float @@ -416,6 +510,11 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { longitude: Float! } + \\"\\"\\"Point mutations\\"\\"\\" + input PointMutations { + set: PointInput + } + type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): ActorAggregateSelection! @@ -438,6 +537,27 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/issues/1575.test.ts b/packages/graphql/tests/schema/issues/1575.test.ts index 9347ce4aba..afb47a4875 100644 --- a/packages/graphql/tests/schema/issues/1575.test.ts +++ b/packages/graphql/tests/schema/issues/1575.test.ts @@ -87,28 +87,32 @@ describe("https://github.com/neo4j/graphql/issues/1575", () => { } input FooUpdateInput { - geo_point_SET: PointInput - point_SET: PointInput + geo_point: PointMutations + geo_point_SET: PointInput @deprecated(reason: \\"Please use the generic mutation 'geo_point: { set: ... } }' instead.\\") + point: PointMutations + point_SET: PointInput @deprecated(reason: \\"Please use the generic mutation 'point: { set: ... } }' instead.\\") } input FooWhere { AND: [FooWhere!] NOT: FooWhere OR: [FooWhere!] - geo_point_DISTANCE: PointDistance - geo_point_EQ: PointInput - geo_point_GT: PointDistance - geo_point_GTE: PointDistance - geo_point_IN: [PointInput] - geo_point_LT: PointDistance - geo_point_LTE: PointDistance - point_DISTANCE: PointDistance - point_EQ: PointInput - point_GT: PointDistance - point_GTE: PointDistance - point_IN: [PointInput] - point_LT: PointDistance - point_LTE: PointDistance + geo_point: PointFilters + geo_point_DISTANCE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter geo_point: { distance: ... }\\") + geo_point_EQ: PointInput @deprecated(reason: \\"Please use the relevant generic filter geo_point: { eq: ... }\\") + geo_point_GT: PointDistance @deprecated(reason: \\"Please use the relevant generic filter geo_point: { gt: ... }\\") + geo_point_GTE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter geo_point: { gte: ... }\\") + geo_point_IN: [PointInput] @deprecated(reason: \\"Please use the relevant generic filter geo_point: { in: ... }\\") + geo_point_LT: PointDistance @deprecated(reason: \\"Please use the relevant generic filter geo_point: { lt: ... }\\") + geo_point_LTE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter geo_point: { lte: ... }\\") + point: PointFilters + point_DISTANCE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { distance: ... }\\") + point_EQ: PointInput @deprecated(reason: \\"Please use the relevant generic filter point: { eq: ... }\\") + point_GT: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { gt: ... }\\") + point_GTE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { gte: ... }\\") + point_IN: [PointInput] @deprecated(reason: \\"Please use the relevant generic filter point: { in: ... }\\") + point_LT: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { lt: ... }\\") + point_LTE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { lte: ... }\\") } type FoosConnection { @@ -149,6 +153,23 @@ describe("https://github.com/neo4j/graphql/issues/1575", () => { point: PointInput! } + \\"\\"\\"Distance filters\\"\\"\\" + input PointDistanceFilters { + eq: Float + from: PointInput! + gt: Float + gte: Float + lt: Float + lte: Float + } + + \\"\\"\\"Point filters\\"\\"\\" + input PointFilters { + distance: PointDistanceFilters + eq: PointInput + in: [PointInput!] + } + \\"\\"\\"Input type for a point\\"\\"\\" input PointInput { height: Float @@ -156,6 +177,11 @@ describe("https://github.com/neo4j/graphql/issues/1575", () => { longitude: Float! } + \\"\\"\\"Point mutations\\"\\"\\" + input PointMutations { + set: PointInput + } + type Query { foos(limit: Int, offset: Int, sort: [FooSort!], where: FooWhere): [Foo!]! foosAggregate(where: FooWhere): FooAggregateSelection! diff --git a/packages/graphql/tests/schema/issues/1614.test.ts b/packages/graphql/tests/schema/issues/1614.test.ts index 701f321272..ebfbbab1c4 100644 --- a/packages/graphql/tests/schema/issues/1614.test.ts +++ b/packages/graphql/tests/schema/issues/1614.test.ts @@ -107,6 +107,7 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { AND: [CrewMemberMoviesAggregateInput!] NOT: CrewMemberMoviesAggregateInput OR: [CrewMemberMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -126,6 +127,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 @@ -161,21 +181,22 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { AND: [CrewMemberMoviesNodeAggregationWhereInput!] NOT: CrewMemberMoviesNodeAggregationWhereInput OR: [CrewMemberMoviesNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type CrewMemberMoviesRelationship { @@ -206,31 +227,33 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { AND: [CrewMemberWhere!] NOT: CrewMemberWhere OR: [CrewMemberWhere!] + movies: MovieRelationshipFilters moviesAggregate: CrewMemberMoviesAggregateInput + moviesConnection: CrewMemberMoviesConnectionFilters \\"\\"\\" Return CrewMembers where all of the related CrewMemberMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: CrewMemberMoviesConnectionWhere + moviesConnection_ALL: CrewMemberMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return CrewMembers where none of the related CrewMemberMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: CrewMemberMoviesConnectionWhere + moviesConnection_NONE: CrewMemberMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return CrewMembers where one of the related CrewMemberMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: CrewMemberMoviesConnectionWhere + moviesConnection_SINGLE: CrewMemberMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return CrewMembers where some of the related CrewMemberMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: CrewMemberMoviesConnectionWhere + moviesConnection_SOME: CrewMemberMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return CrewMembers where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return CrewMembers where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return CrewMembers where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return CrewMembers where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") } type CrewMembersConnection { @@ -261,16 +284,29 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { KeyGrip } + \\"\\"\\"CrewPositionType filters\\"\\"\\" + input CrewPositionTypeEnumScalarFilters { + eq: CrewPositionType + in: [CrewPositionType!] + } + + \\"\\"\\"CrewPositionType mutations\\"\\"\\" + input CrewPositionTypeEnumScalarMutations { + set: CrewPositionType + } + input CrewPositionUpdateInput { - position_SET: CrewPositionType + position: CrewPositionTypeEnumScalarMutations + position_SET: CrewPositionType @deprecated(reason: \\"Please use the generic mutation 'position: { set: ... } }' instead.\\") } input CrewPositionWhere { AND: [CrewPositionWhere!] NOT: CrewPositionWhere OR: [CrewPositionWhere!] - position_EQ: CrewPositionType - position_IN: [CrewPositionType] + position: CrewPositionTypeEnumScalarFilters + position_EQ: CrewPositionType @deprecated(reason: \\"Please use the relevant generic filter position: { eq: ... }\\") + position_IN: [CrewPositionType] @deprecated(reason: \\"Please use the relevant generic filter position: { in: ... }\\") } \\"\\"\\" @@ -281,6 +317,26 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { name: String! } @@ -303,6 +359,17 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -311,18 +378,20 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { } input MovieUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type MoviesConnection { @@ -370,6 +439,27 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateCrewMembersMutationResponse { crewMembers: [CrewMember!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/issues/162.test.ts b/packages/graphql/tests/schema/issues/162.test.ts index 888da7f930..5b7a87661a 100644 --- a/packages/graphql/tests/schema/issues/162.test.ts +++ b/packages/graphql/tests/schema/issues/162.test.ts @@ -79,9 +79,28 @@ describe("162", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -91,6 +110,31 @@ describe("162", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Mutation { createTigerJawLevel2Part1s(input: [TigerJawLevel2Part1CreateInput!]!): CreateTigerJawLevel2Part1sMutationResponse! createTigerJawLevel2s(input: [TigerJawLevel2CreateInput!]!): CreateTigerJawLevel2sMutationResponse! @@ -162,7 +206,6 @@ describe("162", () => { type TigerJawLevel2AggregateSelection { count: Int! - id: IDAggregateSelection! } input TigerJawLevel2CreateInput { @@ -190,17 +233,16 @@ describe("162", () => { AND: [TigerJawLevel2Part1AggregateInput!] NOT: TigerJawLevel2Part1AggregateInput OR: [TigerJawLevel2Part1AggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int count_LT: Int count_LTE: Int - node: TigerJawLevel2Part1NodeAggregationWhereInput } type TigerJawLevel2Part1AggregateSelection { count: Int! - id: IDAggregateSelection! } input TigerJawLevel2Part1ConnectFieldInput { @@ -222,6 +264,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 } @@ -270,27 +331,30 @@ describe("162", () => { create: [TigerJawLevel2Part1CreateFieldInput!] } - input TigerJawLevel2Part1NodeAggregationWhereInput { - AND: [TigerJawLevel2Part1NodeAggregationWhereInput!] - NOT: TigerJawLevel2Part1NodeAggregationWhereInput - OR: [TigerJawLevel2Part1NodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - } - type TigerJawLevel2Part1Relationship { cursor: String! node: TigerJawLevel2Part1! } + input TigerJawLevel2Part1RelationshipFilters { + \\"\\"\\" + Filter type where all of the related TigerJawLevel2Part1s match this filter + \\"\\"\\" + all: TigerJawLevel2Part1Where + \\"\\"\\" + Filter type where none of the related TigerJawLevel2Part1s match this filter + \\"\\"\\" + none: TigerJawLevel2Part1Where + \\"\\"\\" + Filter type where one of the related TigerJawLevel2Part1s match this filter + \\"\\"\\" + single: TigerJawLevel2Part1Where + \\"\\"\\" + Filter type 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. \\"\\"\\" @@ -302,6 +366,7 @@ describe("162", () => { AND: [TigerJawLevel2Part1TigerAggregateInput!] NOT: TigerJawLevel2Part1TigerAggregateInput OR: [TigerJawLevel2Part1TigerAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -320,6 +385,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 } @@ -352,26 +436,27 @@ describe("162", () => { AND: [TigerJawLevel2Part1TigerNodeAggregationWhereInput!] NOT: TigerJawLevel2Part1TigerNodeAggregationWhereInput OR: [TigerJawLevel2Part1TigerNodeAggregationWhereInput!] - x_AVERAGE_EQUAL: Float - x_AVERAGE_GT: Float - x_AVERAGE_GTE: Float - x_AVERAGE_LT: Float - x_AVERAGE_LTE: Float - x_MAX_EQUAL: Int - x_MAX_GT: Int - x_MAX_GTE: Int - x_MAX_LT: Int - x_MAX_LTE: Int - x_MIN_EQUAL: Int - x_MIN_GT: Int - x_MIN_GTE: Int - x_MIN_LT: Int - x_MIN_LTE: Int - x_SUM_EQUAL: Int - x_SUM_GT: Int - x_SUM_GTE: Int - x_SUM_LT: Int - x_SUM_LTE: Int + x: IntScalarAggregationFilters + x_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'x: { average: { eq: ... } } }' instead.\\") + x_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'x: { average: { gt: ... } } }' instead.\\") + x_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'x: { average: { gte: ... } } }' instead.\\") + x_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'x: { average: { lt: ... } } }' instead.\\") + x_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'x: { average: { lte: ... } } }' instead.\\") + x_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'x: { max: { eq: ... } } }' instead.\\") + x_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'x: { max: { gt: ... } } }' instead.\\") + x_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'x: { max: { gte: ... } } }' instead.\\") + x_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'x: { max: { lt: ... } } }' instead.\\") + x_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'x: { max: { lte: ... } } }' instead.\\") + x_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'x: { min: { eq: ... } } }' instead.\\") + x_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'x: { min: { gt: ... } } }' instead.\\") + x_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'x: { min: { gte: ... } } }' instead.\\") + x_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'x: { min: { lt: ... } } }' instead.\\") + x_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'x: { min: { lte: ... } } }' instead.\\") + x_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'x: { sum: { eq: ... } } }' instead.\\") + x_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'x: { sum: { gt: ... } } }' instead.\\") + x_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'x: { sum: { gte: ... } } }' instead.\\") + x_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'x: { sum: { lt: ... } } }' instead.\\") + x_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'x: { sum: { lte: ... } } }' instead.\\") } type TigerJawLevel2Part1TigerRelationship { @@ -415,7 +500,8 @@ describe("162", () => { } input TigerJawLevel2Part1UpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") tiger: [TigerJawLevel2Part1TigerUpdateFieldInput!] } @@ -423,44 +509,47 @@ describe("162", () => { AND: [TigerJawLevel2Part1Where!] NOT: TigerJawLevel2Part1Where OR: [TigerJawLevel2Part1Where!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + tiger: TigerRelationshipFilters tigerAggregate: TigerJawLevel2Part1TigerAggregateInput + tigerConnection: TigerJawLevel2Part1TigerConnectionFilters \\"\\"\\" Return TigerJawLevel2Part1s where all of the related TigerJawLevel2Part1TigerConnections match this filter \\"\\"\\" - tigerConnection_ALL: TigerJawLevel2Part1TigerConnectionWhere + tigerConnection_ALL: TigerJawLevel2Part1TigerConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'tigerConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return TigerJawLevel2Part1s where none of the related TigerJawLevel2Part1TigerConnections match this filter \\"\\"\\" - tigerConnection_NONE: TigerJawLevel2Part1TigerConnectionWhere + tigerConnection_NONE: TigerJawLevel2Part1TigerConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'tigerConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return TigerJawLevel2Part1s where one of the related TigerJawLevel2Part1TigerConnections match this filter \\"\\"\\" - tigerConnection_SINGLE: TigerJawLevel2Part1TigerConnectionWhere + tigerConnection_SINGLE: TigerJawLevel2Part1TigerConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'tigerConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return TigerJawLevel2Part1s where some of the related TigerJawLevel2Part1TigerConnections match this filter \\"\\"\\" - tigerConnection_SOME: TigerJawLevel2Part1TigerConnectionWhere + tigerConnection_SOME: TigerJawLevel2Part1TigerConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'tigerConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\" Return TigerJawLevel2Part1s where all of the related Tigers match this filter \\"\\"\\" - tiger_ALL: TigerWhere + tiger_ALL: TigerWhere @deprecated(reason: \\"Please use the relevant generic filter 'tiger: { all: ... }' instead.\\") \\"\\"\\" Return TigerJawLevel2Part1s where none of the related Tigers match this filter \\"\\"\\" - tiger_NONE: TigerWhere + tiger_NONE: TigerWhere @deprecated(reason: \\"Please use the relevant generic filter 'tiger: { none: ... }' instead.\\") \\"\\"\\" Return TigerJawLevel2Part1s where one of the related Tigers match this filter \\"\\"\\" - tiger_SINGLE: TigerWhere + tiger_SINGLE: TigerWhere @deprecated(reason: \\"Please use the relevant generic filter 'tiger: { single: ... }' instead.\\") \\"\\"\\" Return TigerJawLevel2Part1s where some of the related Tigers match this filter \\"\\"\\" - tiger_SOME: TigerWhere + tiger_SOME: TigerWhere @deprecated(reason: \\"Please use the relevant generic filter 'tiger: { some: ... }' instead.\\") } type TigerJawLevel2Part1sConnection { @@ -478,15 +567,11 @@ describe("162", () => { type TigerJawLevel2TigerJawLevel2Part1Part1AggregationSelection { count: Int! - node: TigerJawLevel2TigerJawLevel2Part1Part1NodeAggregateSelection - } - - type TigerJawLevel2TigerJawLevel2Part1Part1NodeAggregateSelection { - id: IDAggregateSelection! } input TigerJawLevel2UpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") part1: [TigerJawLevel2Part1UpdateFieldInput!] } @@ -494,44 +579,47 @@ describe("162", () => { AND: [TigerJawLevel2Where!] NOT: TigerJawLevel2Where OR: [TigerJawLevel2Where!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + part1: TigerJawLevel2Part1RelationshipFilters part1Aggregate: TigerJawLevel2Part1AggregateInput + part1Connection: TigerJawLevel2Part1ConnectionFilters \\"\\"\\" Return TigerJawLevel2s where all of the related TigerJawLevel2Part1Connections match this filter \\"\\"\\" - part1Connection_ALL: TigerJawLevel2Part1ConnectionWhere + part1Connection_ALL: TigerJawLevel2Part1ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'part1Connection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return TigerJawLevel2s where none of the related TigerJawLevel2Part1Connections match this filter \\"\\"\\" - part1Connection_NONE: TigerJawLevel2Part1ConnectionWhere + part1Connection_NONE: TigerJawLevel2Part1ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'part1Connection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return TigerJawLevel2s where one of the related TigerJawLevel2Part1Connections match this filter \\"\\"\\" - part1Connection_SINGLE: TigerJawLevel2Part1ConnectionWhere + part1Connection_SINGLE: TigerJawLevel2Part1ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'part1Connection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return TigerJawLevel2s where some of the related TigerJawLevel2Part1Connections match this filter \\"\\"\\" - part1Connection_SOME: TigerJawLevel2Part1ConnectionWhere + part1Connection_SOME: TigerJawLevel2Part1ConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'part1Connection: { some: { node: ... } } }' instead.\\") \\"\\"\\" Return TigerJawLevel2s where all of the related TigerJawLevel2Part1s match this filter \\"\\"\\" - part1_ALL: TigerJawLevel2Part1Where + part1_ALL: TigerJawLevel2Part1Where @deprecated(reason: \\"Please use the relevant generic filter 'part1: { all: ... }' instead.\\") \\"\\"\\" Return TigerJawLevel2s where none of the related TigerJawLevel2Part1s match this filter \\"\\"\\" - part1_NONE: TigerJawLevel2Part1Where + part1_NONE: TigerJawLevel2Part1Where @deprecated(reason: \\"Please use the relevant generic filter 'part1: { none: ... }' instead.\\") \\"\\"\\" Return TigerJawLevel2s where one of the related TigerJawLevel2Part1s match this filter \\"\\"\\" - part1_SINGLE: TigerJawLevel2Part1Where + part1_SINGLE: TigerJawLevel2Part1Where @deprecated(reason: \\"Please use the relevant generic filter 'part1: { single: ... }' instead.\\") \\"\\"\\" Return TigerJawLevel2s where some of the related TigerJawLevel2Part1s match this filter \\"\\"\\" - part1_SOME: TigerJawLevel2Part1Where + part1_SOME: TigerJawLevel2Part1Where @deprecated(reason: \\"Please use the relevant generic filter 'part1: { some: ... }' instead.\\") } type TigerJawLevel2sConnection { @@ -540,6 +628,17 @@ describe("162", () => { totalCount: Int! } + input TigerRelationshipFilters { + \\"\\"\\"Filter type where all of the related Tigers match this filter\\"\\"\\" + all: TigerWhere + \\"\\"\\"Filter type where none of the related Tigers match this filter\\"\\"\\" + none: TigerWhere + \\"\\"\\"Filter type where one of the related Tigers match this filter\\"\\"\\" + single: TigerWhere + \\"\\"\\"Filter type where some of the related Tigers match this filter\\"\\"\\" + some: TigerWhere + } + \\"\\"\\" Fields to sort Tigers by. The order in which sorts are applied is not guaranteed when specifying many fields in one TigerSort object. \\"\\"\\" @@ -548,21 +647,23 @@ describe("162", () => { } input TigerUpdateInput { - x_DECREMENT: Int - x_INCREMENT: Int - x_SET: Int + x: IntScalarMutations + x_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'x: { decrement: ... } }' instead.\\") + x_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'x: { increment: ... } }' instead.\\") + x_SET: Int @deprecated(reason: \\"Please use the generic mutation 'x: { set: ... } }' instead.\\") } input TigerWhere { AND: [TigerWhere!] NOT: TigerWhere OR: [TigerWhere!] - x_EQ: Int - x_GT: Int - x_GTE: Int - x_IN: [Int] - x_LT: Int - x_LTE: Int + x: IntScalarFilters + x_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter x: { eq: ... }\\") + x_GT: Int @deprecated(reason: \\"Please use the relevant generic filter x: { gt: ... }\\") + x_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter x: { gte: ... }\\") + x_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter x: { in: ... }\\") + x_LT: Int @deprecated(reason: \\"Please use the relevant generic filter x: { lt: ... }\\") + x_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter x: { lte: ... }\\") } type TigersConnection { diff --git a/packages/graphql/tests/schema/issues/200.test.ts b/packages/graphql/tests/schema/issues/200.test.ts index 3715f9340f..2f947de928 100644 --- a/packages/graphql/tests/schema/issues/200.test.ts +++ b/packages/graphql/tests/schema/issues/200.test.ts @@ -55,7 +55,6 @@ describe("200", () => { } type CategoryAggregateSelection { - categoryId: IDAggregateSelection! count: Int! description: StringAggregateSelection! name: StringAggregateSelection! @@ -82,34 +81,41 @@ describe("200", () => { } input CategoryUpdateInput { - description_SET: String - exampleImageLocations_POP: Int - exampleImageLocations_PUSH: [String!] - exampleImageLocations_SET: [String!] - name_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + exampleImageLocations: ListStringMutations + exampleImageLocations_POP: Int @deprecated(reason: \\"Please use the generic mutation 'exampleImageLocations: { pop: ... } }' instead.\\") + exampleImageLocations_PUSH: [String!] @deprecated(reason: \\"Please use the generic mutation 'exampleImageLocations: { push: ... } }' instead.\\") + exampleImageLocations_SET: [String!] @deprecated(reason: \\"Please use the generic mutation 'exampleImageLocations: { set: ... } }' instead.\\") + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input CategoryWhere { AND: [CategoryWhere!] NOT: CategoryWhere OR: [CategoryWhere!] - categoryId_CONTAINS: ID - categoryId_ENDS_WITH: ID - categoryId_EQ: ID - categoryId_IN: [ID!] - categoryId_STARTS_WITH: ID - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String!] - description_STARTS_WITH: String - exampleImageLocations_EQ: [String!] - exampleImageLocations_INCLUDES: String - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + categoryId: IDScalarFilters + categoryId_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter categoryId: { contains: ... }\\") + categoryId_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter categoryId: { endsWith: ... }\\") + categoryId_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter categoryId: { eq: ... }\\") + categoryId_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter categoryId: { in: ... }\\") + categoryId_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter categoryId: { startsWith: ... }\\") + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + exampleImageLocations: StringListFilters + exampleImageLocations_EQ: [String!] @deprecated(reason: \\"Please use the relevant generic filter exampleImageLocations: { eq: ... }\\") + exampleImageLocations_INCLUDES: String @deprecated(reason: \\"Please use the relevant generic filter exampleImageLocations: { includes: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type CreateCategoriesMutationResponse { @@ -133,9 +139,20 @@ describe("200", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"Mutations for a list for String\\"\\"\\" + input ListStringMutations { + pop: Int + push: [String!] + set: [String!] } type Mutation { @@ -171,6 +188,26 @@ describe("200", () => { shortest: String } + \\"\\"\\"String list filters\\"\\"\\" + input StringListFilters { + eq: [String!] + includes: String + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateCategoriesMutationResponse { categories: [Category!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/issues/2187.test.ts b/packages/graphql/tests/schema/issues/2187.test.ts index 98f4fc218f..832aaf0b58 100644 --- a/packages/graphql/tests/schema/issues/2187.test.ts +++ b/packages/graphql/tests/schema/issues/2187.test.ts @@ -81,6 +81,33 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { sum: Float } + \\"\\"\\"Filters for an aggregation of a float field\\"\\"\\" + input FloatScalarAggregationFilters { + average: FloatScalarFilters + max: FloatScalarFilters + min: FloatScalarFilters + sum: FloatScalarFilters + } + + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + type Genre { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! moviesAggregate(where: MovieWhere): GenreMovieMoviesAggregationSelection @@ -134,6 +161,7 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { AND: [GenreMoviesAggregateInput!] NOT: GenreMoviesAggregateInput OR: [GenreMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -153,6 +181,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 } @@ -187,61 +234,64 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { AND: [GenreMoviesNodeAggregationWhereInput!] NOT: GenreMoviesNodeAggregationWhereInput OR: [GenreMoviesNodeAggregationWhereInput!] - imdbRating_AVERAGE_EQUAL: Float - imdbRating_AVERAGE_GT: Float - imdbRating_AVERAGE_GTE: Float - imdbRating_AVERAGE_LT: Float - imdbRating_AVERAGE_LTE: Float - imdbRating_MAX_EQUAL: Float - imdbRating_MAX_GT: Float - imdbRating_MAX_GTE: Float - imdbRating_MAX_LT: Float - imdbRating_MAX_LTE: Float - imdbRating_MIN_EQUAL: Float - imdbRating_MIN_GT: Float - imdbRating_MIN_GTE: Float - imdbRating_MIN_LT: Float - imdbRating_MIN_LTE: Float - imdbRating_SUM_EQUAL: Float - imdbRating_SUM_GT: Float - imdbRating_SUM_GTE: Float - imdbRating_SUM_LT: Float - imdbRating_SUM_LTE: Float - title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Do not use title\\") - title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Do not use title\\") - title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Do not use title\\") - title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Do not use title\\") - title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Do not use title\\") - title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Do not use title\\") - title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Do not use title\\") - title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Do not use title\\") - title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Do not use title\\") - title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Do not use title\\") - title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Do not use title\\") - title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Do not use title\\") - title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Do not use title\\") - title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Do not use title\\") - title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Do not use title\\") - year_AVERAGE_EQUAL: Float - year_AVERAGE_GT: Float - year_AVERAGE_GTE: Float - year_AVERAGE_LT: Float - year_AVERAGE_LTE: Float - year_MAX_EQUAL: Int - year_MAX_GT: Int - year_MAX_GTE: Int - year_MAX_LT: Int - year_MAX_LTE: Int - year_MIN_EQUAL: Int - year_MIN_GT: Int - year_MIN_GTE: Int - year_MIN_LT: Int - year_MIN_LTE: Int - year_SUM_EQUAL: Int - year_SUM_GT: Int - year_SUM_GTE: Int - year_SUM_LT: Int - year_SUM_LTE: Int + imdbRating: FloatScalarAggregationFilters + imdbRating_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { average: { eq: ... } } }' instead.\\") + imdbRating_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { average: { gt: ... } } }' instead.\\") + imdbRating_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { average: { gte: ... } } }' instead.\\") + imdbRating_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { average: { lt: ... } } }' instead.\\") + imdbRating_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { average: { lte: ... } } }' instead.\\") + imdbRating_MAX_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { max: { eq: ... } } }' instead.\\") + imdbRating_MAX_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { max: { gt: ... } } }' instead.\\") + imdbRating_MAX_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { max: { gte: ... } } }' instead.\\") + imdbRating_MAX_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { max: { lt: ... } } }' instead.\\") + imdbRating_MAX_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { max: { lte: ... } } }' instead.\\") + imdbRating_MIN_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { min: { eq: ... } } }' instead.\\") + imdbRating_MIN_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { min: { gt: ... } } }' instead.\\") + imdbRating_MIN_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { min: { gte: ... } } }' instead.\\") + imdbRating_MIN_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { min: { lt: ... } } }' instead.\\") + imdbRating_MIN_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { min: { lte: ... } } }' instead.\\") + imdbRating_SUM_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { sum: { eq: ... } } }' instead.\\") + imdbRating_SUM_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { sum: { gt: ... } } }' instead.\\") + imdbRating_SUM_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { sum: { gte: ... } } }' instead.\\") + imdbRating_SUM_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { sum: { lt: ... } } }' instead.\\") + imdbRating_SUM_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbRating: { sum: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") + year: IntScalarAggregationFilters + year_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'year: { average: { eq: ... } } }' instead.\\") + year_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'year: { average: { gt: ... } } }' instead.\\") + year_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'year: { average: { gte: ... } } }' instead.\\") + year_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'year: { average: { lt: ... } } }' instead.\\") + year_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'year: { average: { lte: ... } } }' instead.\\") + year_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { max: { eq: ... } } }' instead.\\") + year_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { max: { gt: ... } } }' instead.\\") + year_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { max: { gte: ... } } }' instead.\\") + year_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { max: { lt: ... } } }' instead.\\") + year_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { max: { lte: ... } } }' instead.\\") + year_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { min: { eq: ... } } }' instead.\\") + year_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { min: { gt: ... } } }' instead.\\") + year_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { min: { gte: ... } } }' instead.\\") + year_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { min: { lt: ... } } }' instead.\\") + year_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { min: { lte: ... } } }' instead.\\") + year_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { sum: { eq: ... } } }' instead.\\") + year_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { sum: { gt: ... } } }' instead.\\") + year_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { sum: { gte: ... } } }' instead.\\") + year_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { sum: { lt: ... } } }' instead.\\") + year_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { sum: { lte: ... } } }' instead.\\") } type GenreMoviesRelationship { @@ -262,6 +312,17 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { where: GenreMoviesConnectionWhere } + input GenreRelationshipFilters { + \\"\\"\\"Filter type where all of the related Genres match this filter\\"\\"\\" + all: GenreWhere @deprecated(reason: \\"Do not use genre\\") + \\"\\"\\"Filter type where none of the related Genres match this filter\\"\\"\\" + none: GenreWhere @deprecated(reason: \\"Do not use genre\\") + \\"\\"\\"Filter type where one of the related Genres match this filter\\"\\"\\" + single: GenreWhere @deprecated(reason: \\"Do not use genre\\") + \\"\\"\\"Filter type where some of the related Genres match this filter\\"\\"\\" + some: GenreWhere @deprecated(reason: \\"Do not use genre\\") + } + \\"\\"\\" Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object. \\"\\"\\" @@ -271,43 +332,47 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { input GenreUpdateInput { movies: [GenreMoviesUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input GenreWhere { AND: [GenreWhere!] NOT: GenreWhere OR: [GenreWhere!] + movies: MovieRelationshipFilters moviesAggregate: GenreMoviesAggregateInput + moviesConnection: GenreMoviesConnectionFilters \\"\\"\\" Return Genres where all of the related GenreMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: GenreMoviesConnectionWhere + moviesConnection_ALL: GenreMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Genres where none of the related GenreMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: GenreMoviesConnectionWhere + moviesConnection_NONE: GenreMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Genres where one of the related GenreMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: GenreMoviesConnectionWhere + moviesConnection_SINGLE: GenreMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Genres where some of the related GenreMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: GenreMoviesConnectionWhere + moviesConnection_SOME: GenreMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Genres where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Genres where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Genres where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Genres where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type GenresConnection { @@ -323,6 +388,31 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie { genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! @deprecated(reason: \\"Do not use genre\\") genresAggregate(where: GenreWhere): MovieGenreGenresAggregationSelection @deprecated(reason: \\"Do not use genre\\") @@ -380,6 +470,7 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { AND: [MovieGenresAggregateInput!] NOT: MovieGenresAggregateInput OR: [MovieGenresAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -399,6 +490,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 } @@ -433,21 +543,22 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { AND: [MovieGenresNodeAggregationWhereInput!] NOT: MovieGenresNodeAggregationWhereInput OR: [MovieGenresNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieGenresRelationship { @@ -468,6 +579,17 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { where: MovieGenresConnectionWhere } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -479,22 +601,27 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { input MovieUpdateInput { genres: [MovieGenresUpdateFieldInput!] @deprecated(reason: \\"Do not use genre\\") - imdbRating_ADD: Float - imdbRating_DIVIDE: Float - imdbRating_MULTIPLY: Float - imdbRating_SET: Float - imdbRating_SUBTRACT: Float + imdbRating: FloatScalarMutations + imdbRating_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'imdbRating: { add: ... } }' instead.\\") + imdbRating_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'imdbRating: { divide: ... } }' instead.\\") + imdbRating_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'imdbRating: { multiply: ... } }' instead.\\") + imdbRating_SET: Float @deprecated(reason: \\"Please use the generic mutation 'imdbRating: { set: ... } }' instead.\\") + imdbRating_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'imdbRating: { subtract: ... } }' instead.\\") + title: StringScalarMutations @deprecated(reason: \\"Do not use title\\") title_SET: String @deprecated(reason: \\"Do not use title\\") - year_DECREMENT: Int - year_INCREMENT: Int - year_SET: Int + year: IntScalarMutations + year_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'year: { decrement: ... } }' instead.\\") + year_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'year: { increment: ... } }' instead.\\") + year_SET: Int @deprecated(reason: \\"Please use the generic mutation 'year: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + genres: GenreRelationshipFilters genresAggregate: MovieGenresAggregateInput @deprecated(reason: \\"Do not use genre\\") + genresConnection: MovieGenresConnectionFilters \\"\\"\\" Return Movies where all of the related MovieGenresConnections match this filter \\"\\"\\" @@ -519,23 +646,26 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { genres_SINGLE: GenreWhere @deprecated(reason: \\"Do not use genre\\") \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" genres_SOME: GenreWhere @deprecated(reason: \\"Do not use genre\\") - imdbRating_EQ: Float - imdbRating_GT: Float - imdbRating_GTE: Float - imdbRating_IN: [Float] - imdbRating_LT: Float - imdbRating_LTE: Float + imdbRating: FloatScalarFilters + imdbRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { eq: ... }\\") + imdbRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { gt: ... }\\") + imdbRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { gte: ... }\\") + imdbRating_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { in: ... }\\") + imdbRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { lt: ... }\\") + imdbRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { lte: ... }\\") + title: StringScalarFilters @deprecated(reason: \\"Do not use title\\") title_CONTAINS: String @deprecated(reason: \\"Do not use title\\") title_ENDS_WITH: String @deprecated(reason: \\"Do not use title\\") title_EQ: String @deprecated(reason: \\"Do not use title\\") title_IN: [String] @deprecated(reason: \\"Do not use title\\") title_STARTS_WITH: String @deprecated(reason: \\"Do not use title\\") - year_EQ: Int - year_GT: Int - year_GTE: Int - year_IN: [Int] - year_LT: Int - year_LTE: Int + year: IntScalarFilters + year_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter year: { eq: ... }\\") + year_GT: Int @deprecated(reason: \\"Please use the relevant generic filter year: { gt: ... }\\") + year_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter year: { gte: ... }\\") + year_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter year: { in: ... }\\") + year_LT: Int @deprecated(reason: \\"Please use the relevant generic filter year: { lt: ... }\\") + year_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter year: { lte: ... }\\") } type MoviesConnection { @@ -583,6 +713,27 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateGenresMutationResponse { genres: [Genre!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/issues/2377.test.ts b/packages/graphql/tests/schema/issues/2377.test.ts index 79817639c9..93a4a6b752 100644 --- a/packages/graphql/tests/schema/issues/2377.test.ts +++ b/packages/graphql/tests/schema/issues/2377.test.ts @@ -105,6 +105,27 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { min: DateTime } + \\"\\"\\"Filters for an aggregation of an DateTime input field\\"\\"\\" + input DateTimeScalarAggregationFilters { + max: DateTimeScalarFilters + min: DateTimeScalarFilters + } + + \\"\\"\\"DateTime filters\\"\\"\\" + input DateTimeScalarFilters { + eq: DateTime + gt: DateTime + gte: DateTime + in: [DateTime!] + lt: DateTime + lte: DateTime + } + + \\"\\"\\"DateTime mutations\\"\\"\\" + input DateTimeScalarMutations { + set: DateTime + } + \\"\\"\\" Information about the number of nodes and relationships deleted during a delete mutation \\"\\"\\" @@ -113,9 +134,51 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID list filters\\"\\"\\" + input IDListFilters { + eq: [ID!] + includes: ID + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Mutations for a list for ID\\"\\"\\" + input ListIDMutations { + pop: Int + push: [ID!] + set: [ID!] } type Mutation { @@ -138,6 +201,19 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { PropertyC } + \\"\\"\\"Property filters\\"\\"\\" + input PropertyListEnumScalarFilters { + eq: [Property!] + includes: Property + } + + \\"\\"\\"Mutations for a list for Property\\"\\"\\" + input PropertyListEnumScalarMutations { + pop: Property + push: [Property!]! + set: [Property!]! + } + type Query { resourceEntities(limit: Int, offset: Int, sort: [ResourceEntitySort!], where: ResourceEntityWhere): [ResourceEntity!]! resourceEntitiesAggregate(where: ResourceEntityWhere): ResourceEntityAggregateSelection! @@ -168,7 +244,6 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { type ResourceAggregateSelection { count: Int! createdAt: DateTimeAggregateSelection! - id: IDAggregateSelection! name: StringAggregateSelection! updatedAt: DateTimeAggregateSelection! } @@ -185,6 +260,7 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { AND: [ResourceContainedByAggregateInput!] NOT: ResourceContainedByAggregateInput OR: [ResourceContainedByAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -204,6 +280,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 } @@ -238,51 +333,44 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { AND: [ResourceContainedByNodeAggregationWhereInput!] NOT: ResourceContainedByNodeAggregationWhereInput OR: [ResourceContainedByNodeAggregationWhereInput!] - createdAt_MAX_EQUAL: DateTime - createdAt_MAX_GT: DateTime - createdAt_MAX_GTE: DateTime - createdAt_MAX_LT: DateTime - createdAt_MAX_LTE: DateTime - createdAt_MIN_EQUAL: DateTime - createdAt_MIN_GT: DateTime - createdAt_MIN_GTE: DateTime - createdAt_MIN_LT: DateTime - createdAt_MIN_LTE: DateTime - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int - updatedAt_MAX_EQUAL: DateTime - updatedAt_MAX_GT: DateTime - updatedAt_MAX_GTE: DateTime - updatedAt_MAX_LT: DateTime - updatedAt_MAX_LTE: DateTime - updatedAt_MIN_EQUAL: DateTime - updatedAt_MIN_GT: DateTime - updatedAt_MIN_GTE: DateTime - updatedAt_MIN_LT: DateTime - updatedAt_MIN_LTE: DateTime + createdAt: DateTimeScalarAggregationFilters + createdAt_MAX_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { eq: ... } } }' instead.\\") + createdAt_MAX_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { gt: ... } } }' instead.\\") + createdAt_MAX_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { gte: ... } } }' instead.\\") + createdAt_MAX_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { lt: ... } } }' instead.\\") + createdAt_MAX_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { lte: ... } } }' instead.\\") + createdAt_MIN_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { eq: ... } } }' instead.\\") + createdAt_MIN_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { gt: ... } } }' instead.\\") + createdAt_MIN_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { gte: ... } } }' instead.\\") + createdAt_MIN_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { lt: ... } } }' instead.\\") + createdAt_MIN_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { lte: ... } } }' instead.\\") + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") + updatedAt: DateTimeScalarAggregationFilters + updatedAt_MAX_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'updatedAt: { max: { eq: ... } } }' instead.\\") + updatedAt_MAX_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'updatedAt: { max: { gt: ... } } }' instead.\\") + updatedAt_MAX_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'updatedAt: { max: { gte: ... } } }' instead.\\") + updatedAt_MAX_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'updatedAt: { max: { lt: ... } } }' instead.\\") + updatedAt_MAX_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'updatedAt: { max: { lte: ... } } }' instead.\\") + updatedAt_MIN_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'updatedAt: { min: { eq: ... } } }' instead.\\") + updatedAt_MIN_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'updatedAt: { min: { gt: ... } } }' instead.\\") + updatedAt_MIN_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'updatedAt: { min: { gte: ... } } }' instead.\\") + updatedAt_MIN_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'updatedAt: { min: { lt: ... } } }' instead.\\") + updatedAt_MIN_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'updatedAt: { min: { lte: ... } } }' instead.\\") } type ResourceContainedByRelationship { @@ -345,7 +433,6 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { type ResourceEntityAggregateSelection { count: Int! - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -371,23 +458,39 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { AND: [ResourceEntityWhere!] NOT: ResourceEntityWhere OR: [ResourceEntityWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - properties_EQ: [Property!] - properties_INCLUDES: Property - tags_EQ: [Tag!] - tags_INCLUDES: Tag - type_EQ: ResourceType - type_IN: [ResourceType!] - typename_IN: [ResourceEntityImplementation!] + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + properties: PropertyListEnumScalarFilters + properties_EQ: [Property!] @deprecated(reason: \\"Please use the relevant generic filter properties: { eq: ... }\\") + properties_INCLUDES: Property @deprecated(reason: \\"Please use the relevant generic filter properties: { includes: ... }\\") + tags: TagListEnumScalarFilters + tags_EQ: [Tag!] @deprecated(reason: \\"Please use the relevant generic filter tags: { eq: ... }\\") + tags_INCLUDES: Tag @deprecated(reason: \\"Please use the relevant generic filter tags: { includes: ... }\\") + type: ResourceTypeEnumScalarFilters + type_EQ: ResourceType @deprecated(reason: \\"Please use the relevant generic filter type: { eq: ... }\\") + type_IN: [ResourceType!] @deprecated(reason: \\"Please use the relevant generic filter type: { in: ... }\\") + typename: [ResourceEntityImplementation!] + } + + input ResourceRelationshipFilters { + \\"\\"\\"Filter type where all of the related Resources match this filter\\"\\"\\" + all: ResourceWhere + \\"\\"\\"Filter type where none of the related Resources match this filter\\"\\"\\" + none: ResourceWhere + \\"\\"\\"Filter type where one of the related Resources match this filter\\"\\"\\" + single: ResourceWhere + \\"\\"\\"Filter type where some of the related Resources match this filter\\"\\"\\" + some: ResourceWhere } type ResourceResourceContainedByAggregationSelection { @@ -397,7 +500,6 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { type ResourceResourceContainedByNodeAggregateSelection { createdAt: DateTimeAggregateSelection! - id: IDAggregateSelection! name: StringAggregateSelection! updatedAt: DateTimeAggregateSelection! } @@ -419,78 +521,106 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { ResourceC } + \\"\\"\\"ResourceType filters\\"\\"\\" + input ResourceTypeEnumScalarFilters { + eq: ResourceType + in: [ResourceType!] + } + + \\"\\"\\"ResourceType mutations\\"\\"\\" + input ResourceTypeEnumScalarMutations { + set: ResourceType + } + input ResourceUpdateInput { containedBy: [ResourceContainedByUpdateFieldInput!] - createdAt_SET: DateTime - externalIds_POP: Int - externalIds_PUSH: [ID!] - externalIds_SET: [ID!] - id_SET: ID - name_SET: String - properties_SET: [Property!] - tags_SET: [Tag!] - type_SET: ResourceType + createdAt: DateTimeScalarMutations + createdAt_SET: DateTime @deprecated(reason: \\"Please use the generic mutation 'createdAt: { set: ... } }' instead.\\") + externalIds: ListIDMutations + externalIds_POP: Int @deprecated(reason: \\"Please use the generic mutation 'externalIds: { pop: ... } }' instead.\\") + externalIds_PUSH: [ID!] @deprecated(reason: \\"Please use the generic mutation 'externalIds: { push: ... } }' instead.\\") + externalIds_SET: [ID!] @deprecated(reason: \\"Please use the generic mutation 'externalIds: { set: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") + properties: PropertyListEnumScalarMutations + properties_SET: [Property!] @deprecated(reason: \\"Please use the generic mutation 'properties: { set: ... } }' instead.\\") + tags: TagListEnumScalarMutations + tags_SET: [Tag!] @deprecated(reason: \\"Please use the generic mutation 'tags: { set: ... } }' instead.\\") + type: ResourceTypeEnumScalarMutations + type_SET: ResourceType @deprecated(reason: \\"Please use the generic mutation 'type: { set: ... } }' instead.\\") } input ResourceWhere { AND: [ResourceWhere!] NOT: ResourceWhere OR: [ResourceWhere!] + containedBy: ResourceRelationshipFilters containedByAggregate: ResourceContainedByAggregateInput + containedByConnection: ResourceContainedByConnectionFilters \\"\\"\\" Return Resources where all of the related ResourceContainedByConnections match this filter \\"\\"\\" - containedByConnection_ALL: ResourceContainedByConnectionWhere + containedByConnection_ALL: ResourceContainedByConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'containedByConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Resources where none of the related ResourceContainedByConnections match this filter \\"\\"\\" - containedByConnection_NONE: ResourceContainedByConnectionWhere + containedByConnection_NONE: ResourceContainedByConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'containedByConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Resources where one of the related ResourceContainedByConnections match this filter \\"\\"\\" - containedByConnection_SINGLE: ResourceContainedByConnectionWhere + containedByConnection_SINGLE: ResourceContainedByConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'containedByConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Resources where some of the related ResourceContainedByConnections match this filter \\"\\"\\" - containedByConnection_SOME: ResourceContainedByConnectionWhere + containedByConnection_SOME: ResourceContainedByConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'containedByConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Resources where all of the related Resources match this filter\\"\\"\\" - containedBy_ALL: ResourceWhere + containedBy_ALL: ResourceWhere @deprecated(reason: \\"Please use the relevant generic filter 'containedBy: { all: ... }' instead.\\") \\"\\"\\"Return Resources where none of the related Resources match this filter\\"\\"\\" - containedBy_NONE: ResourceWhere + containedBy_NONE: ResourceWhere @deprecated(reason: \\"Please use the relevant generic filter 'containedBy: { none: ... }' instead.\\") \\"\\"\\"Return Resources where one of the related Resources match this filter\\"\\"\\" - containedBy_SINGLE: ResourceWhere + containedBy_SINGLE: ResourceWhere @deprecated(reason: \\"Please use the relevant generic filter 'containedBy: { single: ... }' instead.\\") \\"\\"\\"Return Resources where some of the related Resources match this filter\\"\\"\\" - containedBy_SOME: ResourceWhere - createdAt_EQ: DateTime - createdAt_GT: DateTime - createdAt_GTE: DateTime - createdAt_IN: [DateTime!] - createdAt_LT: DateTime - createdAt_LTE: DateTime - externalIds_EQ: [ID!] - externalIds_INCLUDES: ID - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - properties_EQ: [Property!] - properties_INCLUDES: Property - tags_EQ: [Tag!] - tags_INCLUDES: Tag - type_EQ: ResourceType - type_IN: [ResourceType!] - updatedAt_EQ: DateTime - updatedAt_GT: DateTime - updatedAt_GTE: DateTime - updatedAt_IN: [DateTime!] - updatedAt_LT: DateTime - updatedAt_LTE: DateTime + containedBy_SOME: ResourceWhere @deprecated(reason: \\"Please use the relevant generic filter 'containedBy: { some: ... }' instead.\\") + createdAt: DateTimeScalarFilters + createdAt_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { eq: ... }\\") + createdAt_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { gt: ... }\\") + createdAt_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { gte: ... }\\") + createdAt_IN: [DateTime!] @deprecated(reason: \\"Please use the relevant generic filter createdAt: { in: ... }\\") + createdAt_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { lt: ... }\\") + createdAt_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { lte: ... }\\") + externalIds: IDListFilters + externalIds_EQ: [ID!] @deprecated(reason: \\"Please use the relevant generic filter externalIds: { eq: ... }\\") + externalIds_INCLUDES: ID @deprecated(reason: \\"Please use the relevant generic filter externalIds: { includes: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + properties: PropertyListEnumScalarFilters + properties_EQ: [Property!] @deprecated(reason: \\"Please use the relevant generic filter properties: { eq: ... }\\") + properties_INCLUDES: Property @deprecated(reason: \\"Please use the relevant generic filter properties: { includes: ... }\\") + tags: TagListEnumScalarFilters + tags_EQ: [Tag!] @deprecated(reason: \\"Please use the relevant generic filter tags: { eq: ... }\\") + tags_INCLUDES: Tag @deprecated(reason: \\"Please use the relevant generic filter tags: { includes: ... }\\") + type: ResourceTypeEnumScalarFilters + type_EQ: ResourceType @deprecated(reason: \\"Please use the relevant generic filter type: { eq: ... }\\") + type_IN: [ResourceType!] @deprecated(reason: \\"Please use the relevant generic filter type: { in: ... }\\") + updatedAt: DateTimeScalarFilters + updatedAt_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter updatedAt: { eq: ... }\\") + updatedAt_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter updatedAt: { gt: ... }\\") + updatedAt_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter updatedAt: { gte: ... }\\") + updatedAt_IN: [DateTime!] @deprecated(reason: \\"Please use the relevant generic filter updatedAt: { in: ... }\\") + updatedAt_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter updatedAt: { lt: ... }\\") + updatedAt_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter updatedAt: { lte: ... }\\") } type ResourcesConnection { @@ -512,12 +642,46 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + enum Tag { TagA TagB TagC } + \\"\\"\\"Tag filters\\"\\"\\" + input TagListEnumScalarFilters { + eq: [Tag!] + includes: Tag + } + + \\"\\"\\"Mutations for a list for Tag\\"\\"\\" + input TagListEnumScalarMutations { + pop: Tag + push: [Tag!]! + set: [Tag!]! + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" diff --git a/packages/graphql/tests/schema/issues/2993.test.ts b/packages/graphql/tests/schema/issues/2993.test.ts index 089a26e5a3..2acc48f191 100644 --- a/packages/graphql/tests/schema/issues/2993.test.ts +++ b/packages/graphql/tests/schema/issues/2993.test.ts @@ -71,6 +71,27 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { min: DateTime } + \\"\\"\\"Filters for an aggregation of an DateTime input field\\"\\"\\" + input DateTimeScalarAggregationFilters { + max: DateTimeScalarFilters + min: DateTimeScalarFilters + } + + \\"\\"\\"DateTime filters\\"\\"\\" + input DateTimeScalarFilters { + eq: DateTime + gt: DateTime + gte: DateTime + in: [DateTime!] + lt: DateTime + lte: DateTime + } + + \\"\\"\\"DateTime mutations\\"\\"\\" + input DateTimeScalarMutations { + set: DateTime + } + \\"\\"\\" Information about the number of nodes and relationships deleted during a delete mutation \\"\\"\\" @@ -91,16 +112,17 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { AND: [FOLLOWSAggregationWhereInput!] NOT: FOLLOWSAggregationWhereInput OR: [FOLLOWSAggregationWhereInput!] - since_MAX_EQUAL: DateTime - since_MAX_GT: DateTime - since_MAX_GTE: DateTime - since_MAX_LT: DateTime - since_MAX_LTE: DateTime - since_MIN_EQUAL: DateTime - since_MIN_GT: DateTime - since_MIN_GTE: DateTime - since_MIN_LT: DateTime - since_MIN_LTE: DateTime + since: DateTimeScalarAggregationFilters + since_MAX_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'since: { max: { eq: ... } } }' instead.\\") + since_MAX_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'since: { max: { gt: ... } } }' instead.\\") + since_MAX_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'since: { max: { gte: ... } } }' instead.\\") + since_MAX_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'since: { max: { lt: ... } } }' instead.\\") + since_MAX_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'since: { max: { lte: ... } } }' instead.\\") + since_MIN_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'since: { min: { eq: ... } } }' instead.\\") + since_MIN_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'since: { min: { gt: ... } } }' instead.\\") + since_MIN_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'since: { min: { gte: ... } } }' instead.\\") + since_MIN_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'since: { min: { lt: ... } } }' instead.\\") + since_MIN_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'since: { min: { lte: ... } } }' instead.\\") } input FOLLOWSSort { @@ -108,24 +130,55 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { } input FOLLOWSUpdateInput { - since_SET: DateTime + since: DateTimeScalarMutations + since_SET: DateTime @deprecated(reason: \\"Please use the generic mutation 'since: { set: ... } }' instead.\\") } input FOLLOWSWhere { AND: [FOLLOWSWhere!] NOT: FOLLOWSWhere OR: [FOLLOWSWhere!] - since_EQ: DateTime - since_GT: DateTime - since_GTE: DateTime - since_IN: [DateTime!] - since_LT: DateTime - since_LTE: DateTime + since: DateTimeScalarFilters + since_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter since: { eq: ... }\\") + since_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter since: { gt: ... }\\") + since_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter since: { gte: ... }\\") + since_IN: [DateTime!] @deprecated(reason: \\"Please use the relevant generic filter since: { in: ... }\\") + since_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter since: { lt: ... }\\") + since_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter since: { lte: ... }\\") + } + + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Mutation { @@ -149,7 +202,6 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { type ProfileAggregateSelection { count: Int! - id: IDAggregateSelection! userName: StringAggregateSelection! } @@ -170,6 +222,17 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { User } + input ProfileRelationshipFilters { + \\"\\"\\"Filter type where all of the related Profiles match this filter\\"\\"\\" + all: ProfileWhere + \\"\\"\\"Filter type where none of the related Profiles match this filter\\"\\"\\" + none: ProfileWhere + \\"\\"\\"Filter type where one of the related Profiles match this filter\\"\\"\\" + single: ProfileWhere + \\"\\"\\"Filter type where some of the related Profiles match this filter\\"\\"\\" + some: ProfileWhere + } + \\"\\"\\" Fields to sort Profiles by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProfileSort object. \\"\\"\\" @@ -179,25 +242,29 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { } input ProfileUpdateInput { - id_SET: ID - userName_SET: String + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + userName: StringScalarMutations + userName_SET: String @deprecated(reason: \\"Please use the generic mutation 'userName: { set: ... } }' instead.\\") } input ProfileWhere { AND: [ProfileWhere!] NOT: ProfileWhere OR: [ProfileWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - typename_IN: [ProfileImplementation!] - userName_CONTAINS: String - userName_ENDS_WITH: String - userName_EQ: String - userName_IN: [String!] - userName_STARTS_WITH: String + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + typename: [ProfileImplementation!] + userName: StringScalarFilters + userName_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter userName: { contains: ... }\\") + userName_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter userName: { endsWith: ... }\\") + userName_EQ: String @deprecated(reason: \\"Please use the relevant generic filter userName: { eq: ... }\\") + userName_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter userName: { in: ... }\\") + userName_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter userName: { startsWith: ... }\\") } type ProfilesConnection { @@ -228,6 +295,27 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -253,7 +341,6 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { type UserAggregateSelection { count: Int! - id: IDAggregateSelection! userName: StringAggregateSelection! } @@ -275,6 +362,7 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { AND: [UserFollowingAggregateInput!] NOT: UserFollowingAggregateInput OR: [UserFollowingAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -294,6 +382,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 @@ -328,31 +435,22 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { AND: [UserFollowingNodeAggregationWhereInput!] NOT: UserFollowingNodeAggregationWhereInput OR: [UserFollowingNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - userName_AVERAGE_LENGTH_EQUAL: Float - userName_AVERAGE_LENGTH_GT: Float - userName_AVERAGE_LENGTH_GTE: Float - userName_AVERAGE_LENGTH_LT: Float - userName_AVERAGE_LENGTH_LTE: Float - userName_LONGEST_LENGTH_EQUAL: Int - userName_LONGEST_LENGTH_GT: Int - userName_LONGEST_LENGTH_GTE: Int - userName_LONGEST_LENGTH_LT: Int - userName_LONGEST_LENGTH_LTE: Int - userName_SHORTEST_LENGTH_EQUAL: Int - userName_SHORTEST_LENGTH_GT: Int - userName_SHORTEST_LENGTH_GTE: Int - userName_SHORTEST_LENGTH_LT: Int - userName_SHORTEST_LENGTH_LTE: Int + userName: StringScalarAggregationFilters + userName_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'userName: { averageLength: { eq: ... } } }' instead.\\") + userName_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'userName: { averageLength: { gt: ... } } }' instead.\\") + userName_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'userName: { averageLength: { gte: ... } } }' instead.\\") + userName_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'userName: { averageLength: { lt: ... } } }' instead.\\") + userName_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'userName: { averageLength: { lte: ... } } }' instead.\\") + userName_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'userName: { longestLength: { eq: ... } } }' instead.\\") + userName_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'userName: { longestLength: { gt: ... } } }' instead.\\") + userName_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'userName: { longestLength: { gte: ... } } }' instead.\\") + userName_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'userName: { longestLength: { lt: ... } } }' instead.\\") + userName_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'userName: { longestLength: { lte: ... } } }' instead.\\") + userName_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'userName: { shortestLength: { eq: ... } } }' instead.\\") + userName_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'userName: { shortestLength: { gt: ... } } }' instead.\\") + userName_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'userName: { shortestLength: { gte: ... } } }' instead.\\") + userName_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'userName: { shortestLength: { lt: ... } } }' instead.\\") + userName_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'userName: { shortestLength: { lte: ... } } }' instead.\\") } type UserFollowingRelationship { @@ -386,7 +484,6 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { } type UserProfileFollowingNodeAggregateSelection { - id: IDAggregateSelection! userName: StringAggregateSelection! } @@ -400,48 +497,53 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { input UserUpdateInput { following: [UserFollowingUpdateFieldInput!] - userName_SET: String + userName: StringScalarMutations + userName_SET: String @deprecated(reason: \\"Please use the generic mutation 'userName: { set: ... } }' instead.\\") } input UserWhere { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] + following: ProfileRelationshipFilters followingAggregate: UserFollowingAggregateInput + followingConnection: UserFollowingConnectionFilters \\"\\"\\" Return Users where all of the related UserFollowingConnections match this filter \\"\\"\\" - followingConnection_ALL: UserFollowingConnectionWhere + followingConnection_ALL: UserFollowingConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'followingConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Users where none of the related UserFollowingConnections match this filter \\"\\"\\" - followingConnection_NONE: UserFollowingConnectionWhere + followingConnection_NONE: UserFollowingConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'followingConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Users where one of the related UserFollowingConnections match this filter \\"\\"\\" - followingConnection_SINGLE: UserFollowingConnectionWhere + followingConnection_SINGLE: UserFollowingConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'followingConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Users where some of the related UserFollowingConnections match this filter \\"\\"\\" - followingConnection_SOME: UserFollowingConnectionWhere + followingConnection_SOME: UserFollowingConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'followingConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Users where all of the related Profiles match this filter\\"\\"\\" - following_ALL: ProfileWhere + following_ALL: ProfileWhere @deprecated(reason: \\"Please use the relevant generic filter 'following: { all: ... }' instead.\\") \\"\\"\\"Return Users where none of the related Profiles match this filter\\"\\"\\" - following_NONE: ProfileWhere + following_NONE: ProfileWhere @deprecated(reason: \\"Please use the relevant generic filter 'following: { none: ... }' instead.\\") \\"\\"\\"Return Users where one of the related Profiles match this filter\\"\\"\\" - following_SINGLE: ProfileWhere + following_SINGLE: ProfileWhere @deprecated(reason: \\"Please use the relevant generic filter 'following: { single: ... }' instead.\\") \\"\\"\\"Return Users where some of the related Profiles match this filter\\"\\"\\" - following_SOME: ProfileWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - userName_CONTAINS: String - userName_ENDS_WITH: String - userName_EQ: String - userName_IN: [String!] - userName_STARTS_WITH: String + following_SOME: ProfileWhere @deprecated(reason: \\"Please use the relevant generic filter 'following: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + userName: StringScalarFilters + userName_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter userName: { contains: ... }\\") + userName_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter userName: { endsWith: ... }\\") + userName_EQ: String @deprecated(reason: \\"Please use the relevant generic filter userName: { eq: ... }\\") + userName_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter userName: { in: ... }\\") + userName_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter userName: { startsWith: ... }\\") } type UsersConnection { diff --git a/packages/graphql/tests/schema/issues/3428.test.ts b/packages/graphql/tests/schema/issues/3428.test.ts index 7b7e4345ec..3171951bc5 100644 --- a/packages/graphql/tests/schema/issues/3428.test.ts +++ b/packages/graphql/tests/schema/issues/3428.test.ts @@ -70,9 +70,38 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Movie { @@ -86,6 +115,7 @@ describe("Relationship nested operations", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -100,6 +130,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 } @@ -115,31 +164,22 @@ describe("Relationship nested operations", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -149,7 +189,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -167,7 +206,6 @@ describe("Relationship nested operations", () => { } type MoviePersonActorsNodeAggregateSelection { - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -179,43 +217,47 @@ describe("Relationship nested operations", () => { } input MovieUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -254,7 +296,6 @@ describe("Relationship nested operations", () => { type PersonAggregateSelection { count: Int! - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -267,6 +308,17 @@ describe("Relationship nested operations", () => { node: Person! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -276,23 +328,26 @@ describe("Relationship nested operations", () => { } input PersonUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type Query { @@ -317,6 +372,27 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -396,9 +472,18 @@ describe("Relationship nested operations", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -413,6 +498,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 @@ -439,7 +543,6 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -459,42 +562,46 @@ describe("Relationship nested operations", () => { } input MovieUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { @@ -551,18 +658,20 @@ describe("Relationship nested operations", () => { } input PersonOneUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonOneWhere { AND: [PersonOneWhere!] NOT: PersonOneWhere OR: [PersonOneWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type PersonOnesConnection { @@ -571,6 +680,17 @@ describe("Relationship nested operations", () => { totalCount: Int! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + type PersonTwo { nameTwo: String } @@ -597,18 +717,20 @@ describe("Relationship nested operations", () => { } input PersonTwoUpdateInput { - nameTwo_SET: String + nameTwo: StringScalarMutations + nameTwo_SET: String @deprecated(reason: \\"Please use the generic mutation 'nameTwo: { set: ... } }' instead.\\") } input PersonTwoWhere { AND: [PersonTwoWhere!] NOT: PersonTwoWhere OR: [PersonTwoWhere!] - nameTwo_CONTAINS: String - nameTwo_ENDS_WITH: String - nameTwo_EQ: String - nameTwo_IN: [String] - nameTwo_STARTS_WITH: String + nameTwo: StringScalarFilters + nameTwo_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { contains: ... }\\") + nameTwo_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { endsWith: ... }\\") + nameTwo_EQ: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { eq: ... }\\") + nameTwo_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { in: ... }\\") + nameTwo_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter nameTwo: { startsWith: ... }\\") } type PersonTwosConnection { @@ -648,6 +770,20 @@ describe("Relationship nested operations", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" diff --git a/packages/graphql/tests/schema/issues/3537.test.ts b/packages/graphql/tests/schema/issues/3537.test.ts index 4368c29157..01a3769294 100644 --- a/packages/graphql/tests/schema/issues/3537.test.ts +++ b/packages/graphql/tests/schema/issues/3537.test.ts @@ -93,24 +93,28 @@ describe("Extending the schema in when using getSubgraphSchema", () => { } input ActorUpdateInput { - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type ActorsConnection { @@ -166,18 +170,20 @@ describe("Extending the schema in when using getSubgraphSchema", () => { } input MovieUpdateInput { - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -219,6 +225,20 @@ describe("Extending the schema in when using getSubgraphSchema", () => { DESC } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -334,16 +354,18 @@ describe("Extending the schema in when using getSubgraphSchema", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type ActorsConnection { @@ -377,11 +399,12 @@ describe("Extending the schema in when using getSubgraphSchema", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -421,6 +444,15 @@ describe("Extending the schema in when using getSubgraphSchema", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + scalar _Any type _Service { @@ -528,21 +560,25 @@ describe("Extending the schema in when using getSubgraphSchema", () => { AND: [ActorSubscriptionWhere!] NOT: ActorSubscriptionWhere OR: [ActorSubscriptionWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } input ActorUpdateInput { - password_SET: String - username_SET: String + password: StringScalarMutations + password_SET: String @deprecated(reason: \\"Please use the generic mutation 'password: { set: ... } }' instead.\\") + username: StringScalarMutations + username_SET: String @deprecated(reason: \\"Please use the generic mutation 'username: { set: ... } }' instead.\\") } type ActorUpdatedEvent { @@ -556,16 +592,18 @@ describe("Extending the schema in when using getSubgraphSchema", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - password_CONTAINS: String - password_ENDS_WITH: String - password_EQ: String - password_IN: [String!] - password_STARTS_WITH: String - username_CONTAINS: String - username_ENDS_WITH: String - username_EQ: String - username_IN: [String!] - username_STARTS_WITH: String + password: StringScalarFilters + password_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter password: { contains: ... }\\") + password_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { endsWith: ... }\\") + password_EQ: String @deprecated(reason: \\"Please use the relevant generic filter password: { eq: ... }\\") + password_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter password: { in: ... }\\") + password_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter password: { startsWith: ... }\\") + username: StringScalarFilters + username_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter username: { contains: ... }\\") + username_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { endsWith: ... }\\") + username_EQ: String @deprecated(reason: \\"Please use the relevant generic filter username: { eq: ... }\\") + username_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter username: { in: ... }\\") + username_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter username: { startsWith: ... }\\") } type ActorsConnection { @@ -641,15 +679,17 @@ describe("Extending the schema in when using getSubgraphSchema", () => { AND: [MovieSubscriptionWhere!] NOT: MovieSubscriptionWhere OR: [MovieSubscriptionWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } input MovieUpdateInput { - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -663,11 +703,12 @@ describe("Extending the schema in when using getSubgraphSchema", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -716,6 +757,20 @@ describe("Extending the schema in when using getSubgraphSchema", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Subscription { actorUpdated(where: ActorSubscriptionWhere): ActorUpdatedEvent! movieUpdated(where: MovieSubscriptionWhere): MovieUpdatedEvent! diff --git a/packages/graphql/tests/schema/issues/3541.test.ts b/packages/graphql/tests/schema/issues/3541.test.ts index a6a8e842b0..87aeedaf7c 100644 --- a/packages/graphql/tests/schema/issues/3541.test.ts +++ b/packages/graphql/tests/schema/issues/3541.test.ts @@ -79,6 +79,17 @@ describe("Extending the schema in when using getSubgraphSchema", () => { node: Actor! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -90,11 +101,12 @@ describe("Extending the schema in when using getSubgraphSchema", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -103,6 +115,26 @@ describe("Extending the schema in when using getSubgraphSchema", () => { totalCount: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie @key(fields: \\"title\\") @shareable { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -123,6 +155,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -137,6 +170,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 } @@ -152,21 +204,22 @@ describe("Extending the schema in when using getSubgraphSchema", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -195,36 +248,39 @@ describe("Extending the schema in when using getSubgraphSchema", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection @shareable { @@ -265,6 +321,22 @@ describe("Extending the schema in when using getSubgraphSchema", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + scalar _Any union _Entity = Movie @@ -356,6 +428,17 @@ describe("Extending the schema in when using getSubgraphSchema", () => { node: Actor! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -364,18 +447,20 @@ describe("Extending the schema in when using getSubgraphSchema", () => { } input ActorUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -410,6 +495,40 @@ describe("Extending the schema in when using getSubgraphSchema", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie @key(fields: \\"title\\") @key(fields: \\"id\\") @shareable { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -431,6 +550,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -449,6 +569,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 } @@ -481,21 +620,22 @@ describe("Extending the schema in when using getSubgraphSchema", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -528,49 +668,55 @@ describe("Extending the schema in when using getSubgraphSchema", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id_SET: ID - title_SET: String + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type Mutation { @@ -611,6 +757,27 @@ describe("Extending the schema in when using getSubgraphSchema", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/issues/3698.test.ts b/packages/graphql/tests/schema/issues/3698.test.ts index 68df677bfb..5263efe9eb 100644 --- a/packages/graphql/tests/schema/issues/3698.test.ts +++ b/packages/graphql/tests/schema/issues/3698.test.ts @@ -105,6 +105,16 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { UPDATE } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + type Genre { name: String! product(limit: Int, offset: Int, sort: [IProductSort!], where: IProductWhere): [IProduct!]! @@ -174,6 +184,7 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { AND: [GenreProductAggregateInput!] NOT: GenreProductAggregateInput OR: [GenreProductAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -192,6 +203,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 } @@ -224,51 +254,54 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { AND: [GenreProductNodeAggregationWhereInput!] NOT: GenreProductNodeAggregationWhereInput OR: [GenreProductNodeAggregationWhereInput!] - id_AVERAGE_LENGTH_EQUAL: Float - id_AVERAGE_LENGTH_GT: Float - id_AVERAGE_LENGTH_GTE: Float - id_AVERAGE_LENGTH_LT: Float - id_AVERAGE_LENGTH_LTE: Float - id_LONGEST_LENGTH_EQUAL: Int - id_LONGEST_LENGTH_GT: Int - id_LONGEST_LENGTH_GTE: Int - id_LONGEST_LENGTH_LT: Int - id_LONGEST_LENGTH_LTE: Int - id_SHORTEST_LENGTH_EQUAL: Int - id_SHORTEST_LENGTH_GT: Int - id_SHORTEST_LENGTH_GTE: Int - id_SHORTEST_LENGTH_LT: Int - id_SHORTEST_LENGTH_LTE: Int - info_AVERAGE_LENGTH_EQUAL: Float - info_AVERAGE_LENGTH_GT: Float - info_AVERAGE_LENGTH_GTE: Float - info_AVERAGE_LENGTH_LT: Float - info_AVERAGE_LENGTH_LTE: Float - info_LONGEST_LENGTH_EQUAL: Int - info_LONGEST_LENGTH_GT: Int - info_LONGEST_LENGTH_GTE: Int - info_LONGEST_LENGTH_LT: Int - info_LONGEST_LENGTH_LTE: Int - info_SHORTEST_LENGTH_EQUAL: Int - info_SHORTEST_LENGTH_GT: Int - info_SHORTEST_LENGTH_GTE: Int - info_SHORTEST_LENGTH_LT: Int - info_SHORTEST_LENGTH_LTE: Int - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + id: StringScalarAggregationFilters + id_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'id: { averageLength: { eq: ... } } }' instead.\\") + id_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'id: { averageLength: { gt: ... } } }' instead.\\") + id_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'id: { averageLength: { gte: ... } } }' instead.\\") + id_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'id: { averageLength: { lt: ... } } }' instead.\\") + id_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'id: { averageLength: { lte: ... } } }' instead.\\") + id_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { longestLength: { eq: ... } } }' instead.\\") + id_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { longestLength: { gt: ... } } }' instead.\\") + id_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { longestLength: { gte: ... } } }' instead.\\") + id_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { longestLength: { lt: ... } } }' instead.\\") + id_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { longestLength: { lte: ... } } }' instead.\\") + id_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { shortestLength: { eq: ... } } }' instead.\\") + id_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { shortestLength: { gt: ... } } }' instead.\\") + id_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { shortestLength: { gte: ... } } }' instead.\\") + id_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { shortestLength: { lt: ... } } }' instead.\\") + id_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { shortestLength: { lte: ... } } }' instead.\\") + info: StringScalarAggregationFilters + info_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'info: { averageLength: { eq: ... } } }' instead.\\") + info_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'info: { averageLength: { gt: ... } } }' instead.\\") + info_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'info: { averageLength: { gte: ... } } }' instead.\\") + info_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'info: { averageLength: { lt: ... } } }' instead.\\") + info_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'info: { averageLength: { lte: ... } } }' instead.\\") + info_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'info: { longestLength: { eq: ... } } }' instead.\\") + info_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'info: { longestLength: { gt: ... } } }' instead.\\") + info_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'info: { longestLength: { gte: ... } } }' instead.\\") + info_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'info: { longestLength: { lt: ... } } }' instead.\\") + info_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'info: { longestLength: { lte: ... } } }' instead.\\") + info_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'info: { shortestLength: { eq: ... } } }' instead.\\") + info_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'info: { shortestLength: { gt: ... } } }' instead.\\") + info_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'info: { shortestLength: { gte: ... } } }' instead.\\") + info_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'info: { shortestLength: { lt: ... } } }' instead.\\") + info_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'info: { shortestLength: { lte: ... } } }' instead.\\") + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type GenreProductRelationship { @@ -289,6 +322,17 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { where: GenreProductConnectionWhere } + input GenreRelationshipFilters { + \\"\\"\\"Filter type where all of the related Genres match this filter\\"\\"\\" + all: GenreWhere + \\"\\"\\"Filter type where none of the related Genres match this filter\\"\\"\\" + none: GenreWhere + \\"\\"\\"Filter type where one of the related Genres match this filter\\"\\"\\" + single: GenreWhere + \\"\\"\\"Filter type where some of the related Genres match this filter\\"\\"\\" + some: GenreWhere + } + \\"\\"\\" Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object. \\"\\"\\" @@ -300,15 +344,17 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { AND: [GenreSubscriptionWhere!] NOT: GenreSubscriptionWhere OR: [GenreSubscriptionWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } input GenreUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") product: [GenreProductUpdateFieldInput!] } @@ -323,36 +369,39 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { AND: [GenreWhere!] NOT: GenreWhere OR: [GenreWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + product: IProductRelationshipFilters productAggregate: GenreProductAggregateInput + productConnection: GenreProductConnectionFilters \\"\\"\\" Return Genres where all of the related GenreProductConnections match this filter \\"\\"\\" - productConnection_ALL: GenreProductConnectionWhere + productConnection_ALL: GenreProductConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'productConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Genres where none of the related GenreProductConnections match this filter \\"\\"\\" - productConnection_NONE: GenreProductConnectionWhere + productConnection_NONE: GenreProductConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'productConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Genres where one of the related GenreProductConnections match this filter \\"\\"\\" - productConnection_SINGLE: GenreProductConnectionWhere + productConnection_SINGLE: GenreProductConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'productConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Genres where some of the related GenreProductConnections match this filter \\"\\"\\" - productConnection_SOME: GenreProductConnectionWhere + productConnection_SOME: GenreProductConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'productConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Genres where all of the related IProducts match this filter\\"\\"\\" - product_ALL: IProductWhere + product_ALL: IProductWhere @deprecated(reason: \\"Please use the relevant generic filter 'product: { all: ... }' instead.\\") \\"\\"\\"Return Genres where none of the related IProducts match this filter\\"\\"\\" - product_NONE: IProductWhere + product_NONE: IProductWhere @deprecated(reason: \\"Please use the relevant generic filter 'product: { none: ... }' instead.\\") \\"\\"\\"Return Genres where one of the related IProducts match this filter\\"\\"\\" - product_SINGLE: IProductWhere + product_SINGLE: IProductWhere @deprecated(reason: \\"Please use the relevant generic filter 'product: { single: ... }' instead.\\") \\"\\"\\"Return Genres where some of the related IProducts match this filter\\"\\"\\" - product_SOME: IProductWhere + product_SOME: IProductWhere @deprecated(reason: \\"Please use the relevant generic filter 'product: { some: ... }' instead.\\") } type GenresConnection { @@ -392,6 +441,17 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { Movie } + input IProductRelationshipFilters { + \\"\\"\\"Filter type where all of the related IProducts match this filter\\"\\"\\" + all: IProductWhere + \\"\\"\\"Filter type where none of the related IProducts match this filter\\"\\"\\" + none: IProductWhere + \\"\\"\\"Filter type where one of the related IProducts match this filter\\"\\"\\" + single: IProductWhere + \\"\\"\\"Filter type where some of the related IProducts match this filter\\"\\"\\" + some: IProductWhere + } + \\"\\"\\" Fields to sort IProducts by. The order in which sorts are applied is not guaranteed when specifying many fields in one IProductSort object. \\"\\"\\" @@ -402,31 +462,37 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { } input IProductUpdateInput { - id_SET: String - info_SET: String - name_SET: String + id: StringScalarMutations + id_SET: String @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + info: StringScalarMutations + info_SET: String @deprecated(reason: \\"Please use the generic mutation 'info: { set: ... } }' instead.\\") + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input IProductWhere { AND: [IProductWhere!] NOT: IProductWhere OR: [IProductWhere!] - id_CONTAINS: String - id_ENDS_WITH: String - id_EQ: String - id_IN: [String!] - id_STARTS_WITH: String - info_CONTAINS: String - info_ENDS_WITH: String - info_EQ: String - info_IN: [String!] - info_STARTS_WITH: String - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String - typename_IN: [IProductImplementation!] + id: StringScalarFilters + id_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: String @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + info: StringScalarFilters + info_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter info: { contains: ... }\\") + info_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter info: { endsWith: ... }\\") + info_EQ: String @deprecated(reason: \\"Please use the relevant generic filter info: { eq: ... }\\") + info_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter info: { in: ... }\\") + info_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter info: { startsWith: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + typename: [IProductImplementation!] } type IProductsConnection { @@ -435,6 +501,16 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { totalCount: Int! } + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie implements IProduct { genre(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! genreAggregate(where: GenreWhere): MovieGenreGenreAggregationSelection @@ -486,6 +562,7 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { AND: [MovieGenreAggregateInput!] NOT: MovieGenreAggregateInput OR: [MovieGenreAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -505,6 +582,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 } @@ -548,21 +644,22 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { AND: [MovieGenreNodeAggregationWhereInput!] NOT: MovieGenreNodeAggregationWhereInput OR: [MovieGenreNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieGenreRelationship { @@ -595,22 +692,26 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { AND: [MovieSubscriptionWhere!] NOT: MovieSubscriptionWhere OR: [MovieSubscriptionWhere!] - id_CONTAINS: String - id_ENDS_WITH: String - id_EQ: String - id_IN: [String!] - id_STARTS_WITH: String - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + id: StringScalarFilters + id_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: String @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } input MovieUpdateInput { genre: [MovieGenreUpdateFieldInput!] - id_SET: String - name_SET: String + id: StringScalarMutations + id_SET: String @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -624,41 +725,45 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + genre: GenreRelationshipFilters genreAggregate: MovieGenreAggregateInput + genreConnection: MovieGenreConnectionFilters \\"\\"\\" Return Movies where all of the related MovieGenreConnections match this filter \\"\\"\\" - genreConnection_ALL: MovieGenreConnectionWhere + genreConnection_ALL: MovieGenreConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'genreConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieGenreConnections match this filter \\"\\"\\" - genreConnection_NONE: MovieGenreConnectionWhere + genreConnection_NONE: MovieGenreConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'genreConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieGenreConnections match this filter \\"\\"\\" - genreConnection_SINGLE: MovieGenreConnectionWhere + genreConnection_SINGLE: MovieGenreConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'genreConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieGenreConnections match this filter \\"\\"\\" - genreConnection_SOME: MovieGenreConnectionWhere + genreConnection_SOME: MovieGenreConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'genreConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Genres match this filter\\"\\"\\" - genre_ALL: GenreWhere + genre_ALL: GenreWhere @deprecated(reason: \\"Please use the relevant generic filter 'genre: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Genres match this filter\\"\\"\\" - genre_NONE: GenreWhere + genre_NONE: GenreWhere @deprecated(reason: \\"Please use the relevant generic filter 'genre: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Genres match this filter\\"\\"\\" - genre_SINGLE: GenreWhere + genre_SINGLE: GenreWhere @deprecated(reason: \\"Please use the relevant generic filter 'genre: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Genres match this filter\\"\\"\\" - genre_SOME: GenreWhere - id_CONTAINS: String - id_ENDS_WITH: String - id_EQ: String - id_IN: [String!] - id_STARTS_WITH: String - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + genre_SOME: GenreWhere @deprecated(reason: \\"Please use the relevant generic filter 'genre: { some: ... }' instead.\\") + id: StringScalarFilters + id_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: String @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type MoviesConnection { @@ -709,6 +814,27 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Subscription { genreCreated(where: GenreSubscriptionWhere): GenreCreatedEvent! genreDeleted(where: GenreSubscriptionWhere): GenreDeletedEvent! diff --git a/packages/graphql/tests/schema/issues/3817.test.ts b/packages/graphql/tests/schema/issues/3817.test.ts index 0bf69b6dc9..a8ea7dd172 100644 --- a/packages/graphql/tests/schema/issues/3817.test.ts +++ b/packages/graphql/tests/schema/issues/3817.test.ts @@ -82,6 +82,16 @@ describe("ttps://github.com/neo4j/graphql/issues/3817", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + \\"\\"\\" The edge properties for the following fields: * Person.friends @@ -94,21 +104,22 @@ describe("ttps://github.com/neo4j/graphql/issues/3817", () => { AND: [FriendOfAggregationWhereInput!] NOT: FriendOfAggregationWhereInput OR: [FriendOfAggregationWhereInput!] - id_AVERAGE_LENGTH_EQUAL: Float - id_AVERAGE_LENGTH_GT: Float - id_AVERAGE_LENGTH_GTE: Float - id_AVERAGE_LENGTH_LT: Float - id_AVERAGE_LENGTH_LTE: Float - id_LONGEST_LENGTH_EQUAL: Int - id_LONGEST_LENGTH_GT: Int - id_LONGEST_LENGTH_GTE: Int - id_LONGEST_LENGTH_LT: Int - id_LONGEST_LENGTH_LTE: Int - id_SHORTEST_LENGTH_EQUAL: Int - id_SHORTEST_LENGTH_GT: Int - id_SHORTEST_LENGTH_GTE: Int - id_SHORTEST_LENGTH_LT: Int - id_SHORTEST_LENGTH_LTE: Int + id: StringScalarAggregationFilters + id_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'id: { averageLength: { eq: ... } } }' instead.\\") + id_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'id: { averageLength: { gt: ... } } }' instead.\\") + id_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'id: { averageLength: { gte: ... } } }' instead.\\") + id_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'id: { averageLength: { lt: ... } } }' instead.\\") + id_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'id: { averageLength: { lte: ... } } }' instead.\\") + id_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { longestLength: { eq: ... } } }' instead.\\") + id_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { longestLength: { gt: ... } } }' instead.\\") + id_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { longestLength: { gte: ... } } }' instead.\\") + id_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { longestLength: { lt: ... } } }' instead.\\") + id_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { longestLength: { lte: ... } } }' instead.\\") + id_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { shortestLength: { eq: ... } } }' instead.\\") + id_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { shortestLength: { gt: ... } } }' instead.\\") + id_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { shortestLength: { gte: ... } } }' instead.\\") + id_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { shortestLength: { lt: ... } } }' instead.\\") + id_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { shortestLength: { lte: ... } } }' instead.\\") } input FriendOfSort { @@ -116,23 +127,39 @@ describe("ttps://github.com/neo4j/graphql/issues/3817", () => { } input FriendOfUpdateInput { - id_SET: String + id: StringScalarMutations + id_SET: String @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input FriendOfWhere { AND: [FriendOfWhere!] NOT: FriendOfWhere OR: [FriendOfWhere!] - id_CONTAINS: String - id_ENDS_WITH: String - id_EQ: String - id_IN: [String] - id_STARTS_WITH: String + id: StringScalarFilters + id_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: String @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Mutation { @@ -164,7 +191,6 @@ describe("ttps://github.com/neo4j/graphql/issues/3817", () => { type PersonAggregateSelection { count: Int! - id: IDAggregateSelection! } input PersonConnectInput { @@ -196,13 +222,13 @@ describe("ttps://github.com/neo4j/graphql/issues/3817", () => { AND: [PersonFriendsAggregateInput!] NOT: PersonFriendsAggregateInput OR: [PersonFriendsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int count_LT: Int count_LTE: Int edge: FriendOfAggregationWhereInput - node: PersonFriendsNodeAggregationWhereInput } input PersonFriendsConnectFieldInput { @@ -216,6 +242,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 @@ -248,22 +293,6 @@ describe("ttps://github.com/neo4j/graphql/issues/3817", () => { create: [PersonFriendsCreateFieldInput!] } - input PersonFriendsNodeAggregationWhereInput { - AND: [PersonFriendsNodeAggregationWhereInput!] - NOT: PersonFriendsNodeAggregationWhereInput - OR: [PersonFriendsNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - } - type PersonFriendsRelationship { cursor: String! node: Person! @@ -287,15 +316,21 @@ describe("ttps://github.com/neo4j/graphql/issues/3817", () => { type PersonPersonFriendsAggregationSelection { count: Int! edge: PersonPersonFriendsEdgeAggregateSelection - node: PersonPersonFriendsNodeAggregateSelection } type PersonPersonFriendsEdgeAggregateSelection { id: StringAggregateSelection! } - type PersonPersonFriendsNodeAggregateSelection { - id: IDAggregateSelection! + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere } \\"\\"\\" @@ -313,36 +348,39 @@ describe("ttps://github.com/neo4j/graphql/issues/3817", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] + friends: PersonRelationshipFilters friendsAggregate: PersonFriendsAggregateInput + friendsConnection: PersonFriendsConnectionFilters \\"\\"\\" Return People where all of the related PersonFriendsConnections match this filter \\"\\"\\" - friendsConnection_ALL: PersonFriendsConnectionWhere + friendsConnection_ALL: PersonFriendsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'friendsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return People where none of the related PersonFriendsConnections match this filter \\"\\"\\" - friendsConnection_NONE: PersonFriendsConnectionWhere + friendsConnection_NONE: PersonFriendsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'friendsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return People where one of the related PersonFriendsConnections match this filter \\"\\"\\" - friendsConnection_SINGLE: PersonFriendsConnectionWhere + friendsConnection_SINGLE: PersonFriendsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'friendsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return People where some of the related PersonFriendsConnections match this filter \\"\\"\\" - friendsConnection_SOME: PersonFriendsConnectionWhere + friendsConnection_SOME: PersonFriendsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'friendsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return People where all of the related People match this filter\\"\\"\\" - friends_ALL: PersonWhere + friends_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'friends: { all: ... }' instead.\\") \\"\\"\\"Return People where none of the related People match this filter\\"\\"\\" - friends_NONE: PersonWhere + friends_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'friends: { none: ... }' instead.\\") \\"\\"\\"Return People where one of the related People match this filter\\"\\"\\" - friends_SINGLE: PersonWhere + friends_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'friends: { single: ... }' instead.\\") \\"\\"\\"Return People where some of the related People match this filter\\"\\"\\" - friends_SOME: PersonWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID + friends_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'friends: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type Query { @@ -364,6 +402,27 @@ describe("ttps://github.com/neo4j/graphql/issues/3817", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" diff --git a/packages/graphql/tests/schema/issues/4511.test.ts b/packages/graphql/tests/schema/issues/4511.test.ts index 8e852934a4..cad5e0f45c 100644 --- a/packages/graphql/tests/schema/issues/4511.test.ts +++ b/packages/graphql/tests/schema/issues/4511.test.ts @@ -129,12 +129,12 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { AND: [CreatureMoviesAggregateInput!] NOT: CreatureMoviesAggregateInput OR: [CreatureMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int count_LT: Int count_LTE: Int - node: CreatureMoviesNodeAggregationWhereInput } input CreatureMoviesConnectFieldInput { @@ -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 } @@ -173,22 +192,6 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { where: CreatureMoviesConnectionWhere } - input CreatureMoviesNodeAggregationWhereInput { - AND: [CreatureMoviesNodeAggregationWhereInput!] - NOT: CreatureMoviesNodeAggregationWhereInput - OR: [CreatureMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - } - type CreatureMoviesRelationship { cursor: String! node: Production! @@ -207,6 +210,17 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { where: CreatureMoviesConnectionWhere } + input CreatureRelationshipFilters { + \\"\\"\\"Filter type where all of the related Creatures match this filter\\"\\"\\" + all: CreatureWhere + \\"\\"\\"Filter type where none of the related Creatures match this filter\\"\\"\\" + none: CreatureWhere + \\"\\"\\"Filter type where one of the related Creatures match this filter\\"\\"\\" + single: CreatureWhere + \\"\\"\\"Filter type where some of the related Creatures match this filter\\"\\"\\" + some: CreatureWhere + } + input CreatureUpdateInput { movies: [CreatureMoviesUpdateFieldInput!] } @@ -215,40 +229,42 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { AND: [CreatureWhere!] NOT: CreatureWhere OR: [CreatureWhere!] + movies: ProductionRelationshipFilters moviesAggregate: CreatureMoviesAggregateInput + moviesConnection: CreatureMoviesConnectionFilters \\"\\"\\" Return Creatures where all of the related CreatureMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: CreatureMoviesConnectionWhere + moviesConnection_ALL: CreatureMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Creatures where none of the related CreatureMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: CreatureMoviesConnectionWhere + moviesConnection_NONE: CreatureMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Creatures where one of the related CreatureMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: CreatureMoviesConnectionWhere + moviesConnection_SINGLE: CreatureMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Creatures where some of the related CreatureMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: CreatureMoviesConnectionWhere + moviesConnection_SOME: CreatureMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\" Return Creatures where all of the related Productions match this filter \\"\\"\\" - movies_ALL: ProductionWhere + movies_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\" Return Creatures where none of the related Productions match this filter \\"\\"\\" - movies_NONE: ProductionWhere + movies_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\" Return Creatures where one of the related Productions match this filter \\"\\"\\" - movies_SINGLE: ProductionWhere + movies_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\" Return Creatures where some of the related Productions match this filter \\"\\"\\" - movies_SOME: ProductionWhere - typename_IN: [CreatureImplementation!] + movies_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + typename: [CreatureImplementation!] } type CreaturesConnection { @@ -273,9 +289,18 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { UPDATE } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -285,6 +310,23 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { sum: Int } + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie implements Production { director(limit: Int, offset: Int, where: CreatureWhere): [Creature!]! directorAggregate(where: CreatureWhere): MovieCreatureDirectorAggregationSelection @@ -295,7 +337,6 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! title: StringAggregateSelection! } @@ -317,6 +358,7 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { AND: [MovieDirectorAggregateInput!] NOT: MovieDirectorAggregateInput OR: [MovieDirectorAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -329,6 +371,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! } @@ -376,49 +437,55 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { input MovieUpdateInput { director: [MovieDirectorUpdateFieldInput!] - id_SET: ID - title_SET: String + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + director: CreatureRelationshipFilters directorAggregate: MovieDirectorAggregateInput + directorConnection: MovieDirectorConnectionFilters \\"\\"\\" Return Movies where all of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_ALL: ProductionDirectorConnectionWhere + directorConnection_ALL: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_NONE: ProductionDirectorConnectionWhere + directorConnection_NONE: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_SINGLE: ProductionDirectorConnectionWhere + directorConnection_SINGLE: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_SOME: ProductionDirectorConnectionWhere + directorConnection_SOME: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Creatures match this filter\\"\\"\\" - director_ALL: CreatureWhere + director_ALL: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Creatures match this filter\\"\\"\\" - director_NONE: CreatureWhere + director_NONE: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Creatures match this filter\\"\\"\\" - director_SINGLE: CreatureWhere + director_SINGLE: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Creatures match this filter\\"\\"\\" - director_SOME: CreatureWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + director_SOME: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -490,12 +557,12 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { AND: [PersonMoviesAggregateInput!] NOT: PersonMoviesAggregateInput OR: [PersonMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int count_LT: Int count_LTE: Int - node: PersonMoviesNodeAggregationWhereInput } input PersonMoviesConnectFieldInput { @@ -503,6 +570,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! } @@ -522,22 +608,6 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { create: [PersonMoviesCreateFieldInput!] } - input PersonMoviesNodeAggregationWhereInput { - AND: [PersonMoviesNodeAggregationWhereInput!] - NOT: PersonMoviesNodeAggregationWhereInput - OR: [PersonMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - } - input PersonMoviesUpdateConnectionInput { node: ProductionUpdateInput } @@ -553,11 +623,6 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { type PersonProductionMoviesAggregationSelection { count: Int! - node: PersonProductionMoviesNodeAggregateSelection - } - - type PersonProductionMoviesNodeAggregateSelection { - id: IDAggregateSelection! } input PersonUpdateInput { @@ -573,31 +638,33 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] + movies: ProductionRelationshipFilters moviesAggregate: PersonMoviesAggregateInput + moviesConnection: PersonMoviesConnectionFilters \\"\\"\\" Return People where all of the related CreatureMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: CreatureMoviesConnectionWhere + moviesConnection_ALL: CreatureMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return People where none of the related CreatureMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: CreatureMoviesConnectionWhere + moviesConnection_NONE: CreatureMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return People where one of the related CreatureMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: CreatureMoviesConnectionWhere + moviesConnection_SINGLE: CreatureMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return People where some of the related CreatureMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: CreatureMoviesConnectionWhere + moviesConnection_SOME: CreatureMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return People where all of the related Productions match this filter\\"\\"\\" - movies_ALL: ProductionWhere + movies_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return People where none of the related Productions match this filter\\"\\"\\" - movies_NONE: ProductionWhere + movies_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return People where one of the related Productions match this filter\\"\\"\\" - movies_SINGLE: ProductionWhere + movies_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return People where some of the related Productions match this filter\\"\\"\\" - movies_SOME: ProductionWhere + movies_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") } interface Production { @@ -608,7 +675,6 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { type ProductionAggregateSelection { count: Int! - id: IDAggregateSelection! } input ProductionConnectInput { @@ -632,6 +698,7 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { AND: [ProductionDirectorAggregateInput!] NOT: ProductionDirectorAggregateInput OR: [ProductionDirectorAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -650,6 +717,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 @@ -703,6 +789,17 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { Series } + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + \\"\\"\\" Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. \\"\\"\\" @@ -712,52 +809,56 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { input ProductionUpdateInput { director: [ProductionDirectorUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] + director: CreatureRelationshipFilters directorAggregate: ProductionDirectorAggregateInput + directorConnection: ProductionDirectorConnectionFilters \\"\\"\\" Return Productions where all of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_ALL: ProductionDirectorConnectionWhere + directorConnection_ALL: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where none of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_NONE: ProductionDirectorConnectionWhere + directorConnection_NONE: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where one of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_SINGLE: ProductionDirectorConnectionWhere + directorConnection_SINGLE: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where some of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_SOME: ProductionDirectorConnectionWhere + directorConnection_SOME: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\" Return Productions where all of the related Creatures match this filter \\"\\"\\" - director_ALL: CreatureWhere + director_ALL: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { all: ... }' instead.\\") \\"\\"\\" Return Productions where none of the related Creatures match this filter \\"\\"\\" - director_NONE: CreatureWhere + director_NONE: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { none: ... }' instead.\\") \\"\\"\\" Return Productions where one of the related Creatures match this filter \\"\\"\\" - director_SINGLE: CreatureWhere + director_SINGLE: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { single: ... }' instead.\\") \\"\\"\\" Return Productions where some of the related Creatures match this filter \\"\\"\\" - director_SOME: CreatureWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - typename_IN: [ProductionImplementation!] + director_SOME: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -796,7 +897,6 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { type SeriesAggregateSelection { count: Int! episode: IntAggregateSelection! - id: IDAggregateSelection! title: StringAggregateSelection! } @@ -837,6 +937,7 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { AND: [SeriesDirectorAggregateInput!] NOT: SeriesDirectorAggregateInput OR: [SeriesDirectorAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -849,6 +950,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! } @@ -905,31 +1025,37 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { AND: [SeriesSubscriptionWhere!] NOT: SeriesSubscriptionWhere OR: [SeriesSubscriptionWhere!] - episode_EQ: Int - episode_GT: Int - episode_GTE: Int - episode_IN: [Int!] - episode_LT: Int - episode_LTE: Int - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + episode: IntScalarFilters + episode_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter episode: { eq: ... }\\") + episode_GT: Int @deprecated(reason: \\"Please use the relevant generic filter episode: { gt: ... }\\") + episode_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter episode: { gte: ... }\\") + episode_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter episode: { in: ... }\\") + episode_LT: Int @deprecated(reason: \\"Please use the relevant generic filter episode: { lt: ... }\\") + episode_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter episode: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } input SeriesUpdateInput { director: [SeriesDirectorUpdateFieldInput!] - episode_DECREMENT: Int - episode_INCREMENT: Int - episode_SET: Int - id_SET: ID - title_SET: String + episode: IntScalarMutations + episode_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episode: { decrement: ... } }' instead.\\") + episode_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episode: { increment: ... } }' instead.\\") + episode_SET: Int @deprecated(reason: \\"Please use the generic mutation 'episode: { set: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } type SeriesUpdatedEvent { @@ -943,47 +1069,52 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] + director: CreatureRelationshipFilters directorAggregate: SeriesDirectorAggregateInput + directorConnection: SeriesDirectorConnectionFilters \\"\\"\\" Return Series where all of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_ALL: ProductionDirectorConnectionWhere + directorConnection_ALL: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where none of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_NONE: ProductionDirectorConnectionWhere + directorConnection_NONE: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where one of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_SINGLE: ProductionDirectorConnectionWhere + directorConnection_SINGLE: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where some of the related ProductionDirectorConnections match this filter \\"\\"\\" - directorConnection_SOME: ProductionDirectorConnectionWhere + directorConnection_SOME: ProductionDirectorConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Series where all of the related Creatures match this filter\\"\\"\\" - director_ALL: CreatureWhere + director_ALL: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { all: ... }' instead.\\") \\"\\"\\"Return Series where none of the related Creatures match this filter\\"\\"\\" - director_NONE: CreatureWhere + director_NONE: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { none: ... }' instead.\\") \\"\\"\\"Return Series where one of the related Creatures match this filter\\"\\"\\" - director_SINGLE: CreatureWhere + director_SINGLE: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { single: ... }' instead.\\") \\"\\"\\"Return Series where some of the related Creatures match this filter\\"\\"\\" - director_SOME: CreatureWhere - episode_EQ: Int - episode_GT: Int - episode_GTE: Int - episode_IN: [Int!] - episode_LT: Int - episode_LTE: Int - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + director_SOME: CreatureWhere @deprecated(reason: \\"Please use the relevant generic filter 'director: { some: ... }' instead.\\") + episode: IntScalarFilters + episode_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter episode: { eq: ... }\\") + episode_GT: Int @deprecated(reason: \\"Please use the relevant generic filter episode: { gt: ... }\\") + episode_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter episode: { gte: ... }\\") + episode_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter episode: { in: ... }\\") + episode_LT: Int @deprecated(reason: \\"Please use the relevant generic filter episode: { lt: ... }\\") + episode_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter episode: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -999,6 +1130,20 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Subscription { personCreated: PersonCreatedEvent! personDeleted: PersonDeletedEvent! diff --git a/packages/graphql/tests/schema/issues/4615.test.ts b/packages/graphql/tests/schema/issues/4615.test.ts index 497b25ac69..eef4d96968 100644 --- a/packages/graphql/tests/schema/issues/4615.test.ts +++ b/packages/graphql/tests/schema/issues/4615.test.ts @@ -77,26 +77,27 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_MAX_EQUAL: Int - screenTime_MAX_GT: Int - screenTime_MAX_GTE: Int - screenTime_MAX_LT: Int - screenTime_MAX_LTE: Int - screenTime_MIN_EQUAL: Int - screenTime_MIN_GT: Int - screenTime_MIN_GTE: Int - screenTime_MIN_LT: Int - screenTime_MIN_LTE: Int - screenTime_SUM_EQUAL: Int - screenTime_SUM_GT: Int - screenTime_SUM_GTE: Int - screenTime_SUM_LT: Int - screenTime_SUM_LTE: Int + screenTime: IntScalarAggregationFilters + screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { eq: ... } } }' instead.\\") + screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gt: ... } } }' instead.\\") + screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gte: ... } } }' instead.\\") + screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lt: ... } } }' instead.\\") + screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lte: ... } } }' instead.\\") + screenTime_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { eq: ... } } }' instead.\\") + screenTime_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gt: ... } } }' instead.\\") + screenTime_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gte: ... } } }' instead.\\") + screenTime_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lt: ... } } }' instead.\\") + screenTime_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lte: ... } } }' instead.\\") + screenTime_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { eq: ... } } }' instead.\\") + screenTime_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gt: ... } } }' instead.\\") + screenTime_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gte: ... } } }' instead.\\") + screenTime_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lt: ... } } }' instead.\\") + screenTime_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lte: ... } } }' instead.\\") + screenTime_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { eq: ... } } }' instead.\\") + screenTime_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gt: ... } } }' instead.\\") + screenTime_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gte: ... } } }' instead.\\") + screenTime_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lt: ... } } }' instead.\\") + screenTime_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lte: ... } } }' instead.\\") } input ActedInCreateInput { @@ -108,21 +109,23 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { } input ActedInUpdateInput { - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - screenTime_SET: Int + screenTime: IntScalarMutations + screenTime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { decrement: ... } }' instead.\\") + screenTime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { increment: ... } }' instead.\\") + screenTime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'screenTime: { set: ... } }' instead.\\") } input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime_EQ: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int] - screenTime_LT: Int - screenTime_LTE: Int + screenTime: IntScalarFilters + screenTime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { eq: ... }\\") + screenTime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gt: ... }\\") + screenTime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gte: ... }\\") + screenTime_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter screenTime: { in: ... }\\") + screenTime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lt: ... }\\") + screenTime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lte: ... }\\") } type Actor { @@ -136,6 +139,7 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -157,6 +161,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 @@ -194,21 +217,22 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -262,6 +286,17 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { node: Actor! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + type ActorShowActedInAggregationSelection { count: Int! edge: ActorShowActedInEdgeAggregateSelection @@ -285,43 +320,47 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ShowRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Shows match this filter\\"\\"\\" - actedIn_ALL: ShowWhere + actedIn_ALL: ShowWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Shows match this filter\\"\\"\\" - actedIn_NONE: ShowWhere + actedIn_NONE: ShowWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Shows match this filter\\"\\"\\" - actedIn_SINGLE: ShowWhere + actedIn_SINGLE: ShowWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Shows match this filter\\"\\"\\" - actedIn_SOME: ShowWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: ShowWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -361,6 +400,21 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { min: DateTime } + \\"\\"\\"DateTime filters\\"\\"\\" + input DateTimeScalarFilters { + eq: DateTime + gt: DateTime + gte: DateTime + in: [DateTime!] + lt: DateTime + lte: DateTime + } + + \\"\\"\\"DateTime mutations\\"\\"\\" + input DateTimeScalarMutations { + set: DateTime + } + \\"\\"\\" Information about the number of nodes and relationships deleted during a delete mutation \\"\\"\\" @@ -369,6 +423,16 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + type IntAggregateSelection { average: Float max: Int @@ -376,6 +440,31 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie implements Show { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -403,6 +492,7 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -418,6 +508,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! @@ -432,21 +541,22 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } input MovieActorsUpdateConnectionInput { @@ -497,59 +607,67 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - release_SET: DateTime - runtime_DECREMENT: Int - runtime_INCREMENT: Int - runtime_SET: Int - title_SET: String + release: DateTimeScalarMutations + release_SET: DateTime @deprecated(reason: \\"Please use the generic mutation 'release: { set: ... } }' instead.\\") + runtime: IntScalarMutations + runtime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { decrement: ... } }' instead.\\") + runtime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { increment: ... } }' instead.\\") + runtime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'runtime: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: ShowActorsConnectionWhere + actorsConnection_ALL: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: ShowActorsConnectionWhere + actorsConnection_NONE: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: ShowActorsConnectionWhere + actorsConnection_SINGLE: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: ShowActorsConnectionWhere + actorsConnection_SOME: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - release_EQ: DateTime - release_GT: DateTime - release_GTE: DateTime - release_IN: [DateTime!] - release_LT: DateTime - release_LTE: DateTime - runtime_EQ: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int] - runtime_LT: Int - runtime_LTE: Int - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + release: DateTimeScalarFilters + release_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter release: { eq: ... }\\") + release_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter release: { gt: ... }\\") + release_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter release: { gte: ... }\\") + release_IN: [DateTime!] @deprecated(reason: \\"Please use the relevant generic filter release: { in: ... }\\") + release_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter release: { lt: ... }\\") + release_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter release: { lte: ... }\\") + runtime: IntScalarFilters + runtime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { eq: ... }\\") + runtime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gt: ... }\\") + runtime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gte: ... }\\") + runtime_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter runtime: { in: ... }\\") + runtime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lt: ... }\\") + runtime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -619,6 +737,7 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { AND: [SeriesActorsAggregateInput!] NOT: SeriesActorsAggregateInput OR: [SeriesActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -634,6 +753,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! @@ -648,21 +786,22 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { AND: [SeriesActorsNodeAggregationWhereInput!] NOT: SeriesActorsNodeAggregationWhereInput OR: [SeriesActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } input SeriesActorsUpdateConnectionInput { @@ -716,52 +855,58 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { input SeriesUpdateInput { actors: [SeriesActorsUpdateFieldInput!] - episodes_DECREMENT: Int - episodes_INCREMENT: Int - episodes_SET: Int - title_SET: String + episodes: IntScalarMutations + episodes_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodes: { decrement: ... } }' instead.\\") + episodes_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodes: { increment: ... } }' instead.\\") + episodes_SET: Int @deprecated(reason: \\"Please use the generic mutation 'episodes: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] + actors: ActorRelationshipFilters actorsAggregate: SeriesActorsAggregateInput + actorsConnection: SeriesActorsConnectionFilters \\"\\"\\" Return Series where all of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: ShowActorsConnectionWhere + actorsConnection_ALL: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where none of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: ShowActorsConnectionWhere + actorsConnection_NONE: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where one of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: ShowActorsConnectionWhere + actorsConnection_SINGLE: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Series where some of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: ShowActorsConnectionWhere + actorsConnection_SOME: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Series where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Series where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Series where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Series where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - episodes_EQ: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int] - episodes_LT: Int - episodes_LTE: Int - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + episodes: IntScalarFilters + episodes_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { eq: ... }\\") + episodes_GT: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { gt: ... }\\") + episodes_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { gte: ... }\\") + episodes_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter episodes: { in: ... }\\") + episodes_LT: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { lt: ... }\\") + episodes_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } interface Show { @@ -774,6 +919,7 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { AND: [ShowActorsAggregateInput!] NOT: ShowActorsAggregateInput OR: [ShowActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -795,6 +941,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 @@ -872,21 +1037,22 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { AND: [ShowActorsNodeAggregationWhereInput!] NOT: ShowActorsNodeAggregationWhereInput OR: [ShowActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type ShowActorsRelationship { @@ -947,6 +1113,17 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { Series } + input ShowRelationshipFilters { + \\"\\"\\"Filter type where all of the related Shows match this filter\\"\\"\\" + all: ShowWhere + \\"\\"\\"Filter type where none of the related Shows match this filter\\"\\"\\" + none: ShowWhere + \\"\\"\\"Filter type where one of the related Shows match this filter\\"\\"\\" + single: ShowWhere + \\"\\"\\"Filter type where some of the related Shows match this filter\\"\\"\\" + some: ShowWhere + } + \\"\\"\\" Fields to sort Shows by. The order in which sorts are applied is not guaranteed when specifying many fields in one ShowSort object. \\"\\"\\" @@ -956,44 +1133,48 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { input ShowUpdateInput { actors: [ShowActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input ShowWhere { AND: [ShowWhere!] NOT: ShowWhere OR: [ShowWhere!] + actors: ActorRelationshipFilters actorsAggregate: ShowActorsAggregateInput + actorsConnection: ShowActorsConnectionFilters \\"\\"\\" Return Shows where all of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: ShowActorsConnectionWhere + actorsConnection_ALL: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Shows where none of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: ShowActorsConnectionWhere + actorsConnection_NONE: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Shows where one of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: ShowActorsConnectionWhere + actorsConnection_SINGLE: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Shows where some of the related ShowActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: ShowActorsConnectionWhere + actorsConnection_SOME: ShowActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Shows where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Shows where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Shows where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Shows where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ShowImplementation!] + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + typename: [ShowImplementation!] } type ShowsConnection { @@ -1015,6 +1196,27 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/issues/5428.test.ts b/packages/graphql/tests/schema/issues/5428.test.ts index 69418bac10..1530c0b067 100644 --- a/packages/graphql/tests/schema/issues/5428.test.ts +++ b/packages/graphql/tests/schema/issues/5428.test.ts @@ -94,6 +94,20 @@ describe("https://github.com/neo4j/graphql/issues/5428", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Test { Name: String } @@ -126,17 +140,19 @@ describe("https://github.com/neo4j/graphql/issues/5428", () => { } input TestUpdateInput { - Name_SET: String + Name: StringScalarMutations + Name_SET: String @deprecated(reason: \\"Please use the generic mutation 'Name: { set: ... } }' instead.\\") } input TestWhere { AND: [TestWhere!] NOT: TestWhere - Name_CONTAINS: String - Name_ENDS_WITH: String - Name_EQ: String - Name_IN: [String] - Name_STARTS_WITH: String + Name: StringScalarFilters + Name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter Name: { contains: ... }\\") + Name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter Name: { endsWith: ... }\\") + Name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter Name: { eq: ... }\\") + Name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter Name: { in: ... }\\") + Name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter Name: { startsWith: ... }\\") OR: [TestWhere!] } diff --git a/packages/graphql/tests/schema/issues/5631.test.ts b/packages/graphql/tests/schema/issues/5631.test.ts index 7adcec8c63..d1b3404d57 100644 --- a/packages/graphql/tests/schema/issues/5631.test.ts +++ b/packages/graphql/tests/schema/issues/5631.test.ts @@ -98,11 +98,12 @@ describe("https://github.com/neo4j/graphql/issues/5631", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - custom_string_with_zero_param_CONTAINS: String - custom_string_with_zero_param_ENDS_WITH: String - custom_string_with_zero_param_EQ: String - custom_string_with_zero_param_IN: [String!] - custom_string_with_zero_param_STARTS_WITH: String + custom_string_with_zero_param: StringScalarFilters + custom_string_with_zero_param_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter custom_string_with_zero_param: { contains: ... }\\") + custom_string_with_zero_param_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter custom_string_with_zero_param: { endsWith: ... }\\") + custom_string_with_zero_param_EQ: String @deprecated(reason: \\"Please use the relevant generic filter custom_string_with_zero_param: { eq: ... }\\") + custom_string_with_zero_param_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter custom_string_with_zero_param: { in: ... }\\") + custom_string_with_zero_param_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter custom_string_with_zero_param: { startsWith: ... }\\") } type ActorsConnection { @@ -213,6 +214,15 @@ describe("https://github.com/neo4j/graphql/issues/5631", () => { DESC } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/issues/609.test.ts b/packages/graphql/tests/schema/issues/609.test.ts index 849ae89590..17397109b5 100644 --- a/packages/graphql/tests/schema/issues/609.test.ts +++ b/packages/graphql/tests/schema/issues/609.test.ts @@ -85,6 +85,7 @@ describe("609", () => { } input DeprecatedUpdateInput { + deprecatedField: StringScalarMutations @deprecated deprecatedField_SET: String @deprecated } @@ -92,6 +93,7 @@ describe("609", () => { AND: [DeprecatedWhere!] NOT: DeprecatedWhere OR: [DeprecatedWhere!] + deprecatedField: StringScalarFilters @deprecated deprecatedField_CONTAINS: String @deprecated deprecatedField_ENDS_WITH: String @deprecated deprecatedField_EQ: String @deprecated @@ -138,6 +140,20 @@ describe("609", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateDeprecatedsMutationResponse { deprecateds: [Deprecated!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/issues/872.test.ts b/packages/graphql/tests/schema/issues/872.test.ts index a14f862105..149907ae26 100644 --- a/packages/graphql/tests/schema/issues/872.test.ts +++ b/packages/graphql/tests/schema/issues/872.test.ts @@ -88,7 +88,6 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { } type Actor2MovieMoviesNodeAggregateSelection { - id: IDAggregateSelection! title: StringAggregateSelection! } @@ -96,6 +95,7 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { AND: [Actor2MoviesAggregateInput!] NOT: Actor2MoviesAggregateInput OR: [Actor2MoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -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 } @@ -146,31 +165,22 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { AND: [Actor2MoviesNodeAggregationWhereInput!] NOT: Actor2MoviesNodeAggregationWhereInput OR: [Actor2MoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type Actor2MoviesRelationship { @@ -200,43 +210,47 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { input Actor2UpdateInput { movies: [Actor2MoviesUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input Actor2Where { AND: [Actor2Where!] NOT: Actor2Where OR: [Actor2Where!] + movies: MovieRelationshipFilters moviesAggregate: Actor2MoviesAggregateInput + moviesConnection: Actor2MoviesConnectionFilters \\"\\"\\" Return Actor2s where all of the related Actor2MoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: Actor2MoviesConnectionWhere + moviesConnection_ALL: Actor2MoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actor2s where none of the related Actor2MoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: Actor2MoviesConnectionWhere + moviesConnection_NONE: Actor2MoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actor2s where one of the related Actor2MoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: Actor2MoviesConnectionWhere + moviesConnection_SINGLE: Actor2MoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actor2s where some of the related Actor2MoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: Actor2MoviesConnectionWhere + moviesConnection_SOME: Actor2MoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actor2s where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actor2s where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actor2s where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actor2s where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type Actor2sConnection { @@ -270,7 +284,6 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { } type ActorMovieMoviesNodeAggregateSelection { - id: IDAggregateSelection! title: StringAggregateSelection! } @@ -278,6 +291,7 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -296,6 +310,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 } @@ -328,31 +361,22 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -382,43 +406,47 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -458,9 +486,33 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int } type Movie { @@ -470,7 +522,6 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! title: StringAggregateSelection! } @@ -487,6 +538,17 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -496,23 +558,26 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { } input MovieUpdateInput { - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -566,6 +631,27 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActor2sMutationResponse { actor2s: [Actor2!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/limit-required.test.ts b/packages/graphql/tests/schema/limit-required.test.ts index f34a530096..0ed200d767 100644 --- a/packages/graphql/tests/schema/limit-required.test.ts +++ b/packages/graphql/tests/schema/limit-required.test.ts @@ -79,26 +79,27 @@ describe("limitRequired constructor option", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_MAX_EQUAL: Int - screenTime_MAX_GT: Int - screenTime_MAX_GTE: Int - screenTime_MAX_LT: Int - screenTime_MAX_LTE: Int - screenTime_MIN_EQUAL: Int - screenTime_MIN_GT: Int - screenTime_MIN_GTE: Int - screenTime_MIN_LT: Int - screenTime_MIN_LTE: Int - screenTime_SUM_EQUAL: Int - screenTime_SUM_GT: Int - screenTime_SUM_GTE: Int - screenTime_SUM_LT: Int - screenTime_SUM_LTE: Int + screenTime: IntScalarAggregationFilters + screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { eq: ... } } }' instead.\\") + screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gt: ... } } }' instead.\\") + screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gte: ... } } }' instead.\\") + screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lt: ... } } }' instead.\\") + screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lte: ... } } }' instead.\\") + screenTime_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { eq: ... } } }' instead.\\") + screenTime_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gt: ... } } }' instead.\\") + screenTime_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gte: ... } } }' instead.\\") + screenTime_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lt: ... } } }' instead.\\") + screenTime_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lte: ... } } }' instead.\\") + screenTime_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { eq: ... } } }' instead.\\") + screenTime_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gt: ... } } }' instead.\\") + screenTime_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gte: ... } } }' instead.\\") + screenTime_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lt: ... } } }' instead.\\") + screenTime_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lte: ... } } }' instead.\\") + screenTime_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { eq: ... } } }' instead.\\") + screenTime_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gt: ... } } }' instead.\\") + screenTime_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gte: ... } } }' instead.\\") + screenTime_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lt: ... } } }' instead.\\") + screenTime_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lte: ... } } }' instead.\\") } input ActedInCreateInput { @@ -110,21 +111,23 @@ describe("limitRequired constructor option", () => { } input ActedInUpdateInput { - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - screenTime_SET: Int + screenTime: IntScalarMutations + screenTime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { decrement: ... } }' instead.\\") + screenTime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { increment: ... } }' instead.\\") + screenTime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'screenTime: { set: ... } }' instead.\\") } input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime_EQ: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int + screenTime: IntScalarFilters + screenTime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { eq: ... }\\") + screenTime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gt: ... }\\") + screenTime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gte: ... }\\") + screenTime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter screenTime: { in: ... }\\") + screenTime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lt: ... }\\") + screenTime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lte: ... }\\") } type Actor implements Person { @@ -142,6 +145,7 @@ describe("limitRequired constructor option", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -156,6 +160,25 @@ describe("limitRequired constructor option", () => { where: ProductionConnectWhere } + input ActorActedInConnectionFilters { + \\"\\"\\" + Return Actors where all of the related PersonActedInConnections match this filter + \\"\\"\\" + all: PersonActedInConnectionWhere + \\"\\"\\" + Return Actors where none of the related PersonActedInConnections match this filter + \\"\\"\\" + none: PersonActedInConnectionWhere + \\"\\"\\" + Return Actors where one of the related PersonActedInConnections match this filter + \\"\\"\\" + single: PersonActedInConnectionWhere + \\"\\"\\" + Return Actors where some of the related PersonActedInConnections match this filter + \\"\\"\\" + some: PersonActedInConnectionWhere + } + input ActorActedInCreateFieldInput { edge: ActedInCreateInput! node: ProductionCreateInput! @@ -178,31 +201,22 @@ describe("limitRequired constructor option", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } input ActorActedInUpdateConnectionInput { @@ -221,7 +235,6 @@ describe("limitRequired constructor option", () => { type ActorAggregateSelection { count: Int! - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -267,7 +280,6 @@ describe("limitRequired constructor option", () => { } type ActorMovieMoviesNodeAggregateSelection { - id: IDAggregateSelection! runtime: IntAggregateSelection! title: StringAggregateSelection! } @@ -276,6 +288,7 @@ describe("limitRequired constructor option", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -291,6 +304,25 @@ describe("limitRequired constructor option", () => { where: MovieConnectWhere } + input ActorMoviesConnectionFilters { + \\"\\"\\" + Return Actors where all of the related PersonMoviesConnections match this filter + \\"\\"\\" + all: PersonMoviesConnectionWhere + \\"\\"\\" + Return Actors where none of the related PersonMoviesConnections match this filter + \\"\\"\\" + none: PersonMoviesConnectionWhere + \\"\\"\\" + Return Actors where one of the related PersonMoviesConnections match this filter + \\"\\"\\" + single: PersonMoviesConnectionWhere + \\"\\"\\" + Return Actors where some of the related PersonMoviesConnections match this filter + \\"\\"\\" + some: PersonMoviesConnectionWhere + } + input ActorMoviesCreateFieldInput { edge: ActedInCreateInput! node: MovieCreateInput! @@ -305,51 +337,43 @@ describe("limitRequired constructor option", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - runtime_AVERAGE_EQUAL: Float - runtime_AVERAGE_GT: Float - runtime_AVERAGE_GTE: Float - runtime_AVERAGE_LT: Float - runtime_AVERAGE_LTE: Float - runtime_MAX_EQUAL: Int - runtime_MAX_GT: Int - runtime_MAX_GTE: Int - runtime_MAX_LT: Int - runtime_MAX_LTE: Int - runtime_MIN_EQUAL: Int - runtime_MIN_GT: Int - runtime_MIN_GTE: Int - runtime_MIN_LT: Int - runtime_MIN_LTE: Int - runtime_SUM_EQUAL: Int - runtime_SUM_GT: Int - runtime_SUM_GTE: Int - runtime_SUM_LT: Int - runtime_SUM_LTE: Int - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + runtime: IntScalarAggregationFilters + runtime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { eq: ... } } }' instead.\\") + runtime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { gt: ... } } }' instead.\\") + runtime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { gte: ... } } }' instead.\\") + runtime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { lt: ... } } }' instead.\\") + runtime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { lte: ... } } }' instead.\\") + runtime_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { eq: ... } } }' instead.\\") + runtime_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { gt: ... } } }' instead.\\") + runtime_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { gte: ... } } }' instead.\\") + runtime_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { lt: ... } } }' instead.\\") + runtime_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { lte: ... } } }' instead.\\") + runtime_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { eq: ... } } }' instead.\\") + runtime_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { gt: ... } } }' instead.\\") + runtime_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { gte: ... } } }' instead.\\") + runtime_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { lt: ... } } }' instead.\\") + runtime_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { lte: ... } } }' instead.\\") + runtime_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { eq: ... } } }' instead.\\") + runtime_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { gt: ... } } }' instead.\\") + runtime_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { gte: ... } } }' instead.\\") + runtime_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { lt: ... } } }' instead.\\") + runtime_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } input ActorMoviesUpdateConnectionInput { @@ -377,10 +401,20 @@ describe("limitRequired constructor option", () => { } type ActorProductionActedInNodeAggregateSelection { - id: IDAggregateSelection! title: StringAggregateSelection! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -391,75 +425,83 @@ describe("limitRequired constructor option", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") movies: [ActorMoviesUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ProductionRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related PersonActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: PersonActedInConnectionWhere + actedInConnection_ALL: PersonActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related PersonActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: PersonActedInConnectionWhere + actedInConnection_NONE: PersonActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related PersonActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: PersonActedInConnectionWhere + actedInConnection_SINGLE: PersonActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related PersonActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: PersonActedInConnectionWhere + actedInConnection_SOME: PersonActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere + actedIn_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere + actedIn_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere + actedIn_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID + actedIn_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related PersonMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: PersonMoviesConnectionWhere + moviesConnection_ALL: PersonMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related PersonMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: PersonMoviesConnectionWhere + moviesConnection_NONE: PersonMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related PersonMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: PersonMoviesConnectionWhere + moviesConnection_SINGLE: PersonMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related PersonMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: PersonMoviesConnectionWhere + moviesConnection_SOME: PersonMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -499,9 +541,28 @@ describe("limitRequired constructor option", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -511,6 +572,31 @@ describe("limitRequired constructor option", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie implements Production { actors(limit: Int!, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -531,7 +617,6 @@ describe("limitRequired constructor option", () => { } type MovieActorActorsNodeAggregateSelection { - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -539,6 +624,7 @@ describe("limitRequired constructor option", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -560,6 +646,25 @@ describe("limitRequired constructor option", () => { 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 @@ -597,31 +702,22 @@ describe("limitRequired constructor option", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -646,7 +742,6 @@ describe("limitRequired constructor option", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! runtime: IntAggregateSelection! title: StringAggregateSelection! } @@ -679,6 +774,17 @@ describe("limitRequired constructor option", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -690,58 +796,66 @@ describe("limitRequired constructor option", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id_SET: ID - runtime_DECREMENT: Int - runtime_INCREMENT: Int - runtime_SET: Int - title_SET: String + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + runtime: IntScalarMutations + runtime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { decrement: ... } }' instead.\\") + runtime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { increment: ... } }' instead.\\") + runtime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'runtime: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - runtime_EQ: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + runtime: IntScalarFilters + runtime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { eq: ... }\\") + runtime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gt: ... }\\") + runtime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gte: ... }\\") + runtime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter runtime: { in: ... }\\") + runtime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lt: ... }\\") + runtime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -789,6 +903,7 @@ describe("limitRequired constructor option", () => { AND: [PersonActedInAggregateInput!] NOT: PersonActedInAggregateInput OR: [PersonActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -804,6 +919,25 @@ describe("limitRequired constructor option", () => { totalCount: Int! } + input PersonActedInConnectionFilters { + \\"\\"\\" + Return People where all of the related PersonActedInConnections match this filter + \\"\\"\\" + all: PersonActedInConnectionWhere + \\"\\"\\" + Return People where none of the related PersonActedInConnections match this filter + \\"\\"\\" + none: PersonActedInConnectionWhere + \\"\\"\\" + Return People where one of the related PersonActedInConnections match this filter + \\"\\"\\" + single: PersonActedInConnectionWhere + \\"\\"\\" + Return People where some of the related PersonActedInConnections match this filter + \\"\\"\\" + some: PersonActedInConnectionWhere + } + input PersonActedInConnectionSort { edge: PersonActedInEdgeSort node: ProductionSort @@ -845,31 +979,22 @@ describe("limitRequired constructor option", () => { AND: [PersonActedInNodeAggregationWhereInput!] NOT: PersonActedInNodeAggregationWhereInput OR: [PersonActedInNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type PersonActedInRelationship { @@ -882,7 +1007,6 @@ describe("limitRequired constructor option", () => { type PersonAggregateSelection { count: Int! - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -899,6 +1023,7 @@ describe("limitRequired constructor option", () => { AND: [PersonMoviesAggregateInput!] NOT: PersonMoviesAggregateInput OR: [PersonMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -914,6 +1039,25 @@ describe("limitRequired constructor option", () => { 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: PersonMoviesEdgeSort node: MovieSort @@ -965,51 +1109,43 @@ describe("limitRequired constructor option", () => { AND: [PersonMoviesNodeAggregationWhereInput!] NOT: PersonMoviesNodeAggregationWhereInput OR: [PersonMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - runtime_AVERAGE_EQUAL: Float - runtime_AVERAGE_GT: Float - runtime_AVERAGE_GTE: Float - runtime_AVERAGE_LT: Float - runtime_AVERAGE_LTE: Float - runtime_MAX_EQUAL: Int - runtime_MAX_GT: Int - runtime_MAX_GTE: Int - runtime_MAX_LT: Int - runtime_MAX_LTE: Int - runtime_MIN_EQUAL: Int - runtime_MIN_GT: Int - runtime_MIN_GTE: Int - runtime_MIN_LT: Int - runtime_MIN_LTE: Int - runtime_SUM_EQUAL: Int - runtime_SUM_GT: Int - runtime_SUM_GTE: Int - runtime_SUM_LT: Int - runtime_SUM_LTE: Int - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + runtime: IntScalarAggregationFilters + runtime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { eq: ... } } }' instead.\\") + runtime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { gt: ... } } }' instead.\\") + runtime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { gte: ... } } }' instead.\\") + runtime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { lt: ... } } }' instead.\\") + runtime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { lte: ... } } }' instead.\\") + runtime_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { eq: ... } } }' instead.\\") + runtime_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { gt: ... } } }' instead.\\") + runtime_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { gte: ... } } }' instead.\\") + runtime_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { lt: ... } } }' instead.\\") + runtime_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { lte: ... } } }' instead.\\") + runtime_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { eq: ... } } }' instead.\\") + runtime_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { gt: ... } } }' instead.\\") + runtime_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { gte: ... } } }' instead.\\") + runtime_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { lt: ... } } }' instead.\\") + runtime_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { lte: ... } } }' instead.\\") + runtime_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { eq: ... } } }' instead.\\") + runtime_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { gt: ... } } }' instead.\\") + runtime_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { gte: ... } } }' instead.\\") + runtime_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { lt: ... } } }' instead.\\") + runtime_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type PersonMoviesRelationship { @@ -1032,67 +1168,73 @@ describe("limitRequired constructor option", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] + actedIn: ProductionRelationshipFilters actedInAggregate: PersonActedInAggregateInput + actedInConnection: PersonActedInConnectionFilters \\"\\"\\" Return People where all of the related PersonActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: PersonActedInConnectionWhere + actedInConnection_ALL: PersonActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return People where none of the related PersonActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: PersonActedInConnectionWhere + actedInConnection_NONE: PersonActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return People where one of the related PersonActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: PersonActedInConnectionWhere + actedInConnection_SINGLE: PersonActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return People where some of the related PersonActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: PersonActedInConnectionWhere + actedInConnection_SOME: PersonActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return People where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere + actedIn_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return People where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere + actedIn_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return People where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere + actedIn_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return People where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID + actedIn_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + movies: MovieRelationshipFilters moviesAggregate: PersonMoviesAggregateInput + moviesConnection: PersonMoviesConnectionFilters \\"\\"\\" Return People where all of the related PersonMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: PersonMoviesConnectionWhere + moviesConnection_ALL: PersonMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return People where none of the related PersonMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: PersonMoviesConnectionWhere + moviesConnection_NONE: PersonMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return People where one of the related PersonMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: PersonMoviesConnectionWhere + moviesConnection_SINGLE: PersonMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return People where some of the related PersonMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: PersonMoviesConnectionWhere + moviesConnection_SOME: PersonMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return People where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return People where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return People where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return People where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + typename: [PersonImplementation!] } interface Production { @@ -1102,7 +1244,6 @@ describe("limitRequired constructor option", () => { type ProductionAggregateSelection { count: Int! - id: IDAggregateSelection! title: StringAggregateSelection! } @@ -1125,6 +1266,17 @@ describe("limitRequired constructor option", () => { Series } + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + \\"\\"\\" Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. \\"\\"\\" @@ -1134,25 +1286,29 @@ describe("limitRequired constructor option", () => { } input ProductionUpdateInput { - id_SET: ID - title_SET: String + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -1188,7 +1344,6 @@ describe("limitRequired constructor option", () => { type SeriesAggregateSelection { count: Int! episodes: IntAggregateSelection! - id: IDAggregateSelection! title: StringAggregateSelection! } @@ -1219,33 +1374,39 @@ describe("limitRequired constructor option", () => { } input SeriesUpdateInput { - episodes_DECREMENT: Int - episodes_INCREMENT: Int - episodes_SET: Int - id_SET: ID - title_SET: String + episodes: IntScalarMutations + episodes_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodes: { decrement: ... } }' instead.\\") + episodes_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodes: { increment: ... } }' instead.\\") + episodes_SET: Int @deprecated(reason: \\"Please use the generic mutation 'episodes: { set: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] - episodes_EQ: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + episodes: IntScalarFilters + episodes_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { eq: ... }\\") + episodes_GT: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { gt: ... }\\") + episodes_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { gte: ... }\\") + episodes_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter episodes: { in: ... }\\") + episodes_LT: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { lt: ... }\\") + episodes_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -1261,6 +1422,27 @@ describe("limitRequired constructor option", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -1346,26 +1528,27 @@ describe("limitRequired constructor option", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_MAX_EQUAL: Int - screenTime_MAX_GT: Int - screenTime_MAX_GTE: Int - screenTime_MAX_LT: Int - screenTime_MAX_LTE: Int - screenTime_MIN_EQUAL: Int - screenTime_MIN_GT: Int - screenTime_MIN_GTE: Int - screenTime_MIN_LT: Int - screenTime_MIN_LTE: Int - screenTime_SUM_EQUAL: Int - screenTime_SUM_GT: Int - screenTime_SUM_GTE: Int - screenTime_SUM_LT: Int - screenTime_SUM_LTE: Int + screenTime: IntScalarAggregationFilters + screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { eq: ... } } }' instead.\\") + screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gt: ... } } }' instead.\\") + screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gte: ... } } }' instead.\\") + screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lt: ... } } }' instead.\\") + screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lte: ... } } }' instead.\\") + screenTime_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { eq: ... } } }' instead.\\") + screenTime_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gt: ... } } }' instead.\\") + screenTime_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gte: ... } } }' instead.\\") + screenTime_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lt: ... } } }' instead.\\") + screenTime_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lte: ... } } }' instead.\\") + screenTime_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { eq: ... } } }' instead.\\") + screenTime_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gt: ... } } }' instead.\\") + screenTime_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gte: ... } } }' instead.\\") + screenTime_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lt: ... } } }' instead.\\") + screenTime_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lte: ... } } }' instead.\\") + screenTime_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { eq: ... } } }' instead.\\") + screenTime_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gt: ... } } }' instead.\\") + screenTime_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gte: ... } } }' instead.\\") + screenTime_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lt: ... } } }' instead.\\") + screenTime_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lte: ... } } }' instead.\\") } input ActedInCreateInput { @@ -1377,21 +1560,23 @@ describe("limitRequired constructor option", () => { } input ActedInUpdateInput { - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - screenTime_SET: Int + screenTime: IntScalarMutations + screenTime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { decrement: ... } }' instead.\\") + screenTime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { increment: ... } }' instead.\\") + screenTime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'screenTime: { set: ... } }' instead.\\") } input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime_EQ: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int + screenTime: IntScalarFilters + screenTime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { eq: ... }\\") + screenTime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gt: ... }\\") + screenTime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gte: ... }\\") + screenTime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter screenTime: { in: ... }\\") + screenTime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lt: ... }\\") + screenTime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lte: ... }\\") } type Actor { @@ -1411,6 +1596,7 @@ describe("limitRequired constructor option", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1431,6 +1617,25 @@ describe("limitRequired constructor option", () => { 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 @@ -1466,31 +1671,22 @@ describe("limitRequired constructor option", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -1515,7 +1711,6 @@ describe("limitRequired constructor option", () => { type ActorAggregateSelection { count: Int! - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -1540,6 +1735,25 @@ describe("limitRequired constructor option", () => { totalCount: Int! } + input ActorContactConnectionFilters { + \\"\\"\\" + Return Actors where all of the related ActorContactConnections match this filter + \\"\\"\\" + all: ActorContactConnectionWhere + \\"\\"\\" + Return Actors where none of the related ActorContactConnections match this filter + \\"\\"\\" + none: ActorContactConnectionWhere + \\"\\"\\" + Return Actors where one of the related ActorContactConnections match this filter + \\"\\"\\" + single: ActorContactConnectionWhere + \\"\\"\\" + Return Actors where some of the related ActorContactConnections match this filter + \\"\\"\\" + some: ActorContactConnectionWhere + } + input ActorContactConnectionWhere { Email: ActorContactEmailConnectionWhere Telephone: ActorContactTelephoneConnectionWhere @@ -1688,7 +1902,6 @@ describe("limitRequired constructor option", () => { } type ActorMovieMoviesNodeAggregateSelection { - id: IDAggregateSelection! runtime: IntAggregateSelection! title: StringAggregateSelection! } @@ -1697,6 +1910,7 @@ describe("limitRequired constructor option", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1718,6 +1932,25 @@ describe("limitRequired constructor option", () => { 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 @@ -1755,51 +1988,43 @@ describe("limitRequired constructor option", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - runtime_AVERAGE_EQUAL: Float - runtime_AVERAGE_GT: Float - runtime_AVERAGE_GTE: Float - runtime_AVERAGE_LT: Float - runtime_AVERAGE_LTE: Float - runtime_MAX_EQUAL: Int - runtime_MAX_GT: Int - runtime_MAX_GTE: Int - runtime_MAX_LT: Int - runtime_MAX_LTE: Int - runtime_MIN_EQUAL: Int - runtime_MIN_GT: Int - runtime_MIN_GTE: Int - runtime_MIN_LT: Int - runtime_MIN_LTE: Int - runtime_SUM_EQUAL: Int - runtime_SUM_GT: Int - runtime_SUM_GTE: Int - runtime_SUM_LT: Int - runtime_SUM_LTE: Int - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + runtime: IntScalarAggregationFilters + runtime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { eq: ... } } }' instead.\\") + runtime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { gt: ... } } }' instead.\\") + runtime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { gte: ... } } }' instead.\\") + runtime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { lt: ... } } }' instead.\\") + runtime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { lte: ... } } }' instead.\\") + runtime_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { eq: ... } } }' instead.\\") + runtime_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { gt: ... } } }' instead.\\") + runtime_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { gte: ... } } }' instead.\\") + runtime_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { lt: ... } } }' instead.\\") + runtime_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { lte: ... } } }' instead.\\") + runtime_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { eq: ... } } }' instead.\\") + runtime_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { gt: ... } } }' instead.\\") + runtime_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { gte: ... } } }' instead.\\") + runtime_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { lt: ... } } }' instead.\\") + runtime_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { lte: ... } } }' instead.\\") + runtime_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { eq: ... } } }' instead.\\") + runtime_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { gt: ... } } }' instead.\\") + runtime_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { gte: ... } } }' instead.\\") + runtime_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { lt: ... } } }' instead.\\") + runtime_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -1833,10 +2058,20 @@ describe("limitRequired constructor option", () => { } type ActorProductionActedInNodeAggregateSelection { - id: IDAggregateSelection! title: StringAggregateSelection! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -1848,99 +2083,109 @@ describe("limitRequired constructor option", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] contact: ActorContactUpdateInput - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") movies: [ActorMoviesUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: ProductionRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere + actedIn_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere + actedIn_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere + actedIn_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere + actedIn_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + contact: ContactRelationshipFilters + contactConnection: ActorContactConnectionFilters \\"\\"\\" Return Actors where all of the related ActorContactConnections match this filter \\"\\"\\" - contactConnection_ALL: ActorContactConnectionWhere + contactConnection_ALL: ActorContactConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'contactConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorContactConnections match this filter \\"\\"\\" - contactConnection_NONE: ActorContactConnectionWhere + contactConnection_NONE: ActorContactConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'contactConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorContactConnections match this filter \\"\\"\\" - contactConnection_SINGLE: ActorContactConnectionWhere + contactConnection_SINGLE: ActorContactConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'contactConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorContactConnections match this filter \\"\\"\\" - contactConnection_SOME: ActorContactConnectionWhere + contactConnection_SOME: ActorContactConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'contactConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Contacts match this filter\\"\\"\\" - contact_ALL: ContactWhere + contact_ALL: ContactWhere @deprecated(reason: \\"Please use the relevant generic filter 'contact: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Contacts match this filter\\"\\"\\" - contact_NONE: ContactWhere + contact_NONE: ContactWhere @deprecated(reason: \\"Please use the relevant generic filter 'contact: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Contacts match this filter\\"\\"\\" - contact_SINGLE: ContactWhere + contact_SINGLE: ContactWhere @deprecated(reason: \\"Please use the relevant generic filter 'contact: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Contacts match this filter\\"\\"\\" - contact_SOME: ContactWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID + contact_SOME: ContactWhere @deprecated(reason: \\"Please use the relevant generic filter 'contact: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -1951,6 +2196,17 @@ describe("limitRequired constructor option", () => { union Contact = Email | Telephone + input ContactRelationshipFilters { + \\"\\"\\"Filter type where all of the related Contacts match this filter\\"\\"\\" + all: ContactWhere + \\"\\"\\"Filter type where none of the related Contacts match this filter\\"\\"\\" + none: ContactWhere + \\"\\"\\"Filter type where one of the related Contacts match this filter\\"\\"\\" + single: ContactWhere + \\"\\"\\"Filter type where some of the related Contacts match this filter\\"\\"\\" + some: ContactWhere + } + input ContactWhere { Email: EmailWhere Telephone: TelephoneWhere @@ -2027,18 +2283,20 @@ describe("limitRequired constructor option", () => { } input EmailUpdateInput { - address_SET: String + address: StringScalarMutations + address_SET: String @deprecated(reason: \\"Please use the generic mutation 'address: { set: ... } }' instead.\\") } input EmailWhere { AND: [EmailWhere!] NOT: EmailWhere OR: [EmailWhere!] - address_CONTAINS: String - address_ENDS_WITH: String - address_EQ: String - address_IN: [String!] - address_STARTS_WITH: String + address: StringScalarFilters + address_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter address: { contains: ... }\\") + address_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter address: { endsWith: ... }\\") + address_EQ: String @deprecated(reason: \\"Please use the relevant generic filter address: { eq: ... }\\") + address_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter address: { in: ... }\\") + address_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter address: { startsWith: ... }\\") } type EmailsConnection { @@ -2047,9 +2305,28 @@ describe("limitRequired constructor option", () => { totalCount: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -2059,6 +2336,31 @@ describe("limitRequired constructor option", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie implements Production { actors(limit: Int!, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -2079,7 +2381,6 @@ describe("limitRequired constructor option", () => { } type MovieActorActorsNodeAggregateSelection { - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -2087,6 +2388,7 @@ describe("limitRequired constructor option", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -2108,6 +2410,25 @@ describe("limitRequired constructor option", () => { 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 @@ -2145,31 +2466,22 @@ describe("limitRequired constructor option", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -2194,7 +2506,6 @@ describe("limitRequired constructor option", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! runtime: IntAggregateSelection! title: StringAggregateSelection! } @@ -2227,6 +2538,17 @@ describe("limitRequired constructor option", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -2238,58 +2560,66 @@ describe("limitRequired constructor option", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - id_SET: ID - runtime_DECREMENT: Int - runtime_INCREMENT: Int - runtime_SET: Int - title_SET: String + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + runtime: IntScalarMutations + runtime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { decrement: ... } }' instead.\\") + runtime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { increment: ... } }' instead.\\") + runtime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'runtime: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - runtime_EQ: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + runtime: IntScalarFilters + runtime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { eq: ... }\\") + runtime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gt: ... }\\") + runtime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gte: ... }\\") + runtime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter runtime: { in: ... }\\") + runtime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lt: ... }\\") + runtime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -2331,7 +2661,6 @@ describe("limitRequired constructor option", () => { type ProductionAggregateSelection { count: Int! - id: IDAggregateSelection! title: StringAggregateSelection! } @@ -2354,6 +2683,17 @@ describe("limitRequired constructor option", () => { Series } + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + \\"\\"\\" Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. \\"\\"\\" @@ -2363,25 +2703,29 @@ describe("limitRequired constructor option", () => { } input ProductionUpdateInput { - id_SET: ID - title_SET: String + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + typename: [ProductionImplementation!] } type ProductionsConnection { @@ -2421,7 +2765,6 @@ describe("limitRequired constructor option", () => { type SeriesAggregateSelection { count: Int! episodes: IntAggregateSelection! - id: IDAggregateSelection! title: StringAggregateSelection! } @@ -2452,33 +2795,39 @@ describe("limitRequired constructor option", () => { } input SeriesUpdateInput { - episodes_DECREMENT: Int - episodes_INCREMENT: Int - episodes_SET: Int - id_SET: ID - title_SET: String + episodes: IntScalarMutations + episodes_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodes: { decrement: ... } }' instead.\\") + episodes_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'episodes: { increment: ... } }' instead.\\") + episodes_SET: Int @deprecated(reason: \\"Please use the generic mutation 'episodes: { set: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input SeriesWhere { AND: [SeriesWhere!] NOT: SeriesWhere OR: [SeriesWhere!] - episodes_EQ: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + episodes: IntScalarFilters + episodes_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { eq: ... }\\") + episodes_GT: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { gt: ... }\\") + episodes_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { gte: ... }\\") + episodes_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter episodes: { in: ... }\\") + episodes_LT: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { lt: ... }\\") + episodes_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter episodes: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" @@ -2494,6 +2843,27 @@ describe("limitRequired constructor option", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Telephone { number: String! } @@ -2524,18 +2894,20 @@ describe("limitRequired constructor option", () => { } input TelephoneUpdateInput { - number_SET: String + number: StringScalarMutations + number_SET: String @deprecated(reason: \\"Please use the generic mutation 'number: { set: ... } }' instead.\\") } input TelephoneWhere { AND: [TelephoneWhere!] NOT: TelephoneWhere OR: [TelephoneWhere!] - number_CONTAINS: String - number_ENDS_WITH: String - number_EQ: String - number_IN: [String!] - number_STARTS_WITH: String + number: StringScalarFilters + number_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter number: { contains: ... }\\") + number_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter number: { endsWith: ... }\\") + number_EQ: String @deprecated(reason: \\"Please use the relevant generic filter number: { eq: ... }\\") + number_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter number: { in: ... }\\") + number_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter number: { startsWith: ... }\\") } type TelephonesConnection { @@ -2624,26 +2996,27 @@ describe("limitRequired constructor option", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_MAX_EQUAL: Int - screenTime_MAX_GT: Int - screenTime_MAX_GTE: Int - screenTime_MAX_LT: Int - screenTime_MAX_LTE: Int - screenTime_MIN_EQUAL: Int - screenTime_MIN_GT: Int - screenTime_MIN_GTE: Int - screenTime_MIN_LT: Int - screenTime_MIN_LTE: Int - screenTime_SUM_EQUAL: Int - screenTime_SUM_GT: Int - screenTime_SUM_GTE: Int - screenTime_SUM_LT: Int - screenTime_SUM_LTE: Int + screenTime: IntScalarAggregationFilters + screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { eq: ... } } }' instead.\\") + screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gt: ... } } }' instead.\\") + screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gte: ... } } }' instead.\\") + screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lt: ... } } }' instead.\\") + screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lte: ... } } }' instead.\\") + screenTime_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { eq: ... } } }' instead.\\") + screenTime_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gt: ... } } }' instead.\\") + screenTime_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gte: ... } } }' instead.\\") + screenTime_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lt: ... } } }' instead.\\") + screenTime_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lte: ... } } }' instead.\\") + screenTime_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { eq: ... } } }' instead.\\") + screenTime_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gt: ... } } }' instead.\\") + screenTime_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gte: ... } } }' instead.\\") + screenTime_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lt: ... } } }' instead.\\") + screenTime_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lte: ... } } }' instead.\\") + screenTime_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { eq: ... } } }' instead.\\") + screenTime_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gt: ... } } }' instead.\\") + screenTime_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gte: ... } } }' instead.\\") + screenTime_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lt: ... } } }' instead.\\") + screenTime_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lte: ... } } }' instead.\\") } input ActedInCreateInput { @@ -2655,21 +3028,23 @@ describe("limitRequired constructor option", () => { } input ActedInUpdateInput { - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - screenTime_SET: Int + screenTime: IntScalarMutations + screenTime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { decrement: ... } }' instead.\\") + screenTime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { increment: ... } }' instead.\\") + screenTime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'screenTime: { set: ... } }' instead.\\") } input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime_EQ: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int + screenTime: IntScalarFilters + screenTime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { eq: ... }\\") + screenTime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gt: ... }\\") + screenTime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gte: ... }\\") + screenTime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter screenTime: { in: ... }\\") + screenTime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lt: ... }\\") + screenTime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lte: ... }\\") } type Actor { @@ -2682,7 +3057,6 @@ describe("limitRequired constructor option", () => { type ActorAggregateSelection { count: Int! - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -2720,6 +3094,7 @@ describe("limitRequired constructor option", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -2740,6 +3115,25 @@ describe("limitRequired constructor option", () => { 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 @@ -2775,36 +3169,38 @@ describe("limitRequired constructor option", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + description: StringScalarAggregationFilters + description_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { eq: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gte: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lte: ... } } }' instead.\\") + description_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { eq: ... } } }' instead.\\") + description_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gt: ... } } }' instead.\\") + description_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gte: ... } } }' instead.\\") + description_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lt: ... } } }' instead.\\") + description_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { eq: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -2836,50 +3232,56 @@ describe("limitRequired constructor option", () => { } input ActorUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") movies: [ActorMoviesUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -2914,15 +3316,34 @@ describe("limitRequired constructor option", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + \\"\\"\\"The input for filtering a float\\"\\"\\" input FloatWhere { max: Float min: Float } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -2932,6 +3353,31 @@ describe("limitRequired constructor option", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie { description: String title: String @@ -2975,6 +3421,17 @@ describe("limitRequired constructor option", () => { score: FloatWhere } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -2984,24 +3441,28 @@ describe("limitRequired constructor option", () => { } input MovieUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -3057,6 +3518,27 @@ describe("limitRequired constructor option", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! @@ -3126,26 +3608,27 @@ describe("limitRequired constructor option", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_MAX_EQUAL: Int - screenTime_MAX_GT: Int - screenTime_MAX_GTE: Int - screenTime_MAX_LT: Int - screenTime_MAX_LTE: Int - screenTime_MIN_EQUAL: Int - screenTime_MIN_GT: Int - screenTime_MIN_GTE: Int - screenTime_MIN_LT: Int - screenTime_MIN_LTE: Int - screenTime_SUM_EQUAL: Int - screenTime_SUM_GT: Int - screenTime_SUM_GTE: Int - screenTime_SUM_LT: Int - screenTime_SUM_LTE: Int + screenTime: IntScalarAggregationFilters + screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { eq: ... } } }' instead.\\") + screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gt: ... } } }' instead.\\") + screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gte: ... } } }' instead.\\") + screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lt: ... } } }' instead.\\") + screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lte: ... } } }' instead.\\") + screenTime_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { eq: ... } } }' instead.\\") + screenTime_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gt: ... } } }' instead.\\") + screenTime_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gte: ... } } }' instead.\\") + screenTime_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lt: ... } } }' instead.\\") + screenTime_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lte: ... } } }' instead.\\") + screenTime_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { eq: ... } } }' instead.\\") + screenTime_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gt: ... } } }' instead.\\") + screenTime_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gte: ... } } }' instead.\\") + screenTime_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lt: ... } } }' instead.\\") + screenTime_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lte: ... } } }' instead.\\") + screenTime_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { eq: ... } } }' instead.\\") + screenTime_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gt: ... } } }' instead.\\") + screenTime_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gte: ... } } }' instead.\\") + screenTime_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lt: ... } } }' instead.\\") + screenTime_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lte: ... } } }' instead.\\") } input ActedInCreateInput { @@ -3157,21 +3640,23 @@ describe("limitRequired constructor option", () => { } input ActedInUpdateInput { - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - screenTime_SET: Int + screenTime: IntScalarMutations + screenTime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { decrement: ... } }' instead.\\") + screenTime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { increment: ... } }' instead.\\") + screenTime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'screenTime: { set: ... } }' instead.\\") } input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime_EQ: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int + screenTime: IntScalarFilters + screenTime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { eq: ... }\\") + screenTime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gt: ... }\\") + screenTime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gte: ... }\\") + screenTime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter screenTime: { in: ... }\\") + screenTime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lt: ... }\\") + screenTime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lte: ... }\\") } type Actor { @@ -3184,7 +3669,6 @@ describe("limitRequired constructor option", () => { type ActorAggregateSelection { count: Int! - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -3222,6 +3706,7 @@ describe("limitRequired constructor option", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -3242,6 +3727,25 @@ describe("limitRequired constructor option", () => { 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 @@ -3277,36 +3781,38 @@ describe("limitRequired constructor option", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - description_AVERAGE_LENGTH_EQUAL: Float - description_AVERAGE_LENGTH_GT: Float - description_AVERAGE_LENGTH_GTE: Float - description_AVERAGE_LENGTH_LT: Float - description_AVERAGE_LENGTH_LTE: Float - description_LONGEST_LENGTH_EQUAL: Int - description_LONGEST_LENGTH_GT: Int - description_LONGEST_LENGTH_GTE: Int - description_LONGEST_LENGTH_LT: Int - description_LONGEST_LENGTH_LTE: Int - description_SHORTEST_LENGTH_EQUAL: Int - description_SHORTEST_LENGTH_GT: Int - description_SHORTEST_LENGTH_GTE: Int - description_SHORTEST_LENGTH_LT: Int - description_SHORTEST_LENGTH_LTE: Int - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + description: StringScalarAggregationFilters + description_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { eq: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { gte: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lt: ... } } }' instead.\\") + description_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'description: { averageLength: { lte: ... } } }' instead.\\") + description_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { eq: ... } } }' instead.\\") + description_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gt: ... } } }' instead.\\") + description_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { gte: ... } } }' instead.\\") + description_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lt: ... } } }' instead.\\") + description_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { longestLength: { lte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { eq: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { gte: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lt: ... } } }' instead.\\") + description_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'description: { shortestLength: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -3338,50 +3844,56 @@ describe("limitRequired constructor option", () => { } input ActorUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") movies: [ActorMoviesUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -3416,15 +3928,34 @@ describe("limitRequired constructor option", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + \\"\\"\\"The input for filtering a float\\"\\"\\" input FloatWhere { max: Float min: Float } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -3434,6 +3965,31 @@ describe("limitRequired constructor option", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie { description: String title: String @@ -3477,6 +4033,17 @@ describe("limitRequired constructor option", () => { score: FloatWhere } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -3486,24 +4053,28 @@ describe("limitRequired constructor option", () => { } input MovieUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -3559,6 +4130,27 @@ describe("limitRequired constructor option", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/lowercase-type-names.test.ts b/packages/graphql/tests/schema/lowercase-type-names.test.ts index e531cc339c..aefb674e1a 100644 --- a/packages/graphql/tests/schema/lowercase-type-names.test.ts +++ b/packages/graphql/tests/schema/lowercase-type-names.test.ts @@ -82,6 +82,27 @@ describe("lower case type names", () => { min: DateTime } + \\"\\"\\"Filters for an aggregation of an DateTime input field\\"\\"\\" + input DateTimeScalarAggregationFilters { + max: DateTimeScalarFilters + min: DateTimeScalarFilters + } + + \\"\\"\\"DateTime filters\\"\\"\\" + input DateTimeScalarFilters { + eq: DateTime + gt: DateTime + gte: DateTime + in: [DateTime!] + lt: DateTime + lte: DateTime + } + + \\"\\"\\"DateTime mutations\\"\\"\\" + input DateTimeScalarMutations { + set: DateTime + } + \\"\\"\\" Information about the number of nodes and relationships deleted during a delete mutation \\"\\"\\" @@ -90,6 +111,16 @@ describe("lower case type names", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + type IntAggregateSelection { average: Float max: Int @@ -97,6 +128,31 @@ describe("lower case type names", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type MoviesConnection { edges: [movieEdge!]! pageInfo: PageInfo! @@ -142,6 +198,27 @@ describe("lower case type names", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [actor!]! info: UpdateInfo! @@ -210,6 +287,7 @@ describe("lower case type names", () => { AND: [actorMoviesAggregateInput!] NOT: actorMoviesAggregateInput OR: [actorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -229,6 +307,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 } @@ -263,66 +360,70 @@ describe("lower case type names", () => { AND: [actorMoviesNodeAggregationWhereInput!] NOT: actorMoviesNodeAggregationWhereInput OR: [actorMoviesNodeAggregationWhereInput!] - createdAt_MAX_EQUAL: DateTime - createdAt_MAX_GT: DateTime - createdAt_MAX_GTE: DateTime - createdAt_MAX_LT: DateTime - createdAt_MAX_LTE: DateTime - createdAt_MIN_EQUAL: DateTime - createdAt_MIN_GT: DateTime - createdAt_MIN_GTE: DateTime - createdAt_MIN_LT: DateTime - createdAt_MIN_LTE: DateTime - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int - testId_AVERAGE_LENGTH_EQUAL: Float - testId_AVERAGE_LENGTH_GT: Float - testId_AVERAGE_LENGTH_GTE: Float - testId_AVERAGE_LENGTH_LT: Float - testId_AVERAGE_LENGTH_LTE: Float - testId_LONGEST_LENGTH_EQUAL: Int - testId_LONGEST_LENGTH_GT: Int - testId_LONGEST_LENGTH_GTE: Int - testId_LONGEST_LENGTH_LT: Int - testId_LONGEST_LENGTH_LTE: Int - testId_SHORTEST_LENGTH_EQUAL: Int - testId_SHORTEST_LENGTH_GT: Int - testId_SHORTEST_LENGTH_GTE: Int - testId_SHORTEST_LENGTH_LT: Int - testId_SHORTEST_LENGTH_LTE: Int - year_AVERAGE_EQUAL: Float - year_AVERAGE_GT: Float - year_AVERAGE_GTE: Float - year_AVERAGE_LT: Float - year_AVERAGE_LTE: Float - year_MAX_EQUAL: Int - year_MAX_GT: Int - year_MAX_GTE: Int - year_MAX_LT: Int - year_MAX_LTE: Int - year_MIN_EQUAL: Int - year_MIN_GT: Int - year_MIN_GTE: Int - year_MIN_LT: Int - year_MIN_LTE: Int - year_SUM_EQUAL: Int - year_SUM_GT: Int - year_SUM_GTE: Int - year_SUM_LT: Int - year_SUM_LTE: Int + createdAt: DateTimeScalarAggregationFilters + createdAt_MAX_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { eq: ... } } }' instead.\\") + createdAt_MAX_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { gt: ... } } }' instead.\\") + createdAt_MAX_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { gte: ... } } }' instead.\\") + createdAt_MAX_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { lt: ... } } }' instead.\\") + createdAt_MAX_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { lte: ... } } }' instead.\\") + createdAt_MIN_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { eq: ... } } }' instead.\\") + createdAt_MIN_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { gt: ... } } }' instead.\\") + createdAt_MIN_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { gte: ... } } }' instead.\\") + createdAt_MIN_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { lt: ... } } }' instead.\\") + createdAt_MIN_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { lte: ... } } }' instead.\\") + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") + testId: StringScalarAggregationFilters + testId_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'testId: { averageLength: { eq: ... } } }' instead.\\") + testId_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'testId: { averageLength: { gt: ... } } }' instead.\\") + testId_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'testId: { averageLength: { gte: ... } } }' instead.\\") + testId_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'testId: { averageLength: { lt: ... } } }' instead.\\") + testId_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'testId: { averageLength: { lte: ... } } }' instead.\\") + testId_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'testId: { longestLength: { eq: ... } } }' instead.\\") + testId_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'testId: { longestLength: { gt: ... } } }' instead.\\") + testId_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'testId: { longestLength: { gte: ... } } }' instead.\\") + testId_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'testId: { longestLength: { lt: ... } } }' instead.\\") + testId_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'testId: { longestLength: { lte: ... } } }' instead.\\") + testId_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'testId: { shortestLength: { eq: ... } } }' instead.\\") + testId_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'testId: { shortestLength: { gt: ... } } }' instead.\\") + testId_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'testId: { shortestLength: { gte: ... } } }' instead.\\") + testId_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'testId: { shortestLength: { lt: ... } } }' instead.\\") + testId_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'testId: { shortestLength: { lte: ... } } }' instead.\\") + year: IntScalarAggregationFilters + year_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'year: { average: { eq: ... } } }' instead.\\") + year_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'year: { average: { gt: ... } } }' instead.\\") + year_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'year: { average: { gte: ... } } }' instead.\\") + year_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'year: { average: { lt: ... } } }' instead.\\") + year_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'year: { average: { lte: ... } } }' instead.\\") + year_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { max: { eq: ... } } }' instead.\\") + year_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { max: { gt: ... } } }' instead.\\") + year_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { max: { gte: ... } } }' instead.\\") + year_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { max: { lt: ... } } }' instead.\\") + year_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { max: { lte: ... } } }' instead.\\") + year_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { min: { eq: ... } } }' instead.\\") + year_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { min: { gt: ... } } }' instead.\\") + year_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { min: { gte: ... } } }' instead.\\") + year_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { min: { lt: ... } } }' instead.\\") + year_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { min: { lte: ... } } }' instead.\\") + year_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { sum: { eq: ... } } }' instead.\\") + year_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { sum: { gt: ... } } }' instead.\\") + year_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { sum: { gte: ... } } }' instead.\\") + year_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { sum: { lt: ... } } }' instead.\\") + year_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { sum: { lte: ... } } }' instead.\\") } type actorMoviesRelationship { @@ -343,6 +444,17 @@ describe("lower case type names", () => { where: actorMoviesConnectionWhere } + input actorRelationshipFilters { + \\"\\"\\"Filter type where all of the related actors match this filter\\"\\"\\" + all: actorWhere + \\"\\"\\"Filter type where none of the related actors match this filter\\"\\"\\" + none: actorWhere + \\"\\"\\"Filter type where one of the related actors match this filter\\"\\"\\" + single: actorWhere + \\"\\"\\"Filter type where some of the related actors match this filter\\"\\"\\" + some: actorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one actorSort object. \\"\\"\\" @@ -353,60 +465,68 @@ describe("lower case type names", () => { } input actorUpdateInput { - createdAt_SET: DateTime + createdAt: DateTimeScalarMutations + createdAt_SET: DateTime @deprecated(reason: \\"Please use the generic mutation 'createdAt: { set: ... } }' instead.\\") movies: [actorMoviesUpdateFieldInput!] - name_SET: String - year_DECREMENT: Int - year_INCREMENT: Int - year_SET: Int + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") + year: IntScalarMutations + year_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'year: { decrement: ... } }' instead.\\") + year_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'year: { increment: ... } }' instead.\\") + year_SET: Int @deprecated(reason: \\"Please use the generic mutation 'year: { set: ... } }' instead.\\") } input actorWhere { AND: [actorWhere!] NOT: actorWhere OR: [actorWhere!] - createdAt_EQ: DateTime - createdAt_GT: DateTime - createdAt_GTE: DateTime - createdAt_IN: [DateTime] - createdAt_LT: DateTime - createdAt_LTE: DateTime + createdAt: DateTimeScalarFilters + createdAt_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { eq: ... }\\") + createdAt_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { gt: ... }\\") + createdAt_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { gte: ... }\\") + createdAt_IN: [DateTime] @deprecated(reason: \\"Please use the relevant generic filter createdAt: { in: ... }\\") + createdAt_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { lt: ... }\\") + createdAt_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { lte: ... }\\") + movies: movieRelationshipFilters moviesAggregate: actorMoviesAggregateInput + moviesConnection: actorMoviesConnectionFilters \\"\\"\\" Return actors where all of the related actorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: actorMoviesConnectionWhere + moviesConnection_ALL: actorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return actors where none of the related actorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: actorMoviesConnectionWhere + moviesConnection_NONE: actorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return actors where one of the related actorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: actorMoviesConnectionWhere + moviesConnection_SINGLE: actorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return actors where some of the related actorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: actorMoviesConnectionWhere + moviesConnection_SOME: actorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return actors where all of the related movies match this filter\\"\\"\\" - movies_ALL: movieWhere + movies_ALL: movieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return actors where none of the related movies match this filter\\"\\"\\" - movies_NONE: movieWhere + movies_NONE: movieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return actors where one of the related movies match this filter\\"\\"\\" - movies_SINGLE: movieWhere + movies_SINGLE: movieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return actors where some of the related movies match this filter\\"\\"\\" - movies_SOME: movieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - year_EQ: Int - year_GT: Int - year_GTE: Int - year_IN: [Int] - year_LT: Int - year_LTE: Int + movies_SOME: movieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + year: IntScalarFilters + year_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter year: { eq: ... }\\") + year_GT: Int @deprecated(reason: \\"Please use the relevant generic filter year: { gt: ... }\\") + year_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter year: { gte: ... }\\") + year_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter year: { in: ... }\\") + year_LT: Int @deprecated(reason: \\"Please use the relevant generic filter year: { lt: ... }\\") + year_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter year: { lte: ... }\\") } type actormovieMoviesAggregationSelection { @@ -435,6 +555,7 @@ describe("lower case type names", () => { AND: [movieActorsAggregateInput!] NOT: movieActorsAggregateInput OR: [movieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -454,6 +575,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 } @@ -488,51 +628,54 @@ describe("lower case type names", () => { AND: [movieActorsNodeAggregationWhereInput!] NOT: movieActorsNodeAggregationWhereInput OR: [movieActorsNodeAggregationWhereInput!] - createdAt_MAX_EQUAL: DateTime - createdAt_MAX_GT: DateTime - createdAt_MAX_GTE: DateTime - createdAt_MAX_LT: DateTime - createdAt_MAX_LTE: DateTime - createdAt_MIN_EQUAL: DateTime - createdAt_MIN_GT: DateTime - createdAt_MIN_GTE: DateTime - createdAt_MIN_LT: DateTime - createdAt_MIN_LTE: DateTime - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int - year_AVERAGE_EQUAL: Float - year_AVERAGE_GT: Float - year_AVERAGE_GTE: Float - year_AVERAGE_LT: Float - year_AVERAGE_LTE: Float - year_MAX_EQUAL: Int - year_MAX_GT: Int - year_MAX_GTE: Int - year_MAX_LT: Int - year_MAX_LTE: Int - year_MIN_EQUAL: Int - year_MIN_GT: Int - year_MIN_GTE: Int - year_MIN_LT: Int - year_MIN_LTE: Int - year_SUM_EQUAL: Int - year_SUM_GT: Int - year_SUM_GTE: Int - year_SUM_LT: Int - year_SUM_LTE: Int + createdAt: DateTimeScalarAggregationFilters + createdAt_MAX_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { eq: ... } } }' instead.\\") + createdAt_MAX_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { gt: ... } } }' instead.\\") + createdAt_MAX_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { gte: ... } } }' instead.\\") + createdAt_MAX_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { lt: ... } } }' instead.\\") + createdAt_MAX_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { lte: ... } } }' instead.\\") + createdAt_MIN_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { eq: ... } } }' instead.\\") + createdAt_MIN_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { gt: ... } } }' instead.\\") + createdAt_MIN_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { gte: ... } } }' instead.\\") + createdAt_MIN_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { lt: ... } } }' instead.\\") + createdAt_MIN_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { lte: ... } } }' instead.\\") + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") + year: IntScalarAggregationFilters + year_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'year: { average: { eq: ... } } }' instead.\\") + year_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'year: { average: { gt: ... } } }' instead.\\") + year_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'year: { average: { gte: ... } } }' instead.\\") + year_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'year: { average: { lt: ... } } }' instead.\\") + year_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'year: { average: { lte: ... } } }' instead.\\") + year_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { max: { eq: ... } } }' instead.\\") + year_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { max: { gt: ... } } }' instead.\\") + year_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { max: { gte: ... } } }' instead.\\") + year_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { max: { lt: ... } } }' instead.\\") + year_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { max: { lte: ... } } }' instead.\\") + year_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { min: { eq: ... } } }' instead.\\") + year_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { min: { gt: ... } } }' instead.\\") + year_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { min: { gte: ... } } }' instead.\\") + year_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { min: { lt: ... } } }' instead.\\") + year_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { min: { lte: ... } } }' instead.\\") + year_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { sum: { eq: ... } } }' instead.\\") + year_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { sum: { gt: ... } } }' instead.\\") + year_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { sum: { gte: ... } } }' instead.\\") + year_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { sum: { lt: ... } } }' instead.\\") + year_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'year: { sum: { lte: ... } } }' instead.\\") } type movieActorsRelationship { @@ -590,6 +733,17 @@ describe("lower case type names", () => { node: movie! } + input movieRelationshipFilters { + \\"\\"\\"Filter type where all of the related movies match this filter\\"\\"\\" + all: movieWhere + \\"\\"\\"Filter type where none of the related movies match this filter\\"\\"\\" + none: movieWhere + \\"\\"\\"Filter type where one of the related movies match this filter\\"\\"\\" + single: movieWhere + \\"\\"\\"Filter type where some of the related movies match this filter\\"\\"\\" + some: movieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one movieSort object. \\"\\"\\" @@ -602,65 +756,75 @@ describe("lower case type names", () => { input movieUpdateInput { actors: [movieActorsUpdateFieldInput!] - createdAt_SET: DateTime - name_SET: String - testId_SET: String - year_DECREMENT: Int - year_INCREMENT: Int - year_SET: Int + createdAt: DateTimeScalarMutations + createdAt_SET: DateTime @deprecated(reason: \\"Please use the generic mutation 'createdAt: { set: ... } }' instead.\\") + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") + testId: StringScalarMutations + testId_SET: String @deprecated(reason: \\"Please use the generic mutation 'testId: { set: ... } }' instead.\\") + year: IntScalarMutations + year_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'year: { decrement: ... } }' instead.\\") + year_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'year: { increment: ... } }' instead.\\") + year_SET: Int @deprecated(reason: \\"Please use the generic mutation 'year: { set: ... } }' instead.\\") } input movieWhere { AND: [movieWhere!] NOT: movieWhere OR: [movieWhere!] + actors: actorRelationshipFilters actorsAggregate: movieActorsAggregateInput + actorsConnection: movieActorsConnectionFilters \\"\\"\\" Return movies where all of the related movieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: movieActorsConnectionWhere + actorsConnection_ALL: movieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return movies where none of the related movieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: movieActorsConnectionWhere + actorsConnection_NONE: movieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return movies where one of the related movieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: movieActorsConnectionWhere + actorsConnection_SINGLE: movieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return movies where some of the related movieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: movieActorsConnectionWhere + actorsConnection_SOME: movieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return movies where all of the related actors match this filter\\"\\"\\" - actors_ALL: actorWhere + actors_ALL: actorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return movies where none of the related actors match this filter\\"\\"\\" - actors_NONE: actorWhere + actors_NONE: actorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return movies where one of the related actors match this filter\\"\\"\\" - actors_SINGLE: actorWhere + actors_SINGLE: actorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return movies where some of the related actors match this filter\\"\\"\\" - actors_SOME: actorWhere - createdAt_EQ: DateTime - createdAt_GT: DateTime - createdAt_GTE: DateTime - createdAt_IN: [DateTime] - createdAt_LT: DateTime - createdAt_LTE: DateTime - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - testId_CONTAINS: String - testId_ENDS_WITH: String - testId_EQ: String - testId_IN: [String] - testId_STARTS_WITH: String - year_EQ: Int - year_GT: Int - year_GTE: Int - year_IN: [Int] - year_LT: Int - year_LTE: Int + actors_SOME: actorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + createdAt: DateTimeScalarFilters + createdAt_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { eq: ... }\\") + createdAt_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { gt: ... }\\") + createdAt_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { gte: ... }\\") + createdAt_IN: [DateTime] @deprecated(reason: \\"Please use the relevant generic filter createdAt: { in: ... }\\") + createdAt_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { lt: ... }\\") + createdAt_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { lte: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + testId: StringScalarFilters + testId_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter testId: { contains: ... }\\") + testId_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter testId: { endsWith: ... }\\") + testId_EQ: String @deprecated(reason: \\"Please use the relevant generic filter testId: { eq: ... }\\") + testId_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter testId: { in: ... }\\") + testId_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter testId: { startsWith: ... }\\") + year: IntScalarFilters + year_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter year: { eq: ... }\\") + year_GT: Int @deprecated(reason: \\"Please use the relevant generic filter year: { gt: ... }\\") + year_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter year: { gte: ... }\\") + year_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter year: { in: ... }\\") + year_LT: Int @deprecated(reason: \\"Please use the relevant generic filter year: { lt: ... }\\") + year_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter year: { lte: ... }\\") } type movieactorActorsAggregationSelection { diff --git a/packages/graphql/tests/schema/math.test.ts b/packages/graphql/tests/schema/math.test.ts index 928d88bcfa..b0fc8b0ecc 100644 --- a/packages/graphql/tests/schema/math.test.ts +++ b/packages/graphql/tests/schema/math.test.ts @@ -59,9 +59,18 @@ describe("Algebraic", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -71,6 +80,23 @@ describe("Algebraic", () => { sum: Int } + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie { id: ID viewers: Int! @@ -78,7 +104,6 @@ describe("Algebraic", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! viewers: IntAggregateSelection! } @@ -101,27 +126,31 @@ describe("Algebraic", () => { } input MovieUpdateInput { - id_SET: ID - viewers_DECREMENT: Int - viewers_INCREMENT: Int - viewers_SET: Int + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + viewers: IntScalarMutations + viewers_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'viewers: { decrement: ... } }' instead.\\") + viewers_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'viewers: { increment: ... } }' instead.\\") + viewers_SET: Int @deprecated(reason: \\"Please use the generic mutation 'viewers: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - viewers_EQ: Int - viewers_GT: Int - viewers_GTE: Int - viewers_IN: [Int!] - viewers_LT: Int - viewers_LTE: Int + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + viewers: IntScalarFilters + viewers_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter viewers: { eq: ... }\\") + viewers_GT: Int @deprecated(reason: \\"Please use the relevant generic filter viewers: { gt: ... }\\") + viewers_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter viewers: { gte: ... }\\") + viewers_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter viewers: { in: ... }\\") + viewers_LT: Int @deprecated(reason: \\"Please use the relevant generic filter viewers: { lt: ... }\\") + viewers_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter viewers: { lte: ... }\\") } type MoviesConnection { @@ -202,6 +231,23 @@ describe("Algebraic", () => { sum: BigInt } + \\"\\"\\"BigInt filters\\"\\"\\" + input BigIntScalarFilters { + eq: BigInt + gt: BigInt + gte: BigInt + in: [BigInt!] + lt: BigInt + lte: BigInt + } + + \\"\\"\\"BigInt mutations\\"\\"\\" + input BigIntScalarMutations { + add: BigInt + set: BigInt + subtract: BigInt + } + \\"\\"\\" Information about the number of nodes and relationships created during a create mutation \\"\\"\\" @@ -223,9 +269,18 @@ describe("Algebraic", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -235,7 +290,6 @@ describe("Algebraic", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! viewers: BigIntAggregateSelection! } @@ -258,27 +312,31 @@ describe("Algebraic", () => { } input MovieUpdateInput { - id_SET: ID - viewers_DECREMENT: BigInt - viewers_INCREMENT: BigInt - viewers_SET: BigInt + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + viewers: BigIntScalarMutations + viewers_DECREMENT: BigInt @deprecated(reason: \\"Please use the relevant generic mutation 'viewers: { decrement: ... } }' instead.\\") + viewers_INCREMENT: BigInt @deprecated(reason: \\"Please use the relevant generic mutation 'viewers: { increment: ... } }' instead.\\") + viewers_SET: BigInt @deprecated(reason: \\"Please use the generic mutation 'viewers: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - viewers_EQ: BigInt - viewers_GT: BigInt - viewers_GTE: BigInt - viewers_IN: [BigInt!] - viewers_LT: BigInt - viewers_LTE: BigInt + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + viewers: BigIntScalarFilters + viewers_EQ: BigInt @deprecated(reason: \\"Please use the relevant generic filter viewers: { eq: ... }\\") + viewers_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter viewers: { gt: ... }\\") + viewers_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter viewers: { gte: ... }\\") + viewers_IN: [BigInt!] @deprecated(reason: \\"Please use the relevant generic filter viewers: { in: ... }\\") + viewers_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter viewers: { lt: ... }\\") + viewers_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter viewers: { lte: ... }\\") } type MoviesConnection { @@ -376,9 +434,37 @@ describe("Algebraic", () => { sum: Float } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -388,7 +474,6 @@ describe("Algebraic", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! viewers: FloatAggregateSelection! } @@ -411,29 +496,33 @@ describe("Algebraic", () => { } input MovieUpdateInput { - id_SET: ID - viewers_ADD: Float - viewers_DIVIDE: Float - viewers_MULTIPLY: Float - viewers_SET: Float - viewers_SUBTRACT: Float + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + viewers: FloatScalarMutations + viewers_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'viewers: { add: ... } }' instead.\\") + viewers_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'viewers: { divide: ... } }' instead.\\") + viewers_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'viewers: { multiply: ... } }' instead.\\") + viewers_SET: Float @deprecated(reason: \\"Please use the generic mutation 'viewers: { set: ... } }' instead.\\") + viewers_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'viewers: { subtract: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - viewers_EQ: Float - viewers_GT: Float - viewers_GTE: Float - viewers_IN: [Float!] - viewers_LT: Float - viewers_LTE: Float + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + viewers: FloatScalarFilters + viewers_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter viewers: { eq: ... }\\") + viewers_GT: Float @deprecated(reason: \\"Please use the relevant generic filter viewers: { gt: ... }\\") + viewers_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter viewers: { gte: ... }\\") + viewers_IN: [Float!] @deprecated(reason: \\"Please use the relevant generic filter viewers: { in: ... }\\") + viewers_LT: Float @deprecated(reason: \\"Please use the relevant generic filter viewers: { lt: ... }\\") + viewers_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter viewers: { lte: ... }\\") } type MoviesConnection { @@ -567,6 +656,7 @@ describe("Algebraic", () => { AND: [DirectorDirectsAggregateInput!] NOT: DirectorDirectsAggregateInput OR: [DirectorDirectsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -586,6 +676,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 } @@ -620,36 +729,27 @@ describe("Algebraic", () => { AND: [DirectorDirectsNodeAggregationWhereInput!] NOT: DirectorDirectsNodeAggregationWhereInput OR: [DirectorDirectsNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - viewers_AVERAGE_EQUAL: Float - viewers_AVERAGE_GT: Float - viewers_AVERAGE_GTE: Float - viewers_AVERAGE_LT: Float - viewers_AVERAGE_LTE: Float - viewers_MAX_EQUAL: Int - viewers_MAX_GT: Int - viewers_MAX_GTE: Int - viewers_MAX_LT: Int - viewers_MAX_LTE: Int - viewers_MIN_EQUAL: Int - viewers_MIN_GT: Int - viewers_MIN_GTE: Int - viewers_MIN_LT: Int - viewers_MIN_LTE: Int - viewers_SUM_EQUAL: Int - viewers_SUM_GT: Int - viewers_SUM_GTE: Int - viewers_SUM_LT: Int - viewers_SUM_LTE: Int + viewers: IntScalarAggregationFilters + viewers_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { average: { eq: ... } } }' instead.\\") + viewers_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { average: { gt: ... } } }' instead.\\") + viewers_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { average: { gte: ... } } }' instead.\\") + viewers_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { average: { lt: ... } } }' instead.\\") + viewers_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { average: { lte: ... } } }' instead.\\") + viewers_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { max: { eq: ... } } }' instead.\\") + viewers_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { max: { gt: ... } } }' instead.\\") + viewers_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { max: { gte: ... } } }' instead.\\") + viewers_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { max: { lt: ... } } }' instead.\\") + viewers_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { max: { lte: ... } } }' instead.\\") + viewers_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { min: { eq: ... } } }' instead.\\") + viewers_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { min: { gt: ... } } }' instead.\\") + viewers_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { min: { gte: ... } } }' instead.\\") + viewers_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { min: { lt: ... } } }' instead.\\") + viewers_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { min: { lte: ... } } }' instead.\\") + viewers_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { sum: { eq: ... } } }' instead.\\") + viewers_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { sum: { gt: ... } } }' instead.\\") + viewers_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { sum: { gte: ... } } }' instead.\\") + viewers_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { sum: { lt: ... } } }' instead.\\") + viewers_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { sum: { lte: ... } } }' instead.\\") } type DirectorDirectsRelationship { @@ -685,10 +785,20 @@ describe("Algebraic", () => { } type DirectorMovieDirectsNodeAggregateSelection { - id: IDAggregateSelection! viewers: IntAggregateSelection! } + input DirectorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Directors match this filter\\"\\"\\" + all: DirectorWhere + \\"\\"\\"Filter type where none of the related Directors match this filter\\"\\"\\" + none: DirectorWhere + \\"\\"\\"Filter type where one of the related Directors match this filter\\"\\"\\" + single: DirectorWhere + \\"\\"\\"Filter type where some of the related Directors match this filter\\"\\"\\" + some: DirectorWhere + } + \\"\\"\\" Fields to sort Directors by. The order in which sorts are applied is not guaranteed when specifying many fields in one DirectorSort object. \\"\\"\\" @@ -698,43 +808,47 @@ describe("Algebraic", () => { input DirectorUpdateInput { directs: [DirectorDirectsUpdateFieldInput!] - lastName_SET: String + lastName: StringScalarMutations + lastName_SET: String @deprecated(reason: \\"Please use the generic mutation 'lastName: { set: ... } }' instead.\\") } input DirectorWhere { AND: [DirectorWhere!] NOT: DirectorWhere OR: [DirectorWhere!] + directs: MovieRelationshipFilters directsAggregate: DirectorDirectsAggregateInput + directsConnection: DirectorDirectsConnectionFilters \\"\\"\\" Return Directors where all of the related DirectorDirectsConnections match this filter \\"\\"\\" - directsConnection_ALL: DirectorDirectsConnectionWhere + directsConnection_ALL: DirectorDirectsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Directors where none of the related DirectorDirectsConnections match this filter \\"\\"\\" - directsConnection_NONE: DirectorDirectsConnectionWhere + directsConnection_NONE: DirectorDirectsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Directors where one of the related DirectorDirectsConnections match this filter \\"\\"\\" - directsConnection_SINGLE: DirectorDirectsConnectionWhere + directsConnection_SINGLE: DirectorDirectsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Directors where some of the related DirectorDirectsConnections match this filter \\"\\"\\" - directsConnection_SOME: DirectorDirectsConnectionWhere + directsConnection_SOME: DirectorDirectsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Directors where all of the related Movies match this filter\\"\\"\\" - directs_ALL: MovieWhere + directs_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'directs: { all: ... }' instead.\\") \\"\\"\\"Return Directors where none of the related Movies match this filter\\"\\"\\" - directs_NONE: MovieWhere + directs_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'directs: { none: ... }' instead.\\") \\"\\"\\"Return Directors where one of the related Movies match this filter\\"\\"\\" - directs_SINGLE: MovieWhere + directs_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'directs: { single: ... }' instead.\\") \\"\\"\\"Return Directors where some of the related Movies match this filter\\"\\"\\" - directs_SOME: MovieWhere - lastName_CONTAINS: String - lastName_ENDS_WITH: String - lastName_EQ: String - lastName_IN: [String!] - lastName_STARTS_WITH: String + directs_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'directs: { some: ... }' instead.\\") + lastName: StringScalarFilters + lastName_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter lastName: { contains: ... }\\") + lastName_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter lastName: { endsWith: ... }\\") + lastName_EQ: String @deprecated(reason: \\"Please use the relevant generic filter lastName: { eq: ... }\\") + lastName_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter lastName: { in: ... }\\") + lastName_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter lastName: { startsWith: ... }\\") } type DirectorsConnection { @@ -743,9 +857,28 @@ describe("Algebraic", () => { totalCount: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -755,6 +888,31 @@ describe("Algebraic", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie { directedBy(limit: Int, offset: Int, sort: [DirectorSort!], where: DirectorWhere): [Director!]! directedByAggregate(where: DirectorWhere): MovieDirectorDirectedByAggregationSelection @@ -765,7 +923,6 @@ describe("Algebraic", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! viewers: IntAggregateSelection! } @@ -791,6 +948,7 @@ describe("Algebraic", () => { AND: [MovieDirectedByAggregateInput!] NOT: MovieDirectedByAggregateInput OR: [MovieDirectedByAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -810,6 +968,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 } @@ -844,21 +1021,22 @@ describe("Algebraic", () => { AND: [MovieDirectedByNodeAggregationWhereInput!] NOT: MovieDirectedByNodeAggregationWhereInput OR: [MovieDirectedByNodeAggregationWhereInput!] - lastName_AVERAGE_LENGTH_EQUAL: Float - lastName_AVERAGE_LENGTH_GT: Float - lastName_AVERAGE_LENGTH_GTE: Float - lastName_AVERAGE_LENGTH_LT: Float - lastName_AVERAGE_LENGTH_LTE: Float - lastName_LONGEST_LENGTH_EQUAL: Int - lastName_LONGEST_LENGTH_GT: Int - lastName_LONGEST_LENGTH_GTE: Int - lastName_LONGEST_LENGTH_LT: Int - lastName_LONGEST_LENGTH_LTE: Int - lastName_SHORTEST_LENGTH_EQUAL: Int - lastName_SHORTEST_LENGTH_GT: Int - lastName_SHORTEST_LENGTH_GTE: Int - lastName_SHORTEST_LENGTH_LT: Int - lastName_SHORTEST_LENGTH_LTE: Int + lastName: StringScalarAggregationFilters + lastName_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'lastName: { averageLength: { eq: ... } } }' instead.\\") + lastName_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'lastName: { averageLength: { gt: ... } } }' instead.\\") + lastName_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'lastName: { averageLength: { gte: ... } } }' instead.\\") + lastName_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'lastName: { averageLength: { lt: ... } } }' instead.\\") + lastName_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'lastName: { averageLength: { lte: ... } } }' instead.\\") + lastName_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'lastName: { longestLength: { eq: ... } } }' instead.\\") + lastName_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'lastName: { longestLength: { gt: ... } } }' instead.\\") + lastName_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'lastName: { longestLength: { gte: ... } } }' instead.\\") + lastName_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'lastName: { longestLength: { lt: ... } } }' instead.\\") + lastName_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'lastName: { longestLength: { lte: ... } } }' instead.\\") + lastName_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'lastName: { shortestLength: { eq: ... } } }' instead.\\") + lastName_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'lastName: { shortestLength: { gt: ... } } }' instead.\\") + lastName_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'lastName: { shortestLength: { gte: ... } } }' instead.\\") + lastName_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'lastName: { shortestLength: { lt: ... } } }' instead.\\") + lastName_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'lastName: { shortestLength: { lte: ... } } }' instead.\\") } type MovieDirectedByRelationship { @@ -897,6 +1075,17 @@ describe("Algebraic", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -907,52 +1096,58 @@ describe("Algebraic", () => { input MovieUpdateInput { directedBy: [MovieDirectedByUpdateFieldInput!] - id_SET: ID - viewers_DECREMENT: Int - viewers_INCREMENT: Int - viewers_SET: Int + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + viewers: IntScalarMutations + viewers_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'viewers: { decrement: ... } }' instead.\\") + viewers_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'viewers: { increment: ... } }' instead.\\") + viewers_SET: Int @deprecated(reason: \\"Please use the generic mutation 'viewers: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + directedBy: DirectorRelationshipFilters directedByAggregate: MovieDirectedByAggregateInput + directedByConnection: MovieDirectedByConnectionFilters \\"\\"\\" Return Movies where all of the related MovieDirectedByConnections match this filter \\"\\"\\" - directedByConnection_ALL: MovieDirectedByConnectionWhere + directedByConnection_ALL: MovieDirectedByConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directedByConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieDirectedByConnections match this filter \\"\\"\\" - directedByConnection_NONE: MovieDirectedByConnectionWhere + directedByConnection_NONE: MovieDirectedByConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directedByConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieDirectedByConnections match this filter \\"\\"\\" - directedByConnection_SINGLE: MovieDirectedByConnectionWhere + directedByConnection_SINGLE: MovieDirectedByConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directedByConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieDirectedByConnections match this filter \\"\\"\\" - directedByConnection_SOME: MovieDirectedByConnectionWhere + directedByConnection_SOME: MovieDirectedByConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directedByConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Directors match this filter\\"\\"\\" - directedBy_ALL: DirectorWhere + directedBy_ALL: DirectorWhere @deprecated(reason: \\"Please use the relevant generic filter 'directedBy: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Directors match this filter\\"\\"\\" - directedBy_NONE: DirectorWhere + directedBy_NONE: DirectorWhere @deprecated(reason: \\"Please use the relevant generic filter 'directedBy: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Directors match this filter\\"\\"\\" - directedBy_SINGLE: DirectorWhere + directedBy_SINGLE: DirectorWhere @deprecated(reason: \\"Please use the relevant generic filter 'directedBy: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Directors match this filter\\"\\"\\" - directedBy_SOME: DirectorWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - viewers_EQ: Int - viewers_GT: Int - viewers_GTE: Int - viewers_IN: [Int!] - viewers_LT: Int - viewers_LTE: Int + directedBy_SOME: DirectorWhere @deprecated(reason: \\"Please use the relevant generic filter 'directedBy: { some: ... }' instead.\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + viewers: IntScalarFilters + viewers_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter viewers: { eq: ... }\\") + viewers_GT: Int @deprecated(reason: \\"Please use the relevant generic filter viewers: { gt: ... }\\") + viewers_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter viewers: { gte: ... }\\") + viewers_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter viewers: { in: ... }\\") + viewers_LT: Int @deprecated(reason: \\"Please use the relevant generic filter viewers: { lt: ... }\\") + viewers_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter viewers: { lte: ... }\\") } type MoviesConnection { @@ -1000,6 +1195,27 @@ describe("Algebraic", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateDirectorsMutationResponse { directors: [Director!]! info: UpdateInfo! @@ -1073,9 +1289,28 @@ describe("Algebraic", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -1085,6 +1320,31 @@ describe("Algebraic", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie implements Production { id: ID viewers: Int! @@ -1095,7 +1355,6 @@ describe("Algebraic", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! viewers: IntAggregateSelection! } @@ -1132,10 +1391,12 @@ describe("Algebraic", () => { } input MovieUpdateInput { - id_SET: ID - viewers_DECREMENT: Int - viewers_INCREMENT: Int - viewers_SET: Int + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + viewers: IntScalarMutations + viewers_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'viewers: { decrement: ... } }' instead.\\") + viewers_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'viewers: { increment: ... } }' instead.\\") + viewers_SET: Int @deprecated(reason: \\"Please use the generic mutation 'viewers: { set: ... } }' instead.\\") workers: [MovieWorkersUpdateFieldInput!] } @@ -1143,48 +1404,53 @@ describe("Algebraic", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - viewers_EQ: Int - viewers_GT: Int - viewers_GTE: Int - viewers_IN: [Int!] - viewers_LT: Int - viewers_LTE: Int + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + viewers: IntScalarFilters + viewers_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter viewers: { eq: ... }\\") + viewers_GT: Int @deprecated(reason: \\"Please use the relevant generic filter viewers: { gt: ... }\\") + viewers_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter viewers: { gte: ... }\\") + viewers_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter viewers: { in: ... }\\") + viewers_LT: Int @deprecated(reason: \\"Please use the relevant generic filter viewers: { lt: ... }\\") + viewers_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter viewers: { lte: ... }\\") + workers: PersonRelationshipFilters workersAggregate: MovieWorkersAggregateInput + workersConnection: MovieWorkersConnectionFilters \\"\\"\\" Return Movies where all of the related MovieWorkersConnections match this filter \\"\\"\\" - workersConnection_ALL: MovieWorkersConnectionWhere + workersConnection_ALL: MovieWorkersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'workersConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieWorkersConnections match this filter \\"\\"\\" - workersConnection_NONE: MovieWorkersConnectionWhere + workersConnection_NONE: MovieWorkersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'workersConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieWorkersConnections match this filter \\"\\"\\" - workersConnection_SINGLE: MovieWorkersConnectionWhere + workersConnection_SINGLE: MovieWorkersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'workersConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieWorkersConnections match this filter \\"\\"\\" - workersConnection_SOME: MovieWorkersConnectionWhere + workersConnection_SOME: MovieWorkersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'workersConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - workers_ALL: PersonWhere + workers_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'workers: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - workers_NONE: PersonWhere + workers_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'workers: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - workers_SINGLE: PersonWhere + workers_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'workers: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - workers_SOME: PersonWhere + workers_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'workers: { some: ... }' instead.\\") } input MovieWorkersAggregateInput { AND: [MovieWorkersAggregateInput!] NOT: MovieWorkersAggregateInput OR: [MovieWorkersAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1204,6 +1470,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 } @@ -1238,21 +1523,22 @@ describe("Algebraic", () => { AND: [MovieWorkersNodeAggregationWhereInput!] NOT: MovieWorkersNodeAggregationWhereInput OR: [MovieWorkersNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieWorkersRelationship { @@ -1349,6 +1635,17 @@ describe("Algebraic", () => { viewers: IntAggregateSelection! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -1357,7 +1654,8 @@ describe("Algebraic", () => { } input PersonUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") worksInProduction: [PersonWorksInProductionUpdateFieldInput!] } @@ -1365,42 +1663,46 @@ describe("Algebraic", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + worksInProduction: ProductionRelationshipFilters worksInProductionAggregate: PersonWorksInProductionAggregateInput + worksInProductionConnection: PersonWorksInProductionConnectionFilters \\"\\"\\" Return People where all of the related PersonWorksInProductionConnections match this filter \\"\\"\\" - worksInProductionConnection_ALL: PersonWorksInProductionConnectionWhere + worksInProductionConnection_ALL: PersonWorksInProductionConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'worksInProductionConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return People where none of the related PersonWorksInProductionConnections match this filter \\"\\"\\" - worksInProductionConnection_NONE: PersonWorksInProductionConnectionWhere + worksInProductionConnection_NONE: PersonWorksInProductionConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'worksInProductionConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return People where one of the related PersonWorksInProductionConnections match this filter \\"\\"\\" - worksInProductionConnection_SINGLE: PersonWorksInProductionConnectionWhere + worksInProductionConnection_SINGLE: PersonWorksInProductionConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'worksInProductionConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return People where some of the related PersonWorksInProductionConnections match this filter \\"\\"\\" - worksInProductionConnection_SOME: PersonWorksInProductionConnectionWhere + worksInProductionConnection_SOME: PersonWorksInProductionConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'worksInProductionConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return People where all of the related Productions match this filter\\"\\"\\" - worksInProduction_ALL: ProductionWhere + worksInProduction_ALL: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'worksInProduction: { all: ... }' instead.\\") \\"\\"\\"Return People where none of the related Productions match this filter\\"\\"\\" - worksInProduction_NONE: ProductionWhere + worksInProduction_NONE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'worksInProduction: { none: ... }' instead.\\") \\"\\"\\"Return People where one of the related Productions match this filter\\"\\"\\" - worksInProduction_SINGLE: ProductionWhere + worksInProduction_SINGLE: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'worksInProduction: { single: ... }' instead.\\") \\"\\"\\"Return People where some of the related Productions match this filter\\"\\"\\" - worksInProduction_SOME: ProductionWhere + worksInProduction_SOME: ProductionWhere @deprecated(reason: \\"Please use the relevant generic filter 'worksInProduction: { some: ... }' instead.\\") } input PersonWorksInProductionAggregateInput { AND: [PersonWorksInProductionAggregateInput!] NOT: PersonWorksInProductionAggregateInput OR: [PersonWorksInProductionAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1419,6 +1721,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 } @@ -1451,26 +1772,27 @@ describe("Algebraic", () => { AND: [PersonWorksInProductionNodeAggregationWhereInput!] NOT: PersonWorksInProductionNodeAggregationWhereInput OR: [PersonWorksInProductionNodeAggregationWhereInput!] - viewers_AVERAGE_EQUAL: Float - viewers_AVERAGE_GT: Float - viewers_AVERAGE_GTE: Float - viewers_AVERAGE_LT: Float - viewers_AVERAGE_LTE: Float - viewers_MAX_EQUAL: Int - viewers_MAX_GT: Int - viewers_MAX_GTE: Int - viewers_MAX_LT: Int - viewers_MAX_LTE: Int - viewers_MIN_EQUAL: Int - viewers_MIN_GT: Int - viewers_MIN_GTE: Int - viewers_MIN_LT: Int - viewers_MIN_LTE: Int - viewers_SUM_EQUAL: Int - viewers_SUM_GT: Int - viewers_SUM_GTE: Int - viewers_SUM_LT: Int - viewers_SUM_LTE: Int + viewers: IntScalarAggregationFilters + viewers_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { average: { eq: ... } } }' instead.\\") + viewers_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { average: { gt: ... } } }' instead.\\") + viewers_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { average: { gte: ... } } }' instead.\\") + viewers_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { average: { lt: ... } } }' instead.\\") + viewers_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { average: { lte: ... } } }' instead.\\") + viewers_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { max: { eq: ... } } }' instead.\\") + viewers_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { max: { gt: ... } } }' instead.\\") + viewers_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { max: { gte: ... } } }' instead.\\") + viewers_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { max: { lt: ... } } }' instead.\\") + viewers_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { max: { lte: ... } } }' instead.\\") + viewers_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { min: { eq: ... } } }' instead.\\") + viewers_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { min: { gt: ... } } }' instead.\\") + viewers_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { min: { gte: ... } } }' instead.\\") + viewers_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { min: { lt: ... } } }' instead.\\") + viewers_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { min: { lte: ... } } }' instead.\\") + viewers_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { sum: { eq: ... } } }' instead.\\") + viewers_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { sum: { gt: ... } } }' instead.\\") + viewers_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { sum: { gte: ... } } }' instead.\\") + viewers_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { sum: { lt: ... } } }' instead.\\") + viewers_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'viewers: { sum: { lte: ... } } }' instead.\\") } type PersonWorksInProductionRelationship { @@ -1517,6 +1839,17 @@ describe("Algebraic", () => { Movie } + input ProductionRelationshipFilters { + \\"\\"\\"Filter type where all of the related Productions match this filter\\"\\"\\" + all: ProductionWhere + \\"\\"\\"Filter type where none of the related Productions match this filter\\"\\"\\" + none: ProductionWhere + \\"\\"\\"Filter type where one of the related Productions match this filter\\"\\"\\" + single: ProductionWhere + \\"\\"\\"Filter type where some of the related Productions match this filter\\"\\"\\" + some: ProductionWhere + } + \\"\\"\\" Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. \\"\\"\\" @@ -1525,22 +1858,24 @@ describe("Algebraic", () => { } input ProductionUpdateInput { - viewers_DECREMENT: Int - viewers_INCREMENT: Int - viewers_SET: Int + viewers: IntScalarMutations + viewers_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'viewers: { decrement: ... } }' instead.\\") + viewers_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'viewers: { increment: ... } }' instead.\\") + viewers_SET: Int @deprecated(reason: \\"Please use the generic mutation 'viewers: { set: ... } }' instead.\\") } input ProductionWhere { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - typename_IN: [ProductionImplementation!] - viewers_EQ: Int - viewers_GT: Int - viewers_GTE: Int - viewers_IN: [Int!] - viewers_LT: Int - viewers_LTE: Int + typename: [ProductionImplementation!] + viewers: IntScalarFilters + viewers_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter viewers: { eq: ... }\\") + viewers_GT: Int @deprecated(reason: \\"Please use the relevant generic filter viewers: { gt: ... }\\") + viewers_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter viewers: { gte: ... }\\") + viewers_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter viewers: { in: ... }\\") + viewers_LT: Int @deprecated(reason: \\"Please use the relevant generic filter viewers: { lt: ... }\\") + viewers_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter viewers: { lte: ... }\\") } type ProductionsConnection { @@ -1574,6 +1909,27 @@ describe("Algebraic", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -1636,26 +1992,27 @@ describe("Algebraic", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - pay_AVERAGE_EQUAL: Float - pay_AVERAGE_GT: Float - pay_AVERAGE_GTE: Float - pay_AVERAGE_LT: Float - pay_AVERAGE_LTE: Float - pay_MAX_EQUAL: Float - pay_MAX_GT: Float - pay_MAX_GTE: Float - pay_MAX_LT: Float - pay_MAX_LTE: Float - pay_MIN_EQUAL: Float - pay_MIN_GT: Float - pay_MIN_GTE: Float - pay_MIN_LT: Float - pay_MIN_LTE: Float - pay_SUM_EQUAL: Float - pay_SUM_GT: Float - pay_SUM_GTE: Float - pay_SUM_LT: Float - pay_SUM_LTE: Float + pay: FloatScalarAggregationFilters + pay_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'pay: { average: { eq: ... } } }' instead.\\") + pay_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'pay: { average: { gt: ... } } }' instead.\\") + pay_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'pay: { average: { gte: ... } } }' instead.\\") + pay_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'pay: { average: { lt: ... } } }' instead.\\") + pay_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'pay: { average: { lte: ... } } }' instead.\\") + pay_MAX_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'pay: { max: { eq: ... } } }' instead.\\") + pay_MAX_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'pay: { max: { gt: ... } } }' instead.\\") + pay_MAX_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'pay: { max: { gte: ... } } }' instead.\\") + pay_MAX_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'pay: { max: { lt: ... } } }' instead.\\") + pay_MAX_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'pay: { max: { lte: ... } } }' instead.\\") + pay_MIN_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'pay: { min: { eq: ... } } }' instead.\\") + pay_MIN_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'pay: { min: { gt: ... } } }' instead.\\") + pay_MIN_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'pay: { min: { gte: ... } } }' instead.\\") + pay_MIN_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'pay: { min: { lt: ... } } }' instead.\\") + pay_MIN_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'pay: { min: { lte: ... } } }' instead.\\") + pay_SUM_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'pay: { sum: { eq: ... } } }' instead.\\") + pay_SUM_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'pay: { sum: { gt: ... } } }' instead.\\") + pay_SUM_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'pay: { sum: { gte: ... } } }' instead.\\") + pay_SUM_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'pay: { sum: { lt: ... } } }' instead.\\") + pay_SUM_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'pay: { sum: { lte: ... } } }' instead.\\") } input ActedInCreateInput { @@ -1669,28 +2026,32 @@ describe("Algebraic", () => { } input ActedInUpdateInput { - pay_ADD: Float - pay_DIVIDE: Float - pay_MULTIPLY: Float - pay_SET: Float - pay_SUBTRACT: Float - roles_POP: Int - roles_PUSH: [String!] - roles_SET: [String!] + pay: FloatScalarMutations + pay_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'pay: { add: ... } }' instead.\\") + pay_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'pay: { divide: ... } }' instead.\\") + pay_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'pay: { multiply: ... } }' instead.\\") + pay_SET: Float @deprecated(reason: \\"Please use the generic mutation 'pay: { set: ... } }' instead.\\") + pay_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'pay: { subtract: ... } }' instead.\\") + roles: ListStringMutations + roles_POP: Int @deprecated(reason: \\"Please use the generic mutation 'roles: { pop: ... } }' instead.\\") + roles_PUSH: [String!] @deprecated(reason: \\"Please use the generic mutation 'roles: { push: ... } }' instead.\\") + roles_SET: [String!] @deprecated(reason: \\"Please use the generic mutation 'roles: { set: ... } }' instead.\\") } input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - pay_EQ: Float - pay_GT: Float - pay_GTE: Float - pay_IN: [Float] - pay_LT: Float - pay_LTE: Float - roles_EQ: [String!] - roles_INCLUDES: String + pay: FloatScalarFilters + pay_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter pay: { eq: ... }\\") + pay_GT: Float @deprecated(reason: \\"Please use the relevant generic filter pay: { gt: ... }\\") + pay_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter pay: { gte: ... }\\") + pay_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter pay: { in: ... }\\") + pay_LT: Float @deprecated(reason: \\"Please use the relevant generic filter pay: { lt: ... }\\") + pay_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter pay: { lte: ... }\\") + roles: StringListFilters + roles_EQ: [String!] @deprecated(reason: \\"Please use the relevant generic filter roles: { eq: ... }\\") + roles_INCLUDES: String @deprecated(reason: \\"Please use the relevant generic filter roles: { includes: ... }\\") } \\"\\"\\" @@ -1726,6 +2087,50 @@ describe("Algebraic", () => { sum: Float } + \\"\\"\\"Filters for an aggregation of a float field\\"\\"\\" + input FloatScalarAggregationFilters { + average: FloatScalarFilters + max: FloatScalarFilters + min: FloatScalarFilters + sum: FloatScalarFilters + } + + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Mutations for a list for String\\"\\"\\" + input ListStringMutations { + pop: Int + push: [String!] + set: [String!] + } + type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @@ -1737,6 +2142,7 @@ describe("Algebraic", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1758,6 +2164,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 @@ -1795,21 +2220,22 @@ describe("Algebraic", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -1877,6 +2303,17 @@ describe("Algebraic", () => { name: StringAggregateSelection! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -1886,43 +2323,47 @@ describe("Algebraic", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: PersonRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related People match this filter\\"\\"\\" - actors_ALL: PersonWhere + actors_ALL: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related People match this filter\\"\\"\\" - actors_NONE: PersonWhere + actors_NONE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related People match this filter\\"\\"\\" - actors_SINGLE: PersonWhere + actors_SINGLE: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related People match this filter\\"\\"\\" - actors_SOME: PersonWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + actors_SOME: PersonWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -1965,6 +2406,7 @@ describe("Algebraic", () => { AND: [PersonActedInMoviesAggregateInput!] NOT: PersonActedInMoviesAggregateInput OR: [PersonActedInMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1986,6 +2428,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 @@ -2023,21 +2484,22 @@ describe("Algebraic", () => { AND: [PersonActedInMoviesNodeAggregationWhereInput!] NOT: PersonActedInMoviesNodeAggregationWhereInput OR: [PersonActedInMoviesNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type PersonActedInMoviesRelationship { @@ -2105,6 +2567,17 @@ describe("Algebraic", () => { title: StringAggregateSelection! } + input PersonRelationshipFilters { + \\"\\"\\"Filter type where all of the related People match this filter\\"\\"\\" + all: PersonWhere + \\"\\"\\"Filter type where none of the related People match this filter\\"\\"\\" + none: PersonWhere + \\"\\"\\"Filter type where one of the related People match this filter\\"\\"\\" + single: PersonWhere + \\"\\"\\"Filter type where some of the related People match this filter\\"\\"\\" + some: PersonWhere + } + \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -2114,43 +2587,47 @@ describe("Algebraic", () => { input PersonUpdateInput { actedInMovies: [PersonActedInMoviesUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] + actedInMovies: MovieRelationshipFilters actedInMoviesAggregate: PersonActedInMoviesAggregateInput + actedInMoviesConnection: PersonActedInMoviesConnectionFilters \\"\\"\\" Return People where all of the related PersonActedInMoviesConnections match this filter \\"\\"\\" - actedInMoviesConnection_ALL: PersonActedInMoviesConnectionWhere + actedInMoviesConnection_ALL: PersonActedInMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInMoviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return People where none of the related PersonActedInMoviesConnections match this filter \\"\\"\\" - actedInMoviesConnection_NONE: PersonActedInMoviesConnectionWhere + actedInMoviesConnection_NONE: PersonActedInMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInMoviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return People where one of the related PersonActedInMoviesConnections match this filter \\"\\"\\" - actedInMoviesConnection_SINGLE: PersonActedInMoviesConnectionWhere + actedInMoviesConnection_SINGLE: PersonActedInMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInMoviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return People where some of the related PersonActedInMoviesConnections match this filter \\"\\"\\" - actedInMoviesConnection_SOME: PersonActedInMoviesConnectionWhere + actedInMoviesConnection_SOME: PersonActedInMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInMoviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return People where all of the related Movies match this filter\\"\\"\\" - actedInMovies_ALL: MovieWhere + actedInMovies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInMovies: { all: ... }' instead.\\") \\"\\"\\"Return People where none of the related Movies match this filter\\"\\"\\" - actedInMovies_NONE: MovieWhere + actedInMovies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInMovies: { none: ... }' instead.\\") \\"\\"\\"Return People where one of the related Movies match this filter\\"\\"\\" - actedInMovies_SINGLE: MovieWhere + actedInMovies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInMovies: { single: ... }' instead.\\") \\"\\"\\"Return People where some of the related Movies match this filter\\"\\"\\" - actedInMovies_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedInMovies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInMovies: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type Query { @@ -2175,6 +2652,33 @@ describe("Algebraic", () => { shortest: String } + \\"\\"\\"String list filters\\"\\"\\" + input StringListFilters { + eq: [String!] + includes: String + } + + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" 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 4f50909dbb..f751e80d9d 100644 --- a/packages/graphql/tests/schema/nested-aggregation-on-type.test.ts +++ b/packages/graphql/tests/schema/nested-aggregation-on-type.test.ts @@ -42,26 +42,27 @@ describe("nested aggregation on interface", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_MAX_EQUAL: Int - screenTime_MAX_GT: Int - screenTime_MAX_GTE: Int - screenTime_MAX_LT: Int - screenTime_MAX_LTE: Int - screenTime_MIN_EQUAL: Int - screenTime_MIN_GT: Int - screenTime_MIN_GTE: Int - screenTime_MIN_LT: Int - screenTime_MIN_LTE: Int - screenTime_SUM_EQUAL: Int - screenTime_SUM_GT: Int - screenTime_SUM_GTE: Int - screenTime_SUM_LT: Int - screenTime_SUM_LTE: Int + screenTime: IntScalarAggregationFilters + screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { eq: ... } } }' instead.\\") + screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gt: ... } } }' instead.\\") + screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gte: ... } } }' instead.\\") + screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lt: ... } } }' instead.\\") + screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lte: ... } } }' instead.\\") + screenTime_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { eq: ... } } }' instead.\\") + screenTime_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gt: ... } } }' instead.\\") + screenTime_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gte: ... } } }' instead.\\") + screenTime_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lt: ... } } }' instead.\\") + screenTime_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lte: ... } } }' instead.\\") + screenTime_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { eq: ... } } }' instead.\\") + screenTime_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gt: ... } } }' instead.\\") + screenTime_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gte: ... } } }' instead.\\") + screenTime_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lt: ... } } }' instead.\\") + screenTime_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lte: ... } } }' instead.\\") + screenTime_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { eq: ... } } }' instead.\\") + screenTime_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gt: ... } } }' instead.\\") + screenTime_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gte: ... } } }' instead.\\") + screenTime_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lt: ... } } }' instead.\\") + screenTime_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lte: ... } } }' instead.\\") } input ActedInCreateInput { @@ -73,21 +74,23 @@ describe("nested aggregation on interface", () => { } input ActedInUpdateInput { - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - screenTime_SET: Int + screenTime: IntScalarMutations + screenTime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { decrement: ... } }' instead.\\") + screenTime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { increment: ... } }' instead.\\") + screenTime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'screenTime: { set: ... } }' instead.\\") } input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime_EQ: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int + screenTime: IntScalarFilters + screenTime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { eq: ... }\\") + screenTime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gt: ... }\\") + screenTime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gte: ... }\\") + screenTime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter screenTime: { in: ... }\\") + screenTime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lt: ... }\\") + screenTime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lte: ... }\\") } type Actor { @@ -101,6 +104,7 @@ describe("nested aggregation on interface", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -121,6 +125,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 @@ -156,61 +179,64 @@ describe("nested aggregation on interface", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - cost_AVERAGE_EQUAL: Float - cost_AVERAGE_GT: Float - cost_AVERAGE_GTE: Float - cost_AVERAGE_LT: Float - cost_AVERAGE_LTE: Float - cost_MAX_EQUAL: Float - cost_MAX_GT: Float - cost_MAX_GTE: Float - cost_MAX_LT: Float - cost_MAX_LTE: Float - cost_MIN_EQUAL: Float - cost_MIN_GT: Float - cost_MIN_GTE: Float - cost_MIN_LT: Float - cost_MIN_LTE: Float - cost_SUM_EQUAL: Float - cost_SUM_GT: Float - cost_SUM_GTE: Float - cost_SUM_LT: Float - cost_SUM_LTE: Float - runtime_AVERAGE_EQUAL: Float - runtime_AVERAGE_GT: Float - runtime_AVERAGE_GTE: Float - runtime_AVERAGE_LT: Float - runtime_AVERAGE_LTE: Float - runtime_MAX_EQUAL: Int - runtime_MAX_GT: Int - runtime_MAX_GTE: Int - runtime_MAX_LT: Int - runtime_MAX_LTE: Int - runtime_MIN_EQUAL: Int - runtime_MIN_GT: Int - runtime_MIN_GTE: Int - runtime_MIN_LT: Int - runtime_MIN_LTE: Int - runtime_SUM_EQUAL: Int - runtime_SUM_GT: Int - runtime_SUM_GTE: Int - runtime_SUM_LT: Int - runtime_SUM_LTE: Int - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + cost: FloatScalarAggregationFilters + cost_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'cost: { average: { eq: ... } } }' instead.\\") + cost_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'cost: { average: { gt: ... } } }' instead.\\") + cost_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'cost: { average: { gte: ... } } }' instead.\\") + cost_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'cost: { average: { lt: ... } } }' instead.\\") + cost_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'cost: { average: { lte: ... } } }' instead.\\") + cost_MAX_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'cost: { max: { eq: ... } } }' instead.\\") + cost_MAX_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'cost: { max: { gt: ... } } }' instead.\\") + cost_MAX_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'cost: { max: { gte: ... } } }' instead.\\") + cost_MAX_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'cost: { max: { lt: ... } } }' instead.\\") + cost_MAX_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'cost: { max: { lte: ... } } }' instead.\\") + cost_MIN_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'cost: { min: { eq: ... } } }' instead.\\") + cost_MIN_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'cost: { min: { gt: ... } } }' instead.\\") + cost_MIN_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'cost: { min: { gte: ... } } }' instead.\\") + cost_MIN_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'cost: { min: { lt: ... } } }' instead.\\") + cost_MIN_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'cost: { min: { lte: ... } } }' instead.\\") + cost_SUM_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'cost: { sum: { eq: ... } } }' instead.\\") + cost_SUM_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'cost: { sum: { gt: ... } } }' instead.\\") + cost_SUM_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'cost: { sum: { gte: ... } } }' instead.\\") + cost_SUM_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'cost: { sum: { lt: ... } } }' instead.\\") + cost_SUM_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'cost: { sum: { lte: ... } } }' instead.\\") + runtime: IntScalarAggregationFilters + runtime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { eq: ... } } }' instead.\\") + runtime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { gt: ... } } }' instead.\\") + runtime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { gte: ... } } }' instead.\\") + runtime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { lt: ... } } }' instead.\\") + runtime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { average: { lte: ... } } }' instead.\\") + runtime_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { eq: ... } } }' instead.\\") + runtime_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { gt: ... } } }' instead.\\") + runtime_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { gte: ... } } }' instead.\\") + runtime_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { lt: ... } } }' instead.\\") + runtime_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { max: { lte: ... } } }' instead.\\") + runtime_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { eq: ... } } }' instead.\\") + runtime_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { gt: ... } } }' instead.\\") + runtime_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { gte: ... } } }' instead.\\") + runtime_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { lt: ... } } }' instead.\\") + runtime_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { min: { lte: ... } } }' instead.\\") + runtime_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { eq: ... } } }' instead.\\") + runtime_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { gt: ... } } }' instead.\\") + runtime_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { gte: ... } } }' instead.\\") + runtime_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { lt: ... } } }' instead.\\") + runtime_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'runtime: { sum: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -277,43 +303,47 @@ describe("nested aggregation on interface", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: MovieRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere + actedIn_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere + actedIn_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere + actedIn_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + actedIn_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -355,6 +385,33 @@ describe("nested aggregation on interface", () => { sum: Float } + \\"\\"\\"Filters for an aggregation of a float field\\"\\"\\" + input FloatScalarAggregationFilters { + average: FloatScalarFilters + max: FloatScalarFilters + min: FloatScalarFilters + sum: FloatScalarFilters + } + + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + type IntAggregateSelection { average: Float max: Int @@ -362,6 +419,31 @@ describe("nested aggregation on interface", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie { cost: Float! runtime: Int! @@ -390,6 +472,17 @@ describe("nested aggregation on interface", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -400,38 +493,44 @@ describe("nested aggregation on interface", () => { } input MovieUpdateInput { - cost_ADD: Float - cost_DIVIDE: Float - cost_MULTIPLY: Float - cost_SET: Float - cost_SUBTRACT: Float - runtime_DECREMENT: Int - runtime_INCREMENT: Int - runtime_SET: Int - title_SET: String + cost: FloatScalarMutations + cost_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'cost: { add: ... } }' instead.\\") + cost_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'cost: { divide: ... } }' instead.\\") + cost_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'cost: { multiply: ... } }' instead.\\") + cost_SET: Float @deprecated(reason: \\"Please use the generic mutation 'cost: { set: ... } }' instead.\\") + cost_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'cost: { subtract: ... } }' instead.\\") + runtime: IntScalarMutations + runtime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { decrement: ... } }' instead.\\") + runtime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'runtime: { increment: ... } }' instead.\\") + runtime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'runtime: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - cost_EQ: Float - cost_GT: Float - cost_GTE: Float - cost_IN: [Float!] - cost_LT: Float - cost_LTE: Float - runtime_EQ: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + cost: FloatScalarFilters + cost_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter cost: { eq: ... }\\") + cost_GT: Float @deprecated(reason: \\"Please use the relevant generic filter cost: { gt: ... }\\") + cost_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter cost: { gte: ... }\\") + cost_IN: [Float!] @deprecated(reason: \\"Please use the relevant generic filter cost: { in: ... }\\") + cost_LT: Float @deprecated(reason: \\"Please use the relevant generic filter cost: { lt: ... }\\") + cost_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter cost: { lte: ... }\\") + runtime: IntScalarFilters + runtime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { eq: ... }\\") + runtime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gt: ... }\\") + runtime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { gte: ... }\\") + runtime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter runtime: { in: ... }\\") + runtime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lt: ... }\\") + runtime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter runtime: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -479,6 +578,27 @@ describe("nested aggregation on interface", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/null.test.ts b/packages/graphql/tests/schema/null.test.ts index e92f51e31c..656a1609e4 100644 --- a/packages/graphql/tests/schema/null.test.ts +++ b/packages/graphql/tests/schema/null.test.ts @@ -50,6 +50,11 @@ describe("Null", () => { mutation: Mutation } + \\"\\"\\"Boolean list filters\\"\\"\\" + input BooleanListFilters { + eq: [Boolean!] + } + \\"\\"\\" Information about the number of nodes and relationships created during a create mutation \\"\\"\\" @@ -71,6 +76,27 @@ describe("Null", () => { min: DateTime } + \\"\\"\\"DateTime list filters\\"\\"\\" + input DateTimeListFilters { + eq: [DateTime!] + includes: DateTime + } + + \\"\\"\\"DateTime filters\\"\\"\\" + input DateTimeScalarFilters { + eq: DateTime + gt: DateTime + gte: DateTime + in: [DateTime!] + lt: DateTime + lte: DateTime + } + + \\"\\"\\"DateTime mutations\\"\\"\\" + input DateTimeScalarMutations { + set: DateTime + } + \\"\\"\\" Information about the number of nodes and relationships deleted during a delete mutation \\"\\"\\" @@ -86,9 +112,49 @@ describe("Null", () => { sum: Float } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float list filters\\"\\"\\" + input FloatListFilters { + eq: [Float!] + includes: Float + } + + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + + \\"\\"\\"ID list filters\\"\\"\\" + input IDListFilters { + eq: [ID!] + includes: ID + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -98,6 +164,78 @@ describe("Null", () => { sum: Int } + \\"\\"\\"Int list filters\\"\\"\\" + input IntListFilters { + eq: [Int!] + includes: Int + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + + \\"\\"\\"Mutations for a list for Boolean\\"\\"\\" + input ListBooleanMutations { + pop: Int + push: [Boolean!] + set: [Boolean!] + } + + \\"\\"\\"Mutations for a list for DateTime\\"\\"\\" + input ListDateTimeMutations { + pop: Int + push: [DateTime!] + set: [DateTime!] + } + + \\"\\"\\"Mutations for a list for Float\\"\\"\\" + input ListFloatMutations { + pop: Int + push: [Float!] + set: [Float!] + } + + \\"\\"\\"Mutations for a list for ID\\"\\"\\" + input ListIDMutations { + pop: Int + push: [ID!] + set: [ID!] + } + + \\"\\"\\"Mutations for a list for Int\\"\\"\\" + input ListIntMutations { + pop: Int + push: [Int!] + set: [Int!] + } + + \\"\\"\\"Mutations for a list for PointInput\\"\\"\\" + input ListPointInputMutations { + pop: Int + push: [PointInput!] + set: [PointInput!] + } + + \\"\\"\\"Mutations for a list for String\\"\\"\\" + input ListStringMutations { + pop: Int + push: [String!] + set: [String!] + } + type Movie { actorCount: Int! actorCounts: [Int!]! @@ -119,7 +257,6 @@ describe("Null", () => { averageRating: FloatAggregateSelection! count: Int! createdAt: DateTimeAggregateSelection! - id: IDAggregateSelection! name: StringAggregateSelection! } @@ -157,93 +294,119 @@ describe("Null", () => { } input MovieUpdateInput { - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actorCount_SET: Int - actorCounts_POP: Int - actorCounts_PUSH: [Int!] - actorCounts_SET: [Int!] - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SET: Float - averageRating_SUBTRACT: Float - averageRatings_POP: Int - averageRatings_PUSH: [Float!] - averageRatings_SET: [Float!] - createdAt_SET: DateTime - createdAts_POP: Int - createdAts_PUSH: [DateTime!] - createdAts_SET: [DateTime!] - filmedAt_SET: PointInput - filmedAts_POP: Int - filmedAts_PUSH: [PointInput!] - filmedAts_SET: [PointInput!] - id_SET: ID - ids_POP: Int - ids_PUSH: [ID!] - ids_SET: [ID!] - isActives_POP: Int - isActives_PUSH: [Boolean!] - isActives_SET: [Boolean!] - name_SET: String - names_POP: Int - names_PUSH: [String!] - names_SET: [String!] + actorCount: IntScalarMutations + actorCount_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'actorCount: { decrement: ... } }' instead.\\") + actorCount_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'actorCount: { increment: ... } }' instead.\\") + actorCount_SET: Int @deprecated(reason: \\"Please use the generic mutation 'actorCount: { set: ... } }' instead.\\") + actorCounts: ListIntMutations + actorCounts_POP: Int @deprecated(reason: \\"Please use the generic mutation 'actorCounts: { pop: ... } }' instead.\\") + actorCounts_PUSH: [Int!] @deprecated(reason: \\"Please use the generic mutation 'actorCounts: { push: ... } }' instead.\\") + actorCounts_SET: [Int!] @deprecated(reason: \\"Please use the generic mutation 'actorCounts: { set: ... } }' instead.\\") + averageRating: FloatScalarMutations + averageRating_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { add: ... } }' instead.\\") + averageRating_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { divide: ... } }' instead.\\") + averageRating_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { multiply: ... } }' instead.\\") + averageRating_SET: Float @deprecated(reason: \\"Please use the generic mutation 'averageRating: { set: ... } }' instead.\\") + averageRating_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { subtract: ... } }' instead.\\") + averageRatings: ListFloatMutations + averageRatings_POP: Int @deprecated(reason: \\"Please use the generic mutation 'averageRatings: { pop: ... } }' instead.\\") + averageRatings_PUSH: [Float!] @deprecated(reason: \\"Please use the generic mutation 'averageRatings: { push: ... } }' instead.\\") + averageRatings_SET: [Float!] @deprecated(reason: \\"Please use the generic mutation 'averageRatings: { set: ... } }' instead.\\") + createdAt: DateTimeScalarMutations + createdAt_SET: DateTime @deprecated(reason: \\"Please use the generic mutation 'createdAt: { set: ... } }' instead.\\") + createdAts: ListDateTimeMutations + createdAts_POP: Int @deprecated(reason: \\"Please use the generic mutation 'createdAts: { pop: ... } }' instead.\\") + createdAts_PUSH: [DateTime!] @deprecated(reason: \\"Please use the generic mutation 'createdAts: { push: ... } }' instead.\\") + createdAts_SET: [DateTime!] @deprecated(reason: \\"Please use the generic mutation 'createdAts: { set: ... } }' instead.\\") + filmedAt: PointMutations + filmedAt_SET: PointInput @deprecated(reason: \\"Please use the generic mutation 'filmedAt: { set: ... } }' instead.\\") + filmedAts: ListPointInputMutations + filmedAts_POP: Int @deprecated(reason: \\"Please use the generic mutation 'filmedAts: { pop: ... } }' instead.\\") + filmedAts_PUSH: [PointInput!] @deprecated(reason: \\"Please use the generic mutation 'filmedAts: { push: ... } }' instead.\\") + filmedAts_SET: [PointInput!] @deprecated(reason: \\"Please use the generic mutation 'filmedAts: { set: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + ids: ListIDMutations + ids_POP: Int @deprecated(reason: \\"Please use the generic mutation 'ids: { pop: ... } }' instead.\\") + ids_PUSH: [ID!] @deprecated(reason: \\"Please use the generic mutation 'ids: { push: ... } }' instead.\\") + ids_SET: [ID!] @deprecated(reason: \\"Please use the generic mutation 'ids: { set: ... } }' instead.\\") + isActives: ListBooleanMutations + isActives_POP: Int @deprecated(reason: \\"Please use the generic mutation 'isActives: { pop: ... } }' instead.\\") + isActives_PUSH: [Boolean!] @deprecated(reason: \\"Please use the generic mutation 'isActives: { push: ... } }' instead.\\") + isActives_SET: [Boolean!] @deprecated(reason: \\"Please use the generic mutation 'isActives: { set: ... } }' instead.\\") + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") + names: ListStringMutations + names_POP: Int @deprecated(reason: \\"Please use the generic mutation 'names: { pop: ... } }' instead.\\") + names_PUSH: [String!] @deprecated(reason: \\"Please use the generic mutation 'names: { push: ... } }' instead.\\") + names_SET: [String!] @deprecated(reason: \\"Please use the generic mutation 'names: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount_EQ: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int!] - actorCount_LT: Int - actorCount_LTE: Int - actorCounts_EQ: [Int!] - actorCounts_INCLUDES: Int - averageRating_EQ: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float!] - averageRating_LT: Float - averageRating_LTE: Float - averageRatings_EQ: [Float!] - averageRatings_INCLUDES: Float - createdAt_EQ: DateTime - createdAt_GT: DateTime - createdAt_GTE: DateTime - createdAt_IN: [DateTime!] - createdAt_LT: DateTime - createdAt_LTE: DateTime - createdAts_EQ: [DateTime!] - createdAts_INCLUDES: DateTime - filmedAt_DISTANCE: PointDistance - filmedAt_EQ: PointInput - filmedAt_GT: PointDistance - filmedAt_GTE: PointDistance - filmedAt_IN: [PointInput!] - filmedAt_LT: PointDistance - filmedAt_LTE: PointDistance - filmedAts_EQ: [PointInput!] - filmedAts_INCLUDES: PointInput - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - ids_EQ: [ID!] - ids_INCLUDES: ID - isActives_EQ: [Boolean!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String - names_EQ: [String!] - names_INCLUDES: String + actorCount: IntScalarFilters + actorCount_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { eq: ... }\\") + actorCount_GT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gt: ... }\\") + actorCount_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gte: ... }\\") + actorCount_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter actorCount: { in: ... }\\") + actorCount_LT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lt: ... }\\") + actorCount_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lte: ... }\\") + actorCounts: IntListFilters + actorCounts_EQ: [Int!] @deprecated(reason: \\"Please use the relevant generic filter actorCounts: { eq: ... }\\") + actorCounts_INCLUDES: Int @deprecated(reason: \\"Please use the relevant generic filter actorCounts: { includes: ... }\\") + averageRating: FloatScalarFilters + averageRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { eq: ... }\\") + averageRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gt: ... }\\") + averageRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gte: ... }\\") + averageRating_IN: [Float!] @deprecated(reason: \\"Please use the relevant generic filter averageRating: { in: ... }\\") + averageRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lt: ... }\\") + averageRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lte: ... }\\") + averageRatings: FloatListFilters + averageRatings_EQ: [Float!] @deprecated(reason: \\"Please use the relevant generic filter averageRatings: { eq: ... }\\") + averageRatings_INCLUDES: Float @deprecated(reason: \\"Please use the relevant generic filter averageRatings: { includes: ... }\\") + createdAt: DateTimeScalarFilters + createdAt_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { eq: ... }\\") + createdAt_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { gt: ... }\\") + createdAt_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { gte: ... }\\") + createdAt_IN: [DateTime!] @deprecated(reason: \\"Please use the relevant generic filter createdAt: { in: ... }\\") + createdAt_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { lt: ... }\\") + createdAt_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { lte: ... }\\") + createdAts: DateTimeListFilters + createdAts_EQ: [DateTime!] @deprecated(reason: \\"Please use the relevant generic filter createdAts: { eq: ... }\\") + createdAts_INCLUDES: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAts: { includes: ... }\\") + filmedAt: PointFilters + filmedAt_DISTANCE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter filmedAt: { distance: ... }\\") + filmedAt_EQ: PointInput @deprecated(reason: \\"Please use the relevant generic filter filmedAt: { eq: ... }\\") + filmedAt_GT: PointDistance @deprecated(reason: \\"Please use the relevant generic filter filmedAt: { gt: ... }\\") + filmedAt_GTE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter filmedAt: { gte: ... }\\") + filmedAt_IN: [PointInput!] @deprecated(reason: \\"Please use the relevant generic filter filmedAt: { in: ... }\\") + filmedAt_LT: PointDistance @deprecated(reason: \\"Please use the relevant generic filter filmedAt: { lt: ... }\\") + filmedAt_LTE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter filmedAt: { lte: ... }\\") + filmedAts: PointListFilters + filmedAts_EQ: [PointInput!] @deprecated(reason: \\"Please use the relevant generic filter filmedAts: { eq: ... }\\") + filmedAts_INCLUDES: PointInput @deprecated(reason: \\"Please use the relevant generic filter filmedAts: { includes: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + ids: IDListFilters + ids_EQ: [ID!] @deprecated(reason: \\"Please use the relevant generic filter ids: { eq: ... }\\") + ids_INCLUDES: ID @deprecated(reason: \\"Please use the relevant generic filter ids: { includes: ... }\\") + isActives: BooleanListFilters + isActives_EQ: [Boolean!] @deprecated(reason: \\"Please use the relevant generic filter isActives: { eq: ... }\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + names: StringListFilters + names_EQ: [String!] @deprecated(reason: \\"Please use the relevant generic filter names: { eq: ... }\\") + names_INCLUDES: String @deprecated(reason: \\"Please use the relevant generic filter names: { includes: ... }\\") } type MoviesConnection { @@ -284,6 +447,23 @@ describe("Null", () => { point: PointInput! } + \\"\\"\\"Distance filters\\"\\"\\" + input PointDistanceFilters { + eq: Float + from: PointInput! + gt: Float + gte: Float + lt: Float + lte: Float + } + + \\"\\"\\"Point filters\\"\\"\\" + input PointFilters { + distance: PointDistanceFilters + eq: PointInput + in: [PointInput!] + } + \\"\\"\\"Input type for a point\\"\\"\\" input PointInput { height: Float @@ -291,6 +471,17 @@ describe("Null", () => { longitude: Float! } + \\"\\"\\"Point list filters\\"\\"\\" + input PointListFilters { + eq: [PointInput!] + includes: PointInput + } + + \\"\\"\\"Point mutations\\"\\"\\" + input PointMutations { + set: PointInput + } + type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! moviesAggregate(where: MovieWhere): MovieAggregateSelection! @@ -310,6 +501,26 @@ describe("Null", () => { shortest: String } + \\"\\"\\"String list filters\\"\\"\\" + input StringListFilters { + eq: [String!] + includes: String + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" diff --git a/packages/graphql/tests/schema/pluralize-consistency.test.ts b/packages/graphql/tests/schema/pluralize-consistency.test.ts index 8d53c55588..4b9b8cb4e4 100644 --- a/packages/graphql/tests/schema/pluralize-consistency.test.ts +++ b/packages/graphql/tests/schema/pluralize-consistency.test.ts @@ -69,6 +69,26 @@ describe("Pluralize consistency", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Mutation { createSuperFriends(input: [super_friendCreateInput!]!): CreateSuperFriendsMutationResponse! createSuperUsers(input: [super_userCreateInput!]!): CreateSuperUsersMutationResponse! @@ -108,6 +128,27 @@ describe("Pluralize consistency", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type SuperFriendsConnection { edges: [super_friendEdge!]! pageInfo: PageInfo! @@ -162,6 +203,17 @@ describe("Pluralize consistency", () => { node: super_friend! } + input super_friendRelationshipFilters { + \\"\\"\\"Filter type where all of the related super_friends match this filter\\"\\"\\" + all: super_friendWhere + \\"\\"\\"Filter type where none of the related super_friends match this filter\\"\\"\\" + none: super_friendWhere + \\"\\"\\"Filter type where one of the related super_friends match this filter\\"\\"\\" + single: super_friendWhere + \\"\\"\\"Filter type where some of the related super_friends match this filter\\"\\"\\" + some: super_friendWhere + } + \\"\\"\\" Fields to sort SuperFriends by. The order in which sorts are applied is not guaranteed when specifying many fields in one super_friendSort object. \\"\\"\\" @@ -170,18 +222,20 @@ describe("Pluralize consistency", () => { } input super_friendUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input super_friendWhere { AND: [super_friendWhere!] NOT: super_friendWhere OR: [super_friendWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type super_user { @@ -214,6 +268,7 @@ describe("Pluralize consistency", () => { AND: [super_userMy_friendAggregateInput!] NOT: super_userMy_friendAggregateInput OR: [super_userMy_friendAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -232,6 +287,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 } @@ -264,21 +338,22 @@ describe("Pluralize consistency", () => { AND: [super_userMy_friendNodeAggregationWhereInput!] NOT: super_userMy_friendNodeAggregationWhereInput OR: [super_userMy_friendNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type super_userMy_friendRelationship { @@ -308,51 +383,55 @@ describe("Pluralize consistency", () => { input super_userUpdateInput { my_friend: [super_userMy_friendUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input super_userWhere { AND: [super_userWhere!] NOT: super_userWhere OR: [super_userWhere!] + my_friend: super_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 \\"\\"\\" - my_friendConnection_ALL: super_userMy_friendConnectionWhere + my_friendConnection_ALL: super_userMy_friendConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'my_friendConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return super_users where none of the related super_userMy_friendConnections match this filter \\"\\"\\" - my_friendConnection_NONE: super_userMy_friendConnectionWhere + my_friendConnection_NONE: super_userMy_friendConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'my_friendConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return super_users where one of the related super_userMy_friendConnections match this filter \\"\\"\\" - my_friendConnection_SINGLE: super_userMy_friendConnectionWhere + my_friendConnection_SINGLE: super_userMy_friendConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'my_friendConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return super_users where some of the related super_userMy_friendConnections match this filter \\"\\"\\" - my_friendConnection_SOME: super_userMy_friendConnectionWhere + my_friendConnection_SOME: super_userMy_friendConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'my_friendConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\" Return super_users where all of the related super_friends match this filter \\"\\"\\" - my_friend_ALL: super_friendWhere + my_friend_ALL: super_friendWhere @deprecated(reason: \\"Please use the relevant generic filter 'my_friend: { all: ... }' instead.\\") \\"\\"\\" Return super_users where none of the related super_friends match this filter \\"\\"\\" - my_friend_NONE: super_friendWhere + my_friend_NONE: super_friendWhere @deprecated(reason: \\"Please use the relevant generic filter 'my_friend: { none: ... }' instead.\\") \\"\\"\\" Return super_users where one of the related super_friends match this filter \\"\\"\\" - my_friend_SINGLE: super_friendWhere + my_friend_SINGLE: super_friendWhere @deprecated(reason: \\"Please use the relevant generic filter 'my_friend: { single: ... }' instead.\\") \\"\\"\\" Return super_users where some of the related super_friends match this filter \\"\\"\\" - my_friend_SOME: super_friendWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + my_friend_SOME: super_friendWhere @deprecated(reason: \\"Please use the relevant generic filter 'my_friend: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type super_usersuper_friendMy_friendAggregationSelection { diff --git a/packages/graphql/tests/schema/query-direction.test.ts b/packages/graphql/tests/schema/query-direction.test.ts index 5c61839a79..8654545fe4 100644 --- a/packages/graphql/tests/schema/query-direction.test.ts +++ b/packages/graphql/tests/schema/query-direction.test.ts @@ -60,6 +60,26 @@ describe("Query Direction", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Mutation { createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! @@ -93,6 +113,27 @@ describe("Query Direction", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -150,6 +191,7 @@ describe("Query Direction", () => { AND: [UserFriendsAggregateInput!] NOT: UserFriendsAggregateInput OR: [UserFriendsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -169,6 +211,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 } @@ -203,21 +264,22 @@ describe("Query Direction", () => { AND: [UserFriendsNodeAggregationWhereInput!] NOT: UserFriendsNodeAggregationWhereInput OR: [UserFriendsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type UserFriendsRelationship { @@ -238,6 +300,17 @@ describe("Query Direction", () => { where: UserFriendsConnectionWhere } + input UserRelationshipFilters { + \\"\\"\\"Filter type where all of the related Users match this filter\\"\\"\\" + all: UserWhere + \\"\\"\\"Filter type where none of the related Users match this filter\\"\\"\\" + none: UserWhere + \\"\\"\\"Filter type where one of the related Users match this filter\\"\\"\\" + single: UserWhere + \\"\\"\\"Filter type where some of the related Users match this filter\\"\\"\\" + some: UserWhere + } + \\"\\"\\" Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. \\"\\"\\" @@ -247,7 +320,8 @@ describe("Query Direction", () => { input UserUpdateInput { friends: [UserFriendsUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } type UserUserFriendsAggregationSelection { @@ -263,36 +337,39 @@ describe("Query Direction", () => { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] + friends: UserRelationshipFilters friendsAggregate: UserFriendsAggregateInput + friendsConnection: UserFriendsConnectionFilters \\"\\"\\" Return Users where all of the related UserFriendsConnections match this filter \\"\\"\\" - friendsConnection_ALL: UserFriendsConnectionWhere + friendsConnection_ALL: UserFriendsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'friendsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Users where none of the related UserFriendsConnections match this filter \\"\\"\\" - friendsConnection_NONE: UserFriendsConnectionWhere + friendsConnection_NONE: UserFriendsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'friendsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Users where one of the related UserFriendsConnections match this filter \\"\\"\\" - friendsConnection_SINGLE: UserFriendsConnectionWhere + friendsConnection_SINGLE: UserFriendsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'friendsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Users where some of the related UserFriendsConnections match this filter \\"\\"\\" - friendsConnection_SOME: UserFriendsConnectionWhere + friendsConnection_SOME: UserFriendsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'friendsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Users where all of the related Users match this filter\\"\\"\\" - friends_ALL: UserWhere + friends_ALL: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'friends: { all: ... }' instead.\\") \\"\\"\\"Return Users where none of the related Users match this filter\\"\\"\\" - friends_NONE: UserWhere + friends_NONE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'friends: { none: ... }' instead.\\") \\"\\"\\"Return Users where one of the related Users match this filter\\"\\"\\" - friends_SINGLE: UserWhere + friends_SINGLE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'friends: { single: ... }' instead.\\") \\"\\"\\"Return Users where some of the related Users match this filter\\"\\"\\" - friends_SOME: UserWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + friends_SOME: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'friends: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type UsersConnection { @@ -340,6 +417,26 @@ describe("Query Direction", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Mutation { createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! @@ -373,6 +470,27 @@ describe("Query Direction", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -430,6 +548,7 @@ describe("Query Direction", () => { AND: [UserFriendsAggregateInput!] NOT: UserFriendsAggregateInput OR: [UserFriendsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -449,6 +568,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 } @@ -483,21 +621,22 @@ describe("Query Direction", () => { AND: [UserFriendsNodeAggregationWhereInput!] NOT: UserFriendsNodeAggregationWhereInput OR: [UserFriendsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type UserFriendsRelationship { @@ -518,6 +657,17 @@ describe("Query Direction", () => { where: UserFriendsConnectionWhere } + input UserRelationshipFilters { + \\"\\"\\"Filter type where all of the related Users match this filter\\"\\"\\" + all: UserWhere + \\"\\"\\"Filter type where none of the related Users match this filter\\"\\"\\" + none: UserWhere + \\"\\"\\"Filter type where one of the related Users match this filter\\"\\"\\" + single: UserWhere + \\"\\"\\"Filter type where some of the related Users match this filter\\"\\"\\" + some: UserWhere + } + \\"\\"\\" Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. \\"\\"\\" @@ -527,7 +677,8 @@ describe("Query Direction", () => { input UserUpdateInput { friends: [UserFriendsUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } type UserUserFriendsAggregationSelection { @@ -543,36 +694,39 @@ describe("Query Direction", () => { AND: [UserWhere!] NOT: UserWhere OR: [UserWhere!] + friends: UserRelationshipFilters friendsAggregate: UserFriendsAggregateInput + friendsConnection: UserFriendsConnectionFilters \\"\\"\\" Return Users where all of the related UserFriendsConnections match this filter \\"\\"\\" - friendsConnection_ALL: UserFriendsConnectionWhere + friendsConnection_ALL: UserFriendsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'friendsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Users where none of the related UserFriendsConnections match this filter \\"\\"\\" - friendsConnection_NONE: UserFriendsConnectionWhere + friendsConnection_NONE: UserFriendsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'friendsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Users where one of the related UserFriendsConnections match this filter \\"\\"\\" - friendsConnection_SINGLE: UserFriendsConnectionWhere + friendsConnection_SINGLE: UserFriendsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'friendsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Users where some of the related UserFriendsConnections match this filter \\"\\"\\" - friendsConnection_SOME: UserFriendsConnectionWhere + friendsConnection_SOME: UserFriendsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'friendsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Users where all of the related Users match this filter\\"\\"\\" - friends_ALL: UserWhere + friends_ALL: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'friends: { all: ... }' instead.\\") \\"\\"\\"Return Users where none of the related Users match this filter\\"\\"\\" - friends_NONE: UserWhere + friends_NONE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'friends: { none: ... }' instead.\\") \\"\\"\\"Return Users where one of the related Users match this filter\\"\\"\\" - friends_SINGLE: UserWhere + friends_SINGLE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'friends: { single: ... }' instead.\\") \\"\\"\\"Return Users where some of the related Users match this filter\\"\\"\\" - friends_SOME: UserWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + friends_SOME: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'friends: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type UsersConnection { diff --git a/packages/graphql/tests/schema/remove-deprecated/aggregations-deprecated-disabled.test.ts b/packages/graphql/tests/schema/remove-deprecated/aggregations-deprecated-disabled.test.ts new file mode 100644 index 0000000000..06527b0d99 --- /dev/null +++ b/packages/graphql/tests/schema/remove-deprecated/aggregations-deprecated-disabled.test.ts @@ -0,0 +1,2588 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { printSchemaWithDirectives } from "@graphql-tools/utils"; +import { gql } from "graphql-tag"; +import { lexicographicSortSchema } from "graphql/utilities"; +import { Neo4jGraphQL } from "../../../src"; + +describe("Deprecated Aggregations disabled", () => { + test("Top Level Aggregations", async () => { + const typeDefs = /* GraphQL */ ` + type Movie @node { + id: ID + isbn: String! + title: String + createdAt: DateTime + someTime: Time + someLocalTime: LocalTime + someLocalDateTime: LocalDateTime + imdbRating: Float + someInt: Int + someBigInt: BigInt + screenTime: Duration + } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { excludeDeprecatedFields: { aggregationFilters: true } }, + }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\" + A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. + \\"\\"\\" + scalar BigInt + + type BigIntAggregateSelection { + average: BigInt + max: BigInt + min: BigInt + sum: BigInt + } + + \\"\\"\\"BigInt filters\\"\\"\\" + input BigIntScalarFilters { + eq: BigInt + gt: BigInt + gte: BigInt + in: [BigInt!] + lt: BigInt + lte: BigInt + } + + \\"\\"\\"BigInt mutations\\"\\"\\" + input BigIntScalarMutations { + add: BigInt + set: BigInt + subtract: BigInt + } + + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" + type CreateInfo { + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" + scalar DateTime + + type DateTimeAggregateSelection { + max: DateTime + min: DateTime + } + + \\"\\"\\"DateTime filters\\"\\"\\" + input DateTimeScalarFilters { + eq: DateTime + gt: DateTime + gte: DateTime + in: [DateTime!] + lt: DateTime + lte: DateTime + } + + \\"\\"\\"DateTime mutations\\"\\"\\" + input DateTimeScalarMutations { + set: DateTime + } + + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" + type DeleteInfo { + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + \\"\\"\\"A duration, represented as an ISO 8601 duration string\\"\\"\\" + scalar Duration + + type DurationAggregateSelection { + max: Duration + min: Duration + } + + \\"\\"\\"Duration filters\\"\\"\\" + input DurationScalarFilters { + eq: Duration + gt: Duration + gte: Duration + in: [Duration!] + lt: Duration + lte: Duration + } + + \\"\\"\\"Duration mutations\\"\\"\\" + input DurationScalarMutations { + set: Duration + } + + type FloatAggregateSelection { + average: Float + max: Float + min: Float + sum: Float + } + + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + type IntAggregateSelection { + average: Float + max: Int + min: Int + sum: Int + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + + \\"\\"\\"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'\\"\\"\\" + scalar LocalDateTime + + type LocalDateTimeAggregateSelection { + max: LocalDateTime + min: LocalDateTime + } + + \\"\\"\\"LocalDateTime filters\\"\\"\\" + input LocalDateTimeScalarFilters { + eq: LocalDateTime + gt: LocalDateTime + gte: LocalDateTime + in: [LocalDateTime!] + lt: LocalDateTime + lte: LocalDateTime + } + + \\"\\"\\"LocalDateTime mutations\\"\\"\\" + input LocalDateTimeScalarMutations { + set: LocalDateTime + } + + \\"\\"\\" + A local time, represented as a time string without timezone information + \\"\\"\\" + scalar LocalTime + + type LocalTimeAggregateSelection { + max: LocalTime + min: LocalTime + } + + \\"\\"\\"LocalTime filters\\"\\"\\" + input LocalTimeScalarFilters { + eq: LocalTime + gt: LocalTime + gte: LocalTime + in: [LocalTime!] + lt: LocalTime + lte: LocalTime + } + + \\"\\"\\"LocalTime mutations\\"\\"\\" + input LocalTimeScalarMutations { + set: LocalTime + } + + type Movie { + createdAt: DateTime + id: ID + imdbRating: Float + isbn: String! + screenTime: Duration + someBigInt: BigInt + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someTime: Time + title: String + } + + type MovieAggregateSelection { + count: Int! + createdAt: DateTimeAggregateSelection! + imdbRating: FloatAggregateSelection! + isbn: StringAggregateSelection! + screenTime: DurationAggregateSelection! + someBigInt: BigIntAggregateSelection! + someInt: IntAggregateSelection! + someLocalDateTime: LocalDateTimeAggregateSelection! + someLocalTime: LocalTimeAggregateSelection! + someTime: TimeAggregateSelection! + title: StringAggregateSelection! + } + + input MovieCreateInput { + createdAt: DateTime + id: ID + imdbRating: Float + isbn: String! + screenTime: Duration + someBigInt: BigInt + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someTime: Time + title: String + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + \\"\\"\\" + Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. + \\"\\"\\" + input MovieSort { + createdAt: SortDirection + id: SortDirection + imdbRating: SortDirection + isbn: SortDirection + screenTime: SortDirection + someBigInt: SortDirection + someInt: SortDirection + someLocalDateTime: SortDirection + someLocalTime: SortDirection + someTime: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + createdAt: DateTimeScalarMutations + createdAt_SET: DateTime @deprecated(reason: \\"Please use the generic mutation 'createdAt: { set: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + imdbRating: FloatScalarMutations + imdbRating_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'imdbRating: { add: ... } }' instead.\\") + imdbRating_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'imdbRating: { divide: ... } }' instead.\\") + imdbRating_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'imdbRating: { multiply: ... } }' instead.\\") + imdbRating_SET: Float @deprecated(reason: \\"Please use the generic mutation 'imdbRating: { set: ... } }' instead.\\") + imdbRating_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'imdbRating: { subtract: ... } }' instead.\\") + isbn: StringScalarMutations + isbn_SET: String @deprecated(reason: \\"Please use the generic mutation 'isbn: { set: ... } }' instead.\\") + screenTime: DurationScalarMutations + screenTime_SET: Duration @deprecated(reason: \\"Please use the generic mutation 'screenTime: { set: ... } }' instead.\\") + someBigInt: BigIntScalarMutations + someBigInt_DECREMENT: BigInt @deprecated(reason: \\"Please use the relevant generic mutation 'someBigInt: { decrement: ... } }' instead.\\") + someBigInt_INCREMENT: BigInt @deprecated(reason: \\"Please use the relevant generic mutation 'someBigInt: { increment: ... } }' instead.\\") + someBigInt_SET: BigInt @deprecated(reason: \\"Please use the generic mutation 'someBigInt: { set: ... } }' instead.\\") + someInt: IntScalarMutations + someInt_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'someInt: { decrement: ... } }' instead.\\") + someInt_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'someInt: { increment: ... } }' instead.\\") + someInt_SET: Int @deprecated(reason: \\"Please use the generic mutation 'someInt: { set: ... } }' instead.\\") + someLocalDateTime: LocalDateTimeScalarMutations + someLocalDateTime_SET: LocalDateTime @deprecated(reason: \\"Please use the generic mutation 'someLocalDateTime: { set: ... } }' instead.\\") + someLocalTime: LocalTimeScalarMutations + someLocalTime_SET: LocalTime @deprecated(reason: \\"Please use the generic mutation 'someLocalTime: { set: ... } }' instead.\\") + someTime: TimeScalarMutations + someTime_SET: Time @deprecated(reason: \\"Please use the generic mutation 'someTime: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + createdAt: DateTimeScalarFilters + createdAt_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { eq: ... }\\") + createdAt_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { gt: ... }\\") + createdAt_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { gte: ... }\\") + createdAt_IN: [DateTime] @deprecated(reason: \\"Please use the relevant generic filter createdAt: { in: ... }\\") + createdAt_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { lt: ... }\\") + createdAt_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + imdbRating: FloatScalarFilters + imdbRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { eq: ... }\\") + imdbRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { gt: ... }\\") + imdbRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { gte: ... }\\") + imdbRating_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { in: ... }\\") + imdbRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { lt: ... }\\") + imdbRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter imdbRating: { lte: ... }\\") + isbn: StringScalarFilters + isbn_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter isbn: { contains: ... }\\") + isbn_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter isbn: { endsWith: ... }\\") + isbn_EQ: String @deprecated(reason: \\"Please use the relevant generic filter isbn: { eq: ... }\\") + isbn_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter isbn: { in: ... }\\") + isbn_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter isbn: { startsWith: ... }\\") + screenTime: DurationScalarFilters + screenTime_EQ: Duration @deprecated(reason: \\"Please use the relevant generic filter screenTime: { eq: ... }\\") + screenTime_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gt: ... }\\") + screenTime_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gte: ... }\\") + screenTime_IN: [Duration] @deprecated(reason: \\"Please use the relevant generic filter screenTime: { in: ... }\\") + screenTime_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lt: ... }\\") + screenTime_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lte: ... }\\") + someBigInt: BigIntScalarFilters + someBigInt_EQ: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { eq: ... }\\") + someBigInt_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { gt: ... }\\") + someBigInt_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { gte: ... }\\") + someBigInt_IN: [BigInt] @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { in: ... }\\") + someBigInt_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { lt: ... }\\") + someBigInt_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { lte: ... }\\") + someInt: IntScalarFilters + someInt_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { eq: ... }\\") + someInt_GT: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { gt: ... }\\") + someInt_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { gte: ... }\\") + someInt_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter someInt: { in: ... }\\") + someInt_LT: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { lt: ... }\\") + someInt_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { lte: ... }\\") + someLocalDateTime: LocalDateTimeScalarFilters + someLocalDateTime_EQ: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { eq: ... }\\") + someLocalDateTime_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { gt: ... }\\") + someLocalDateTime_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { gte: ... }\\") + someLocalDateTime_IN: [LocalDateTime] @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { in: ... }\\") + someLocalDateTime_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { lt: ... }\\") + someLocalDateTime_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { lte: ... }\\") + someLocalTime: LocalTimeScalarFilters + someLocalTime_EQ: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { eq: ... }\\") + someLocalTime_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { gt: ... }\\") + someLocalTime_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { gte: ... }\\") + someLocalTime_IN: [LocalTime] @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { in: ... }\\") + someLocalTime_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { lt: ... }\\") + someLocalTime_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { lte: ... }\\") + someTime: TimeScalarFilters + someTime_EQ: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { eq: ... }\\") + someTime_GT: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { gt: ... }\\") + someTime_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { gte: ... }\\") + someTime_IN: [Time] @deprecated(reason: \\"Please use the relevant generic filter someTime: { in: ... }\\") + someTime_LT: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { lt: ... }\\") + someTime_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { lte: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Query { + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + } + + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type StringAggregateSelection { + longest: String + shortest: String + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + + \\"\\"\\"A time, represented as an RFC3339 time string\\"\\"\\" + scalar Time + + type TimeAggregateSelection { + max: Time + min: Time + } + + \\"\\"\\"Time filters\\"\\"\\" + input TimeScalarFilters { + eq: Time + gt: Time + gte: Time + in: [Time!] + lt: Time + lte: Time + } + + \\"\\"\\"Time mutations\\"\\"\\" + input TimeScalarMutations { + set: Time + } + + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" + type UpdateInfo { + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); + + test("Where Level Aggregations", async () => { + const typeDefs = gql` + type User @node { + someId: ID + someString: String + someFloat: Float + someInt: Int + someBigInt: BigInt + someDateTime: DateTime + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someTime: Time + someDuration: Duration + } + + type Post @node { + title: String + likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") + } + + type Likes @relationshipProperties { + someId: ID + someString: String + someFloat: Float + someInt: Int + someBigInt: BigInt + someDateTime: DateTime + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someTime: Time + someDuration: Duration + } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { excludeDeprecatedFields: { aggregationFilters: true } }, + }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\" + A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. + \\"\\"\\" + scalar BigInt + + type BigIntAggregateSelection { + average: BigInt + max: BigInt + min: BigInt + sum: BigInt + } + + \\"\\"\\"Filters for an aggregation of an BigInt field\\"\\"\\" + input BigIntScalarAggregationFilters { + average: BigIntScalarFilters + max: BigIntScalarFilters + min: BigIntScalarFilters + sum: BigIntScalarFilters + } + + \\"\\"\\"BigInt filters\\"\\"\\" + input BigIntScalarFilters { + eq: BigInt + gt: BigInt + gte: BigInt + in: [BigInt!] + lt: BigInt + lte: BigInt + } + + \\"\\"\\"BigInt mutations\\"\\"\\" + input BigIntScalarMutations { + add: BigInt + set: BigInt + subtract: BigInt + } + + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" + type CreateInfo { + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreatePostsMutationResponse { + info: CreateInfo! + posts: [Post!]! + } + + type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! + } + + \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" + scalar DateTime + + type DateTimeAggregateSelection { + max: DateTime + min: DateTime + } + + \\"\\"\\"Filters for an aggregation of an DateTime input field\\"\\"\\" + input DateTimeScalarAggregationFilters { + max: DateTimeScalarFilters + min: DateTimeScalarFilters + } + + \\"\\"\\"DateTime filters\\"\\"\\" + input DateTimeScalarFilters { + eq: DateTime + gt: DateTime + gte: DateTime + in: [DateTime!] + lt: DateTime + lte: DateTime + } + + \\"\\"\\"DateTime mutations\\"\\"\\" + input DateTimeScalarMutations { + set: DateTime + } + + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" + type DeleteInfo { + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + \\"\\"\\"A duration, represented as an ISO 8601 duration string\\"\\"\\" + scalar Duration + + type DurationAggregateSelection { + max: Duration + min: Duration + } + + \\"\\"\\"Filters for an aggregation of a Dutation input field\\"\\"\\" + input DurationScalarAggregationFilters { + average: DurationScalarFilters + max: DurationScalarFilters + min: DurationScalarFilters + } + + \\"\\"\\"Duration filters\\"\\"\\" + input DurationScalarFilters { + eq: Duration + gt: Duration + gte: Duration + in: [Duration!] + lt: Duration + lte: Duration + } + + \\"\\"\\"Duration mutations\\"\\"\\" + input DurationScalarMutations { + set: Duration + } + + type FloatAggregateSelection { + average: Float + max: Float + min: Float + sum: Float + } + + \\"\\"\\"Filters for an aggregation of a float field\\"\\"\\" + input FloatScalarAggregationFilters { + average: FloatScalarFilters + max: FloatScalarFilters + min: FloatScalarFilters + sum: FloatScalarFilters + } + + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + type IntAggregateSelection { + average: Float + max: Int + min: Int + sum: Int + } + + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + + \\"\\"\\" + The edge properties for the following fields: + * Post.likes + \\"\\"\\" + type Likes { + someBigInt: BigInt + someDateTime: DateTime + someDuration: Duration + someFloat: Float + someId: ID + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someString: String + someTime: Time + } + + input LikesAggregationWhereInput { + AND: [LikesAggregationWhereInput!] + NOT: LikesAggregationWhereInput + OR: [LikesAggregationWhereInput!] + someBigInt: BigIntScalarAggregationFilters + someDateTime: DateTimeScalarAggregationFilters + someDuration: DurationScalarAggregationFilters + someFloat: FloatScalarAggregationFilters + someInt: IntScalarAggregationFilters + someLocalDateTime: LocalDateTimeScalarAggregationFilters + someLocalTime: LocalTimeScalarAggregationFilters + someString: StringScalarAggregationFilters + someTime: TimeScalarAggregationFilters + } + + input LikesCreateInput { + someBigInt: BigInt + someDateTime: DateTime + someDuration: Duration + someFloat: Float + someId: ID + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someString: String + someTime: Time + } + + input LikesSort { + someBigInt: SortDirection + someDateTime: SortDirection + someDuration: SortDirection + someFloat: SortDirection + someId: SortDirection + someInt: SortDirection + someLocalDateTime: SortDirection + someLocalTime: SortDirection + someString: SortDirection + someTime: SortDirection + } + + input LikesUpdateInput { + someBigInt: BigIntScalarMutations + someBigInt_DECREMENT: BigInt @deprecated(reason: \\"Please use the relevant generic mutation 'someBigInt: { decrement: ... } }' instead.\\") + someBigInt_INCREMENT: BigInt @deprecated(reason: \\"Please use the relevant generic mutation 'someBigInt: { increment: ... } }' instead.\\") + someBigInt_SET: BigInt @deprecated(reason: \\"Please use the generic mutation 'someBigInt: { set: ... } }' instead.\\") + someDateTime: DateTimeScalarMutations + someDateTime_SET: DateTime @deprecated(reason: \\"Please use the generic mutation 'someDateTime: { set: ... } }' instead.\\") + someDuration: DurationScalarMutations + someDuration_SET: Duration @deprecated(reason: \\"Please use the generic mutation 'someDuration: { set: ... } }' instead.\\") + someFloat: FloatScalarMutations + someFloat_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { add: ... } }' instead.\\") + someFloat_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { divide: ... } }' instead.\\") + someFloat_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { multiply: ... } }' instead.\\") + someFloat_SET: Float @deprecated(reason: \\"Please use the generic mutation 'someFloat: { set: ... } }' instead.\\") + someFloat_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { subtract: ... } }' instead.\\") + someId: IDScalarMutations + someId_SET: ID @deprecated(reason: \\"Please use the generic mutation 'someId: { set: ... } }' instead.\\") + someInt: IntScalarMutations + someInt_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'someInt: { decrement: ... } }' instead.\\") + someInt_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'someInt: { increment: ... } }' instead.\\") + someInt_SET: Int @deprecated(reason: \\"Please use the generic mutation 'someInt: { set: ... } }' instead.\\") + someLocalDateTime: LocalDateTimeScalarMutations + someLocalDateTime_SET: LocalDateTime @deprecated(reason: \\"Please use the generic mutation 'someLocalDateTime: { set: ... } }' instead.\\") + someLocalTime: LocalTimeScalarMutations + someLocalTime_SET: LocalTime @deprecated(reason: \\"Please use the generic mutation 'someLocalTime: { set: ... } }' instead.\\") + someString: StringScalarMutations + someString_SET: String @deprecated(reason: \\"Please use the generic mutation 'someString: { set: ... } }' instead.\\") + someTime: TimeScalarMutations + someTime_SET: Time @deprecated(reason: \\"Please use the generic mutation 'someTime: { set: ... } }' instead.\\") + } + + input LikesWhere { + AND: [LikesWhere!] + NOT: LikesWhere + OR: [LikesWhere!] + someBigInt: BigIntScalarFilters + someBigInt_EQ: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { eq: ... }\\") + someBigInt_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { gt: ... }\\") + someBigInt_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { gte: ... }\\") + someBigInt_IN: [BigInt] @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { in: ... }\\") + someBigInt_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { lt: ... }\\") + someBigInt_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { lte: ... }\\") + someDateTime: DateTimeScalarFilters + someDateTime_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { eq: ... }\\") + someDateTime_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { gt: ... }\\") + someDateTime_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { gte: ... }\\") + someDateTime_IN: [DateTime] @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { in: ... }\\") + someDateTime_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { lt: ... }\\") + someDateTime_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { lte: ... }\\") + someDuration: DurationScalarFilters + someDuration_EQ: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { eq: ... }\\") + someDuration_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { gt: ... }\\") + someDuration_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { gte: ... }\\") + someDuration_IN: [Duration] @deprecated(reason: \\"Please use the relevant generic filter someDuration: { in: ... }\\") + someDuration_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { lt: ... }\\") + someDuration_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { lte: ... }\\") + someFloat: FloatScalarFilters + someFloat_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { eq: ... }\\") + someFloat_GT: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { gt: ... }\\") + someFloat_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { gte: ... }\\") + someFloat_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter someFloat: { in: ... }\\") + someFloat_LT: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { lt: ... }\\") + someFloat_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { lte: ... }\\") + someId: IDScalarFilters + someId_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { contains: ... }\\") + someId_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { endsWith: ... }\\") + someId_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { eq: ... }\\") + someId_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter someId: { in: ... }\\") + someId_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { startsWith: ... }\\") + someInt: IntScalarFilters + someInt_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { eq: ... }\\") + someInt_GT: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { gt: ... }\\") + someInt_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { gte: ... }\\") + someInt_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter someInt: { in: ... }\\") + someInt_LT: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { lt: ... }\\") + someInt_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { lte: ... }\\") + someLocalDateTime: LocalDateTimeScalarFilters + someLocalDateTime_EQ: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { eq: ... }\\") + someLocalDateTime_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { gt: ... }\\") + someLocalDateTime_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { gte: ... }\\") + someLocalDateTime_IN: [LocalDateTime] @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { in: ... }\\") + someLocalDateTime_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { lt: ... }\\") + someLocalDateTime_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { lte: ... }\\") + someLocalTime: LocalTimeScalarFilters + someLocalTime_EQ: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { eq: ... }\\") + someLocalTime_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { gt: ... }\\") + someLocalTime_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { gte: ... }\\") + someLocalTime_IN: [LocalTime] @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { in: ... }\\") + someLocalTime_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { lt: ... }\\") + someLocalTime_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { lte: ... }\\") + someString: StringScalarFilters + someString_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter someString: { contains: ... }\\") + someString_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter someString: { endsWith: ... }\\") + someString_EQ: String @deprecated(reason: \\"Please use the relevant generic filter someString: { eq: ... }\\") + someString_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter someString: { in: ... }\\") + someString_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter someString: { startsWith: ... }\\") + someTime: TimeScalarFilters + someTime_EQ: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { eq: ... }\\") + someTime_GT: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { gt: ... }\\") + someTime_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { gte: ... }\\") + someTime_IN: [Time] @deprecated(reason: \\"Please use the relevant generic filter someTime: { in: ... }\\") + someTime_LT: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { lt: ... }\\") + someTime_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { lte: ... }\\") + } + + \\"\\"\\"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'\\"\\"\\" + scalar LocalDateTime + + type LocalDateTimeAggregateSelection { + max: LocalDateTime + min: LocalDateTime + } + + \\"\\"\\"Filters for an aggregation of an LocalDateTime input field\\"\\"\\" + input LocalDateTimeScalarAggregationFilters { + max: LocalDateTimeScalarFilters + min: LocalDateTimeScalarFilters + } + + \\"\\"\\"LocalDateTime filters\\"\\"\\" + input LocalDateTimeScalarFilters { + eq: LocalDateTime + gt: LocalDateTime + gte: LocalDateTime + in: [LocalDateTime!] + lt: LocalDateTime + lte: LocalDateTime + } + + \\"\\"\\"LocalDateTime mutations\\"\\"\\" + input LocalDateTimeScalarMutations { + set: LocalDateTime + } + + \\"\\"\\" + A local time, represented as a time string without timezone information + \\"\\"\\" + scalar LocalTime + + type LocalTimeAggregateSelection { + max: LocalTime + min: LocalTime + } + + \\"\\"\\"Filters for an aggregation of an LocalTime input field\\"\\"\\" + input LocalTimeScalarAggregationFilters { + max: LocalTimeScalarFilters + min: LocalTimeScalarFilters + } + + \\"\\"\\"LocalTime filters\\"\\"\\" + input LocalTimeScalarFilters { + eq: LocalTime + gt: LocalTime + gte: LocalTime + in: [LocalTime!] + lt: LocalTime + lte: LocalTime + } + + \\"\\"\\"LocalTime mutations\\"\\"\\" + input LocalTimeScalarMutations { + set: LocalTime + } + + type Mutation { + createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! + deleteUsers(where: UserWhere): DeleteInfo! + updatePosts(update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! + updateUsers(update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Post { + likes(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + likesAggregate(where: UserWhere): PostUserLikesAggregationSelection + likesConnection(after: String, first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! + title: String + } + + type PostAggregateSelection { + count: Int! + title: StringAggregateSelection! + } + + input PostCreateInput { + likes: PostLikesFieldInput + title: String + } + + input PostDeleteInput { + likes: [PostLikesDeleteFieldInput!] + } + + type PostEdge { + cursor: String! + node: Post! + } + + input PostLikesAggregateInput { + AND: [PostLikesAggregateInput!] + NOT: PostLikesAggregateInput + OR: [PostLikesAggregateInput!] + count: IntScalarFilters + count_EQ: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: LikesAggregationWhereInput + node: PostLikesNodeAggregationWhereInput + } + + input PostLikesConnectFieldInput { + edge: LikesCreateInput + where: UserConnectWhere + } + + type PostLikesConnection { + edges: [PostLikesRelationship!]! + pageInfo: PageInfo! + 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 + } + + input PostLikesConnectionWhere { + AND: [PostLikesConnectionWhere!] + NOT: PostLikesConnectionWhere + OR: [PostLikesConnectionWhere!] + edge: LikesWhere + node: UserWhere + } + + input PostLikesCreateFieldInput { + edge: LikesCreateInput + node: UserCreateInput! + } + + input PostLikesDeleteFieldInput { + where: PostLikesConnectionWhere + } + + input PostLikesDisconnectFieldInput { + where: PostLikesConnectionWhere + } + + input PostLikesFieldInput { + connect: [PostLikesConnectFieldInput!] + create: [PostLikesCreateFieldInput!] + } + + input PostLikesNodeAggregationWhereInput { + AND: [PostLikesNodeAggregationWhereInput!] + NOT: PostLikesNodeAggregationWhereInput + OR: [PostLikesNodeAggregationWhereInput!] + someBigInt: BigIntScalarAggregationFilters + someDateTime: DateTimeScalarAggregationFilters + someDuration: DurationScalarAggregationFilters + someFloat: FloatScalarAggregationFilters + someInt: IntScalarAggregationFilters + someLocalDateTime: LocalDateTimeScalarAggregationFilters + someLocalTime: LocalTimeScalarAggregationFilters + someString: StringScalarAggregationFilters + someTime: TimeScalarAggregationFilters + } + + type PostLikesRelationship { + cursor: String! + node: User! + properties: Likes! + } + + input PostLikesUpdateConnectionInput { + edge: LikesUpdateInput + node: UserUpdateInput + } + + input PostLikesUpdateFieldInput { + connect: [PostLikesConnectFieldInput!] + create: [PostLikesCreateFieldInput!] + delete: [PostLikesDeleteFieldInput!] + disconnect: [PostLikesDisconnectFieldInput!] + update: PostLikesUpdateConnectionInput + where: PostLikesConnectionWhere + } + + \\"\\"\\" + Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. + \\"\\"\\" + input PostSort { + title: SortDirection + } + + input PostUpdateInput { + likes: [PostLikesUpdateFieldInput!] + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") + } + + type PostUserLikesAggregationSelection { + count: Int! + edge: PostUserLikesEdgeAggregateSelection + node: PostUserLikesNodeAggregateSelection + } + + type PostUserLikesEdgeAggregateSelection { + someBigInt: BigIntAggregateSelection! + someDateTime: DateTimeAggregateSelection! + someDuration: DurationAggregateSelection! + someFloat: FloatAggregateSelection! + someInt: IntAggregateSelection! + someLocalDateTime: LocalDateTimeAggregateSelection! + someLocalTime: LocalTimeAggregateSelection! + someString: StringAggregateSelection! + someTime: TimeAggregateSelection! + } + + type PostUserLikesNodeAggregateSelection { + someBigInt: BigIntAggregateSelection! + someDateTime: DateTimeAggregateSelection! + someDuration: DurationAggregateSelection! + someFloat: FloatAggregateSelection! + someInt: IntAggregateSelection! + someLocalDateTime: LocalDateTimeAggregateSelection! + someLocalTime: LocalTimeAggregateSelection! + someString: StringAggregateSelection! + someTime: TimeAggregateSelection! + } + + input PostWhere { + AND: [PostWhere!] + NOT: PostWhere + OR: [PostWhere!] + likes: UserRelationshipFilters + likesAggregate: PostLikesAggregateInput + likesConnection: PostLikesConnectionFilters + \\"\\"\\" + Return Posts where all of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_ALL: PostLikesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'likesConnection: { all: { node: ... } } }' instead.\\") + \\"\\"\\" + Return Posts where none of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_NONE: PostLikesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'likesConnection: { none: { node: ... } } }' instead.\\") + \\"\\"\\" + Return Posts where one of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_SINGLE: PostLikesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'likesConnection: { single: { node: ... } } }' instead.\\") + \\"\\"\\" + Return Posts where some of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_SOME: PostLikesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'likesConnection: { some: { node: ... } } }' instead.\\") + \\"\\"\\"Return Posts where all of the related Users match this filter\\"\\"\\" + likes_ALL: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'likes: { all: ... }' instead.\\") + \\"\\"\\"Return Posts where none of the related Users match this filter\\"\\"\\" + likes_NONE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'likes: { none: ... }' instead.\\") + \\"\\"\\"Return Posts where one of the related Users match this filter\\"\\"\\" + likes_SINGLE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'likes: { single: ... }' instead.\\") + \\"\\"\\"Return Posts where some of the related Users match this filter\\"\\"\\" + likes_SOME: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'likes: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + } + + type PostsConnection { + edges: [PostEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Query { + posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): PostAggregateSelection! + postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! + users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! + } + + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type StringAggregateSelection { + longest: String + shortest: String + } + + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + + \\"\\"\\"A time, represented as an RFC3339 time string\\"\\"\\" + scalar Time + + type TimeAggregateSelection { + max: Time + min: Time + } + + \\"\\"\\"Filters for an aggregation of an Time input field\\"\\"\\" + input TimeScalarAggregationFilters { + max: TimeScalarFilters + min: TimeScalarFilters + } + + \\"\\"\\"Time filters\\"\\"\\" + input TimeScalarFilters { + eq: Time + gt: Time + gte: Time + in: [Time!] + lt: Time + lte: Time + } + + \\"\\"\\"Time mutations\\"\\"\\" + input TimeScalarMutations { + set: Time + } + + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" + type UpdateInfo { + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdatePostsMutationResponse { + info: UpdateInfo! + posts: [Post!]! + } + + type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! + } + + type User { + someBigInt: BigInt + someDateTime: DateTime + someDuration: Duration + someFloat: Float + someId: ID + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someString: String + someTime: Time + } + + type UserAggregateSelection { + count: Int! + someBigInt: BigIntAggregateSelection! + someDateTime: DateTimeAggregateSelection! + someDuration: DurationAggregateSelection! + someFloat: FloatAggregateSelection! + someInt: IntAggregateSelection! + someLocalDateTime: LocalDateTimeAggregateSelection! + someLocalTime: LocalTimeAggregateSelection! + someString: StringAggregateSelection! + someTime: TimeAggregateSelection! + } + + input UserConnectWhere { + node: UserWhere! + } + + input UserCreateInput { + someBigInt: BigInt + someDateTime: DateTime + someDuration: Duration + someFloat: Float + someId: ID + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someString: String + someTime: Time + } + + type UserEdge { + cursor: String! + node: User! + } + + input UserRelationshipFilters { + \\"\\"\\"Filter type where all of the related Users match this filter\\"\\"\\" + all: UserWhere + \\"\\"\\"Filter type where none of the related Users match this filter\\"\\"\\" + none: UserWhere + \\"\\"\\"Filter type where one of the related Users match this filter\\"\\"\\" + single: UserWhere + \\"\\"\\"Filter type where some of the related Users match this filter\\"\\"\\" + some: UserWhere + } + + \\"\\"\\" + Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. + \\"\\"\\" + input UserSort { + someBigInt: SortDirection + someDateTime: SortDirection + someDuration: SortDirection + someFloat: SortDirection + someId: SortDirection + someInt: SortDirection + someLocalDateTime: SortDirection + someLocalTime: SortDirection + someString: SortDirection + someTime: SortDirection + } + + input UserUpdateInput { + someBigInt: BigIntScalarMutations + someBigInt_DECREMENT: BigInt @deprecated(reason: \\"Please use the relevant generic mutation 'someBigInt: { decrement: ... } }' instead.\\") + someBigInt_INCREMENT: BigInt @deprecated(reason: \\"Please use the relevant generic mutation 'someBigInt: { increment: ... } }' instead.\\") + someBigInt_SET: BigInt @deprecated(reason: \\"Please use the generic mutation 'someBigInt: { set: ... } }' instead.\\") + someDateTime: DateTimeScalarMutations + someDateTime_SET: DateTime @deprecated(reason: \\"Please use the generic mutation 'someDateTime: { set: ... } }' instead.\\") + someDuration: DurationScalarMutations + someDuration_SET: Duration @deprecated(reason: \\"Please use the generic mutation 'someDuration: { set: ... } }' instead.\\") + someFloat: FloatScalarMutations + someFloat_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { add: ... } }' instead.\\") + someFloat_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { divide: ... } }' instead.\\") + someFloat_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { multiply: ... } }' instead.\\") + someFloat_SET: Float @deprecated(reason: \\"Please use the generic mutation 'someFloat: { set: ... } }' instead.\\") + someFloat_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { subtract: ... } }' instead.\\") + someId: IDScalarMutations + someId_SET: ID @deprecated(reason: \\"Please use the generic mutation 'someId: { set: ... } }' instead.\\") + someInt: IntScalarMutations + someInt_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'someInt: { decrement: ... } }' instead.\\") + someInt_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'someInt: { increment: ... } }' instead.\\") + someInt_SET: Int @deprecated(reason: \\"Please use the generic mutation 'someInt: { set: ... } }' instead.\\") + someLocalDateTime: LocalDateTimeScalarMutations + someLocalDateTime_SET: LocalDateTime @deprecated(reason: \\"Please use the generic mutation 'someLocalDateTime: { set: ... } }' instead.\\") + someLocalTime: LocalTimeScalarMutations + someLocalTime_SET: LocalTime @deprecated(reason: \\"Please use the generic mutation 'someLocalTime: { set: ... } }' instead.\\") + someString: StringScalarMutations + someString_SET: String @deprecated(reason: \\"Please use the generic mutation 'someString: { set: ... } }' instead.\\") + someTime: TimeScalarMutations + someTime_SET: Time @deprecated(reason: \\"Please use the generic mutation 'someTime: { set: ... } }' instead.\\") + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + someBigInt: BigIntScalarFilters + someBigInt_EQ: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { eq: ... }\\") + someBigInt_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { gt: ... }\\") + someBigInt_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { gte: ... }\\") + someBigInt_IN: [BigInt] @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { in: ... }\\") + someBigInt_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { lt: ... }\\") + someBigInt_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { lte: ... }\\") + someDateTime: DateTimeScalarFilters + someDateTime_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { eq: ... }\\") + someDateTime_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { gt: ... }\\") + someDateTime_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { gte: ... }\\") + someDateTime_IN: [DateTime] @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { in: ... }\\") + someDateTime_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { lt: ... }\\") + someDateTime_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { lte: ... }\\") + someDuration: DurationScalarFilters + someDuration_EQ: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { eq: ... }\\") + someDuration_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { gt: ... }\\") + someDuration_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { gte: ... }\\") + someDuration_IN: [Duration] @deprecated(reason: \\"Please use the relevant generic filter someDuration: { in: ... }\\") + someDuration_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { lt: ... }\\") + someDuration_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { lte: ... }\\") + someFloat: FloatScalarFilters + someFloat_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { eq: ... }\\") + someFloat_GT: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { gt: ... }\\") + someFloat_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { gte: ... }\\") + someFloat_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter someFloat: { in: ... }\\") + someFloat_LT: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { lt: ... }\\") + someFloat_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { lte: ... }\\") + someId: IDScalarFilters + someId_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { contains: ... }\\") + someId_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { endsWith: ... }\\") + someId_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { eq: ... }\\") + someId_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter someId: { in: ... }\\") + someId_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { startsWith: ... }\\") + someInt: IntScalarFilters + someInt_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { eq: ... }\\") + someInt_GT: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { gt: ... }\\") + someInt_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { gte: ... }\\") + someInt_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter someInt: { in: ... }\\") + someInt_LT: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { lt: ... }\\") + someInt_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { lte: ... }\\") + someLocalDateTime: LocalDateTimeScalarFilters + someLocalDateTime_EQ: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { eq: ... }\\") + someLocalDateTime_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { gt: ... }\\") + someLocalDateTime_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { gte: ... }\\") + someLocalDateTime_IN: [LocalDateTime] @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { in: ... }\\") + someLocalDateTime_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { lt: ... }\\") + someLocalDateTime_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { lte: ... }\\") + someLocalTime: LocalTimeScalarFilters + someLocalTime_EQ: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { eq: ... }\\") + someLocalTime_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { gt: ... }\\") + someLocalTime_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { gte: ... }\\") + someLocalTime_IN: [LocalTime] @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { in: ... }\\") + someLocalTime_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { lt: ... }\\") + someLocalTime_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { lte: ... }\\") + someString: StringScalarFilters + someString_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter someString: { contains: ... }\\") + someString_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter someString: { endsWith: ... }\\") + someString_EQ: String @deprecated(reason: \\"Please use the relevant generic filter someString: { eq: ... }\\") + someString_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter someString: { in: ... }\\") + someString_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter someString: { startsWith: ... }\\") + someTime: TimeScalarFilters + someTime_EQ: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { eq: ... }\\") + someTime_GT: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { gt: ... }\\") + someTime_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { gte: ... }\\") + someTime_IN: [Time] @deprecated(reason: \\"Please use the relevant generic filter someTime: { in: ... }\\") + someTime_LT: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { lt: ... }\\") + someTime_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { lte: ... }\\") + } + + type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + }" + `); + }); + + test("Where Level Aggregations with arrays", async () => { + const typeDefs = gql` + type User @node { + someId: ID + someString: String + someFloat: Float + someInt: Int + someBigInt: BigInt + someDateTime: DateTime + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someTime: Time + someDuration: Duration + } + + type Post @node { + title: String + likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") + } + + type Likes @relationshipProperties { + someId: [ID!]! + someString: [String!]! + someFloat: [Float!]! + someInt: [Int!]! + someBigInt: [BigInt!]! + someDateTime: [DateTime!]! + someLocalDateTime: [LocalDateTime!]! + someLocalTime: [LocalTime!]! + someTime: [Time!]! + someDuration: [Duration!]! + } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { excludeDeprecatedFields: { aggregationFilters: true } }, + }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\" + A BigInt value up to 64 bits in size, which can be a number or a string if used inline, or a string only if used as a variable. Always returned as a string. + \\"\\"\\" + scalar BigInt + + type BigIntAggregateSelection { + average: BigInt + max: BigInt + min: BigInt + sum: BigInt + } + + \\"\\"\\"BigInt list filters\\"\\"\\" + input BigIntListFilters { + eq: [BigInt!] + includes: BigInt + } + + \\"\\"\\"Filters for an aggregation of an BigInt field\\"\\"\\" + input BigIntScalarAggregationFilters { + average: BigIntScalarFilters + max: BigIntScalarFilters + min: BigIntScalarFilters + sum: BigIntScalarFilters + } + + \\"\\"\\"BigInt filters\\"\\"\\" + input BigIntScalarFilters { + eq: BigInt + gt: BigInt + gte: BigInt + in: [BigInt!] + lt: BigInt + lte: BigInt + } + + \\"\\"\\"BigInt mutations\\"\\"\\" + input BigIntScalarMutations { + add: BigInt + set: BigInt + subtract: BigInt + } + + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" + type CreateInfo { + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreatePostsMutationResponse { + info: CreateInfo! + posts: [Post!]! + } + + type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! + } + + \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" + scalar DateTime + + type DateTimeAggregateSelection { + max: DateTime + min: DateTime + } + + \\"\\"\\"DateTime list filters\\"\\"\\" + input DateTimeListFilters { + eq: [DateTime!] + includes: DateTime + } + + \\"\\"\\"Filters for an aggregation of an DateTime input field\\"\\"\\" + input DateTimeScalarAggregationFilters { + max: DateTimeScalarFilters + min: DateTimeScalarFilters + } + + \\"\\"\\"DateTime filters\\"\\"\\" + input DateTimeScalarFilters { + eq: DateTime + gt: DateTime + gte: DateTime + in: [DateTime!] + lt: DateTime + lte: DateTime + } + + \\"\\"\\"DateTime mutations\\"\\"\\" + input DateTimeScalarMutations { + set: DateTime + } + + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" + type DeleteInfo { + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + \\"\\"\\"A duration, represented as an ISO 8601 duration string\\"\\"\\" + scalar Duration + + type DurationAggregateSelection { + max: Duration + min: Duration + } + + \\"\\"\\"Duration list filters\\"\\"\\" + input DurationListFilters { + eq: [Duration!] + includes: Duration + } + + \\"\\"\\"Filters for an aggregation of a Dutation input field\\"\\"\\" + input DurationScalarAggregationFilters { + average: DurationScalarFilters + max: DurationScalarFilters + min: DurationScalarFilters + } + + \\"\\"\\"Duration filters\\"\\"\\" + input DurationScalarFilters { + eq: Duration + gt: Duration + gte: Duration + in: [Duration!] + lt: Duration + lte: Duration + } + + \\"\\"\\"Duration mutations\\"\\"\\" + input DurationScalarMutations { + set: Duration + } + + type FloatAggregateSelection { + average: Float + max: Float + min: Float + sum: Float + } + + \\"\\"\\"Float list filters\\"\\"\\" + input FloatListFilters { + eq: [Float!] + includes: Float + } + + \\"\\"\\"Filters for an aggregation of a float field\\"\\"\\" + input FloatScalarAggregationFilters { + average: FloatScalarFilters + max: FloatScalarFilters + min: FloatScalarFilters + sum: FloatScalarFilters + } + + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + + \\"\\"\\"ID list filters\\"\\"\\" + input IDListFilters { + eq: [ID!] + includes: ID + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + type IntAggregateSelection { + average: Float + max: Int + min: Int + sum: Int + } + + \\"\\"\\"Int list filters\\"\\"\\" + input IntListFilters { + eq: [Int!] + includes: Int + } + + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + + \\"\\"\\" + The edge properties for the following fields: + * Post.likes + \\"\\"\\" + type Likes { + someBigInt: [BigInt!]! + someDateTime: [DateTime!]! + someDuration: [Duration!]! + someFloat: [Float!]! + someId: [ID!]! + someInt: [Int!]! + someLocalDateTime: [LocalDateTime!]! + someLocalTime: [LocalTime!]! + someString: [String!]! + someTime: [Time!]! + } + + input LikesCreateInput { + someBigInt: [BigInt!]! + someDateTime: [DateTime!]! + someDuration: [Duration!]! + someFloat: [Float!]! + someId: [ID!]! + someInt: [Int!]! + someLocalDateTime: [LocalDateTime!]! + someLocalTime: [LocalTime!]! + someString: [String!]! + someTime: [Time!]! + } + + input LikesSort { + someBigInt: SortDirection + someDateTime: SortDirection + someDuration: SortDirection + someFloat: SortDirection + someId: SortDirection + someInt: SortDirection + someLocalDateTime: SortDirection + someLocalTime: SortDirection + someString: SortDirection + someTime: SortDirection + } + + input LikesUpdateInput { + someBigInt: ListBigIntMutations + someBigInt_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someBigInt: { pop: ... } }' instead.\\") + someBigInt_PUSH: [BigInt!] @deprecated(reason: \\"Please use the generic mutation 'someBigInt: { push: ... } }' instead.\\") + someBigInt_SET: [BigInt!] @deprecated(reason: \\"Please use the generic mutation 'someBigInt: { set: ... } }' instead.\\") + someDateTime: ListDateTimeMutations + someDateTime_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someDateTime: { pop: ... } }' instead.\\") + someDateTime_PUSH: [DateTime!] @deprecated(reason: \\"Please use the generic mutation 'someDateTime: { push: ... } }' instead.\\") + someDateTime_SET: [DateTime!] @deprecated(reason: \\"Please use the generic mutation 'someDateTime: { set: ... } }' instead.\\") + someDuration: ListDurationMutations + someDuration_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someDuration: { pop: ... } }' instead.\\") + someDuration_PUSH: [Duration!] @deprecated(reason: \\"Please use the generic mutation 'someDuration: { push: ... } }' instead.\\") + someDuration_SET: [Duration!] @deprecated(reason: \\"Please use the generic mutation 'someDuration: { set: ... } }' instead.\\") + someFloat: ListFloatMutations + someFloat_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someFloat: { pop: ... } }' instead.\\") + someFloat_PUSH: [Float!] @deprecated(reason: \\"Please use the generic mutation 'someFloat: { push: ... } }' instead.\\") + someFloat_SET: [Float!] @deprecated(reason: \\"Please use the generic mutation 'someFloat: { set: ... } }' instead.\\") + someId: ListIDMutations + someId_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someId: { pop: ... } }' instead.\\") + someId_PUSH: [ID!] @deprecated(reason: \\"Please use the generic mutation 'someId: { push: ... } }' instead.\\") + someId_SET: [ID!] @deprecated(reason: \\"Please use the generic mutation 'someId: { set: ... } }' instead.\\") + someInt: ListIntMutations + someInt_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someInt: { pop: ... } }' instead.\\") + someInt_PUSH: [Int!] @deprecated(reason: \\"Please use the generic mutation 'someInt: { push: ... } }' instead.\\") + someInt_SET: [Int!] @deprecated(reason: \\"Please use the generic mutation 'someInt: { set: ... } }' instead.\\") + someLocalDateTime: ListLocalDateTimeMutations + someLocalDateTime_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someLocalDateTime: { pop: ... } }' instead.\\") + someLocalDateTime_PUSH: [LocalDateTime!] @deprecated(reason: \\"Please use the generic mutation 'someLocalDateTime: { push: ... } }' instead.\\") + someLocalDateTime_SET: [LocalDateTime!] @deprecated(reason: \\"Please use the generic mutation 'someLocalDateTime: { set: ... } }' instead.\\") + someLocalTime: ListLocalTimeMutations + someLocalTime_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someLocalTime: { pop: ... } }' instead.\\") + someLocalTime_PUSH: [LocalTime!] @deprecated(reason: \\"Please use the generic mutation 'someLocalTime: { push: ... } }' instead.\\") + someLocalTime_SET: [LocalTime!] @deprecated(reason: \\"Please use the generic mutation 'someLocalTime: { set: ... } }' instead.\\") + someString: ListStringMutations + someString_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someString: { pop: ... } }' instead.\\") + someString_PUSH: [String!] @deprecated(reason: \\"Please use the generic mutation 'someString: { push: ... } }' instead.\\") + someString_SET: [String!] @deprecated(reason: \\"Please use the generic mutation 'someString: { set: ... } }' instead.\\") + someTime: ListTimeMutations + someTime_POP: Int @deprecated(reason: \\"Please use the generic mutation 'someTime: { pop: ... } }' instead.\\") + someTime_PUSH: [Time!] @deprecated(reason: \\"Please use the generic mutation 'someTime: { push: ... } }' instead.\\") + someTime_SET: [Time!] @deprecated(reason: \\"Please use the generic mutation 'someTime: { set: ... } }' instead.\\") + } + + input LikesWhere { + AND: [LikesWhere!] + NOT: LikesWhere + OR: [LikesWhere!] + someBigInt: BigIntListFilters + someBigInt_EQ: [BigInt!] @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { eq: ... }\\") + someBigInt_INCLUDES: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { includes: ... }\\") + someDateTime: DateTimeListFilters + someDateTime_EQ: [DateTime!] @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { eq: ... }\\") + someDateTime_INCLUDES: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { includes: ... }\\") + someDuration: DurationListFilters + someDuration_EQ: [Duration!] @deprecated(reason: \\"Please use the relevant generic filter someDuration: { eq: ... }\\") + someDuration_INCLUDES: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { includes: ... }\\") + someFloat: FloatListFilters + someFloat_EQ: [Float!] @deprecated(reason: \\"Please use the relevant generic filter someFloat: { eq: ... }\\") + someFloat_INCLUDES: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { includes: ... }\\") + someId: IDListFilters + someId_EQ: [ID!] @deprecated(reason: \\"Please use the relevant generic filter someId: { eq: ... }\\") + someId_INCLUDES: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { includes: ... }\\") + someInt: IntListFilters + someInt_EQ: [Int!] @deprecated(reason: \\"Please use the relevant generic filter someInt: { eq: ... }\\") + someInt_INCLUDES: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { includes: ... }\\") + someLocalDateTime: LocalDateTimeListFilters + someLocalDateTime_EQ: [LocalDateTime!] @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { eq: ... }\\") + someLocalDateTime_INCLUDES: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { includes: ... }\\") + someLocalTime: LocalTimeListFilters + someLocalTime_EQ: [LocalTime!] @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { eq: ... }\\") + someLocalTime_INCLUDES: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { includes: ... }\\") + someString: StringListFilters + someString_EQ: [String!] @deprecated(reason: \\"Please use the relevant generic filter someString: { eq: ... }\\") + someString_INCLUDES: String @deprecated(reason: \\"Please use the relevant generic filter someString: { includes: ... }\\") + someTime: TimeListFilters + someTime_EQ: [Time!] @deprecated(reason: \\"Please use the relevant generic filter someTime: { eq: ... }\\") + someTime_INCLUDES: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { includes: ... }\\") + } + + \\"\\"\\"Mutations for a list for BigInt\\"\\"\\" + input ListBigIntMutations { + pop: Int + push: [BigInt!] + set: [BigInt!] + } + + \\"\\"\\"Mutations for a list for DateTime\\"\\"\\" + input ListDateTimeMutations { + pop: Int + push: [DateTime!] + set: [DateTime!] + } + + \\"\\"\\"Mutations for a list for Duration\\"\\"\\" + input ListDurationMutations { + pop: Int + push: [Duration!] + set: [Duration!] + } + + \\"\\"\\"Mutations for a list for Float\\"\\"\\" + input ListFloatMutations { + pop: Int + push: [Float!] + set: [Float!] + } + + \\"\\"\\"Mutations for a list for ID\\"\\"\\" + input ListIDMutations { + pop: Int + push: [ID!] + set: [ID!] + } + + \\"\\"\\"Mutations for a list for Int\\"\\"\\" + input ListIntMutations { + pop: Int + push: [Int!] + set: [Int!] + } + + \\"\\"\\"Mutations for a list for LocalDateTime\\"\\"\\" + input ListLocalDateTimeMutations { + pop: Int + push: [LocalDateTime!] + set: [LocalDateTime!] + } + + \\"\\"\\"Mutations for a list for LocalTime\\"\\"\\" + input ListLocalTimeMutations { + pop: Int + push: [LocalTime!] + set: [LocalTime!] + } + + \\"\\"\\"Mutations for a list for String\\"\\"\\" + input ListStringMutations { + pop: Int + push: [String!] + set: [String!] + } + + \\"\\"\\"Mutations for a list for Time\\"\\"\\" + input ListTimeMutations { + pop: Int + push: [Time!] + set: [Time!] + } + + \\"\\"\\"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'\\"\\"\\" + scalar LocalDateTime + + type LocalDateTimeAggregateSelection { + max: LocalDateTime + min: LocalDateTime + } + + \\"\\"\\"LocalDateTime list filters\\"\\"\\" + input LocalDateTimeListFilters { + eq: [LocalDateTime!] + includes: LocalDateTime + } + + \\"\\"\\"Filters for an aggregation of an LocalDateTime input field\\"\\"\\" + input LocalDateTimeScalarAggregationFilters { + max: LocalDateTimeScalarFilters + min: LocalDateTimeScalarFilters + } + + \\"\\"\\"LocalDateTime filters\\"\\"\\" + input LocalDateTimeScalarFilters { + eq: LocalDateTime + gt: LocalDateTime + gte: LocalDateTime + in: [LocalDateTime!] + lt: LocalDateTime + lte: LocalDateTime + } + + \\"\\"\\"LocalDateTime mutations\\"\\"\\" + input LocalDateTimeScalarMutations { + set: LocalDateTime + } + + \\"\\"\\" + A local time, represented as a time string without timezone information + \\"\\"\\" + scalar LocalTime + + type LocalTimeAggregateSelection { + max: LocalTime + min: LocalTime + } + + \\"\\"\\"LocalTime list filters\\"\\"\\" + input LocalTimeListFilters { + eq: [LocalTime!] + includes: LocalTime + } + + \\"\\"\\"Filters for an aggregation of an LocalTime input field\\"\\"\\" + input LocalTimeScalarAggregationFilters { + max: LocalTimeScalarFilters + min: LocalTimeScalarFilters + } + + \\"\\"\\"LocalTime filters\\"\\"\\" + input LocalTimeScalarFilters { + eq: LocalTime + gt: LocalTime + gte: LocalTime + in: [LocalTime!] + lt: LocalTime + lte: LocalTime + } + + \\"\\"\\"LocalTime mutations\\"\\"\\" + input LocalTimeScalarMutations { + set: LocalTime + } + + type Mutation { + createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! + deleteUsers(where: UserWhere): DeleteInfo! + updatePosts(update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! + updateUsers(update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Post { + likes(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + likesAggregate(where: UserWhere): PostUserLikesAggregationSelection + likesConnection(after: String, first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! + title: String + } + + type PostAggregateSelection { + count: Int! + title: StringAggregateSelection! + } + + input PostCreateInput { + likes: PostLikesFieldInput + title: String + } + + input PostDeleteInput { + likes: [PostLikesDeleteFieldInput!] + } + + type PostEdge { + cursor: String! + node: Post! + } + + input PostLikesAggregateInput { + AND: [PostLikesAggregateInput!] + NOT: PostLikesAggregateInput + OR: [PostLikesAggregateInput!] + count: IntScalarFilters + count_EQ: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: PostLikesNodeAggregationWhereInput + } + + input PostLikesConnectFieldInput { + edge: LikesCreateInput! + where: UserConnectWhere + } + + type PostLikesConnection { + edges: [PostLikesRelationship!]! + pageInfo: PageInfo! + 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 + } + + input PostLikesConnectionWhere { + AND: [PostLikesConnectionWhere!] + NOT: PostLikesConnectionWhere + OR: [PostLikesConnectionWhere!] + edge: LikesWhere + node: UserWhere + } + + input PostLikesCreateFieldInput { + edge: LikesCreateInput! + node: UserCreateInput! + } + + input PostLikesDeleteFieldInput { + where: PostLikesConnectionWhere + } + + input PostLikesDisconnectFieldInput { + where: PostLikesConnectionWhere + } + + input PostLikesFieldInput { + connect: [PostLikesConnectFieldInput!] + create: [PostLikesCreateFieldInput!] + } + + input PostLikesNodeAggregationWhereInput { + AND: [PostLikesNodeAggregationWhereInput!] + NOT: PostLikesNodeAggregationWhereInput + OR: [PostLikesNodeAggregationWhereInput!] + someBigInt: BigIntScalarAggregationFilters + someDateTime: DateTimeScalarAggregationFilters + someDuration: DurationScalarAggregationFilters + someFloat: FloatScalarAggregationFilters + someInt: IntScalarAggregationFilters + someLocalDateTime: LocalDateTimeScalarAggregationFilters + someLocalTime: LocalTimeScalarAggregationFilters + someString: StringScalarAggregationFilters + someTime: TimeScalarAggregationFilters + } + + type PostLikesRelationship { + cursor: String! + node: User! + properties: Likes! + } + + input PostLikesUpdateConnectionInput { + edge: LikesUpdateInput + node: UserUpdateInput + } + + input PostLikesUpdateFieldInput { + connect: [PostLikesConnectFieldInput!] + create: [PostLikesCreateFieldInput!] + delete: [PostLikesDeleteFieldInput!] + disconnect: [PostLikesDisconnectFieldInput!] + update: PostLikesUpdateConnectionInput + where: PostLikesConnectionWhere + } + + \\"\\"\\" + Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. + \\"\\"\\" + input PostSort { + title: SortDirection + } + + input PostUpdateInput { + likes: [PostLikesUpdateFieldInput!] + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") + } + + type PostUserLikesAggregationSelection { + count: Int! + node: PostUserLikesNodeAggregateSelection + } + + type PostUserLikesNodeAggregateSelection { + someBigInt: BigIntAggregateSelection! + someDateTime: DateTimeAggregateSelection! + someDuration: DurationAggregateSelection! + someFloat: FloatAggregateSelection! + someInt: IntAggregateSelection! + someLocalDateTime: LocalDateTimeAggregateSelection! + someLocalTime: LocalTimeAggregateSelection! + someString: StringAggregateSelection! + someTime: TimeAggregateSelection! + } + + input PostWhere { + AND: [PostWhere!] + NOT: PostWhere + OR: [PostWhere!] + likes: UserRelationshipFilters + likesAggregate: PostLikesAggregateInput + likesConnection: PostLikesConnectionFilters + \\"\\"\\" + Return Posts where all of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_ALL: PostLikesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'likesConnection: { all: { node: ... } } }' instead.\\") + \\"\\"\\" + Return Posts where none of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_NONE: PostLikesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'likesConnection: { none: { node: ... } } }' instead.\\") + \\"\\"\\" + Return Posts where one of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_SINGLE: PostLikesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'likesConnection: { single: { node: ... } } }' instead.\\") + \\"\\"\\" + Return Posts where some of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_SOME: PostLikesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'likesConnection: { some: { node: ... } } }' instead.\\") + \\"\\"\\"Return Posts where all of the related Users match this filter\\"\\"\\" + likes_ALL: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'likes: { all: ... }' instead.\\") + \\"\\"\\"Return Posts where none of the related Users match this filter\\"\\"\\" + likes_NONE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'likes: { none: ... }' instead.\\") + \\"\\"\\"Return Posts where one of the related Users match this filter\\"\\"\\" + likes_SINGLE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'likes: { single: ... }' instead.\\") + \\"\\"\\"Return Posts where some of the related Users match this filter\\"\\"\\" + likes_SOME: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'likes: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") + } + + type PostsConnection { + edges: [PostEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Query { + posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): PostAggregateSelection! + postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! + users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! + } + + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type StringAggregateSelection { + longest: String + shortest: String + } + + \\"\\"\\"String list filters\\"\\"\\" + input StringListFilters { + eq: [String!] + includes: String + } + + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + + \\"\\"\\"A time, represented as an RFC3339 time string\\"\\"\\" + scalar Time + + type TimeAggregateSelection { + max: Time + min: Time + } + + \\"\\"\\"Time list filters\\"\\"\\" + input TimeListFilters { + eq: [Time!] + includes: Time + } + + \\"\\"\\"Filters for an aggregation of an Time input field\\"\\"\\" + input TimeScalarAggregationFilters { + max: TimeScalarFilters + min: TimeScalarFilters + } + + \\"\\"\\"Time filters\\"\\"\\" + input TimeScalarFilters { + eq: Time + gt: Time + gte: Time + in: [Time!] + lt: Time + lte: Time + } + + \\"\\"\\"Time mutations\\"\\"\\" + input TimeScalarMutations { + set: Time + } + + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" + type UpdateInfo { + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdatePostsMutationResponse { + info: UpdateInfo! + posts: [Post!]! + } + + type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! + } + + type User { + someBigInt: BigInt + someDateTime: DateTime + someDuration: Duration + someFloat: Float + someId: ID + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someString: String + someTime: Time + } + + type UserAggregateSelection { + count: Int! + someBigInt: BigIntAggregateSelection! + someDateTime: DateTimeAggregateSelection! + someDuration: DurationAggregateSelection! + someFloat: FloatAggregateSelection! + someInt: IntAggregateSelection! + someLocalDateTime: LocalDateTimeAggregateSelection! + someLocalTime: LocalTimeAggregateSelection! + someString: StringAggregateSelection! + someTime: TimeAggregateSelection! + } + + input UserConnectWhere { + node: UserWhere! + } + + input UserCreateInput { + someBigInt: BigInt + someDateTime: DateTime + someDuration: Duration + someFloat: Float + someId: ID + someInt: Int + someLocalDateTime: LocalDateTime + someLocalTime: LocalTime + someString: String + someTime: Time + } + + type UserEdge { + cursor: String! + node: User! + } + + input UserRelationshipFilters { + \\"\\"\\"Filter type where all of the related Users match this filter\\"\\"\\" + all: UserWhere + \\"\\"\\"Filter type where none of the related Users match this filter\\"\\"\\" + none: UserWhere + \\"\\"\\"Filter type where one of the related Users match this filter\\"\\"\\" + single: UserWhere + \\"\\"\\"Filter type where some of the related Users match this filter\\"\\"\\" + some: UserWhere + } + + \\"\\"\\" + Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. + \\"\\"\\" + input UserSort { + someBigInt: SortDirection + someDateTime: SortDirection + someDuration: SortDirection + someFloat: SortDirection + someId: SortDirection + someInt: SortDirection + someLocalDateTime: SortDirection + someLocalTime: SortDirection + someString: SortDirection + someTime: SortDirection + } + + input UserUpdateInput { + someBigInt: BigIntScalarMutations + someBigInt_DECREMENT: BigInt @deprecated(reason: \\"Please use the relevant generic mutation 'someBigInt: { decrement: ... } }' instead.\\") + someBigInt_INCREMENT: BigInt @deprecated(reason: \\"Please use the relevant generic mutation 'someBigInt: { increment: ... } }' instead.\\") + someBigInt_SET: BigInt @deprecated(reason: \\"Please use the generic mutation 'someBigInt: { set: ... } }' instead.\\") + someDateTime: DateTimeScalarMutations + someDateTime_SET: DateTime @deprecated(reason: \\"Please use the generic mutation 'someDateTime: { set: ... } }' instead.\\") + someDuration: DurationScalarMutations + someDuration_SET: Duration @deprecated(reason: \\"Please use the generic mutation 'someDuration: { set: ... } }' instead.\\") + someFloat: FloatScalarMutations + someFloat_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { add: ... } }' instead.\\") + someFloat_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { divide: ... } }' instead.\\") + someFloat_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { multiply: ... } }' instead.\\") + someFloat_SET: Float @deprecated(reason: \\"Please use the generic mutation 'someFloat: { set: ... } }' instead.\\") + someFloat_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'someFloat: { subtract: ... } }' instead.\\") + someId: IDScalarMutations + someId_SET: ID @deprecated(reason: \\"Please use the generic mutation 'someId: { set: ... } }' instead.\\") + someInt: IntScalarMutations + someInt_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'someInt: { decrement: ... } }' instead.\\") + someInt_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'someInt: { increment: ... } }' instead.\\") + someInt_SET: Int @deprecated(reason: \\"Please use the generic mutation 'someInt: { set: ... } }' instead.\\") + someLocalDateTime: LocalDateTimeScalarMutations + someLocalDateTime_SET: LocalDateTime @deprecated(reason: \\"Please use the generic mutation 'someLocalDateTime: { set: ... } }' instead.\\") + someLocalTime: LocalTimeScalarMutations + someLocalTime_SET: LocalTime @deprecated(reason: \\"Please use the generic mutation 'someLocalTime: { set: ... } }' instead.\\") + someString: StringScalarMutations + someString_SET: String @deprecated(reason: \\"Please use the generic mutation 'someString: { set: ... } }' instead.\\") + someTime: TimeScalarMutations + someTime_SET: Time @deprecated(reason: \\"Please use the generic mutation 'someTime: { set: ... } }' instead.\\") + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + someBigInt: BigIntScalarFilters + someBigInt_EQ: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { eq: ... }\\") + someBigInt_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { gt: ... }\\") + someBigInt_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { gte: ... }\\") + someBigInt_IN: [BigInt] @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { in: ... }\\") + someBigInt_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { lt: ... }\\") + someBigInt_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter someBigInt: { lte: ... }\\") + someDateTime: DateTimeScalarFilters + someDateTime_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { eq: ... }\\") + someDateTime_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { gt: ... }\\") + someDateTime_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { gte: ... }\\") + someDateTime_IN: [DateTime] @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { in: ... }\\") + someDateTime_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { lt: ... }\\") + someDateTime_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter someDateTime: { lte: ... }\\") + someDuration: DurationScalarFilters + someDuration_EQ: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { eq: ... }\\") + someDuration_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { gt: ... }\\") + someDuration_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { gte: ... }\\") + someDuration_IN: [Duration] @deprecated(reason: \\"Please use the relevant generic filter someDuration: { in: ... }\\") + someDuration_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { lt: ... }\\") + someDuration_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter someDuration: { lte: ... }\\") + someFloat: FloatScalarFilters + someFloat_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { eq: ... }\\") + someFloat_GT: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { gt: ... }\\") + someFloat_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { gte: ... }\\") + someFloat_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter someFloat: { in: ... }\\") + someFloat_LT: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { lt: ... }\\") + someFloat_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter someFloat: { lte: ... }\\") + someId: IDScalarFilters + someId_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { contains: ... }\\") + someId_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { endsWith: ... }\\") + someId_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { eq: ... }\\") + someId_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter someId: { in: ... }\\") + someId_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter someId: { startsWith: ... }\\") + someInt: IntScalarFilters + someInt_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { eq: ... }\\") + someInt_GT: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { gt: ... }\\") + someInt_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { gte: ... }\\") + someInt_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter someInt: { in: ... }\\") + someInt_LT: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { lt: ... }\\") + someInt_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter someInt: { lte: ... }\\") + someLocalDateTime: LocalDateTimeScalarFilters + someLocalDateTime_EQ: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { eq: ... }\\") + someLocalDateTime_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { gt: ... }\\") + someLocalDateTime_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { gte: ... }\\") + someLocalDateTime_IN: [LocalDateTime] @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { in: ... }\\") + someLocalDateTime_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { lt: ... }\\") + someLocalDateTime_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter someLocalDateTime: { lte: ... }\\") + someLocalTime: LocalTimeScalarFilters + someLocalTime_EQ: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { eq: ... }\\") + someLocalTime_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { gt: ... }\\") + someLocalTime_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { gte: ... }\\") + someLocalTime_IN: [LocalTime] @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { in: ... }\\") + someLocalTime_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { lt: ... }\\") + someLocalTime_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter someLocalTime: { lte: ... }\\") + someString: StringScalarFilters + someString_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter someString: { contains: ... }\\") + someString_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter someString: { endsWith: ... }\\") + someString_EQ: String @deprecated(reason: \\"Please use the relevant generic filter someString: { eq: ... }\\") + someString_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter someString: { in: ... }\\") + someString_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter someString: { startsWith: ... }\\") + someTime: TimeScalarFilters + someTime_EQ: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { eq: ... }\\") + someTime_GT: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { gt: ... }\\") + someTime_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { gte: ... }\\") + someTime_IN: [Time] @deprecated(reason: \\"Please use the relevant generic filter someTime: { in: ... }\\") + someTime_LT: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { lt: ... }\\") + someTime_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter someTime: { lte: ... }\\") + } + + type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + }" + `); + }); +}); diff --git a/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts b/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts deleted file mode 100644 index d18850a2a2..0000000000 --- a/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts +++ /dev/null @@ -1,620 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { printSchemaWithDirectives } from "@graphql-tools/utils"; -import { gql } from "graphql-tag"; -import { lexicographicSortSchema } from "graphql/utilities"; -import { Neo4jGraphQL } from "../../../src"; - -describe("Arrays Methods", () => { - test("Array of Float and Array of Actor relationships", async () => { - const typeDefs = gql` - type Actor @node { - name: String - actedIn: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) - } - - type Movie @node { - id: ID! - ratings: [Float!]! - actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) - averageRating: Float! - } - - type ActedIn @relationshipProperties { - pay: [Float!] - } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\" - The edge properties for the following fields: - * Actor.actedIn - * Movie.actors - \\"\\"\\" - type ActedIn { - pay: [Float!] - } - - input ActedInCreateInput { - pay: [Float!] - } - - input ActedInSort { - pay: SortDirection - } - - input ActedInUpdateInput { - pay_POP: Int - pay_PUSH: [Float!] - pay_SET: [Float!] - } - - input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - pay_EQ: [Float!] - pay_INCLUDES: Float - } - - type Actor { - actedIn(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection - actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String - } - - input ActorActedInAggregateInput { - AND: [ActorActedInAggregateInput!] - NOT: ActorActedInAggregateInput - OR: [ActorActedInAggregateInput!] - count_EQ: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ActorActedInNodeAggregationWhereInput - } - - input ActorActedInConnectFieldInput { - connect: [MovieConnectInput!] - edge: ActedInCreateInput - where: MovieConnectWhere - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionSort { - edge: ActedInSort - node: MovieSort - } - - input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - node: MovieWhere - } - - input ActorActedInCreateFieldInput { - edge: ActedInCreateInput - node: MovieCreateInput! - } - - input ActorActedInDeleteFieldInput { - delete: MovieDeleteInput - where: ActorActedInConnectionWhere - } - - input ActorActedInDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: ActorActedInConnectionWhere - } - - input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - } - - input ActorActedInNodeAggregationWhereInput { - AND: [ActorActedInNodeAggregationWhereInput!] - NOT: ActorActedInNodeAggregationWhereInput - OR: [ActorActedInNodeAggregationWhereInput!] - averageRating_AVERAGE_EQUAL: Float - averageRating_AVERAGE_GT: Float - averageRating_AVERAGE_GTE: Float - averageRating_AVERAGE_LT: Float - averageRating_AVERAGE_LTE: Float - averageRating_MAX_EQUAL: Float - averageRating_MAX_GT: Float - averageRating_MAX_GTE: Float - averageRating_MAX_LT: Float - averageRating_MAX_LTE: Float - averageRating_MIN_EQUAL: Float - averageRating_MIN_GT: Float - averageRating_MIN_GTE: Float - averageRating_MIN_LT: Float - averageRating_MIN_LTE: Float - averageRating_SUM_EQUAL: Float - averageRating_SUM_GT: Float - averageRating_SUM_GTE: Float - averageRating_SUM_LT: Float - averageRating_SUM_LTE: Float - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID - } - - type ActorActedInRelationship { - cursor: String! - node: Movie! - properties: ActedIn! - } - - input ActorActedInUpdateConnectionInput { - edge: ActedInUpdateInput - node: MovieUpdateInput - } - - input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - - input ActorConnectInput { - actedIn: [ActorActedInConnectFieldInput!] - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String - } - - input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] - } - - input ActorDisconnectInput { - actedIn: [ActorActedInDisconnectFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorMovieActedInAggregationSelection { - count: Int! - node: ActorMovieActedInNodeAggregateSelection - } - - type ActorMovieActedInNodeAggregateSelection { - averageRating: FloatAggregateSelection! - id: IDAggregateSelection! - } - - \\"\\"\\" - Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. - \\"\\"\\" - input ActorSort { - name: SortDirection - } - - input ActorUpdateInput { - actedIn: [ActorActedInUpdateFieldInput!] - name_SET: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInAggregate: ActorActedInAggregateInput - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere - \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere - \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere - \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\" - Information about the number of nodes and relationships created during a create mutation - \\"\\"\\" - type CreateInfo { - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\" - Information about the number of nodes and relationships deleted during a delete mutation - \\"\\"\\" - type DeleteInfo { - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type FloatAggregateSelection { - average: Float - max: Float - min: Float - sum: Float - } - - type IDAggregateSelection { - longest: ID - shortest: ID - } - - type Movie { - actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - averageRating: Float! - id: ID! - ratings: [Float!]! - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelection! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count_EQ: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - connect: [ActorConnectInput!] - edge: ActedInCreateInput - where: ActorConnectWhere - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - edge: ActedInSort - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - edge: ActedInWhere - node: ActorWhere - } - - input MovieActorsCreateFieldInput { - edge: ActedInCreateInput - node: ActorCreateInput! - } - - input MovieActorsDeleteFieldInput { - delete: ActorDeleteInput - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - disconnect: ActorDisconnectInput - where: MovieActorsConnectionWhere - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - properties: ActedIn! - } - - input MovieActorsUpdateConnectionInput { - edge: ActedInUpdateInput - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - averageRating: FloatAggregateSelection! - count: Int! - id: IDAggregateSelection! - } - - input MovieConnectInput { - actors: [MovieActorsConnectFieldInput!] - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - averageRating: Float! - id: ID! - ratings: [Float!]! - } - - input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] - } - - input MovieDisconnectInput { - actors: [MovieActorsDisconnectFieldInput!] - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - \\"\\"\\" - Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. - \\"\\"\\" - input MovieSort { - averageRating: SortDirection - id: SortDirection - } - - input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SET: Float - averageRating_SUBTRACT: Float - id_SET: ID - ratings_POP: Int - ratings_PUSH: [Float!] - ratings_SET: [Float!] - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsAggregate: MovieActorsAggregateInput - \\"\\"\\" - Return Movies where all of the related MovieActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere - \\"\\"\\" - Return Movies where one of the related MovieActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere - \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere - \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere - \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere - \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - averageRating_EQ: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float!] - averageRating_LT: Float - averageRating_LTE: Float - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID!] - id_STARTS_WITH: ID - ratings_EQ: [Float!] - ratings_INCLUDES: Float - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! - movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelection { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\" - Information about the number of nodes and relationships created and deleted during an update mutation - \\"\\"\\" - type UpdateInfo { - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); -}); diff --git a/packages/graphql/tests/schema/remove-deprecated/attribute-filtering.test.ts b/packages/graphql/tests/schema/remove-deprecated/attribute-filtering.test.ts new file mode 100644 index 0000000000..9be5489abb --- /dev/null +++ b/packages/graphql/tests/schema/remove-deprecated/attribute-filtering.test.ts @@ -0,0 +1,1413 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { printSchemaWithDirectives } from "@graphql-tools/utils"; +import { lexicographicSortSchema } from "graphql/utilities"; +import { Neo4jGraphQL } from "../../../src"; + +describe("Exclude attribute suffix based filtering", () => { + test("should exclude attribute suffix based filtering", async () => { + const typeDefs = /* GraphQL */ ` + type typeA @node { + name: String + actedIn: [typeB!]! @relationship(type: "HAS_TYPE", properties: "relType", direction: OUT) + } + + type typeB implements interfaceC @node { + id: ID! + ratings: [Float!]! + rels: [typeA!]! @relationship(type: "HAS_TYPE", properties: "relType", direction: IN) + averageRating: Float! + date: Date + duration: Duration + localDateTime: LocalDateTime + createdAt: DateTime + cartesianPoint: CartesianPoint + point: Point + time: Time + localTime: LocalTime + list: [String!]! + } + union d = typeA | typeB + + interface interfaceC { + averageRating: Float! + date: Date + duration: Duration + localDateTime: LocalDateTime + createdAt: DateTime + cartesianPoint: CartesianPoint + point: Point + time: Time + localTime: LocalTime + list: [String!]! + } + + type relType @relationshipProperties { + pay: [Float!] + averageRating: Float! + date: Date + duration: Duration + localDateTime: LocalDateTime + createdAt: DateTime + cartesianPoint: CartesianPoint + point: Point + time: Time + localTime: LocalTime + } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + excludeDeprecatedFields: { + attributeFilters: true, + }, + }, + }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Distance filters for cartesian points\\"\\"\\" + input CartesianDistancePointFilters { + from: CartesianPointInput! + gt: Float + gte: Float + lt: Float + lte: Float + } + + \\"\\"\\" + A point in a two- or three-dimensional Cartesian coordinate system or in a three-dimensional cylindrical coordinate system. For more information, see https://neo4j.com/docs/graphql/4/type-definitions/types/spatial/#cartesian-point + \\"\\"\\" + type CartesianPoint { + crs: String! + srid: Int! + x: Float! + y: Float! + z: Float + } + + \\"\\"\\"Cartesian Point filters\\"\\"\\" + input CartesianPointFilters { + distance: CartesianDistancePointFilters + eq: CartesianPointInput + in: [CartesianPointInput!] + } + + \\"\\"\\"Input type for a cartesian point\\"\\"\\" + input CartesianPointInput { + x: Float! + y: Float! + z: Float + } + + \\"\\"\\"CartesianPoint mutations\\"\\"\\" + input CartesianPointMutations { + set: CartesianPointInput + } + + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" + type CreateInfo { + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateTypeASMutationResponse { + info: CreateInfo! + typeAS: [typeA!]! + } + + type CreateTypeBSMutationResponse { + info: CreateInfo! + typeBS: [typeB!]! + } + + \\"\\"\\"A date, represented as a 'yyyy-mm-dd' string\\"\\"\\" + scalar Date + + \\"\\"\\"Date filters\\"\\"\\" + input DateScalarFilters { + eq: Date + gt: Date + gte: Date + in: [Date!] + lt: Date + lte: Date + } + + \\"\\"\\"Date mutations\\"\\"\\" + input DateScalarMutations { + set: Date + } + + \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" + scalar DateTime + + type DateTimeAggregateSelection { + max: DateTime + min: DateTime + } + + \\"\\"\\"Filters for an aggregation of an DateTime input field\\"\\"\\" + input DateTimeScalarAggregationFilters { + max: DateTimeScalarFilters + min: DateTimeScalarFilters + } + + \\"\\"\\"DateTime filters\\"\\"\\" + input DateTimeScalarFilters { + eq: DateTime + gt: DateTime + gte: DateTime + in: [DateTime!] + lt: DateTime + lte: DateTime + } + + \\"\\"\\"DateTime mutations\\"\\"\\" + input DateTimeScalarMutations { + set: DateTime + } + + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" + type DeleteInfo { + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + \\"\\"\\"A duration, represented as an ISO 8601 duration string\\"\\"\\" + scalar Duration + + type DurationAggregateSelection { + max: Duration + min: Duration + } + + \\"\\"\\"Filters for an aggregation of a Dutation input field\\"\\"\\" + input DurationScalarAggregationFilters { + average: DurationScalarFilters + max: DurationScalarFilters + min: DurationScalarFilters + } + + \\"\\"\\"Duration filters\\"\\"\\" + input DurationScalarFilters { + eq: Duration + gt: Duration + gte: Duration + in: [Duration!] + lt: Duration + lte: Duration + } + + \\"\\"\\"Duration mutations\\"\\"\\" + input DurationScalarMutations { + set: Duration + } + + type FloatAggregateSelection { + average: Float + max: Float + min: Float + sum: Float + } + + \\"\\"\\"Float list filters\\"\\"\\" + input FloatListFilters { + eq: [Float!] + includes: Float + } + + \\"\\"\\"Filters for an aggregation of a float field\\"\\"\\" + input FloatScalarAggregationFilters { + average: FloatScalarFilters + max: FloatScalarFilters + min: FloatScalarFilters + sum: FloatScalarFilters + } + + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + type InterfaceCSConnection { + edges: [interfaceCEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + \\"\\"\\"Mutations for a list for Float\\"\\"\\" + input ListFloatMutations { + pop: Int + push: [Float!] + set: [Float!] + } + + \\"\\"\\"Mutations for a list for String\\"\\"\\" + input ListStringMutations { + pop: Int + push: [String!] + set: [String!] + } + + \\"\\"\\"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'\\"\\"\\" + scalar LocalDateTime + + type LocalDateTimeAggregateSelection { + max: LocalDateTime + min: LocalDateTime + } + + \\"\\"\\"Filters for an aggregation of an LocalDateTime input field\\"\\"\\" + input LocalDateTimeScalarAggregationFilters { + max: LocalDateTimeScalarFilters + min: LocalDateTimeScalarFilters + } + + \\"\\"\\"LocalDateTime filters\\"\\"\\" + input LocalDateTimeScalarFilters { + eq: LocalDateTime + gt: LocalDateTime + gte: LocalDateTime + in: [LocalDateTime!] + lt: LocalDateTime + lte: LocalDateTime + } + + \\"\\"\\"LocalDateTime mutations\\"\\"\\" + input LocalDateTimeScalarMutations { + set: LocalDateTime + } + + \\"\\"\\" + A local time, represented as a time string without timezone information + \\"\\"\\" + scalar LocalTime + + type LocalTimeAggregateSelection { + max: LocalTime + min: LocalTime + } + + \\"\\"\\"Filters for an aggregation of an LocalTime input field\\"\\"\\" + input LocalTimeScalarAggregationFilters { + max: LocalTimeScalarFilters + min: LocalTimeScalarFilters + } + + \\"\\"\\"LocalTime filters\\"\\"\\" + input LocalTimeScalarFilters { + eq: LocalTime + gt: LocalTime + gte: LocalTime + in: [LocalTime!] + lt: LocalTime + lte: LocalTime + } + + \\"\\"\\"LocalTime mutations\\"\\"\\" + input LocalTimeScalarMutations { + set: LocalTime + } + + type Mutation { + createTypeAS(input: [typeACreateInput!]!): CreateTypeASMutationResponse! + createTypeBS(input: [typeBCreateInput!]!): CreateTypeBSMutationResponse! + deleteTypeAS(delete: typeADeleteInput, where: typeAWhere): DeleteInfo! + deleteTypeBS(delete: typeBDeleteInput, where: typeBWhere): DeleteInfo! + updateTypeAS(update: typeAUpdateInput, where: typeAWhere): UpdateTypeASMutationResponse! + updateTypeBS(update: typeBUpdateInput, where: typeBWhere): UpdateTypeBSMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + \\"\\"\\" + A point in a coordinate system. For more information, see https://neo4j.com/docs/graphql/4/type-definitions/types/spatial/#point + \\"\\"\\" + type Point { + crs: String! + height: Float + latitude: Float! + longitude: Float! + srid: Int! + } + + \\"\\"\\"Distance filters\\"\\"\\" + input PointDistanceFilters { + eq: Float + from: PointInput! + gt: Float + gte: Float + lt: Float + lte: Float + } + + \\"\\"\\"Point filters\\"\\"\\" + input PointFilters { + distance: PointDistanceFilters + eq: PointInput + in: [PointInput!] + } + + \\"\\"\\"Input type for a point\\"\\"\\" + input PointInput { + height: Float + latitude: Float! + longitude: Float! + } + + \\"\\"\\"Point mutations\\"\\"\\" + input PointMutations { + set: PointInput + } + + type Query { + ds(limit: Int, offset: Int, where: dWhere): [d!]! + interfaceCS(limit: Int, offset: Int, sort: [interfaceCSort!], where: interfaceCWhere): [interfaceC!]! + interfaceCSAggregate(where: interfaceCWhere): interfaceCAggregateSelection! + interfaceCSConnection(after: String, first: Int, sort: [interfaceCSort!], where: interfaceCWhere): InterfaceCSConnection! + typeAS(limit: Int, offset: Int, sort: [typeASort!], where: typeAWhere): [typeA!]! + typeASAggregate(where: typeAWhere): typeAAggregateSelection! + typeASConnection(after: String, first: Int, sort: [typeASort!], where: typeAWhere): TypeASConnection! + typeBS(limit: Int, offset: Int, sort: [typeBSort!], where: typeBWhere): [typeB!]! + typeBSAggregate(where: typeBWhere): typeBAggregateSelection! + typeBSConnection(after: String, first: Int, sort: [typeBSort!], where: typeBWhere): TypeBSConnection! + } + + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type StringAggregateSelection { + longest: String + shortest: String + } + + \\"\\"\\"String list filters\\"\\"\\" + input StringListFilters { + eq: [String!] + includes: String + } + + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + + \\"\\"\\"A time, represented as an RFC3339 time string\\"\\"\\" + scalar Time + + type TimeAggregateSelection { + max: Time + min: Time + } + + \\"\\"\\"Filters for an aggregation of an Time input field\\"\\"\\" + input TimeScalarAggregationFilters { + max: TimeScalarFilters + min: TimeScalarFilters + } + + \\"\\"\\"Time filters\\"\\"\\" + input TimeScalarFilters { + eq: Time + gt: Time + gte: Time + in: [Time!] + lt: Time + lte: Time + } + + \\"\\"\\"Time mutations\\"\\"\\" + input TimeScalarMutations { + set: Time + } + + type TypeASConnection { + edges: [typeAEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type TypeBSConnection { + edges: [typeBEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" + type UpdateInfo { + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateTypeASMutationResponse { + info: UpdateInfo! + typeAS: [typeA!]! + } + + type UpdateTypeBSMutationResponse { + info: UpdateInfo! + typeBS: [typeB!]! + } + + union d = typeA | typeB + + input dWhere { + typeA: typeAWhere + typeB: typeBWhere + } + + interface interfaceC { + averageRating: Float! + cartesianPoint: CartesianPoint + createdAt: DateTime + date: Date + duration: Duration + list: [String!]! + localDateTime: LocalDateTime + localTime: LocalTime + point: Point + time: Time + } + + type interfaceCAggregateSelection { + averageRating: FloatAggregateSelection! + count: Int! + createdAt: DateTimeAggregateSelection! + duration: DurationAggregateSelection! + localDateTime: LocalDateTimeAggregateSelection! + localTime: LocalTimeAggregateSelection! + time: TimeAggregateSelection! + } + + type interfaceCEdge { + cursor: String! + node: interfaceC! + } + + enum interfaceCImplementation { + typeB + } + + \\"\\"\\" + Fields to sort InterfaceCS by. The order in which sorts are applied is not guaranteed when specifying many fields in one interfaceCSort object. + \\"\\"\\" + input interfaceCSort { + averageRating: SortDirection + cartesianPoint: SortDirection + createdAt: SortDirection + date: SortDirection + duration: SortDirection + localDateTime: SortDirection + localTime: SortDirection + point: SortDirection + time: SortDirection + } + + input interfaceCWhere { + AND: [interfaceCWhere!] + NOT: interfaceCWhere + OR: [interfaceCWhere!] + averageRating: FloatScalarFilters + cartesianPoint: CartesianPointFilters + createdAt: DateTimeScalarFilters + date: DateScalarFilters + duration: DurationScalarFilters + list: StringListFilters + localDateTime: LocalDateTimeScalarFilters + localTime: LocalTimeScalarFilters + point: PointFilters + time: TimeScalarFilters + typename: [interfaceCImplementation!] + } + + \\"\\"\\" + The edge properties for the following fields: + * typeA.actedIn + * typeB.rels + \\"\\"\\" + type relType { + averageRating: Float! + cartesianPoint: CartesianPoint + createdAt: DateTime + date: Date + duration: Duration + localDateTime: LocalDateTime + localTime: LocalTime + pay: [Float!] + point: Point + time: Time + } + + input relTypeAggregationWhereInput { + AND: [relTypeAggregationWhereInput!] + NOT: relTypeAggregationWhereInput + OR: [relTypeAggregationWhereInput!] + averageRating: FloatScalarAggregationFilters + averageRating_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { eq: ... } } }' instead.\\") + averageRating_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gt: ... } } }' instead.\\") + averageRating_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gte: ... } } }' instead.\\") + averageRating_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lt: ... } } }' instead.\\") + averageRating_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lte: ... } } }' instead.\\") + averageRating_MAX_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { eq: ... } } }' instead.\\") + averageRating_MAX_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gt: ... } } }' instead.\\") + averageRating_MAX_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gte: ... } } }' instead.\\") + averageRating_MAX_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lt: ... } } }' instead.\\") + averageRating_MAX_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lte: ... } } }' instead.\\") + averageRating_MIN_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { eq: ... } } }' instead.\\") + averageRating_MIN_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gt: ... } } }' instead.\\") + averageRating_MIN_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gte: ... } } }' instead.\\") + averageRating_MIN_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lt: ... } } }' instead.\\") + averageRating_MIN_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lte: ... } } }' instead.\\") + averageRating_SUM_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { eq: ... } } }' instead.\\") + averageRating_SUM_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gt: ... } } }' instead.\\") + averageRating_SUM_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gte: ... } } }' instead.\\") + averageRating_SUM_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lt: ... } } }' instead.\\") + averageRating_SUM_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lte: ... } } }' instead.\\") + createdAt: DateTimeScalarAggregationFilters + createdAt_MAX_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { eq: ... } } }' instead.\\") + createdAt_MAX_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { gt: ... } } }' instead.\\") + createdAt_MAX_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { gte: ... } } }' instead.\\") + createdAt_MAX_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { lt: ... } } }' instead.\\") + createdAt_MAX_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { lte: ... } } }' instead.\\") + createdAt_MIN_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { eq: ... } } }' instead.\\") + createdAt_MIN_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { gt: ... } } }' instead.\\") + createdAt_MIN_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { gte: ... } } }' instead.\\") + createdAt_MIN_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { lt: ... } } }' instead.\\") + createdAt_MIN_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { lte: ... } } }' instead.\\") + duration: DurationScalarAggregationFilters + duration_AVERAGE_EQUAL: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { average: { eq: ... } } }' instead.\\") + duration_AVERAGE_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { average: { gt: ... } } }' instead.\\") + duration_AVERAGE_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { average: { gte: ... } } }' instead.\\") + duration_AVERAGE_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { average: { lt: ... } } }' instead.\\") + duration_AVERAGE_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { average: { lte: ... } } }' instead.\\") + duration_MAX_EQUAL: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { max: { eq: ... } } }' instead.\\") + duration_MAX_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { max: { gt: ... } } }' instead.\\") + duration_MAX_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { max: { gte: ... } } }' instead.\\") + duration_MAX_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { max: { lt: ... } } }' instead.\\") + duration_MAX_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { max: { lte: ... } } }' instead.\\") + duration_MIN_EQUAL: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { min: { eq: ... } } }' instead.\\") + duration_MIN_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { min: { gt: ... } } }' instead.\\") + duration_MIN_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { min: { gte: ... } } }' instead.\\") + duration_MIN_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { min: { lt: ... } } }' instead.\\") + duration_MIN_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { min: { lte: ... } } }' instead.\\") + localDateTime: LocalDateTimeScalarAggregationFilters + localDateTime_MAX_EQUAL: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { max: { eq: ... } } }' instead.\\") + localDateTime_MAX_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { max: { gt: ... } } }' instead.\\") + localDateTime_MAX_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { max: { gte: ... } } }' instead.\\") + localDateTime_MAX_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { max: { lt: ... } } }' instead.\\") + localDateTime_MAX_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { max: { lte: ... } } }' instead.\\") + localDateTime_MIN_EQUAL: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { min: { eq: ... } } }' instead.\\") + localDateTime_MIN_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { min: { gt: ... } } }' instead.\\") + localDateTime_MIN_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { min: { gte: ... } } }' instead.\\") + localDateTime_MIN_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { min: { lt: ... } } }' instead.\\") + localDateTime_MIN_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { min: { lte: ... } } }' instead.\\") + localTime: LocalTimeScalarAggregationFilters + localTime_MAX_EQUAL: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { max: { eq: ... } } }' instead.\\") + localTime_MAX_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { max: { gt: ... } } }' instead.\\") + localTime_MAX_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { max: { gte: ... } } }' instead.\\") + localTime_MAX_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { max: { lt: ... } } }' instead.\\") + localTime_MAX_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { max: { lte: ... } } }' instead.\\") + localTime_MIN_EQUAL: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { min: { eq: ... } } }' instead.\\") + localTime_MIN_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { min: { gt: ... } } }' instead.\\") + localTime_MIN_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { min: { gte: ... } } }' instead.\\") + localTime_MIN_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { min: { lt: ... } } }' instead.\\") + localTime_MIN_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { min: { lte: ... } } }' instead.\\") + time: TimeScalarAggregationFilters + time_MAX_EQUAL: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { max: { eq: ... } } }' instead.\\") + time_MAX_GT: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { max: { gt: ... } } }' instead.\\") + time_MAX_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { max: { gte: ... } } }' instead.\\") + time_MAX_LT: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { max: { lt: ... } } }' instead.\\") + time_MAX_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { max: { lte: ... } } }' instead.\\") + time_MIN_EQUAL: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { min: { eq: ... } } }' instead.\\") + time_MIN_GT: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { min: { gt: ... } } }' instead.\\") + time_MIN_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { min: { gte: ... } } }' instead.\\") + time_MIN_LT: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { min: { lt: ... } } }' instead.\\") + time_MIN_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { min: { lte: ... } } }' instead.\\") + } + + input relTypeCreateInput { + averageRating: Float! + cartesianPoint: CartesianPointInput + createdAt: DateTime + date: Date + duration: Duration + localDateTime: LocalDateTime + localTime: LocalTime + pay: [Float!] + point: PointInput + time: Time + } + + input relTypeSort { + averageRating: SortDirection + cartesianPoint: SortDirection + createdAt: SortDirection + date: SortDirection + duration: SortDirection + localDateTime: SortDirection + localTime: SortDirection + pay: SortDirection + point: SortDirection + time: SortDirection + } + + input relTypeUpdateInput { + averageRating: FloatScalarMutations + averageRating_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { add: ... } }' instead.\\") + averageRating_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { divide: ... } }' instead.\\") + averageRating_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { multiply: ... } }' instead.\\") + averageRating_SET: Float @deprecated(reason: \\"Please use the generic mutation 'averageRating: { set: ... } }' instead.\\") + averageRating_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { subtract: ... } }' instead.\\") + cartesianPoint: CartesianPointMutations + cartesianPoint_SET: CartesianPointInput @deprecated(reason: \\"Please use the generic mutation 'cartesianPoint: { set: ... } }' instead.\\") + createdAt: DateTimeScalarMutations + createdAt_SET: DateTime @deprecated(reason: \\"Please use the generic mutation 'createdAt: { set: ... } }' instead.\\") + date: DateScalarMutations + date_SET: Date @deprecated(reason: \\"Please use the generic mutation 'date: { set: ... } }' instead.\\") + duration: DurationScalarMutations + duration_SET: Duration @deprecated(reason: \\"Please use the generic mutation 'duration: { set: ... } }' instead.\\") + localDateTime: LocalDateTimeScalarMutations + localDateTime_SET: LocalDateTime @deprecated(reason: \\"Please use the generic mutation 'localDateTime: { set: ... } }' instead.\\") + localTime: LocalTimeScalarMutations + localTime_SET: LocalTime @deprecated(reason: \\"Please use the generic mutation 'localTime: { set: ... } }' instead.\\") + pay: ListFloatMutations + pay_POP: Int @deprecated(reason: \\"Please use the generic mutation 'pay: { pop: ... } }' instead.\\") + pay_PUSH: [Float!] @deprecated(reason: \\"Please use the generic mutation 'pay: { push: ... } }' instead.\\") + pay_SET: [Float!] @deprecated(reason: \\"Please use the generic mutation 'pay: { set: ... } }' instead.\\") + point: PointMutations + point_SET: PointInput @deprecated(reason: \\"Please use the generic mutation 'point: { set: ... } }' instead.\\") + time: TimeScalarMutations + time_SET: Time @deprecated(reason: \\"Please use the generic mutation 'time: { set: ... } }' instead.\\") + } + + input relTypeWhere { + AND: [relTypeWhere!] + NOT: relTypeWhere + OR: [relTypeWhere!] + averageRating: FloatScalarFilters + cartesianPoint: CartesianPointFilters + createdAt: DateTimeScalarFilters + date: DateScalarFilters + duration: DurationScalarFilters + localDateTime: LocalDateTimeScalarFilters + localTime: LocalTimeScalarFilters + pay: FloatListFilters + point: PointFilters + time: TimeScalarFilters + } + + type typeA { + actedIn(limit: Int, offset: Int, sort: [typeBSort!], where: typeBWhere): [typeB!]! + actedInAggregate(where: typeBWhere): typeAtypeBActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [typeAActedInConnectionSort!], where: typeAActedInConnectionWhere): typeAActedInConnection! + name: String + } + + input typeAActedInAggregateInput { + AND: [typeAActedInAggregateInput!] + NOT: typeAActedInAggregateInput + OR: [typeAActedInAggregateInput!] + count: IntScalarFilters + count_EQ: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: relTypeAggregationWhereInput + node: typeAActedInNodeAggregationWhereInput + } + + input typeAActedInConnectFieldInput { + connect: [typeBConnectInput!] + edge: relTypeCreateInput! + where: typeBConnectWhere + } + + type typeAActedInConnection { + edges: [typeAActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input typeAActedInConnectionFilters { + \\"\\"\\" + Return typeAS where all of the related typeAActedInConnections match this filter + \\"\\"\\" + all: typeAActedInConnectionWhere + \\"\\"\\" + Return typeAS where none of the related typeAActedInConnections match this filter + \\"\\"\\" + none: typeAActedInConnectionWhere + \\"\\"\\" + Return typeAS where one of the related typeAActedInConnections match this filter + \\"\\"\\" + single: typeAActedInConnectionWhere + \\"\\"\\" + Return typeAS where some of the related typeAActedInConnections match this filter + \\"\\"\\" + some: typeAActedInConnectionWhere + } + + input typeAActedInConnectionSort { + edge: relTypeSort + node: typeBSort + } + + input typeAActedInConnectionWhere { + AND: [typeAActedInConnectionWhere!] + NOT: typeAActedInConnectionWhere + OR: [typeAActedInConnectionWhere!] + edge: relTypeWhere + node: typeBWhere + } + + input typeAActedInCreateFieldInput { + edge: relTypeCreateInput! + node: typeBCreateInput! + } + + input typeAActedInDeleteFieldInput { + delete: typeBDeleteInput + where: typeAActedInConnectionWhere + } + + input typeAActedInDisconnectFieldInput { + disconnect: typeBDisconnectInput + where: typeAActedInConnectionWhere + } + + input typeAActedInFieldInput { + connect: [typeAActedInConnectFieldInput!] + create: [typeAActedInCreateFieldInput!] + } + + input typeAActedInNodeAggregationWhereInput { + AND: [typeAActedInNodeAggregationWhereInput!] + NOT: typeAActedInNodeAggregationWhereInput + OR: [typeAActedInNodeAggregationWhereInput!] + averageRating: FloatScalarAggregationFilters + averageRating_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { eq: ... } } }' instead.\\") + averageRating_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gt: ... } } }' instead.\\") + averageRating_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gte: ... } } }' instead.\\") + averageRating_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lt: ... } } }' instead.\\") + averageRating_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lte: ... } } }' instead.\\") + averageRating_MAX_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { eq: ... } } }' instead.\\") + averageRating_MAX_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gt: ... } } }' instead.\\") + averageRating_MAX_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gte: ... } } }' instead.\\") + averageRating_MAX_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lt: ... } } }' instead.\\") + averageRating_MAX_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lte: ... } } }' instead.\\") + averageRating_MIN_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { eq: ... } } }' instead.\\") + averageRating_MIN_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gt: ... } } }' instead.\\") + averageRating_MIN_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gte: ... } } }' instead.\\") + averageRating_MIN_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lt: ... } } }' instead.\\") + averageRating_MIN_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lte: ... } } }' instead.\\") + averageRating_SUM_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { eq: ... } } }' instead.\\") + averageRating_SUM_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gt: ... } } }' instead.\\") + averageRating_SUM_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gte: ... } } }' instead.\\") + averageRating_SUM_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lt: ... } } }' instead.\\") + averageRating_SUM_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lte: ... } } }' instead.\\") + createdAt: DateTimeScalarAggregationFilters + createdAt_MAX_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { eq: ... } } }' instead.\\") + createdAt_MAX_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { gt: ... } } }' instead.\\") + createdAt_MAX_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { gte: ... } } }' instead.\\") + createdAt_MAX_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { lt: ... } } }' instead.\\") + createdAt_MAX_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { lte: ... } } }' instead.\\") + createdAt_MIN_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { eq: ... } } }' instead.\\") + createdAt_MIN_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { gt: ... } } }' instead.\\") + createdAt_MIN_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { gte: ... } } }' instead.\\") + createdAt_MIN_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { lt: ... } } }' instead.\\") + createdAt_MIN_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { lte: ... } } }' instead.\\") + duration: DurationScalarAggregationFilters + duration_AVERAGE_EQUAL: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { average: { eq: ... } } }' instead.\\") + duration_AVERAGE_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { average: { gt: ... } } }' instead.\\") + duration_AVERAGE_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { average: { gte: ... } } }' instead.\\") + duration_AVERAGE_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { average: { lt: ... } } }' instead.\\") + duration_AVERAGE_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { average: { lte: ... } } }' instead.\\") + duration_MAX_EQUAL: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { max: { eq: ... } } }' instead.\\") + duration_MAX_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { max: { gt: ... } } }' instead.\\") + duration_MAX_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { max: { gte: ... } } }' instead.\\") + duration_MAX_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { max: { lt: ... } } }' instead.\\") + duration_MAX_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { max: { lte: ... } } }' instead.\\") + duration_MIN_EQUAL: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { min: { eq: ... } } }' instead.\\") + duration_MIN_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { min: { gt: ... } } }' instead.\\") + duration_MIN_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { min: { gte: ... } } }' instead.\\") + duration_MIN_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { min: { lt: ... } } }' instead.\\") + duration_MIN_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { min: { lte: ... } } }' instead.\\") + localDateTime: LocalDateTimeScalarAggregationFilters + localDateTime_MAX_EQUAL: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { max: { eq: ... } } }' instead.\\") + localDateTime_MAX_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { max: { gt: ... } } }' instead.\\") + localDateTime_MAX_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { max: { gte: ... } } }' instead.\\") + localDateTime_MAX_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { max: { lt: ... } } }' instead.\\") + localDateTime_MAX_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { max: { lte: ... } } }' instead.\\") + localDateTime_MIN_EQUAL: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { min: { eq: ... } } }' instead.\\") + localDateTime_MIN_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { min: { gt: ... } } }' instead.\\") + localDateTime_MIN_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { min: { gte: ... } } }' instead.\\") + localDateTime_MIN_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { min: { lt: ... } } }' instead.\\") + localDateTime_MIN_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { min: { lte: ... } } }' instead.\\") + localTime: LocalTimeScalarAggregationFilters + localTime_MAX_EQUAL: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { max: { eq: ... } } }' instead.\\") + localTime_MAX_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { max: { gt: ... } } }' instead.\\") + localTime_MAX_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { max: { gte: ... } } }' instead.\\") + localTime_MAX_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { max: { lt: ... } } }' instead.\\") + localTime_MAX_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { max: { lte: ... } } }' instead.\\") + localTime_MIN_EQUAL: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { min: { eq: ... } } }' instead.\\") + localTime_MIN_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { min: { gt: ... } } }' instead.\\") + localTime_MIN_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { min: { gte: ... } } }' instead.\\") + localTime_MIN_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { min: { lt: ... } } }' instead.\\") + localTime_MIN_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { min: { lte: ... } } }' instead.\\") + time: TimeScalarAggregationFilters + time_MAX_EQUAL: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { max: { eq: ... } } }' instead.\\") + time_MAX_GT: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { max: { gt: ... } } }' instead.\\") + time_MAX_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { max: { gte: ... } } }' instead.\\") + time_MAX_LT: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { max: { lt: ... } } }' instead.\\") + time_MAX_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { max: { lte: ... } } }' instead.\\") + time_MIN_EQUAL: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { min: { eq: ... } } }' instead.\\") + time_MIN_GT: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { min: { gt: ... } } }' instead.\\") + time_MIN_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { min: { gte: ... } } }' instead.\\") + time_MIN_LT: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { min: { lt: ... } } }' instead.\\") + time_MIN_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { min: { lte: ... } } }' instead.\\") + } + + type typeAActedInRelationship { + cursor: String! + node: typeB! + properties: relType! + } + + input typeAActedInUpdateConnectionInput { + edge: relTypeUpdateInput + node: typeBUpdateInput + } + + input typeAActedInUpdateFieldInput { + connect: [typeAActedInConnectFieldInput!] + create: [typeAActedInCreateFieldInput!] + delete: [typeAActedInDeleteFieldInput!] + disconnect: [typeAActedInDisconnectFieldInput!] + update: typeAActedInUpdateConnectionInput + where: typeAActedInConnectionWhere + } + + type typeAAggregateSelection { + count: Int! + name: StringAggregateSelection! + } + + input typeAConnectInput { + actedIn: [typeAActedInConnectFieldInput!] + } + + input typeAConnectWhere { + node: typeAWhere! + } + + input typeACreateInput { + actedIn: typeAActedInFieldInput + name: String + } + + input typeADeleteInput { + actedIn: [typeAActedInDeleteFieldInput!] + } + + input typeADisconnectInput { + actedIn: [typeAActedInDisconnectFieldInput!] + } + + type typeAEdge { + cursor: String! + node: typeA! + } + + input typeARelationshipFilters { + \\"\\"\\"Filter type where all of the related typeAS match this filter\\"\\"\\" + all: typeAWhere + \\"\\"\\"Filter type where none of the related typeAS match this filter\\"\\"\\" + none: typeAWhere + \\"\\"\\"Filter type where one of the related typeAS match this filter\\"\\"\\" + single: typeAWhere + \\"\\"\\"Filter type where some of the related typeAS match this filter\\"\\"\\" + some: typeAWhere + } + + \\"\\"\\" + Fields to sort TypeAS by. The order in which sorts are applied is not guaranteed when specifying many fields in one typeASort object. + \\"\\"\\" + input typeASort { + name: SortDirection + } + + input typeAUpdateInput { + actedIn: [typeAActedInUpdateFieldInput!] + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") + } + + input typeAWhere { + AND: [typeAWhere!] + NOT: typeAWhere + OR: [typeAWhere!] + actedIn: typeBRelationshipFilters + actedInAggregate: typeAActedInAggregateInput + actedInConnection: typeAActedInConnectionFilters + \\"\\"\\" + Return typeAS where all of the related typeAActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: typeAActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") + \\"\\"\\" + Return typeAS where none of the related typeAActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: typeAActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") + \\"\\"\\" + Return typeAS where one of the related typeAActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: typeAActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") + \\"\\"\\" + Return typeAS where some of the related typeAActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: typeAActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") + \\"\\"\\"Return typeAS where all of the related typeBS match this filter\\"\\"\\" + actedIn_ALL: typeBWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") + \\"\\"\\"Return typeAS where none of the related typeBS match this filter\\"\\"\\" + actedIn_NONE: typeBWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") + \\"\\"\\"Return typeAS where one of the related typeBS match this filter\\"\\"\\" + actedIn_SINGLE: typeBWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") + \\"\\"\\"Return typeAS where some of the related typeBS match this filter\\"\\"\\" + actedIn_SOME: typeBWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + } + + type typeAtypeBActedInAggregationSelection { + count: Int! + edge: typeAtypeBActedInEdgeAggregateSelection + node: typeAtypeBActedInNodeAggregateSelection + } + + type typeAtypeBActedInEdgeAggregateSelection { + averageRating: FloatAggregateSelection! + createdAt: DateTimeAggregateSelection! + duration: DurationAggregateSelection! + localDateTime: LocalDateTimeAggregateSelection! + localTime: LocalTimeAggregateSelection! + time: TimeAggregateSelection! + } + + type typeAtypeBActedInNodeAggregateSelection { + averageRating: FloatAggregateSelection! + createdAt: DateTimeAggregateSelection! + duration: DurationAggregateSelection! + localDateTime: LocalDateTimeAggregateSelection! + localTime: LocalTimeAggregateSelection! + time: TimeAggregateSelection! + } + + type typeB implements interfaceC { + averageRating: Float! + cartesianPoint: CartesianPoint + createdAt: DateTime + date: Date + duration: Duration + id: ID! + list: [String!]! + localDateTime: LocalDateTime + localTime: LocalTime + point: Point + ratings: [Float!]! + rels(limit: Int, offset: Int, sort: [typeASort!], where: typeAWhere): [typeA!]! + relsAggregate(where: typeAWhere): typeBtypeARelsAggregationSelection + relsConnection(after: String, first: Int, sort: [typeBRelsConnectionSort!], where: typeBRelsConnectionWhere): typeBRelsConnection! + time: Time + } + + type typeBAggregateSelection { + averageRating: FloatAggregateSelection! + count: Int! + createdAt: DateTimeAggregateSelection! + duration: DurationAggregateSelection! + localDateTime: LocalDateTimeAggregateSelection! + localTime: LocalTimeAggregateSelection! + time: TimeAggregateSelection! + } + + input typeBConnectInput { + rels: [typeBRelsConnectFieldInput!] + } + + input typeBConnectWhere { + node: typeBWhere! + } + + input typeBCreateInput { + averageRating: Float! + cartesianPoint: CartesianPointInput + createdAt: DateTime + date: Date + duration: Duration + id: ID! + list: [String!]! + localDateTime: LocalDateTime + localTime: LocalTime + point: PointInput + ratings: [Float!]! + rels: typeBRelsFieldInput + time: Time + } + + input typeBDeleteInput { + rels: [typeBRelsDeleteFieldInput!] + } + + input typeBDisconnectInput { + rels: [typeBRelsDisconnectFieldInput!] + } + + type typeBEdge { + cursor: String! + node: typeB! + } + + input typeBRelationshipFilters { + \\"\\"\\"Filter type where all of the related typeBS match this filter\\"\\"\\" + all: typeBWhere + \\"\\"\\"Filter type where none of the related typeBS match this filter\\"\\"\\" + none: typeBWhere + \\"\\"\\"Filter type where one of the related typeBS match this filter\\"\\"\\" + single: typeBWhere + \\"\\"\\"Filter type where some of the related typeBS match this filter\\"\\"\\" + some: typeBWhere + } + + input typeBRelsAggregateInput { + AND: [typeBRelsAggregateInput!] + NOT: typeBRelsAggregateInput + OR: [typeBRelsAggregateInput!] + count: IntScalarFilters + count_EQ: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: relTypeAggregationWhereInput + node: typeBRelsNodeAggregationWhereInput + } + + input typeBRelsConnectFieldInput { + connect: [typeAConnectInput!] + edge: relTypeCreateInput! + where: typeAConnectWhere + } + + type typeBRelsConnection { + edges: [typeBRelsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input typeBRelsConnectionFilters { + \\"\\"\\" + Return typeBS where all of the related typeBRelsConnections match this filter + \\"\\"\\" + all: typeBRelsConnectionWhere + \\"\\"\\" + Return typeBS where none of the related typeBRelsConnections match this filter + \\"\\"\\" + none: typeBRelsConnectionWhere + \\"\\"\\" + Return typeBS where one of the related typeBRelsConnections match this filter + \\"\\"\\" + single: typeBRelsConnectionWhere + \\"\\"\\" + Return typeBS where some of the related typeBRelsConnections match this filter + \\"\\"\\" + some: typeBRelsConnectionWhere + } + + input typeBRelsConnectionSort { + edge: relTypeSort + node: typeASort + } + + input typeBRelsConnectionWhere { + AND: [typeBRelsConnectionWhere!] + NOT: typeBRelsConnectionWhere + OR: [typeBRelsConnectionWhere!] + edge: relTypeWhere + node: typeAWhere + } + + input typeBRelsCreateFieldInput { + edge: relTypeCreateInput! + node: typeACreateInput! + } + + input typeBRelsDeleteFieldInput { + delete: typeADeleteInput + where: typeBRelsConnectionWhere + } + + input typeBRelsDisconnectFieldInput { + disconnect: typeADisconnectInput + where: typeBRelsConnectionWhere + } + + input typeBRelsFieldInput { + connect: [typeBRelsConnectFieldInput!] + create: [typeBRelsCreateFieldInput!] + } + + input typeBRelsNodeAggregationWhereInput { + AND: [typeBRelsNodeAggregationWhereInput!] + NOT: typeBRelsNodeAggregationWhereInput + OR: [typeBRelsNodeAggregationWhereInput!] + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") + } + + type typeBRelsRelationship { + cursor: String! + node: typeA! + properties: relType! + } + + input typeBRelsUpdateConnectionInput { + edge: relTypeUpdateInput + node: typeAUpdateInput + } + + input typeBRelsUpdateFieldInput { + connect: [typeBRelsConnectFieldInput!] + create: [typeBRelsCreateFieldInput!] + delete: [typeBRelsDeleteFieldInput!] + disconnect: [typeBRelsDisconnectFieldInput!] + update: typeBRelsUpdateConnectionInput + where: typeBRelsConnectionWhere + } + + \\"\\"\\" + Fields to sort TypeBS by. The order in which sorts are applied is not guaranteed when specifying many fields in one typeBSort object. + \\"\\"\\" + input typeBSort { + averageRating: SortDirection + cartesianPoint: SortDirection + createdAt: SortDirection + date: SortDirection + duration: SortDirection + id: SortDirection + localDateTime: SortDirection + localTime: SortDirection + point: SortDirection + time: SortDirection + } + + input typeBUpdateInput { + averageRating: FloatScalarMutations + averageRating_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { add: ... } }' instead.\\") + averageRating_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { divide: ... } }' instead.\\") + averageRating_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { multiply: ... } }' instead.\\") + averageRating_SET: Float @deprecated(reason: \\"Please use the generic mutation 'averageRating: { set: ... } }' instead.\\") + averageRating_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { subtract: ... } }' instead.\\") + cartesianPoint: CartesianPointMutations + cartesianPoint_SET: CartesianPointInput @deprecated(reason: \\"Please use the generic mutation 'cartesianPoint: { set: ... } }' instead.\\") + createdAt: DateTimeScalarMutations + createdAt_SET: DateTime @deprecated(reason: \\"Please use the generic mutation 'createdAt: { set: ... } }' instead.\\") + date: DateScalarMutations + date_SET: Date @deprecated(reason: \\"Please use the generic mutation 'date: { set: ... } }' instead.\\") + duration: DurationScalarMutations + duration_SET: Duration @deprecated(reason: \\"Please use the generic mutation 'duration: { set: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + list: ListStringMutations + list_POP: Int @deprecated(reason: \\"Please use the generic mutation 'list: { pop: ... } }' instead.\\") + list_PUSH: [String!] @deprecated(reason: \\"Please use the generic mutation 'list: { push: ... } }' instead.\\") + list_SET: [String!] @deprecated(reason: \\"Please use the generic mutation 'list: { set: ... } }' instead.\\") + localDateTime: LocalDateTimeScalarMutations + localDateTime_SET: LocalDateTime @deprecated(reason: \\"Please use the generic mutation 'localDateTime: { set: ... } }' instead.\\") + localTime: LocalTimeScalarMutations + localTime_SET: LocalTime @deprecated(reason: \\"Please use the generic mutation 'localTime: { set: ... } }' instead.\\") + point: PointMutations + point_SET: PointInput @deprecated(reason: \\"Please use the generic mutation 'point: { set: ... } }' instead.\\") + ratings: ListFloatMutations + ratings_POP: Int @deprecated(reason: \\"Please use the generic mutation 'ratings: { pop: ... } }' instead.\\") + ratings_PUSH: [Float!] @deprecated(reason: \\"Please use the generic mutation 'ratings: { push: ... } }' instead.\\") + ratings_SET: [Float!] @deprecated(reason: \\"Please use the generic mutation 'ratings: { set: ... } }' instead.\\") + rels: [typeBRelsUpdateFieldInput!] + time: TimeScalarMutations + time_SET: Time @deprecated(reason: \\"Please use the generic mutation 'time: { set: ... } }' instead.\\") + } + + input typeBWhere { + AND: [typeBWhere!] + NOT: typeBWhere + OR: [typeBWhere!] + averageRating: FloatScalarFilters + cartesianPoint: CartesianPointFilters + createdAt: DateTimeScalarFilters + date: DateScalarFilters + duration: DurationScalarFilters + id: IDScalarFilters + list: StringListFilters + localDateTime: LocalDateTimeScalarFilters + localTime: LocalTimeScalarFilters + point: PointFilters + ratings: FloatListFilters + rels: typeARelationshipFilters + relsAggregate: typeBRelsAggregateInput + relsConnection: typeBRelsConnectionFilters + \\"\\"\\" + Return typeBS where all of the related typeBRelsConnections match this filter + \\"\\"\\" + relsConnection_ALL: typeBRelsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'relsConnection: { all: { node: ... } } }' instead.\\") + \\"\\"\\" + Return typeBS where none of the related typeBRelsConnections match this filter + \\"\\"\\" + relsConnection_NONE: typeBRelsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'relsConnection: { none: { node: ... } } }' instead.\\") + \\"\\"\\" + Return typeBS where one of the related typeBRelsConnections match this filter + \\"\\"\\" + relsConnection_SINGLE: typeBRelsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'relsConnection: { single: { node: ... } } }' instead.\\") + \\"\\"\\" + Return typeBS where some of the related typeBRelsConnections match this filter + \\"\\"\\" + relsConnection_SOME: typeBRelsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'relsConnection: { some: { node: ... } } }' instead.\\") + \\"\\"\\"Return typeBS where all of the related typeAS match this filter\\"\\"\\" + rels_ALL: typeAWhere @deprecated(reason: \\"Please use the relevant generic filter 'rels: { all: ... }' instead.\\") + \\"\\"\\"Return typeBS where none of the related typeAS match this filter\\"\\"\\" + rels_NONE: typeAWhere @deprecated(reason: \\"Please use the relevant generic filter 'rels: { none: ... }' instead.\\") + \\"\\"\\"Return typeBS where one of the related typeAS match this filter\\"\\"\\" + rels_SINGLE: typeAWhere @deprecated(reason: \\"Please use the relevant generic filter 'rels: { single: ... }' instead.\\") + \\"\\"\\"Return typeBS where some of the related typeAS match this filter\\"\\"\\" + rels_SOME: typeAWhere @deprecated(reason: \\"Please use the relevant generic filter 'rels: { some: ... }' instead.\\") + time: TimeScalarFilters + } + + type typeBtypeARelsAggregationSelection { + count: Int! + edge: typeBtypeARelsEdgeAggregateSelection + node: typeBtypeARelsNodeAggregateSelection + } + + type typeBtypeARelsEdgeAggregateSelection { + averageRating: FloatAggregateSelection! + createdAt: DateTimeAggregateSelection! + duration: DurationAggregateSelection! + localDateTime: LocalDateTimeAggregateSelection! + localTime: LocalTimeAggregateSelection! + time: TimeAggregateSelection! + } + + type typeBtypeARelsNodeAggregateSelection { + name: StringAggregateSelection! + }" + `); + }); +}); diff --git a/packages/graphql/tests/schema/remove-deprecated/comments.test.ts b/packages/graphql/tests/schema/remove-deprecated/comments.test.ts deleted file mode 100644 index 01e6a0ddce..0000000000 --- a/packages/graphql/tests/schema/remove-deprecated/comments.test.ts +++ /dev/null @@ -1,1572 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { printSchemaWithDirectives } from "@graphql-tools/utils"; -import { gql } from "graphql-tag"; -import { lexicographicSortSchema } from "graphql/utilities"; -import { Neo4jGraphQL } from "../../../src"; - -describe("Comments", () => { - test("Simple", async () => { - const typeDefs = gql` - "A custom scalar." - scalar CustomScalar - - "An enumeration of movie genres." - enum Genre { - ACTION - DRAMA - ROMANCE - } - - """ - A type describing a movie. - """ - type Movie @node { - id: ID - "The number of actors who acted in the movie." - actorCount: Int - """ - The average rating for the movie. - """ - averageRating: Float - """ - Is the movie active? - - This is measured based on annual profit. - """ - isActive: Boolean - genre: Genre - customScalar: CustomScalar - } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\" - Information about the number of nodes and relationships created during a create mutation - \\"\\"\\" - type CreateInfo { - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\"A custom scalar.\\"\\"\\" - scalar CustomScalar - - \\"\\"\\" - Information about the number of nodes and relationships deleted during a delete mutation - \\"\\"\\" - type DeleteInfo { - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type FloatAggregateSelection { - average: Float - max: Float - min: Float - sum: Float - } - - \\"\\"\\"An enumeration of movie genres.\\"\\"\\" - enum Genre { - ACTION - DRAMA - ROMANCE - } - - type IDAggregateSelection { - longest: ID - shortest: ID - } - - type IntAggregateSelection { - average: Float - max: Int - min: Int - sum: Int - } - - \\"\\"\\"A type describing a movie.\\"\\"\\" - type Movie { - \\"\\"\\"The number of actors who acted in the movie.\\"\\"\\" - actorCount: Int - \\"\\"\\"The average rating for the movie.\\"\\"\\" - averageRating: Float - customScalar: CustomScalar - genre: Genre - id: ID - \\"\\"\\" - Is the movie active? - - This is measured based on annual profit. - \\"\\"\\" - isActive: Boolean - } - - type MovieAggregateSelection { - actorCount: IntAggregateSelection! - averageRating: FloatAggregateSelection! - count: Int! - id: IDAggregateSelection! - } - - input MovieCreateInput { - actorCount: Int - averageRating: Float - customScalar: CustomScalar - genre: Genre - id: ID - isActive: Boolean - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - \\"\\"\\" - Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. - \\"\\"\\" - input MovieSort { - actorCount: SortDirection - averageRating: SortDirection - customScalar: SortDirection - genre: SortDirection - id: SortDirection - isActive: SortDirection - } - - input MovieUpdateInput { - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actorCount_SET: Int - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SET: Float - averageRating_SUBTRACT: Float - customScalar_SET: CustomScalar - genre_SET: Genre - id_SET: ID - isActive_SET: Boolean - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorCount_EQ: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - averageRating_EQ: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - customScalar_EQ: CustomScalar - customScalar_IN: [CustomScalar] - genre_EQ: Genre - genre_IN: [Genre] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive_EQ: Boolean - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteMovies(where: MovieWhere): DeleteInfo! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - \\"\\"\\" - Information about the number of nodes and relationships created and deleted during an update mutation - \\"\\"\\" - type UpdateInfo { - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - - describe("Relationship", () => { - test("Simple", async () => { - const typeDefs = gql` - type Actor @node { - name: String - } - - type Movie @node { - id: ID - "Actors in Movie" - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) - } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - type Actor { - name: String - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - - input ActorConnectWhere { - node: ActorWhere! - } - - input ActorCreateInput { - name: String - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - \\"\\"\\" - Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. - \\"\\"\\" - input ActorSort { - name: SortDirection - } - - input ActorUpdateInput { - name_SET: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String] - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\" - Information about the number of nodes and relationships created during a create mutation - \\"\\"\\" - type CreateInfo { - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\" - Information about the number of nodes and relationships deleted during a delete mutation - \\"\\"\\" - type DeleteInfo { - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IDAggregateSelection { - longest: ID - shortest: ID - } - - type Movie { - \\"\\"\\"Actors in Movie\\"\\"\\" - actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection - actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! - id: ID - } - - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelection! - } - - input MovieActorsAggregateInput { - AND: [MovieActorsAggregateInput!] - NOT: MovieActorsAggregateInput - OR: [MovieActorsAggregateInput!] - count_EQ: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieActorsNodeAggregationWhereInput - } - - input MovieActorsConnectFieldInput { - where: ActorConnectWhere - } - - type MovieActorsConnection { - edges: [MovieActorsRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieActorsConnectionSort { - node: ActorSort - } - - input MovieActorsConnectionWhere { - AND: [MovieActorsConnectionWhere!] - NOT: MovieActorsConnectionWhere - OR: [MovieActorsConnectionWhere!] - node: ActorWhere - } - - input MovieActorsCreateFieldInput { - node: ActorCreateInput! - } - - input MovieActorsDeleteFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsDisconnectFieldInput { - where: MovieActorsConnectionWhere - } - - input MovieActorsFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - } - - input MovieActorsNodeAggregationWhereInput { - AND: [MovieActorsNodeAggregationWhereInput!] - NOT: MovieActorsNodeAggregationWhereInput - OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int - } - - type MovieActorsRelationship { - cursor: String! - node: Actor! - } - - input MovieActorsUpdateConnectionInput { - node: ActorUpdateInput - } - - input MovieActorsUpdateFieldInput { - connect: [MovieActorsConnectFieldInput!] - create: [MovieActorsCreateFieldInput!] - delete: [MovieActorsDeleteFieldInput!] - disconnect: [MovieActorsDisconnectFieldInput!] - update: MovieActorsUpdateConnectionInput - where: MovieActorsConnectionWhere - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelection! - } - - input MovieCreateInput { - actors: MovieActorsFieldInput - id: ID - } - - input MovieDeleteInput { - actors: [MovieActorsDeleteFieldInput!] - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - \\"\\"\\" - Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. - \\"\\"\\" - input MovieSort { - id: SortDirection - } - - input MovieUpdateInput { - actors: [MovieActorsUpdateFieldInput!] - id_SET: ID - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - actorsAggregate: MovieActorsAggregateInput - \\"\\"\\" - Return Movies where all of the related MovieActorsConnections match this filter - \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieActorsConnections match this filter - \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere - \\"\\"\\" - Return Movies where one of the related MovieActorsConnections match this filter - \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieActorsConnections match this filter - \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere - \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere - \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere - \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere - \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteActors(where: ActorWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! - movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! - } - - \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelection { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\" - Information about the number of nodes and relationships created and deleted during an update mutation - \\"\\"\\" - type UpdateInfo { - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - - test("Interface", async () => { - const typeDefs = gql` - interface Production { - title: String! - } - - type Movie implements Production @node { - title: String! - runtime: Int! - } - - type Series implements Production @node { - title: String! - episodes: Int! - } - - type ActedIn @relationshipProperties { - screenTime: Int! - } - - type Actor @node { - name: String! - "Acted in Production" - actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") - } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - \\"\\"\\" - The edge properties for the following fields: - * Actor.actedIn - \\"\\"\\" - type ActedIn { - screenTime: Int! - } - - input ActedInAggregationWhereInput { - AND: [ActedInAggregationWhereInput!] - NOT: ActedInAggregationWhereInput - OR: [ActedInAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_MAX_EQUAL: Int - screenTime_MAX_GT: Int - screenTime_MAX_GTE: Int - screenTime_MAX_LT: Int - screenTime_MAX_LTE: Int - screenTime_MIN_EQUAL: Int - screenTime_MIN_GT: Int - screenTime_MIN_GTE: Int - screenTime_MIN_LT: Int - screenTime_MIN_LTE: Int - screenTime_SUM_EQUAL: Int - screenTime_SUM_GT: Int - screenTime_SUM_GTE: Int - screenTime_SUM_LT: Int - screenTime_SUM_LTE: Int - } - - input ActedInCreateInput { - screenTime: Int! - } - - input ActedInSort { - screenTime: SortDirection - } - - input ActedInUpdateInput { - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - screenTime_SET: Int - } - - input ActedInWhere { - AND: [ActedInWhere!] - NOT: ActedInWhere - OR: [ActedInWhere!] - screenTime_EQ: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int - } - - type Actor { - \\"\\"\\"Acted in Production\\"\\"\\" - actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection - actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! - name: String! - } - - input ActorActedInAggregateInput { - AND: [ActorActedInAggregateInput!] - NOT: ActorActedInAggregateInput - OR: [ActorActedInAggregateInput!] - count_EQ: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: ActedInAggregationWhereInput - node: ActorActedInNodeAggregationWhereInput - } - - input ActorActedInConnectFieldInput { - edge: ActedInCreateInput! - where: ProductionConnectWhere - } - - type ActorActedInConnection { - edges: [ActorActedInRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input ActorActedInConnectionSort { - edge: ActedInSort - node: ProductionSort - } - - input ActorActedInConnectionWhere { - AND: [ActorActedInConnectionWhere!] - NOT: ActorActedInConnectionWhere - OR: [ActorActedInConnectionWhere!] - edge: ActedInWhere - node: ProductionWhere - } - - input ActorActedInCreateFieldInput { - edge: ActedInCreateInput! - node: ProductionCreateInput! - } - - input ActorActedInDeleteFieldInput { - where: ActorActedInConnectionWhere - } - - input ActorActedInDisconnectFieldInput { - where: ActorActedInConnectionWhere - } - - input ActorActedInFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - } - - input ActorActedInNodeAggregationWhereInput { - AND: [ActorActedInNodeAggregationWhereInput!] - NOT: ActorActedInNodeAggregationWhereInput - OR: [ActorActedInNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int - } - - type ActorActedInRelationship { - cursor: String! - node: Production! - properties: ActedIn! - } - - input ActorActedInUpdateConnectionInput { - edge: ActedInUpdateInput - node: ProductionUpdateInput - } - - input ActorActedInUpdateFieldInput { - connect: [ActorActedInConnectFieldInput!] - create: [ActorActedInCreateFieldInput!] - delete: [ActorActedInDeleteFieldInput!] - disconnect: [ActorActedInDisconnectFieldInput!] - update: ActorActedInUpdateConnectionInput - where: ActorActedInConnectionWhere - } - - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - - input ActorCreateInput { - actedIn: ActorActedInFieldInput - name: String! - } - - input ActorDeleteInput { - actedIn: [ActorActedInDeleteFieldInput!] - } - - type ActorEdge { - cursor: String! - node: Actor! - } - - type ActorProductionActedInAggregationSelection { - count: Int! - edge: ActorProductionActedInEdgeAggregateSelection - node: ActorProductionActedInNodeAggregateSelection - } - - type ActorProductionActedInEdgeAggregateSelection { - screenTime: IntAggregateSelection! - } - - type ActorProductionActedInNodeAggregateSelection { - title: StringAggregateSelection! - } - - \\"\\"\\" - Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. - \\"\\"\\" - input ActorSort { - name: SortDirection - } - - input ActorUpdateInput { - actedIn: [ActorActedInUpdateFieldInput!] - name_SET: String - } - - input ActorWhere { - AND: [ActorWhere!] - NOT: ActorWhere - OR: [ActorWhere!] - actedInAggregate: ActorActedInAggregateInput - \\"\\"\\" - Return Actors where all of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where none of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where one of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere - \\"\\"\\" - Return Actors where some of the related ActorActedInConnections match this filter - \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere - \\"\\"\\"Return Actors where all of the related Productions match this filter\\"\\"\\" - actedIn_ALL: ProductionWhere - \\"\\"\\"Return Actors where none of the related Productions match this filter\\"\\"\\" - actedIn_NONE: ProductionWhere - \\"\\"\\"Return Actors where one of the related Productions match this filter\\"\\"\\" - actedIn_SINGLE: ProductionWhere - \\"\\"\\"Return Actors where some of the related Productions match this filter\\"\\"\\" - actedIn_SOME: ProductionWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String - } - - type ActorsConnection { - edges: [ActorEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type CreateActorsMutationResponse { - actors: [Actor!]! - info: CreateInfo! - } - - \\"\\"\\" - Information about the number of nodes and relationships created during a create mutation - \\"\\"\\" - type CreateInfo { - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - type CreateSeriesMutationResponse { - info: CreateInfo! - series: [Series!]! - } - - \\"\\"\\" - Information about the number of nodes and relationships deleted during a delete mutation - \\"\\"\\" - type DeleteInfo { - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type IntAggregateSelection { - average: Float - max: Int - min: Int - sum: Int - } - - type Movie implements Production { - runtime: Int! - title: String! - } - - type MovieAggregateSelection { - count: Int! - runtime: IntAggregateSelection! - title: StringAggregateSelection! - } - - input MovieCreateInput { - runtime: Int! - title: String! - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - \\"\\"\\" - Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. - \\"\\"\\" - input MovieSort { - runtime: SortDirection - title: SortDirection - } - - input MovieUpdateInput { - runtime_DECREMENT: Int - runtime_INCREMENT: Int - runtime_SET: Int - title_SET: String - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - runtime_EQ: Int - runtime_GT: Int - runtime_GTE: Int - runtime_IN: [Int!] - runtime_LT: Int - runtime_LTE: Int - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! - deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! - deleteMovies(where: MovieWhere): DeleteInfo! - deleteSeries(where: SeriesWhere): DeleteInfo! - updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - interface Production { - title: String! - } - - type ProductionAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - - input ProductionConnectWhere { - node: ProductionWhere! - } - - input ProductionCreateInput { - Movie: MovieCreateInput - Series: SeriesCreateInput - } - - type ProductionEdge { - cursor: String! - node: Production! - } - - enum ProductionImplementation { - Movie - Series - } - - \\"\\"\\" - Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. - \\"\\"\\" - input ProductionSort { - title: SortDirection - } - - input ProductionUpdateInput { - title_SET: String - } - - input ProductionWhere { - AND: [ProductionWhere!] - NOT: ProductionWhere - OR: [ProductionWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] - } - - type ProductionsConnection { - edges: [ProductionEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Query { - actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! - actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! - movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! - productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! - productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! - series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! - seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! - } - - type Series implements Production { - episodes: Int! - title: String! - } - - type SeriesAggregateSelection { - count: Int! - episodes: IntAggregateSelection! - title: StringAggregateSelection! - } - - type SeriesConnection { - edges: [SeriesEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input SeriesCreateInput { - episodes: Int! - title: String! - } - - type SeriesEdge { - cursor: String! - node: Series! - } - - \\"\\"\\" - Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. - \\"\\"\\" - input SeriesSort { - episodes: SortDirection - title: SortDirection - } - - input SeriesUpdateInput { - episodes_DECREMENT: Int - episodes_INCREMENT: Int - episodes_SET: Int - title_SET: String - } - - input SeriesWhere { - AND: [SeriesWhere!] - NOT: SeriesWhere - OR: [SeriesWhere!] - episodes_EQ: Int - episodes_GT: Int - episodes_GTE: Int - episodes_IN: [Int!] - episodes_LT: Int - episodes_LTE: Int - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String - } - - \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type StringAggregateSelection { - longest: String - shortest: String - } - - type UpdateActorsMutationResponse { - actors: [Actor!]! - info: UpdateInfo! - } - - \\"\\"\\" - Information about the number of nodes and relationships created and deleted during an update mutation - \\"\\"\\" - type UpdateInfo { - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - } - - type UpdateSeriesMutationResponse { - info: UpdateInfo! - series: [Series!]! - }" - `); - }); - - test("Unions", async () => { - const typeDefs = gql` - union Search = Movie | Genre - - type Genre @node { - id: ID - } - - type Movie @node { - id: ID - search: [Search!]! @relationship(type: "SEARCH", direction: OUT) - searchNoDirective: Search - } - `; - const neoSchema = new Neo4jGraphQL({ - typeDefs, - }); - const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); - - expect(printedSchema).toMatchInlineSnapshot(` - "schema { - query: Query - mutation: Mutation - } - - type CreateGenresMutationResponse { - genres: [Genre!]! - info: CreateInfo! - } - - \\"\\"\\" - Information about the number of nodes and relationships created during a create mutation - \\"\\"\\" - type CreateInfo { - nodesCreated: Int! - relationshipsCreated: Int! - } - - type CreateMoviesMutationResponse { - info: CreateInfo! - movies: [Movie!]! - } - - \\"\\"\\" - Information about the number of nodes and relationships deleted during a delete mutation - \\"\\"\\" - type DeleteInfo { - nodesDeleted: Int! - relationshipsDeleted: Int! - } - - type Genre { - id: ID - } - - type GenreAggregateSelection { - count: Int! - id: IDAggregateSelection! - } - - input GenreConnectWhere { - node: GenreWhere! - } - - input GenreCreateInput { - id: ID - } - - type GenreEdge { - cursor: String! - node: Genre! - } - - \\"\\"\\" - Fields to sort Genres by. The order in which sorts are applied is not guaranteed when specifying many fields in one GenreSort object. - \\"\\"\\" - input GenreSort { - id: SortDirection - } - - input GenreUpdateInput { - id_SET: ID - } - - input GenreWhere { - AND: [GenreWhere!] - NOT: GenreWhere - OR: [GenreWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - } - - type GenresConnection { - edges: [GenreEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type IDAggregateSelection { - longest: ID - shortest: ID - } - - type Movie { - id: ID - search(limit: Int, offset: Int, where: SearchWhere): [Search!]! - searchConnection(after: String, first: Int, where: MovieSearchConnectionWhere): MovieSearchConnection! - searchNoDirective: Search - } - - type MovieAggregateSelection { - count: Int! - id: IDAggregateSelection! - } - - input MovieConnectInput { - search: MovieSearchConnectInput - } - - input MovieConnectWhere { - node: MovieWhere! - } - - input MovieCreateInput { - id: ID - search: MovieSearchCreateInput - } - - input MovieDeleteInput { - search: MovieSearchDeleteInput - } - - input MovieDisconnectInput { - search: MovieSearchDisconnectInput - } - - type MovieEdge { - cursor: String! - node: Movie! - } - - input MovieSearchConnectInput { - Genre: [MovieSearchGenreConnectFieldInput!] - Movie: [MovieSearchMovieConnectFieldInput!] - } - - type MovieSearchConnection { - edges: [MovieSearchRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input MovieSearchConnectionWhere { - Genre: MovieSearchGenreConnectionWhere - Movie: MovieSearchMovieConnectionWhere - } - - input MovieSearchCreateInput { - Genre: MovieSearchGenreFieldInput - Movie: MovieSearchMovieFieldInput - } - - input MovieSearchDeleteInput { - Genre: [MovieSearchGenreDeleteFieldInput!] - Movie: [MovieSearchMovieDeleteFieldInput!] - } - - input MovieSearchDisconnectInput { - Genre: [MovieSearchGenreDisconnectFieldInput!] - Movie: [MovieSearchMovieDisconnectFieldInput!] - } - - input MovieSearchGenreConnectFieldInput { - where: GenreConnectWhere - } - - input MovieSearchGenreConnectionWhere { - AND: [MovieSearchGenreConnectionWhere!] - NOT: MovieSearchGenreConnectionWhere - OR: [MovieSearchGenreConnectionWhere!] - node: GenreWhere - } - - input MovieSearchGenreCreateFieldInput { - node: GenreCreateInput! - } - - input MovieSearchGenreDeleteFieldInput { - where: MovieSearchGenreConnectionWhere - } - - input MovieSearchGenreDisconnectFieldInput { - where: MovieSearchGenreConnectionWhere - } - - input MovieSearchGenreFieldInput { - connect: [MovieSearchGenreConnectFieldInput!] - create: [MovieSearchGenreCreateFieldInput!] - } - - input MovieSearchGenreUpdateConnectionInput { - node: GenreUpdateInput - } - - input MovieSearchGenreUpdateFieldInput { - connect: [MovieSearchGenreConnectFieldInput!] - create: [MovieSearchGenreCreateFieldInput!] - delete: [MovieSearchGenreDeleteFieldInput!] - disconnect: [MovieSearchGenreDisconnectFieldInput!] - update: MovieSearchGenreUpdateConnectionInput - where: MovieSearchGenreConnectionWhere - } - - input MovieSearchMovieConnectFieldInput { - connect: [MovieConnectInput!] - where: MovieConnectWhere - } - - input MovieSearchMovieConnectionWhere { - AND: [MovieSearchMovieConnectionWhere!] - NOT: MovieSearchMovieConnectionWhere - OR: [MovieSearchMovieConnectionWhere!] - node: MovieWhere - } - - input MovieSearchMovieCreateFieldInput { - node: MovieCreateInput! - } - - input MovieSearchMovieDeleteFieldInput { - delete: MovieDeleteInput - where: MovieSearchMovieConnectionWhere - } - - input MovieSearchMovieDisconnectFieldInput { - disconnect: MovieDisconnectInput - where: MovieSearchMovieConnectionWhere - } - - input MovieSearchMovieFieldInput { - connect: [MovieSearchMovieConnectFieldInput!] - create: [MovieSearchMovieCreateFieldInput!] - } - - input MovieSearchMovieUpdateConnectionInput { - node: MovieUpdateInput - } - - input MovieSearchMovieUpdateFieldInput { - connect: [MovieSearchMovieConnectFieldInput!] - create: [MovieSearchMovieCreateFieldInput!] - delete: [MovieSearchMovieDeleteFieldInput!] - disconnect: [MovieSearchMovieDisconnectFieldInput!] - update: MovieSearchMovieUpdateConnectionInput - where: MovieSearchMovieConnectionWhere - } - - type MovieSearchRelationship { - cursor: String! - node: Search! - } - - input MovieSearchUpdateInput { - Genre: [MovieSearchGenreUpdateFieldInput!] - Movie: [MovieSearchMovieUpdateFieldInput!] - } - - \\"\\"\\" - Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. - \\"\\"\\" - input MovieSort { - id: SortDirection - } - - input MovieUpdateInput { - id_SET: ID - search: MovieSearchUpdateInput - } - - input MovieWhere { - AND: [MovieWhere!] - NOT: MovieWhere - OR: [MovieWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - \\"\\"\\" - Return Movies where all of the related MovieSearchConnections match this filter - \\"\\"\\" - searchConnection_ALL: MovieSearchConnectionWhere - \\"\\"\\" - Return Movies where none of the related MovieSearchConnections match this filter - \\"\\"\\" - searchConnection_NONE: MovieSearchConnectionWhere - \\"\\"\\" - Return Movies where one of the related MovieSearchConnections match this filter - \\"\\"\\" - searchConnection_SINGLE: MovieSearchConnectionWhere - \\"\\"\\" - Return Movies where some of the related MovieSearchConnections match this filter - \\"\\"\\" - searchConnection_SOME: MovieSearchConnectionWhere - \\"\\"\\"Return Movies where all of the related Searches match this filter\\"\\"\\" - search_ALL: SearchWhere - \\"\\"\\"Return Movies where none of the related Searches match this filter\\"\\"\\" - search_NONE: SearchWhere - \\"\\"\\"Return Movies where one of the related Searches match this filter\\"\\"\\" - search_SINGLE: SearchWhere - \\"\\"\\"Return Movies where some of the related Searches match this filter\\"\\"\\" - search_SOME: SearchWhere - } - - type MoviesConnection { - edges: [MovieEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Mutation { - createGenres(input: [GenreCreateInput!]!): CreateGenresMutationResponse! - createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! - deleteGenres(where: GenreWhere): DeleteInfo! - deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! - updateGenres(update: GenreUpdateInput, where: GenreWhere): UpdateGenresMutationResponse! - updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Query { - genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! - genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! - movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! - moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! - searches(limit: Int, offset: Int, where: SearchWhere): [Search!]! - } - - union Search = Genre | Movie - - input SearchWhere { - Genre: GenreWhere - Movie: MovieWhere - } - - \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" - enum SortDirection { - \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" - ASC - \\"\\"\\"Sort by field values in descending order.\\"\\"\\" - DESC - } - - type UpdateGenresMutationResponse { - genres: [Genre!]! - info: UpdateInfo! - } - - \\"\\"\\" - Information about the number of nodes and relationships created and deleted during an update mutation - \\"\\"\\" - type UpdateInfo { - nodesCreated: Int! - nodesDeleted: Int! - relationshipsCreated: Int! - relationshipsDeleted: Int! - } - - type UpdateMoviesMutationResponse { - info: UpdateInfo! - movies: [Movie!]! - }" - `); - }); - }); -}); diff --git a/packages/graphql/tests/schema/remove-deprecated/mutation-operations.test.ts b/packages/graphql/tests/schema/remove-deprecated/mutation-operations.test.ts new file mode 100644 index 0000000000..960283bfbd --- /dev/null +++ b/packages/graphql/tests/schema/remove-deprecated/mutation-operations.test.ts @@ -0,0 +1,920 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { printSchemaWithDirectives } from "@graphql-tools/utils"; +import { lexicographicSortSchema } from "graphql/utilities"; +import { Neo4jGraphQL } from "../../../src"; + +describe("Deprecated mutation operations", () => { + test("Remove deprecated mutation operations", async () => { + const typeDefs = /* GraphQL */ ` + type Actor @node { + name: String + actedIn: [Movie!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: OUT) + } + + type Movie @node { + id: ID! + ratings: [Float!]! + actors: [Actor!]! @relationship(type: "ACTED_IN", properties: "ActedIn", direction: IN) + averageRating: Float! + date: Date + point: Point + } + + type ActedIn @relationshipProperties { + pay: [Float!] + value: Int + } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + excludeDeprecatedFields: { + mutationOperations: true, + }, + }, + }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\" + The edge properties for the following fields: + * Actor.actedIn + * Movie.actors + \\"\\"\\" + type ActedIn { + pay: [Float!] + value: Int + } + + input ActedInAggregationWhereInput { + AND: [ActedInAggregationWhereInput!] + NOT: ActedInAggregationWhereInput + OR: [ActedInAggregationWhereInput!] + value: IntScalarAggregationFilters + value_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'value: { average: { eq: ... } } }' instead.\\") + value_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'value: { average: { gt: ... } } }' instead.\\") + value_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'value: { average: { gte: ... } } }' instead.\\") + value_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'value: { average: { lt: ... } } }' instead.\\") + value_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'value: { average: { lte: ... } } }' instead.\\") + value_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'value: { max: { eq: ... } } }' instead.\\") + value_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'value: { max: { gt: ... } } }' instead.\\") + value_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'value: { max: { gte: ... } } }' instead.\\") + value_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'value: { max: { lt: ... } } }' instead.\\") + value_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'value: { max: { lte: ... } } }' instead.\\") + value_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'value: { min: { eq: ... } } }' instead.\\") + value_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'value: { min: { gt: ... } } }' instead.\\") + value_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'value: { min: { gte: ... } } }' instead.\\") + value_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'value: { min: { lt: ... } } }' instead.\\") + value_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'value: { min: { lte: ... } } }' instead.\\") + value_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'value: { sum: { eq: ... } } }' instead.\\") + value_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'value: { sum: { gt: ... } } }' instead.\\") + value_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'value: { sum: { gte: ... } } }' instead.\\") + value_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'value: { sum: { lt: ... } } }' instead.\\") + value_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'value: { sum: { lte: ... } } }' instead.\\") + } + + input ActedInCreateInput { + pay: [Float!] + value: Int + } + + input ActedInSort { + pay: SortDirection + value: SortDirection + } + + input ActedInUpdateInput { + pay: ListFloatMutations + value: IntScalarMutations + } + + input ActedInWhere { + AND: [ActedInWhere!] + NOT: ActedInWhere + OR: [ActedInWhere!] + pay: FloatListFilters + pay_EQ: [Float!] @deprecated(reason: \\"Please use the relevant generic filter pay: { eq: ... }\\") + pay_INCLUDES: Float @deprecated(reason: \\"Please use the relevant generic filter pay: { includes: ... }\\") + value: IntScalarFilters + value_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter value: { eq: ... }\\") + value_GT: Int @deprecated(reason: \\"Please use the relevant generic filter value: { gt: ... }\\") + value_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter value: { gte: ... }\\") + value_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter value: { in: ... }\\") + value_LT: Int @deprecated(reason: \\"Please use the relevant generic filter value: { lt: ... }\\") + value_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter value: { lte: ... }\\") + } + + type Actor { + actedIn(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! + name: String + } + + input ActorActedInAggregateInput { + AND: [ActorActedInAggregateInput!] + NOT: ActorActedInAggregateInput + OR: [ActorActedInAggregateInput!] + count: IntScalarFilters + count_EQ: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: ActedInAggregationWhereInput + node: ActorActedInNodeAggregationWhereInput + } + + input ActorActedInConnectFieldInput { + connect: [MovieConnectInput!] + edge: ActedInCreateInput + where: MovieConnectWhere + } + + type ActorActedInConnection { + edges: [ActorActedInRelationship!]! + pageInfo: PageInfo! + 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 + } + + input ActorActedInConnectionWhere { + AND: [ActorActedInConnectionWhere!] + NOT: ActorActedInConnectionWhere + OR: [ActorActedInConnectionWhere!] + edge: ActedInWhere + node: MovieWhere + } + + input ActorActedInCreateFieldInput { + edge: ActedInCreateInput + node: MovieCreateInput! + } + + input ActorActedInDeleteFieldInput { + delete: MovieDeleteInput + where: ActorActedInConnectionWhere + } + + input ActorActedInDisconnectFieldInput { + disconnect: MovieDisconnectInput + where: ActorActedInConnectionWhere + } + + input ActorActedInFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + } + + input ActorActedInNodeAggregationWhereInput { + AND: [ActorActedInNodeAggregationWhereInput!] + NOT: ActorActedInNodeAggregationWhereInput + OR: [ActorActedInNodeAggregationWhereInput!] + averageRating: FloatScalarAggregationFilters + averageRating_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { eq: ... } } }' instead.\\") + averageRating_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gt: ... } } }' instead.\\") + averageRating_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gte: ... } } }' instead.\\") + averageRating_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lt: ... } } }' instead.\\") + averageRating_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lte: ... } } }' instead.\\") + averageRating_MAX_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { eq: ... } } }' instead.\\") + averageRating_MAX_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gt: ... } } }' instead.\\") + averageRating_MAX_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gte: ... } } }' instead.\\") + averageRating_MAX_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lt: ... } } }' instead.\\") + averageRating_MAX_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lte: ... } } }' instead.\\") + averageRating_MIN_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { eq: ... } } }' instead.\\") + averageRating_MIN_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gt: ... } } }' instead.\\") + averageRating_MIN_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gte: ... } } }' instead.\\") + averageRating_MIN_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lt: ... } } }' instead.\\") + averageRating_MIN_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lte: ... } } }' instead.\\") + averageRating_SUM_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { eq: ... } } }' instead.\\") + averageRating_SUM_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gt: ... } } }' instead.\\") + averageRating_SUM_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gte: ... } } }' instead.\\") + averageRating_SUM_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lt: ... } } }' instead.\\") + averageRating_SUM_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lte: ... } } }' instead.\\") + } + + type ActorActedInRelationship { + cursor: String! + node: Movie! + properties: ActedIn! + } + + input ActorActedInUpdateConnectionInput { + edge: ActedInUpdateInput + node: MovieUpdateInput + } + + input ActorActedInUpdateFieldInput { + connect: [ActorActedInConnectFieldInput!] + create: [ActorActedInCreateFieldInput!] + delete: [ActorActedInDeleteFieldInput!] + disconnect: [ActorActedInDisconnectFieldInput!] + update: ActorActedInUpdateConnectionInput + where: ActorActedInConnectionWhere + } + + type ActorAggregateSelection { + count: Int! + name: StringAggregateSelection! + } + + input ActorConnectInput { + actedIn: [ActorActedInConnectFieldInput!] + } + + input ActorConnectWhere { + node: ActorWhere! + } + + input ActorCreateInput { + actedIn: ActorActedInFieldInput + name: String + } + + input ActorDeleteInput { + actedIn: [ActorActedInDeleteFieldInput!] + } + + input ActorDisconnectInput { + actedIn: [ActorActedInDisconnectFieldInput!] + } + + type ActorEdge { + cursor: String! + node: Actor! + } + + type ActorMovieActedInAggregationSelection { + count: Int! + edge: ActorMovieActedInEdgeAggregateSelection + node: ActorMovieActedInNodeAggregateSelection + } + + type ActorMovieActedInEdgeAggregateSelection { + value: IntAggregateSelection! + } + + type ActorMovieActedInNodeAggregateSelection { + averageRating: FloatAggregateSelection! + } + + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + + \\"\\"\\" + Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. + \\"\\"\\" + input ActorSort { + name: SortDirection + } + + input ActorUpdateInput { + actedIn: [ActorActedInUpdateFieldInput!] + name: StringScalarMutations + } + + input ActorWhere { + AND: [ActorWhere!] + NOT: ActorWhere + OR: [ActorWhere!] + actedIn: MovieRelationshipFilters + actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters + \\"\\"\\" + Return Actors where all of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") + \\"\\"\\" + Return Actors where none of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") + \\"\\"\\" + Return Actors where one of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") + \\"\\"\\" + Return Actors where some of the related ActorActedInConnections match this filter + \\"\\"\\" + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") + \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" + actedIn_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") + \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" + actedIn_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") + \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" + actedIn_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") + \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" + actedIn_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + } + + type ActorsConnection { + edges: [ActorEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type CreateActorsMutationResponse { + actors: [Actor!]! + info: CreateInfo! + } + + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" + type CreateInfo { + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + \\"\\"\\"A date, represented as a 'yyyy-mm-dd' string\\"\\"\\" + scalar Date + + \\"\\"\\"Date filters\\"\\"\\" + input DateScalarFilters { + eq: Date + gt: Date + gte: Date + in: [Date!] + lt: Date + lte: Date + } + + \\"\\"\\"Date mutations\\"\\"\\" + input DateScalarMutations { + set: Date + } + + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" + type DeleteInfo { + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type FloatAggregateSelection { + average: Float + max: Float + min: Float + sum: Float + } + + \\"\\"\\"Float list filters\\"\\"\\" + input FloatListFilters { + eq: [Float!] + includes: Float + } + + \\"\\"\\"Filters for an aggregation of a float field\\"\\"\\" + input FloatScalarAggregationFilters { + average: FloatScalarFilters + max: FloatScalarFilters + min: FloatScalarFilters + sum: FloatScalarFilters + } + + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + type IntAggregateSelection { + average: Float + max: Int + min: Int + sum: Int + } + + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + + \\"\\"\\"Mutations for a list for Float\\"\\"\\" + input ListFloatMutations { + pop: Int + push: [Float!] + set: [Float!] + } + + type Movie { + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection + actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! + averageRating: Float! + date: Date + id: ID! + point: Point + ratings: [Float!]! + } + + type MovieActorActorsAggregationSelection { + count: Int! + edge: MovieActorActorsEdgeAggregateSelection + node: MovieActorActorsNodeAggregateSelection + } + + type MovieActorActorsEdgeAggregateSelection { + value: IntAggregateSelection! + } + + type MovieActorActorsNodeAggregateSelection { + name: StringAggregateSelection! + } + + input MovieActorsAggregateInput { + AND: [MovieActorsAggregateInput!] + NOT: MovieActorsAggregateInput + OR: [MovieActorsAggregateInput!] + count: IntScalarFilters + count_EQ: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: ActedInAggregationWhereInput + node: MovieActorsNodeAggregationWhereInput + } + + input MovieActorsConnectFieldInput { + connect: [ActorConnectInput!] + edge: ActedInCreateInput + where: ActorConnectWhere + } + + type MovieActorsConnection { + edges: [MovieActorsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input 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 + } + + input MovieActorsConnectionWhere { + AND: [MovieActorsConnectionWhere!] + NOT: MovieActorsConnectionWhere + OR: [MovieActorsConnectionWhere!] + edge: ActedInWhere + node: ActorWhere + } + + input MovieActorsCreateFieldInput { + edge: ActedInCreateInput + node: ActorCreateInput! + } + + input MovieActorsDeleteFieldInput { + delete: ActorDeleteInput + where: MovieActorsConnectionWhere + } + + input MovieActorsDisconnectFieldInput { + disconnect: ActorDisconnectInput + where: MovieActorsConnectionWhere + } + + input MovieActorsFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + } + + input MovieActorsNodeAggregationWhereInput { + AND: [MovieActorsNodeAggregationWhereInput!] + NOT: MovieActorsNodeAggregationWhereInput + OR: [MovieActorsNodeAggregationWhereInput!] + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") + } + + type MovieActorsRelationship { + cursor: String! + node: Actor! + properties: ActedIn! + } + + input MovieActorsUpdateConnectionInput { + edge: ActedInUpdateInput + node: ActorUpdateInput + } + + input MovieActorsUpdateFieldInput { + connect: [MovieActorsConnectFieldInput!] + create: [MovieActorsCreateFieldInput!] + delete: [MovieActorsDeleteFieldInput!] + disconnect: [MovieActorsDisconnectFieldInput!] + update: MovieActorsUpdateConnectionInput + where: MovieActorsConnectionWhere + } + + type MovieAggregateSelection { + averageRating: FloatAggregateSelection! + count: Int! + } + + input MovieConnectInput { + actors: [MovieActorsConnectFieldInput!] + } + + input MovieConnectWhere { + node: MovieWhere! + } + + input MovieCreateInput { + actors: MovieActorsFieldInput + averageRating: Float! + date: Date + id: ID! + point: PointInput + ratings: [Float!]! + } + + input MovieDeleteInput { + actors: [MovieActorsDeleteFieldInput!] + } + + input MovieDisconnectInput { + actors: [MovieActorsDisconnectFieldInput!] + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + + \\"\\"\\" + Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. + \\"\\"\\" + input MovieSort { + averageRating: SortDirection + date: SortDirection + id: SortDirection + point: SortDirection + } + + input MovieUpdateInput { + actors: [MovieActorsUpdateFieldInput!] + averageRating: FloatScalarMutations + date: DateScalarMutations + id: IDScalarMutations + point: PointMutations + ratings: ListFloatMutations + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + actors: ActorRelationshipFilters + actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters + \\"\\"\\" + Return Movies where all of the related MovieActorsConnections match this filter + \\"\\"\\" + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") + \\"\\"\\" + Return Movies where none of the related MovieActorsConnections match this filter + \\"\\"\\" + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") + \\"\\"\\" + Return Movies where one of the related MovieActorsConnections match this filter + \\"\\"\\" + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") + \\"\\"\\" + Return Movies where some of the related MovieActorsConnections match this filter + \\"\\"\\" + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") + \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") + \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") + \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") + \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + averageRating: FloatScalarFilters + averageRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { eq: ... }\\") + averageRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gt: ... }\\") + averageRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gte: ... }\\") + averageRating_IN: [Float!] @deprecated(reason: \\"Please use the relevant generic filter averageRating: { in: ... }\\") + averageRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lt: ... }\\") + averageRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lte: ... }\\") + date: DateScalarFilters + date_EQ: Date @deprecated(reason: \\"Please use the relevant generic filter date: { eq: ... }\\") + date_GT: Date @deprecated(reason: \\"Please use the relevant generic filter date: { gt: ... }\\") + date_GTE: Date @deprecated(reason: \\"Please use the relevant generic filter date: { gte: ... }\\") + date_IN: [Date] @deprecated(reason: \\"Please use the relevant generic filter date: { in: ... }\\") + date_LT: Date @deprecated(reason: \\"Please use the relevant generic filter date: { lt: ... }\\") + date_LTE: Date @deprecated(reason: \\"Please use the relevant generic filter date: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + point: PointFilters + point_DISTANCE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { distance: ... }\\") + point_EQ: PointInput @deprecated(reason: \\"Please use the relevant generic filter point: { eq: ... }\\") + point_GT: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { gt: ... }\\") + point_GTE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { gte: ... }\\") + point_IN: [PointInput] @deprecated(reason: \\"Please use the relevant generic filter point: { in: ... }\\") + point_LT: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { lt: ... }\\") + point_LTE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { lte: ... }\\") + ratings: FloatListFilters + ratings_EQ: [Float!] @deprecated(reason: \\"Please use the relevant generic filter ratings: { eq: ... }\\") + ratings_INCLUDES: Float @deprecated(reason: \\"Please use the relevant generic filter ratings: { includes: ... }\\") + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createActors(input: [ActorCreateInput!]!): CreateActorsMutationResponse! + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + deleteActors(delete: ActorDeleteInput, where: ActorWhere): DeleteInfo! + deleteMovies(delete: MovieDeleteInput, where: MovieWhere): DeleteInfo! + updateActors(update: ActorUpdateInput, where: ActorWhere): UpdateActorsMutationResponse! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + \\"\\"\\" + A point in a coordinate system. For more information, see https://neo4j.com/docs/graphql/4/type-definitions/types/spatial/#point + \\"\\"\\" + type Point { + crs: String! + height: Float + latitude: Float! + longitude: Float! + srid: Int! + } + + \\"\\"\\"Input type for a point with a distance\\"\\"\\" + input PointDistance { + \\"\\"\\"The distance in metres to be used when comparing two points\\"\\"\\" + distance: Float! + point: PointInput! + } + + \\"\\"\\"Distance filters\\"\\"\\" + input PointDistanceFilters { + eq: Float + from: PointInput! + gt: Float + gte: Float + lt: Float + lte: Float + } + + \\"\\"\\"Point filters\\"\\"\\" + input PointFilters { + distance: PointDistanceFilters + eq: PointInput + in: [PointInput!] + } + + \\"\\"\\"Input type for a point\\"\\"\\" + input PointInput { + height: Float + latitude: Float! + longitude: Float! + } + + \\"\\"\\"Point mutations\\"\\"\\" + input PointMutations { + set: PointInput + } + + type Query { + actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! + movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + } + + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type StringAggregateSelection { + longest: String + shortest: String + } + + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + + type UpdateActorsMutationResponse { + actors: [Actor!]! + info: UpdateInfo! + } + + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" + type UpdateInfo { + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + }" + `); + }); +}); diff --git a/packages/graphql/tests/schema/remove-deprecated/relationship-filtering.test.ts b/packages/graphql/tests/schema/remove-deprecated/relationship-filtering.test.ts new file mode 100644 index 0000000000..0c054a6c3f --- /dev/null +++ b/packages/graphql/tests/schema/remove-deprecated/relationship-filtering.test.ts @@ -0,0 +1,1564 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { printSchemaWithDirectives } from "@graphql-tools/utils"; +import { lexicographicSortSchema } from "graphql/utilities"; +import { Neo4jGraphQL } from "../../../src"; + +describe("Exclude suffix based filtering", () => { + test("should exclude suffix based filtering", async () => { + const typeDefs = /* GraphQL */ ` + type typeA @node { + name: String + actedIn: [typeB!]! @relationship(type: "HAS_TYPE", properties: "relType", direction: OUT) + } + + type typeB implements interfaceC @node { + id: ID! + ratings: [Float!]! + rels: [typeA!]! @relationship(type: "HAS_TYPE", properties: "relType", direction: IN) + averageRating: Float! + date: Date + duration: Duration + localDateTime: LocalDateTime + createdAt: DateTime + cartesianPoint: CartesianPoint + point: Point + time: Time + localTime: LocalTime + list: [String!]! + } + union d = typeA | typeB + + interface interfaceC { + averageRating: Float! + date: Date + duration: Duration + localDateTime: LocalDateTime + createdAt: DateTime + cartesianPoint: CartesianPoint + point: Point + time: Time + localTime: LocalTime + list: [String!]! + } + + type relType @relationshipProperties { + pay: [Float!] + averageRating: Float! + date: Date + duration: Duration + localDateTime: LocalDateTime + createdAt: DateTime + cartesianPoint: CartesianPoint + point: Point + time: Time + localTime: LocalTime + } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + excludeDeprecatedFields: { + relationshipFilters: true, + }, + }, + }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\"Distance filters for cartesian points\\"\\"\\" + input CartesianDistancePointFilters { + from: CartesianPointInput! + gt: Float + gte: Float + lt: Float + lte: Float + } + + \\"\\"\\" + A point in a two- or three-dimensional Cartesian coordinate system or in a three-dimensional cylindrical coordinate system. For more information, see https://neo4j.com/docs/graphql/4/type-definitions/types/spatial/#cartesian-point + \\"\\"\\" + type CartesianPoint { + crs: String! + srid: Int! + x: Float! + y: Float! + z: Float + } + + \\"\\"\\"Input type for a cartesian point with a distance\\"\\"\\" + input CartesianPointDistance { + distance: Float! + point: CartesianPointInput! + } + + \\"\\"\\"Cartesian Point filters\\"\\"\\" + input CartesianPointFilters { + distance: CartesianDistancePointFilters + eq: CartesianPointInput + in: [CartesianPointInput!] + } + + \\"\\"\\"Input type for a cartesian point\\"\\"\\" + input CartesianPointInput { + x: Float! + y: Float! + z: Float + } + + \\"\\"\\"CartesianPoint mutations\\"\\"\\" + input CartesianPointMutations { + set: CartesianPointInput + } + + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" + type CreateInfo { + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateTypeASMutationResponse { + info: CreateInfo! + typeAS: [typeA!]! + } + + type CreateTypeBSMutationResponse { + info: CreateInfo! + typeBS: [typeB!]! + } + + \\"\\"\\"A date, represented as a 'yyyy-mm-dd' string\\"\\"\\" + scalar Date + + \\"\\"\\"Date filters\\"\\"\\" + input DateScalarFilters { + eq: Date + gt: Date + gte: Date + in: [Date!] + lt: Date + lte: Date + } + + \\"\\"\\"Date mutations\\"\\"\\" + input DateScalarMutations { + set: Date + } + + \\"\\"\\"A date and time, represented as an ISO-8601 string\\"\\"\\" + scalar DateTime + + type DateTimeAggregateSelection { + max: DateTime + min: DateTime + } + + \\"\\"\\"Filters for an aggregation of an DateTime input field\\"\\"\\" + input DateTimeScalarAggregationFilters { + max: DateTimeScalarFilters + min: DateTimeScalarFilters + } + + \\"\\"\\"DateTime filters\\"\\"\\" + input DateTimeScalarFilters { + eq: DateTime + gt: DateTime + gte: DateTime + in: [DateTime!] + lt: DateTime + lte: DateTime + } + + \\"\\"\\"DateTime mutations\\"\\"\\" + input DateTimeScalarMutations { + set: DateTime + } + + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" + type DeleteInfo { + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + \\"\\"\\"A duration, represented as an ISO 8601 duration string\\"\\"\\" + scalar Duration + + type DurationAggregateSelection { + max: Duration + min: Duration + } + + \\"\\"\\"Filters for an aggregation of a Dutation input field\\"\\"\\" + input DurationScalarAggregationFilters { + average: DurationScalarFilters + max: DurationScalarFilters + min: DurationScalarFilters + } + + \\"\\"\\"Duration filters\\"\\"\\" + input DurationScalarFilters { + eq: Duration + gt: Duration + gte: Duration + in: [Duration!] + lt: Duration + lte: Duration + } + + \\"\\"\\"Duration mutations\\"\\"\\" + input DurationScalarMutations { + set: Duration + } + + type FloatAggregateSelection { + average: Float + max: Float + min: Float + sum: Float + } + + \\"\\"\\"Float list filters\\"\\"\\" + input FloatListFilters { + eq: [Float!] + includes: Float + } + + \\"\\"\\"Filters for an aggregation of a float field\\"\\"\\" + input FloatScalarAggregationFilters { + average: FloatScalarFilters + max: FloatScalarFilters + min: FloatScalarFilters + sum: FloatScalarFilters + } + + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + type InterfaceCSConnection { + edges: [interfaceCEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + \\"\\"\\"Mutations for a list for Float\\"\\"\\" + input ListFloatMutations { + pop: Int + push: [Float!] + set: [Float!] + } + + \\"\\"\\"Mutations for a list for String\\"\\"\\" + input ListStringMutations { + pop: Int + push: [String!] + set: [String!] + } + + \\"\\"\\"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'\\"\\"\\" + scalar LocalDateTime + + type LocalDateTimeAggregateSelection { + max: LocalDateTime + min: LocalDateTime + } + + \\"\\"\\"Filters for an aggregation of an LocalDateTime input field\\"\\"\\" + input LocalDateTimeScalarAggregationFilters { + max: LocalDateTimeScalarFilters + min: LocalDateTimeScalarFilters + } + + \\"\\"\\"LocalDateTime filters\\"\\"\\" + input LocalDateTimeScalarFilters { + eq: LocalDateTime + gt: LocalDateTime + gte: LocalDateTime + in: [LocalDateTime!] + lt: LocalDateTime + lte: LocalDateTime + } + + \\"\\"\\"LocalDateTime mutations\\"\\"\\" + input LocalDateTimeScalarMutations { + set: LocalDateTime + } + + \\"\\"\\" + A local time, represented as a time string without timezone information + \\"\\"\\" + scalar LocalTime + + type LocalTimeAggregateSelection { + max: LocalTime + min: LocalTime + } + + \\"\\"\\"Filters for an aggregation of an LocalTime input field\\"\\"\\" + input LocalTimeScalarAggregationFilters { + max: LocalTimeScalarFilters + min: LocalTimeScalarFilters + } + + \\"\\"\\"LocalTime filters\\"\\"\\" + input LocalTimeScalarFilters { + eq: LocalTime + gt: LocalTime + gte: LocalTime + in: [LocalTime!] + lt: LocalTime + lte: LocalTime + } + + \\"\\"\\"LocalTime mutations\\"\\"\\" + input LocalTimeScalarMutations { + set: LocalTime + } + + type Mutation { + createTypeAS(input: [typeACreateInput!]!): CreateTypeASMutationResponse! + createTypeBS(input: [typeBCreateInput!]!): CreateTypeBSMutationResponse! + deleteTypeAS(delete: typeADeleteInput, where: typeAWhere): DeleteInfo! + deleteTypeBS(delete: typeBDeleteInput, where: typeBWhere): DeleteInfo! + updateTypeAS(update: typeAUpdateInput, where: typeAWhere): UpdateTypeASMutationResponse! + updateTypeBS(update: typeBUpdateInput, where: typeBWhere): UpdateTypeBSMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + \\"\\"\\" + A point in a coordinate system. For more information, see https://neo4j.com/docs/graphql/4/type-definitions/types/spatial/#point + \\"\\"\\" + type Point { + crs: String! + height: Float + latitude: Float! + longitude: Float! + srid: Int! + } + + \\"\\"\\"Input type for a point with a distance\\"\\"\\" + input PointDistance { + \\"\\"\\"The distance in metres to be used when comparing two points\\"\\"\\" + distance: Float! + point: PointInput! + } + + \\"\\"\\"Distance filters\\"\\"\\" + input PointDistanceFilters { + eq: Float + from: PointInput! + gt: Float + gte: Float + lt: Float + lte: Float + } + + \\"\\"\\"Point filters\\"\\"\\" + input PointFilters { + distance: PointDistanceFilters + eq: PointInput + in: [PointInput!] + } + + \\"\\"\\"Input type for a point\\"\\"\\" + input PointInput { + height: Float + latitude: Float! + longitude: Float! + } + + \\"\\"\\"Point mutations\\"\\"\\" + input PointMutations { + set: PointInput + } + + type Query { + ds(limit: Int, offset: Int, where: dWhere): [d!]! + interfaceCS(limit: Int, offset: Int, sort: [interfaceCSort!], where: interfaceCWhere): [interfaceC!]! + interfaceCSAggregate(where: interfaceCWhere): interfaceCAggregateSelection! + interfaceCSConnection(after: String, first: Int, sort: [interfaceCSort!], where: interfaceCWhere): InterfaceCSConnection! + typeAS(limit: Int, offset: Int, sort: [typeASort!], where: typeAWhere): [typeA!]! + typeASAggregate(where: typeAWhere): typeAAggregateSelection! + typeASConnection(after: String, first: Int, sort: [typeASort!], where: typeAWhere): TypeASConnection! + typeBS(limit: Int, offset: Int, sort: [typeBSort!], where: typeBWhere): [typeB!]! + typeBSAggregate(where: typeBWhere): typeBAggregateSelection! + typeBSConnection(after: String, first: Int, sort: [typeBSort!], where: typeBWhere): TypeBSConnection! + } + + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type StringAggregateSelection { + longest: String + shortest: String + } + + \\"\\"\\"String list filters\\"\\"\\" + input StringListFilters { + eq: [String!] + includes: String + } + + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + + \\"\\"\\"A time, represented as an RFC3339 time string\\"\\"\\" + scalar Time + + type TimeAggregateSelection { + max: Time + min: Time + } + + \\"\\"\\"Filters for an aggregation of an Time input field\\"\\"\\" + input TimeScalarAggregationFilters { + max: TimeScalarFilters + min: TimeScalarFilters + } + + \\"\\"\\"Time filters\\"\\"\\" + input TimeScalarFilters { + eq: Time + gt: Time + gte: Time + in: [Time!] + lt: Time + lte: Time + } + + \\"\\"\\"Time mutations\\"\\"\\" + input TimeScalarMutations { + set: Time + } + + type TypeASConnection { + edges: [typeAEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type TypeBSConnection { + edges: [typeBEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" + type UpdateInfo { + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateTypeASMutationResponse { + info: UpdateInfo! + typeAS: [typeA!]! + } + + type UpdateTypeBSMutationResponse { + info: UpdateInfo! + typeBS: [typeB!]! + } + + union d = typeA | typeB + + input dWhere { + typeA: typeAWhere + typeB: typeBWhere + } + + interface interfaceC { + averageRating: Float! + cartesianPoint: CartesianPoint + createdAt: DateTime + date: Date + duration: Duration + list: [String!]! + localDateTime: LocalDateTime + localTime: LocalTime + point: Point + time: Time + } + + type interfaceCAggregateSelection { + averageRating: FloatAggregateSelection! + count: Int! + createdAt: DateTimeAggregateSelection! + duration: DurationAggregateSelection! + localDateTime: LocalDateTimeAggregateSelection! + localTime: LocalTimeAggregateSelection! + time: TimeAggregateSelection! + } + + type interfaceCEdge { + cursor: String! + node: interfaceC! + } + + enum interfaceCImplementation { + typeB + } + + \\"\\"\\" + Fields to sort InterfaceCS by. The order in which sorts are applied is not guaranteed when specifying many fields in one interfaceCSort object. + \\"\\"\\" + input interfaceCSort { + averageRating: SortDirection + cartesianPoint: SortDirection + createdAt: SortDirection + date: SortDirection + duration: SortDirection + localDateTime: SortDirection + localTime: SortDirection + point: SortDirection + time: SortDirection + } + + input interfaceCWhere { + AND: [interfaceCWhere!] + NOT: interfaceCWhere + OR: [interfaceCWhere!] + averageRating: FloatScalarFilters + averageRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { eq: ... }\\") + averageRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gt: ... }\\") + averageRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gte: ... }\\") + averageRating_IN: [Float!] @deprecated(reason: \\"Please use the relevant generic filter averageRating: { in: ... }\\") + averageRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lt: ... }\\") + averageRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lte: ... }\\") + cartesianPoint: CartesianPointFilters + cartesianPoint_DISTANCE: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter cartesianPoint: { distance: ... }\\") + cartesianPoint_EQ: CartesianPointInput @deprecated(reason: \\"Please use the relevant generic filter cartesianPoint: { eq: ... }\\") + cartesianPoint_GT: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter cartesianPoint: { gt: ... }\\") + cartesianPoint_GTE: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter cartesianPoint: { gte: ... }\\") + cartesianPoint_IN: [CartesianPointInput] @deprecated(reason: \\"Please use the relevant generic filter cartesianPoint: { in: ... }\\") + cartesianPoint_LT: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter cartesianPoint: { lt: ... }\\") + cartesianPoint_LTE: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter cartesianPoint: { lte: ... }\\") + createdAt: DateTimeScalarFilters + createdAt_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { eq: ... }\\") + createdAt_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { gt: ... }\\") + createdAt_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { gte: ... }\\") + createdAt_IN: [DateTime] @deprecated(reason: \\"Please use the relevant generic filter createdAt: { in: ... }\\") + createdAt_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { lt: ... }\\") + createdAt_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { lte: ... }\\") + date: DateScalarFilters + date_EQ: Date @deprecated(reason: \\"Please use the relevant generic filter date: { eq: ... }\\") + date_GT: Date @deprecated(reason: \\"Please use the relevant generic filter date: { gt: ... }\\") + date_GTE: Date @deprecated(reason: \\"Please use the relevant generic filter date: { gte: ... }\\") + date_IN: [Date] @deprecated(reason: \\"Please use the relevant generic filter date: { in: ... }\\") + date_LT: Date @deprecated(reason: \\"Please use the relevant generic filter date: { lt: ... }\\") + date_LTE: Date @deprecated(reason: \\"Please use the relevant generic filter date: { lte: ... }\\") + duration: DurationScalarFilters + duration_EQ: Duration @deprecated(reason: \\"Please use the relevant generic filter duration: { eq: ... }\\") + duration_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter duration: { gt: ... }\\") + duration_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter duration: { gte: ... }\\") + duration_IN: [Duration] @deprecated(reason: \\"Please use the relevant generic filter duration: { in: ... }\\") + duration_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter duration: { lt: ... }\\") + duration_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter duration: { lte: ... }\\") + list: StringListFilters + list_EQ: [String!] @deprecated(reason: \\"Please use the relevant generic filter list: { eq: ... }\\") + list_INCLUDES: String @deprecated(reason: \\"Please use the relevant generic filter list: { includes: ... }\\") + localDateTime: LocalDateTimeScalarFilters + localDateTime_EQ: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter localDateTime: { eq: ... }\\") + localDateTime_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter localDateTime: { gt: ... }\\") + localDateTime_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter localDateTime: { gte: ... }\\") + localDateTime_IN: [LocalDateTime] @deprecated(reason: \\"Please use the relevant generic filter localDateTime: { in: ... }\\") + localDateTime_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter localDateTime: { lt: ... }\\") + localDateTime_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter localDateTime: { lte: ... }\\") + localTime: LocalTimeScalarFilters + localTime_EQ: LocalTime @deprecated(reason: \\"Please use the relevant generic filter localTime: { eq: ... }\\") + localTime_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter localTime: { gt: ... }\\") + localTime_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter localTime: { gte: ... }\\") + localTime_IN: [LocalTime] @deprecated(reason: \\"Please use the relevant generic filter localTime: { in: ... }\\") + localTime_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter localTime: { lt: ... }\\") + localTime_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter localTime: { lte: ... }\\") + point: PointFilters + point_DISTANCE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { distance: ... }\\") + point_EQ: PointInput @deprecated(reason: \\"Please use the relevant generic filter point: { eq: ... }\\") + point_GT: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { gt: ... }\\") + point_GTE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { gte: ... }\\") + point_IN: [PointInput] @deprecated(reason: \\"Please use the relevant generic filter point: { in: ... }\\") + point_LT: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { lt: ... }\\") + point_LTE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { lte: ... }\\") + time: TimeScalarFilters + time_EQ: Time @deprecated(reason: \\"Please use the relevant generic filter time: { eq: ... }\\") + time_GT: Time @deprecated(reason: \\"Please use the relevant generic filter time: { gt: ... }\\") + time_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter time: { gte: ... }\\") + time_IN: [Time] @deprecated(reason: \\"Please use the relevant generic filter time: { in: ... }\\") + time_LT: Time @deprecated(reason: \\"Please use the relevant generic filter time: { lt: ... }\\") + time_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter time: { lte: ... }\\") + typename: [interfaceCImplementation!] + } + + \\"\\"\\" + The edge properties for the following fields: + * typeA.actedIn + * typeB.rels + \\"\\"\\" + type relType { + averageRating: Float! + cartesianPoint: CartesianPoint + createdAt: DateTime + date: Date + duration: Duration + localDateTime: LocalDateTime + localTime: LocalTime + pay: [Float!] + point: Point + time: Time + } + + input relTypeAggregationWhereInput { + AND: [relTypeAggregationWhereInput!] + NOT: relTypeAggregationWhereInput + OR: [relTypeAggregationWhereInput!] + averageRating: FloatScalarAggregationFilters + averageRating_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { eq: ... } } }' instead.\\") + averageRating_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gt: ... } } }' instead.\\") + averageRating_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gte: ... } } }' instead.\\") + averageRating_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lt: ... } } }' instead.\\") + averageRating_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lte: ... } } }' instead.\\") + averageRating_MAX_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { eq: ... } } }' instead.\\") + averageRating_MAX_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gt: ... } } }' instead.\\") + averageRating_MAX_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gte: ... } } }' instead.\\") + averageRating_MAX_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lt: ... } } }' instead.\\") + averageRating_MAX_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lte: ... } } }' instead.\\") + averageRating_MIN_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { eq: ... } } }' instead.\\") + averageRating_MIN_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gt: ... } } }' instead.\\") + averageRating_MIN_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gte: ... } } }' instead.\\") + averageRating_MIN_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lt: ... } } }' instead.\\") + averageRating_MIN_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lte: ... } } }' instead.\\") + averageRating_SUM_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { eq: ... } } }' instead.\\") + averageRating_SUM_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gt: ... } } }' instead.\\") + averageRating_SUM_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gte: ... } } }' instead.\\") + averageRating_SUM_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lt: ... } } }' instead.\\") + averageRating_SUM_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lte: ... } } }' instead.\\") + createdAt: DateTimeScalarAggregationFilters + createdAt_MAX_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { eq: ... } } }' instead.\\") + createdAt_MAX_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { gt: ... } } }' instead.\\") + createdAt_MAX_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { gte: ... } } }' instead.\\") + createdAt_MAX_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { lt: ... } } }' instead.\\") + createdAt_MAX_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { lte: ... } } }' instead.\\") + createdAt_MIN_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { eq: ... } } }' instead.\\") + createdAt_MIN_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { gt: ... } } }' instead.\\") + createdAt_MIN_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { gte: ... } } }' instead.\\") + createdAt_MIN_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { lt: ... } } }' instead.\\") + createdAt_MIN_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { lte: ... } } }' instead.\\") + duration: DurationScalarAggregationFilters + duration_AVERAGE_EQUAL: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { average: { eq: ... } } }' instead.\\") + duration_AVERAGE_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { average: { gt: ... } } }' instead.\\") + duration_AVERAGE_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { average: { gte: ... } } }' instead.\\") + duration_AVERAGE_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { average: { lt: ... } } }' instead.\\") + duration_AVERAGE_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { average: { lte: ... } } }' instead.\\") + duration_MAX_EQUAL: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { max: { eq: ... } } }' instead.\\") + duration_MAX_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { max: { gt: ... } } }' instead.\\") + duration_MAX_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { max: { gte: ... } } }' instead.\\") + duration_MAX_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { max: { lt: ... } } }' instead.\\") + duration_MAX_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { max: { lte: ... } } }' instead.\\") + duration_MIN_EQUAL: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { min: { eq: ... } } }' instead.\\") + duration_MIN_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { min: { gt: ... } } }' instead.\\") + duration_MIN_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { min: { gte: ... } } }' instead.\\") + duration_MIN_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { min: { lt: ... } } }' instead.\\") + duration_MIN_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { min: { lte: ... } } }' instead.\\") + localDateTime: LocalDateTimeScalarAggregationFilters + localDateTime_MAX_EQUAL: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { max: { eq: ... } } }' instead.\\") + localDateTime_MAX_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { max: { gt: ... } } }' instead.\\") + localDateTime_MAX_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { max: { gte: ... } } }' instead.\\") + localDateTime_MAX_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { max: { lt: ... } } }' instead.\\") + localDateTime_MAX_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { max: { lte: ... } } }' instead.\\") + localDateTime_MIN_EQUAL: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { min: { eq: ... } } }' instead.\\") + localDateTime_MIN_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { min: { gt: ... } } }' instead.\\") + localDateTime_MIN_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { min: { gte: ... } } }' instead.\\") + localDateTime_MIN_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { min: { lt: ... } } }' instead.\\") + localDateTime_MIN_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { min: { lte: ... } } }' instead.\\") + localTime: LocalTimeScalarAggregationFilters + localTime_MAX_EQUAL: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { max: { eq: ... } } }' instead.\\") + localTime_MAX_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { max: { gt: ... } } }' instead.\\") + localTime_MAX_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { max: { gte: ... } } }' instead.\\") + localTime_MAX_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { max: { lt: ... } } }' instead.\\") + localTime_MAX_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { max: { lte: ... } } }' instead.\\") + localTime_MIN_EQUAL: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { min: { eq: ... } } }' instead.\\") + localTime_MIN_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { min: { gt: ... } } }' instead.\\") + localTime_MIN_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { min: { gte: ... } } }' instead.\\") + localTime_MIN_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { min: { lt: ... } } }' instead.\\") + localTime_MIN_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { min: { lte: ... } } }' instead.\\") + time: TimeScalarAggregationFilters + time_MAX_EQUAL: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { max: { eq: ... } } }' instead.\\") + time_MAX_GT: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { max: { gt: ... } } }' instead.\\") + time_MAX_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { max: { gte: ... } } }' instead.\\") + time_MAX_LT: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { max: { lt: ... } } }' instead.\\") + time_MAX_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { max: { lte: ... } } }' instead.\\") + time_MIN_EQUAL: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { min: { eq: ... } } }' instead.\\") + time_MIN_GT: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { min: { gt: ... } } }' instead.\\") + time_MIN_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { min: { gte: ... } } }' instead.\\") + time_MIN_LT: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { min: { lt: ... } } }' instead.\\") + time_MIN_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { min: { lte: ... } } }' instead.\\") + } + + input relTypeCreateInput { + averageRating: Float! + cartesianPoint: CartesianPointInput + createdAt: DateTime + date: Date + duration: Duration + localDateTime: LocalDateTime + localTime: LocalTime + pay: [Float!] + point: PointInput + time: Time + } + + input relTypeSort { + averageRating: SortDirection + cartesianPoint: SortDirection + createdAt: SortDirection + date: SortDirection + duration: SortDirection + localDateTime: SortDirection + localTime: SortDirection + pay: SortDirection + point: SortDirection + time: SortDirection + } + + input relTypeUpdateInput { + averageRating: FloatScalarMutations + averageRating_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { add: ... } }' instead.\\") + averageRating_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { divide: ... } }' instead.\\") + averageRating_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { multiply: ... } }' instead.\\") + averageRating_SET: Float @deprecated(reason: \\"Please use the generic mutation 'averageRating: { set: ... } }' instead.\\") + averageRating_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { subtract: ... } }' instead.\\") + cartesianPoint: CartesianPointMutations + cartesianPoint_SET: CartesianPointInput @deprecated(reason: \\"Please use the generic mutation 'cartesianPoint: { set: ... } }' instead.\\") + createdAt: DateTimeScalarMutations + createdAt_SET: DateTime @deprecated(reason: \\"Please use the generic mutation 'createdAt: { set: ... } }' instead.\\") + date: DateScalarMutations + date_SET: Date @deprecated(reason: \\"Please use the generic mutation 'date: { set: ... } }' instead.\\") + duration: DurationScalarMutations + duration_SET: Duration @deprecated(reason: \\"Please use the generic mutation 'duration: { set: ... } }' instead.\\") + localDateTime: LocalDateTimeScalarMutations + localDateTime_SET: LocalDateTime @deprecated(reason: \\"Please use the generic mutation 'localDateTime: { set: ... } }' instead.\\") + localTime: LocalTimeScalarMutations + localTime_SET: LocalTime @deprecated(reason: \\"Please use the generic mutation 'localTime: { set: ... } }' instead.\\") + pay: ListFloatMutations + pay_POP: Int @deprecated(reason: \\"Please use the generic mutation 'pay: { pop: ... } }' instead.\\") + pay_PUSH: [Float!] @deprecated(reason: \\"Please use the generic mutation 'pay: { push: ... } }' instead.\\") + pay_SET: [Float!] @deprecated(reason: \\"Please use the generic mutation 'pay: { set: ... } }' instead.\\") + point: PointMutations + point_SET: PointInput @deprecated(reason: \\"Please use the generic mutation 'point: { set: ... } }' instead.\\") + time: TimeScalarMutations + time_SET: Time @deprecated(reason: \\"Please use the generic mutation 'time: { set: ... } }' instead.\\") + } + + input relTypeWhere { + AND: [relTypeWhere!] + NOT: relTypeWhere + OR: [relTypeWhere!] + averageRating: FloatScalarFilters + averageRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { eq: ... }\\") + averageRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gt: ... }\\") + averageRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gte: ... }\\") + averageRating_IN: [Float!] @deprecated(reason: \\"Please use the relevant generic filter averageRating: { in: ... }\\") + averageRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lt: ... }\\") + averageRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lte: ... }\\") + cartesianPoint: CartesianPointFilters + cartesianPoint_DISTANCE: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter cartesianPoint: { distance: ... }\\") + cartesianPoint_EQ: CartesianPointInput @deprecated(reason: \\"Please use the relevant generic filter cartesianPoint: { eq: ... }\\") + cartesianPoint_GT: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter cartesianPoint: { gt: ... }\\") + cartesianPoint_GTE: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter cartesianPoint: { gte: ... }\\") + cartesianPoint_IN: [CartesianPointInput] @deprecated(reason: \\"Please use the relevant generic filter cartesianPoint: { in: ... }\\") + cartesianPoint_LT: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter cartesianPoint: { lt: ... }\\") + cartesianPoint_LTE: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter cartesianPoint: { lte: ... }\\") + createdAt: DateTimeScalarFilters + createdAt_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { eq: ... }\\") + createdAt_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { gt: ... }\\") + createdAt_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { gte: ... }\\") + createdAt_IN: [DateTime] @deprecated(reason: \\"Please use the relevant generic filter createdAt: { in: ... }\\") + createdAt_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { lt: ... }\\") + createdAt_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { lte: ... }\\") + date: DateScalarFilters + date_EQ: Date @deprecated(reason: \\"Please use the relevant generic filter date: { eq: ... }\\") + date_GT: Date @deprecated(reason: \\"Please use the relevant generic filter date: { gt: ... }\\") + date_GTE: Date @deprecated(reason: \\"Please use the relevant generic filter date: { gte: ... }\\") + date_IN: [Date] @deprecated(reason: \\"Please use the relevant generic filter date: { in: ... }\\") + date_LT: Date @deprecated(reason: \\"Please use the relevant generic filter date: { lt: ... }\\") + date_LTE: Date @deprecated(reason: \\"Please use the relevant generic filter date: { lte: ... }\\") + duration: DurationScalarFilters + duration_EQ: Duration @deprecated(reason: \\"Please use the relevant generic filter duration: { eq: ... }\\") + duration_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter duration: { gt: ... }\\") + duration_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter duration: { gte: ... }\\") + duration_IN: [Duration] @deprecated(reason: \\"Please use the relevant generic filter duration: { in: ... }\\") + duration_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter duration: { lt: ... }\\") + duration_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter duration: { lte: ... }\\") + localDateTime: LocalDateTimeScalarFilters + localDateTime_EQ: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter localDateTime: { eq: ... }\\") + localDateTime_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter localDateTime: { gt: ... }\\") + localDateTime_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter localDateTime: { gte: ... }\\") + localDateTime_IN: [LocalDateTime] @deprecated(reason: \\"Please use the relevant generic filter localDateTime: { in: ... }\\") + localDateTime_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter localDateTime: { lt: ... }\\") + localDateTime_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter localDateTime: { lte: ... }\\") + localTime: LocalTimeScalarFilters + localTime_EQ: LocalTime @deprecated(reason: \\"Please use the relevant generic filter localTime: { eq: ... }\\") + localTime_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter localTime: { gt: ... }\\") + localTime_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter localTime: { gte: ... }\\") + localTime_IN: [LocalTime] @deprecated(reason: \\"Please use the relevant generic filter localTime: { in: ... }\\") + localTime_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter localTime: { lt: ... }\\") + localTime_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter localTime: { lte: ... }\\") + pay: FloatListFilters + pay_EQ: [Float!] @deprecated(reason: \\"Please use the relevant generic filter pay: { eq: ... }\\") + pay_INCLUDES: Float @deprecated(reason: \\"Please use the relevant generic filter pay: { includes: ... }\\") + point: PointFilters + point_DISTANCE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { distance: ... }\\") + point_EQ: PointInput @deprecated(reason: \\"Please use the relevant generic filter point: { eq: ... }\\") + point_GT: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { gt: ... }\\") + point_GTE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { gte: ... }\\") + point_IN: [PointInput] @deprecated(reason: \\"Please use the relevant generic filter point: { in: ... }\\") + point_LT: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { lt: ... }\\") + point_LTE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { lte: ... }\\") + time: TimeScalarFilters + time_EQ: Time @deprecated(reason: \\"Please use the relevant generic filter time: { eq: ... }\\") + time_GT: Time @deprecated(reason: \\"Please use the relevant generic filter time: { gt: ... }\\") + time_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter time: { gte: ... }\\") + time_IN: [Time] @deprecated(reason: \\"Please use the relevant generic filter time: { in: ... }\\") + time_LT: Time @deprecated(reason: \\"Please use the relevant generic filter time: { lt: ... }\\") + time_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter time: { lte: ... }\\") + } + + type typeA { + actedIn(limit: Int, offset: Int, sort: [typeBSort!], where: typeBWhere): [typeB!]! + actedInAggregate(where: typeBWhere): typeAtypeBActedInAggregationSelection + actedInConnection(after: String, first: Int, sort: [typeAActedInConnectionSort!], where: typeAActedInConnectionWhere): typeAActedInConnection! + name: String + } + + input typeAActedInAggregateInput { + AND: [typeAActedInAggregateInput!] + NOT: typeAActedInAggregateInput + OR: [typeAActedInAggregateInput!] + count: IntScalarFilters + count_EQ: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: relTypeAggregationWhereInput + node: typeAActedInNodeAggregationWhereInput + } + + input typeAActedInConnectFieldInput { + connect: [typeBConnectInput!] + edge: relTypeCreateInput! + where: typeBConnectWhere + } + + type typeAActedInConnection { + edges: [typeAActedInRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input typeAActedInConnectionFilters { + \\"\\"\\" + Return typeAS where all of the related typeAActedInConnections match this filter + \\"\\"\\" + all: typeAActedInConnectionWhere + \\"\\"\\" + Return typeAS where none of the related typeAActedInConnections match this filter + \\"\\"\\" + none: typeAActedInConnectionWhere + \\"\\"\\" + Return typeAS where one of the related typeAActedInConnections match this filter + \\"\\"\\" + single: typeAActedInConnectionWhere + \\"\\"\\" + Return typeAS where some of the related typeAActedInConnections match this filter + \\"\\"\\" + some: typeAActedInConnectionWhere + } + + input typeAActedInConnectionSort { + edge: relTypeSort + node: typeBSort + } + + input typeAActedInConnectionWhere { + AND: [typeAActedInConnectionWhere!] + NOT: typeAActedInConnectionWhere + OR: [typeAActedInConnectionWhere!] + edge: relTypeWhere + node: typeBWhere + } + + input typeAActedInCreateFieldInput { + edge: relTypeCreateInput! + node: typeBCreateInput! + } + + input typeAActedInDeleteFieldInput { + delete: typeBDeleteInput + where: typeAActedInConnectionWhere + } + + input typeAActedInDisconnectFieldInput { + disconnect: typeBDisconnectInput + where: typeAActedInConnectionWhere + } + + input typeAActedInFieldInput { + connect: [typeAActedInConnectFieldInput!] + create: [typeAActedInCreateFieldInput!] + } + + input typeAActedInNodeAggregationWhereInput { + AND: [typeAActedInNodeAggregationWhereInput!] + NOT: typeAActedInNodeAggregationWhereInput + OR: [typeAActedInNodeAggregationWhereInput!] + averageRating: FloatScalarAggregationFilters + averageRating_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { eq: ... } } }' instead.\\") + averageRating_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gt: ... } } }' instead.\\") + averageRating_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gte: ... } } }' instead.\\") + averageRating_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lt: ... } } }' instead.\\") + averageRating_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lte: ... } } }' instead.\\") + averageRating_MAX_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { eq: ... } } }' instead.\\") + averageRating_MAX_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gt: ... } } }' instead.\\") + averageRating_MAX_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gte: ... } } }' instead.\\") + averageRating_MAX_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lt: ... } } }' instead.\\") + averageRating_MAX_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lte: ... } } }' instead.\\") + averageRating_MIN_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { eq: ... } } }' instead.\\") + averageRating_MIN_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gt: ... } } }' instead.\\") + averageRating_MIN_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gte: ... } } }' instead.\\") + averageRating_MIN_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lt: ... } } }' instead.\\") + averageRating_MIN_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lte: ... } } }' instead.\\") + averageRating_SUM_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { eq: ... } } }' instead.\\") + averageRating_SUM_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gt: ... } } }' instead.\\") + averageRating_SUM_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gte: ... } } }' instead.\\") + averageRating_SUM_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lt: ... } } }' instead.\\") + averageRating_SUM_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lte: ... } } }' instead.\\") + createdAt: DateTimeScalarAggregationFilters + createdAt_MAX_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { eq: ... } } }' instead.\\") + createdAt_MAX_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { gt: ... } } }' instead.\\") + createdAt_MAX_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { gte: ... } } }' instead.\\") + createdAt_MAX_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { lt: ... } } }' instead.\\") + createdAt_MAX_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { max: { lte: ... } } }' instead.\\") + createdAt_MIN_EQUAL: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { eq: ... } } }' instead.\\") + createdAt_MIN_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { gt: ... } } }' instead.\\") + createdAt_MIN_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { gte: ... } } }' instead.\\") + createdAt_MIN_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { lt: ... } } }' instead.\\") + createdAt_MIN_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter 'createdAt: { min: { lte: ... } } }' instead.\\") + duration: DurationScalarAggregationFilters + duration_AVERAGE_EQUAL: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { average: { eq: ... } } }' instead.\\") + duration_AVERAGE_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { average: { gt: ... } } }' instead.\\") + duration_AVERAGE_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { average: { gte: ... } } }' instead.\\") + duration_AVERAGE_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { average: { lt: ... } } }' instead.\\") + duration_AVERAGE_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { average: { lte: ... } } }' instead.\\") + duration_MAX_EQUAL: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { max: { eq: ... } } }' instead.\\") + duration_MAX_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { max: { gt: ... } } }' instead.\\") + duration_MAX_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { max: { gte: ... } } }' instead.\\") + duration_MAX_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { max: { lt: ... } } }' instead.\\") + duration_MAX_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { max: { lte: ... } } }' instead.\\") + duration_MIN_EQUAL: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { min: { eq: ... } } }' instead.\\") + duration_MIN_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { min: { gt: ... } } }' instead.\\") + duration_MIN_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { min: { gte: ... } } }' instead.\\") + duration_MIN_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { min: { lt: ... } } }' instead.\\") + duration_MIN_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter 'duration: { min: { lte: ... } } }' instead.\\") + localDateTime: LocalDateTimeScalarAggregationFilters + localDateTime_MAX_EQUAL: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { max: { eq: ... } } }' instead.\\") + localDateTime_MAX_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { max: { gt: ... } } }' instead.\\") + localDateTime_MAX_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { max: { gte: ... } } }' instead.\\") + localDateTime_MAX_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { max: { lt: ... } } }' instead.\\") + localDateTime_MAX_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { max: { lte: ... } } }' instead.\\") + localDateTime_MIN_EQUAL: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { min: { eq: ... } } }' instead.\\") + localDateTime_MIN_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { min: { gt: ... } } }' instead.\\") + localDateTime_MIN_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { min: { gte: ... } } }' instead.\\") + localDateTime_MIN_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { min: { lt: ... } } }' instead.\\") + localDateTime_MIN_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter 'localDateTime: { min: { lte: ... } } }' instead.\\") + localTime: LocalTimeScalarAggregationFilters + localTime_MAX_EQUAL: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { max: { eq: ... } } }' instead.\\") + localTime_MAX_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { max: { gt: ... } } }' instead.\\") + localTime_MAX_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { max: { gte: ... } } }' instead.\\") + localTime_MAX_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { max: { lt: ... } } }' instead.\\") + localTime_MAX_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { max: { lte: ... } } }' instead.\\") + localTime_MIN_EQUAL: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { min: { eq: ... } } }' instead.\\") + localTime_MIN_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { min: { gt: ... } } }' instead.\\") + localTime_MIN_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { min: { gte: ... } } }' instead.\\") + localTime_MIN_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { min: { lt: ... } } }' instead.\\") + localTime_MIN_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter 'localTime: { min: { lte: ... } } }' instead.\\") + time: TimeScalarAggregationFilters + time_MAX_EQUAL: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { max: { eq: ... } } }' instead.\\") + time_MAX_GT: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { max: { gt: ... } } }' instead.\\") + time_MAX_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { max: { gte: ... } } }' instead.\\") + time_MAX_LT: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { max: { lt: ... } } }' instead.\\") + time_MAX_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { max: { lte: ... } } }' instead.\\") + time_MIN_EQUAL: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { min: { eq: ... } } }' instead.\\") + time_MIN_GT: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { min: { gt: ... } } }' instead.\\") + time_MIN_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { min: { gte: ... } } }' instead.\\") + time_MIN_LT: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { min: { lt: ... } } }' instead.\\") + time_MIN_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter 'time: { min: { lte: ... } } }' instead.\\") + } + + type typeAActedInRelationship { + cursor: String! + node: typeB! + properties: relType! + } + + input typeAActedInUpdateConnectionInput { + edge: relTypeUpdateInput + node: typeBUpdateInput + } + + input typeAActedInUpdateFieldInput { + connect: [typeAActedInConnectFieldInput!] + create: [typeAActedInCreateFieldInput!] + delete: [typeAActedInDeleteFieldInput!] + disconnect: [typeAActedInDisconnectFieldInput!] + update: typeAActedInUpdateConnectionInput + where: typeAActedInConnectionWhere + } + + type typeAAggregateSelection { + count: Int! + name: StringAggregateSelection! + } + + input typeAConnectInput { + actedIn: [typeAActedInConnectFieldInput!] + } + + input typeAConnectWhere { + node: typeAWhere! + } + + input typeACreateInput { + actedIn: typeAActedInFieldInput + name: String + } + + input typeADeleteInput { + actedIn: [typeAActedInDeleteFieldInput!] + } + + input typeADisconnectInput { + actedIn: [typeAActedInDisconnectFieldInput!] + } + + type typeAEdge { + cursor: String! + node: typeA! + } + + input typeARelationshipFilters { + \\"\\"\\"Filter type where all of the related typeAS match this filter\\"\\"\\" + all: typeAWhere + \\"\\"\\"Filter type where none of the related typeAS match this filter\\"\\"\\" + none: typeAWhere + \\"\\"\\"Filter type where one of the related typeAS match this filter\\"\\"\\" + single: typeAWhere + \\"\\"\\"Filter type where some of the related typeAS match this filter\\"\\"\\" + some: typeAWhere + } + + \\"\\"\\" + Fields to sort TypeAS by. The order in which sorts are applied is not guaranteed when specifying many fields in one typeASort object. + \\"\\"\\" + input typeASort { + name: SortDirection + } + + input typeAUpdateInput { + actedIn: [typeAActedInUpdateFieldInput!] + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") + } + + input typeAWhere { + AND: [typeAWhere!] + NOT: typeAWhere + OR: [typeAWhere!] + actedIn: typeBRelationshipFilters + actedInAggregate: typeAActedInAggregateInput + actedInConnection: typeAActedInConnectionFilters + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + } + + type typeAtypeBActedInAggregationSelection { + count: Int! + edge: typeAtypeBActedInEdgeAggregateSelection + node: typeAtypeBActedInNodeAggregateSelection + } + + type typeAtypeBActedInEdgeAggregateSelection { + averageRating: FloatAggregateSelection! + createdAt: DateTimeAggregateSelection! + duration: DurationAggregateSelection! + localDateTime: LocalDateTimeAggregateSelection! + localTime: LocalTimeAggregateSelection! + time: TimeAggregateSelection! + } + + type typeAtypeBActedInNodeAggregateSelection { + averageRating: FloatAggregateSelection! + createdAt: DateTimeAggregateSelection! + duration: DurationAggregateSelection! + localDateTime: LocalDateTimeAggregateSelection! + localTime: LocalTimeAggregateSelection! + time: TimeAggregateSelection! + } + + type typeB implements interfaceC { + averageRating: Float! + cartesianPoint: CartesianPoint + createdAt: DateTime + date: Date + duration: Duration + id: ID! + list: [String!]! + localDateTime: LocalDateTime + localTime: LocalTime + point: Point + ratings: [Float!]! + rels(limit: Int, offset: Int, sort: [typeASort!], where: typeAWhere): [typeA!]! + relsAggregate(where: typeAWhere): typeBtypeARelsAggregationSelection + relsConnection(after: String, first: Int, sort: [typeBRelsConnectionSort!], where: typeBRelsConnectionWhere): typeBRelsConnection! + time: Time + } + + type typeBAggregateSelection { + averageRating: FloatAggregateSelection! + count: Int! + createdAt: DateTimeAggregateSelection! + duration: DurationAggregateSelection! + localDateTime: LocalDateTimeAggregateSelection! + localTime: LocalTimeAggregateSelection! + time: TimeAggregateSelection! + } + + input typeBConnectInput { + rels: [typeBRelsConnectFieldInput!] + } + + input typeBConnectWhere { + node: typeBWhere! + } + + input typeBCreateInput { + averageRating: Float! + cartesianPoint: CartesianPointInput + createdAt: DateTime + date: Date + duration: Duration + id: ID! + list: [String!]! + localDateTime: LocalDateTime + localTime: LocalTime + point: PointInput + ratings: [Float!]! + rels: typeBRelsFieldInput + time: Time + } + + input typeBDeleteInput { + rels: [typeBRelsDeleteFieldInput!] + } + + input typeBDisconnectInput { + rels: [typeBRelsDisconnectFieldInput!] + } + + type typeBEdge { + cursor: String! + node: typeB! + } + + input typeBRelationshipFilters { + \\"\\"\\"Filter type where all of the related typeBS match this filter\\"\\"\\" + all: typeBWhere + \\"\\"\\"Filter type where none of the related typeBS match this filter\\"\\"\\" + none: typeBWhere + \\"\\"\\"Filter type where one of the related typeBS match this filter\\"\\"\\" + single: typeBWhere + \\"\\"\\"Filter type where some of the related typeBS match this filter\\"\\"\\" + some: typeBWhere + } + + input typeBRelsAggregateInput { + AND: [typeBRelsAggregateInput!] + NOT: typeBRelsAggregateInput + OR: [typeBRelsAggregateInput!] + count: IntScalarFilters + count_EQ: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: relTypeAggregationWhereInput + node: typeBRelsNodeAggregationWhereInput + } + + input typeBRelsConnectFieldInput { + connect: [typeAConnectInput!] + edge: relTypeCreateInput! + where: typeAConnectWhere + } + + type typeBRelsConnection { + edges: [typeBRelsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input typeBRelsConnectionFilters { + \\"\\"\\" + Return typeBS where all of the related typeBRelsConnections match this filter + \\"\\"\\" + all: typeBRelsConnectionWhere + \\"\\"\\" + Return typeBS where none of the related typeBRelsConnections match this filter + \\"\\"\\" + none: typeBRelsConnectionWhere + \\"\\"\\" + Return typeBS where one of the related typeBRelsConnections match this filter + \\"\\"\\" + single: typeBRelsConnectionWhere + \\"\\"\\" + Return typeBS where some of the related typeBRelsConnections match this filter + \\"\\"\\" + some: typeBRelsConnectionWhere + } + + input typeBRelsConnectionSort { + edge: relTypeSort + node: typeASort + } + + input typeBRelsConnectionWhere { + AND: [typeBRelsConnectionWhere!] + NOT: typeBRelsConnectionWhere + OR: [typeBRelsConnectionWhere!] + edge: relTypeWhere + node: typeAWhere + } + + input typeBRelsCreateFieldInput { + edge: relTypeCreateInput! + node: typeACreateInput! + } + + input typeBRelsDeleteFieldInput { + delete: typeADeleteInput + where: typeBRelsConnectionWhere + } + + input typeBRelsDisconnectFieldInput { + disconnect: typeADisconnectInput + where: typeBRelsConnectionWhere + } + + input typeBRelsFieldInput { + connect: [typeBRelsConnectFieldInput!] + create: [typeBRelsCreateFieldInput!] + } + + input typeBRelsNodeAggregationWhereInput { + AND: [typeBRelsNodeAggregationWhereInput!] + NOT: typeBRelsNodeAggregationWhereInput + OR: [typeBRelsNodeAggregationWhereInput!] + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") + } + + type typeBRelsRelationship { + cursor: String! + node: typeA! + properties: relType! + } + + input typeBRelsUpdateConnectionInput { + edge: relTypeUpdateInput + node: typeAUpdateInput + } + + input typeBRelsUpdateFieldInput { + connect: [typeBRelsConnectFieldInput!] + create: [typeBRelsCreateFieldInput!] + delete: [typeBRelsDeleteFieldInput!] + disconnect: [typeBRelsDisconnectFieldInput!] + update: typeBRelsUpdateConnectionInput + where: typeBRelsConnectionWhere + } + + \\"\\"\\" + Fields to sort TypeBS by. The order in which sorts are applied is not guaranteed when specifying many fields in one typeBSort object. + \\"\\"\\" + input typeBSort { + averageRating: SortDirection + cartesianPoint: SortDirection + createdAt: SortDirection + date: SortDirection + duration: SortDirection + id: SortDirection + localDateTime: SortDirection + localTime: SortDirection + point: SortDirection + time: SortDirection + } + + input typeBUpdateInput { + averageRating: FloatScalarMutations + averageRating_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { add: ... } }' instead.\\") + averageRating_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { divide: ... } }' instead.\\") + averageRating_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { multiply: ... } }' instead.\\") + averageRating_SET: Float @deprecated(reason: \\"Please use the generic mutation 'averageRating: { set: ... } }' instead.\\") + averageRating_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { subtract: ... } }' instead.\\") + cartesianPoint: CartesianPointMutations + cartesianPoint_SET: CartesianPointInput @deprecated(reason: \\"Please use the generic mutation 'cartesianPoint: { set: ... } }' instead.\\") + createdAt: DateTimeScalarMutations + createdAt_SET: DateTime @deprecated(reason: \\"Please use the generic mutation 'createdAt: { set: ... } }' instead.\\") + date: DateScalarMutations + date_SET: Date @deprecated(reason: \\"Please use the generic mutation 'date: { set: ... } }' instead.\\") + duration: DurationScalarMutations + duration_SET: Duration @deprecated(reason: \\"Please use the generic mutation 'duration: { set: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + list: ListStringMutations + list_POP: Int @deprecated(reason: \\"Please use the generic mutation 'list: { pop: ... } }' instead.\\") + list_PUSH: [String!] @deprecated(reason: \\"Please use the generic mutation 'list: { push: ... } }' instead.\\") + list_SET: [String!] @deprecated(reason: \\"Please use the generic mutation 'list: { set: ... } }' instead.\\") + localDateTime: LocalDateTimeScalarMutations + localDateTime_SET: LocalDateTime @deprecated(reason: \\"Please use the generic mutation 'localDateTime: { set: ... } }' instead.\\") + localTime: LocalTimeScalarMutations + localTime_SET: LocalTime @deprecated(reason: \\"Please use the generic mutation 'localTime: { set: ... } }' instead.\\") + point: PointMutations + point_SET: PointInput @deprecated(reason: \\"Please use the generic mutation 'point: { set: ... } }' instead.\\") + ratings: ListFloatMutations + ratings_POP: Int @deprecated(reason: \\"Please use the generic mutation 'ratings: { pop: ... } }' instead.\\") + ratings_PUSH: [Float!] @deprecated(reason: \\"Please use the generic mutation 'ratings: { push: ... } }' instead.\\") + ratings_SET: [Float!] @deprecated(reason: \\"Please use the generic mutation 'ratings: { set: ... } }' instead.\\") + rels: [typeBRelsUpdateFieldInput!] + time: TimeScalarMutations + time_SET: Time @deprecated(reason: \\"Please use the generic mutation 'time: { set: ... } }' instead.\\") + } + + input typeBWhere { + AND: [typeBWhere!] + NOT: typeBWhere + OR: [typeBWhere!] + averageRating: FloatScalarFilters + averageRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { eq: ... }\\") + averageRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gt: ... }\\") + averageRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gte: ... }\\") + averageRating_IN: [Float!] @deprecated(reason: \\"Please use the relevant generic filter averageRating: { in: ... }\\") + averageRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lt: ... }\\") + averageRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lte: ... }\\") + cartesianPoint: CartesianPointFilters + cartesianPoint_DISTANCE: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter cartesianPoint: { distance: ... }\\") + cartesianPoint_EQ: CartesianPointInput @deprecated(reason: \\"Please use the relevant generic filter cartesianPoint: { eq: ... }\\") + cartesianPoint_GT: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter cartesianPoint: { gt: ... }\\") + cartesianPoint_GTE: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter cartesianPoint: { gte: ... }\\") + cartesianPoint_IN: [CartesianPointInput] @deprecated(reason: \\"Please use the relevant generic filter cartesianPoint: { in: ... }\\") + cartesianPoint_LT: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter cartesianPoint: { lt: ... }\\") + cartesianPoint_LTE: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter cartesianPoint: { lte: ... }\\") + createdAt: DateTimeScalarFilters + createdAt_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { eq: ... }\\") + createdAt_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { gt: ... }\\") + createdAt_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { gte: ... }\\") + createdAt_IN: [DateTime] @deprecated(reason: \\"Please use the relevant generic filter createdAt: { in: ... }\\") + createdAt_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { lt: ... }\\") + createdAt_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter createdAt: { lte: ... }\\") + date: DateScalarFilters + date_EQ: Date @deprecated(reason: \\"Please use the relevant generic filter date: { eq: ... }\\") + date_GT: Date @deprecated(reason: \\"Please use the relevant generic filter date: { gt: ... }\\") + date_GTE: Date @deprecated(reason: \\"Please use the relevant generic filter date: { gte: ... }\\") + date_IN: [Date] @deprecated(reason: \\"Please use the relevant generic filter date: { in: ... }\\") + date_LT: Date @deprecated(reason: \\"Please use the relevant generic filter date: { lt: ... }\\") + date_LTE: Date @deprecated(reason: \\"Please use the relevant generic filter date: { lte: ... }\\") + duration: DurationScalarFilters + duration_EQ: Duration @deprecated(reason: \\"Please use the relevant generic filter duration: { eq: ... }\\") + duration_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter duration: { gt: ... }\\") + duration_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter duration: { gte: ... }\\") + duration_IN: [Duration] @deprecated(reason: \\"Please use the relevant generic filter duration: { in: ... }\\") + duration_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter duration: { lt: ... }\\") + duration_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter duration: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID!] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + list: StringListFilters + list_EQ: [String!] @deprecated(reason: \\"Please use the relevant generic filter list: { eq: ... }\\") + list_INCLUDES: String @deprecated(reason: \\"Please use the relevant generic filter list: { includes: ... }\\") + localDateTime: LocalDateTimeScalarFilters + localDateTime_EQ: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter localDateTime: { eq: ... }\\") + localDateTime_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter localDateTime: { gt: ... }\\") + localDateTime_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter localDateTime: { gte: ... }\\") + localDateTime_IN: [LocalDateTime] @deprecated(reason: \\"Please use the relevant generic filter localDateTime: { in: ... }\\") + localDateTime_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter localDateTime: { lt: ... }\\") + localDateTime_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter localDateTime: { lte: ... }\\") + localTime: LocalTimeScalarFilters + localTime_EQ: LocalTime @deprecated(reason: \\"Please use the relevant generic filter localTime: { eq: ... }\\") + localTime_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter localTime: { gt: ... }\\") + localTime_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter localTime: { gte: ... }\\") + localTime_IN: [LocalTime] @deprecated(reason: \\"Please use the relevant generic filter localTime: { in: ... }\\") + localTime_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter localTime: { lt: ... }\\") + localTime_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter localTime: { lte: ... }\\") + point: PointFilters + point_DISTANCE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { distance: ... }\\") + point_EQ: PointInput @deprecated(reason: \\"Please use the relevant generic filter point: { eq: ... }\\") + point_GT: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { gt: ... }\\") + point_GTE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { gte: ... }\\") + point_IN: [PointInput] @deprecated(reason: \\"Please use the relevant generic filter point: { in: ... }\\") + point_LT: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { lt: ... }\\") + point_LTE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter point: { lte: ... }\\") + ratings: FloatListFilters + ratings_EQ: [Float!] @deprecated(reason: \\"Please use the relevant generic filter ratings: { eq: ... }\\") + ratings_INCLUDES: Float @deprecated(reason: \\"Please use the relevant generic filter ratings: { includes: ... }\\") + rels: typeARelationshipFilters + relsAggregate: typeBRelsAggregateInput + relsConnection: typeBRelsConnectionFilters + time: TimeScalarFilters + time_EQ: Time @deprecated(reason: \\"Please use the relevant generic filter time: { eq: ... }\\") + time_GT: Time @deprecated(reason: \\"Please use the relevant generic filter time: { gt: ... }\\") + time_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter time: { gte: ... }\\") + time_IN: [Time] @deprecated(reason: \\"Please use the relevant generic filter time: { in: ... }\\") + time_LT: Time @deprecated(reason: \\"Please use the relevant generic filter time: { lt: ... }\\") + time_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter time: { lte: ... }\\") + } + + type typeBtypeARelsAggregationSelection { + count: Int! + edge: typeBtypeARelsEdgeAggregateSelection + node: typeBtypeARelsNodeAggregateSelection + } + + type typeBtypeARelsEdgeAggregateSelection { + averageRating: FloatAggregateSelection! + createdAt: DateTimeAggregateSelection! + duration: DurationAggregateSelection! + localDateTime: LocalDateTimeAggregateSelection! + localTime: LocalTimeAggregateSelection! + time: TimeAggregateSelection! + } + + type typeBtypeARelsNodeAggregateSelection { + name: StringAggregateSelection! + }" + `); + }); +}); diff --git a/packages/graphql/tests/schema/scalar.test.ts b/packages/graphql/tests/schema/scalar.test.ts index c8764ea786..d9d1441921 100644 --- a/packages/graphql/tests/schema/scalar.test.ts +++ b/packages/graphql/tests/schema/scalar.test.ts @@ -58,6 +58,30 @@ describe("Scalar", () => { scalar CustomScalar + \\"\\"\\"CustomScalar filters\\"\\"\\" + input CustomScalarListScalarFilters { + eq: [CustomScalar!] + includes: CustomScalar + } + + \\"\\"\\"Mutations for a list for CustomScalar\\"\\"\\" + input CustomScalarListScalarMutations { + pop: CustomScalar + push: [CustomScalar!]! + set: [CustomScalar!]! + } + + \\"\\"\\"CustomScalar filters\\"\\"\\" + input CustomScalarScalarFilters { + eq: CustomScalar + in: [CustomScalar!] + } + + \\"\\"\\"CustomScalar filters\\"\\"\\" + input CustomScalarScalarMutations { + set: CustomScalar + } + \\"\\"\\" Information about the number of nodes and relationships deleted during a delete mutation \\"\\"\\" @@ -66,9 +90,18 @@ describe("Scalar", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -80,7 +113,6 @@ describe("Scalar", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -104,27 +136,35 @@ describe("Scalar", () => { } input MovieUpdateInput { - id_SET: ID - myCustomArrayScalar_SET: [CustomScalar!] - myCustomScalar_SET: CustomScalar - myRequiredCustomArrayScalar_SET: [CustomScalar!] + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + myCustomArrayScalar: CustomScalarListScalarMutations + myCustomArrayScalar_SET: [CustomScalar!] @deprecated(reason: \\"Please use the generic mutation 'myCustomArrayScalar: { set: ... } }' instead.\\") + myCustomScalar: CustomScalarScalarMutations + myCustomScalar_SET: CustomScalar @deprecated(reason: \\"Please use the generic mutation 'myCustomScalar: { set: ... } }' instead.\\") + myRequiredCustomArrayScalar: CustomScalarListScalarMutations + myRequiredCustomArrayScalar_SET: [CustomScalar!] @deprecated(reason: \\"Please use the generic mutation 'myRequiredCustomArrayScalar: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - myCustomArrayScalar_EQ: [CustomScalar!] - myCustomArrayScalar_INCLUDES: CustomScalar - myCustomScalar_EQ: CustomScalar - myCustomScalar_IN: [CustomScalar] - myRequiredCustomArrayScalar_EQ: [CustomScalar!] - myRequiredCustomArrayScalar_INCLUDES: CustomScalar + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + myCustomArrayScalar: CustomScalarListScalarFilters + myCustomArrayScalar_EQ: [CustomScalar!] @deprecated(reason: \\"Please use the relevant generic filter myCustomArrayScalar: { eq: ... }\\") + myCustomArrayScalar_INCLUDES: CustomScalar @deprecated(reason: \\"Please use the relevant generic filter myCustomArrayScalar: { includes: ... }\\") + myCustomScalar: CustomScalarScalarFilters + myCustomScalar_EQ: CustomScalar @deprecated(reason: \\"Please use the relevant generic filter myCustomScalar: { eq: ... }\\") + myCustomScalar_IN: [CustomScalar] @deprecated(reason: \\"Please use the relevant generic filter myCustomScalar: { in: ... }\\") + myRequiredCustomArrayScalar: CustomScalarListScalarFilters + myRequiredCustomArrayScalar_EQ: [CustomScalar!] @deprecated(reason: \\"Please use the relevant generic filter myRequiredCustomArrayScalar: { eq: ... }\\") + myRequiredCustomArrayScalar_INCLUDES: CustomScalar @deprecated(reason: \\"Please use the relevant generic filter myRequiredCustomArrayScalar: { includes: ... }\\") } type MoviesConnection { diff --git a/packages/graphql/tests/schema/simple.test.ts b/packages/graphql/tests/schema/simple.test.ts index 69654c4ac7..972c865ae4 100644 --- a/packages/graphql/tests/schema/simple.test.ts +++ b/packages/graphql/tests/schema/simple.test.ts @@ -41,6 +41,16 @@ describe("Simple", () => { mutation: Mutation } + \\"\\"\\"Boolean filters\\"\\"\\" + input BooleanScalarFilters { + eq: Boolean + } + + \\"\\"\\"Boolean mutations\\"\\"\\" + input BooleanScalarMutations { + set: Boolean + } + \\"\\"\\" Information about the number of nodes and relationships created during a create mutation \\"\\"\\" @@ -69,9 +79,37 @@ describe("Simple", () => { sum: Float } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -81,6 +119,23 @@ describe("Simple", () => { sum: Int } + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie { actorCount: Int averageRating: Float @@ -92,7 +147,6 @@ describe("Simple", () => { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -118,40 +172,48 @@ describe("Simple", () => { } input MovieUpdateInput { - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actorCount_SET: Int - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SET: Float - averageRating_SUBTRACT: Float - id_SET: ID - isActive_SET: Boolean + actorCount: IntScalarMutations + actorCount_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'actorCount: { decrement: ... } }' instead.\\") + actorCount_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'actorCount: { increment: ... } }' instead.\\") + actorCount_SET: Int @deprecated(reason: \\"Please use the generic mutation 'actorCount: { set: ... } }' instead.\\") + averageRating: FloatScalarMutations + averageRating_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { add: ... } }' instead.\\") + averageRating_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { divide: ... } }' instead.\\") + averageRating_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { multiply: ... } }' instead.\\") + averageRating_SET: Float @deprecated(reason: \\"Please use the generic mutation 'averageRating: { set: ... } }' instead.\\") + averageRating_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { subtract: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + isActive: BooleanScalarMutations + isActive_SET: Boolean @deprecated(reason: \\"Please use the generic mutation 'isActive: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount_EQ: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - averageRating_EQ: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive_EQ: Boolean + actorCount: IntScalarFilters + actorCount_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { eq: ... }\\") + actorCount_GT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gt: ... }\\") + actorCount_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gte: ... }\\") + actorCount_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter actorCount: { in: ... }\\") + actorCount_LT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lt: ... }\\") + actorCount_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lte: ... }\\") + averageRating: FloatScalarFilters + averageRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { eq: ... }\\") + averageRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gt: ... }\\") + averageRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gte: ... }\\") + averageRating_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter averageRating: { in: ... }\\") + averageRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lt: ... }\\") + averageRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + isActive: BooleanScalarFilters + isActive_EQ: Boolean @deprecated(reason: \\"Please use the relevant generic filter isActive: { eq: ... }\\") } type MoviesConnection { diff --git a/packages/graphql/tests/schema/string-comparators.test.ts b/packages/graphql/tests/schema/string-comparators.test.ts index 801e29052b..092d57c0ff 100644 --- a/packages/graphql/tests/schema/string-comparators.test.ts +++ b/packages/graphql/tests/schema/string-comparators.test.ts @@ -97,22 +97,24 @@ describe("String Comparators", () => { } input MovieUpdateInput { - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_GT: String - title_GTE: String - title_IN: [String] - title_LT: String - title_LTE: String - title_STARTS_WITH: String + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_GT: String @deprecated(reason: \\"Please use the relevant generic filter title: { gt: ... }\\") + title_GTE: String @deprecated(reason: \\"Please use the relevant generic filter title: { gte: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_LT: String @deprecated(reason: \\"Please use the relevant generic filter title: { lt: ... }\\") + title_LTE: String @deprecated(reason: \\"Please use the relevant generic filter title: { lte: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -154,6 +156,24 @@ describe("String Comparators", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + gt: String + gte: String + in: [String!] + lt: String + lte: String + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -235,18 +255,20 @@ describe("String Comparators", () => { } input MovieUpdateInput { - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -288,6 +310,20 @@ describe("String Comparators", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -378,20 +414,22 @@ describe("String Comparators", () => { } input MovieUpdateInput { - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_GT: String - title_IN: [String] - title_LT: String - title_STARTS_WITH: String + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_GT: String @deprecated(reason: \\"Please use the relevant generic filter title: { gt: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_LT: String @deprecated(reason: \\"Please use the relevant generic filter title: { lt: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -433,6 +471,22 @@ describe("String Comparators", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + gt: String + in: [String!] + lt: String + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" @@ -501,21 +555,22 @@ describe("String Comparators", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - screenTime_AVERAGE_LENGTH_EQUAL: Float - screenTime_AVERAGE_LENGTH_GT: Float - screenTime_AVERAGE_LENGTH_GTE: Float - screenTime_AVERAGE_LENGTH_LT: Float - screenTime_AVERAGE_LENGTH_LTE: Float - screenTime_LONGEST_LENGTH_EQUAL: Int - screenTime_LONGEST_LENGTH_GT: Int - screenTime_LONGEST_LENGTH_GTE: Int - screenTime_LONGEST_LENGTH_LT: Int - screenTime_LONGEST_LENGTH_LTE: Int - screenTime_SHORTEST_LENGTH_EQUAL: Int - screenTime_SHORTEST_LENGTH_GT: Int - screenTime_SHORTEST_LENGTH_GTE: Int - screenTime_SHORTEST_LENGTH_LT: Int - screenTime_SHORTEST_LENGTH_LTE: Int + screenTime: StringScalarAggregationFilters + screenTime_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { averageLength: { eq: ... } } }' instead.\\") + screenTime_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { averageLength: { gt: ... } } }' instead.\\") + screenTime_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { averageLength: { gte: ... } } }' instead.\\") + screenTime_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { averageLength: { lt: ... } } }' instead.\\") + screenTime_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { averageLength: { lte: ... } } }' instead.\\") + screenTime_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { longestLength: { eq: ... } } }' instead.\\") + screenTime_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { longestLength: { gt: ... } } }' instead.\\") + screenTime_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { longestLength: { gte: ... } } }' instead.\\") + screenTime_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { longestLength: { lt: ... } } }' instead.\\") + screenTime_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { longestLength: { lte: ... } } }' instead.\\") + screenTime_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { shortestLength: { eq: ... } } }' instead.\\") + screenTime_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { shortestLength: { gt: ... } } }' instead.\\") + screenTime_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { shortestLength: { gte: ... } } }' instead.\\") + screenTime_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { shortestLength: { lt: ... } } }' instead.\\") + screenTime_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { shortestLength: { lte: ... } } }' instead.\\") } input ActedInCreateInput { @@ -527,22 +582,24 @@ describe("String Comparators", () => { } input ActedInUpdateInput { - screenTime_SET: String + screenTime: StringScalarMutations + screenTime_SET: String @deprecated(reason: \\"Please use the generic mutation 'screenTime: { set: ... } }' instead.\\") } input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime_CONTAINS: String - screenTime_ENDS_WITH: String - screenTime_EQ: String - screenTime_GT: String - screenTime_GTE: String - screenTime_IN: [String] - screenTime_LT: String - screenTime_LTE: String - screenTime_STARTS_WITH: String + screenTime: StringScalarFilters + screenTime_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter screenTime: { contains: ... }\\") + screenTime_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter screenTime: { endsWith: ... }\\") + screenTime_EQ: String @deprecated(reason: \\"Please use the relevant generic filter screenTime: { eq: ... }\\") + screenTime_GT: String @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gt: ... }\\") + screenTime_GTE: String @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gte: ... }\\") + screenTime_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter screenTime: { in: ... }\\") + screenTime_LT: String @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lt: ... }\\") + screenTime_LTE: String @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lte: ... }\\") + screenTime_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter screenTime: { startsWith: ... }\\") } type Actor { @@ -556,6 +613,7 @@ describe("String Comparators", () => { AND: [ActorActedInAggregateInput!] NOT: ActorActedInAggregateInput OR: [ActorActedInAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -577,6 +635,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 @@ -614,21 +691,22 @@ describe("String Comparators", () => { AND: [ActorActedInNodeAggregationWhereInput!] NOT: ActorActedInNodeAggregationWhereInput OR: [ActorActedInNodeAggregationWhereInput!] - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorActedInRelationship { @@ -696,6 +774,17 @@ describe("String Comparators", () => { title: StringAggregateSelection! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -705,47 +794,51 @@ describe("String Comparators", () => { input ActorUpdateInput { actedIn: [ActorActedInUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + actedIn: MovieRelationshipFilters actedInAggregate: ActorActedInAggregateInput + actedInConnection: ActorActedInConnectionFilters \\"\\"\\" Return Actors where all of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_ALL: ActorActedInConnectionWhere + actedInConnection_ALL: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_NONE: ActorActedInConnectionWhere + actedInConnection_NONE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SINGLE: ActorActedInConnectionWhere + actedInConnection_SINGLE: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorActedInConnections match this filter \\"\\"\\" - actedInConnection_SOME: ActorActedInConnectionWhere + actedInConnection_SOME: ActorActedInConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedInConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - actedIn_ALL: MovieWhere + actedIn_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - actedIn_NONE: MovieWhere + actedIn_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - actedIn_SINGLE: MovieWhere + actedIn_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - actedIn_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_GT: String - name_GTE: String - name_IN: [String] - name_LT: String - name_LTE: String - name_STARTS_WITH: String + actedIn_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'actedIn: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_GT: String @deprecated(reason: \\"Please use the relevant generic filter name: { gt: ... }\\") + name_GTE: String @deprecated(reason: \\"Please use the relevant generic filter name: { gte: ... }\\") + name_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_LT: String @deprecated(reason: \\"Please use the relevant generic filter name: { lt: ... }\\") + name_LTE: String @deprecated(reason: \\"Please use the relevant generic filter name: { lte: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -780,6 +873,26 @@ describe("String Comparators", () => { relationshipsDeleted: Int! } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -805,6 +918,7 @@ describe("String Comparators", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -826,6 +940,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 @@ -863,21 +996,22 @@ describe("String Comparators", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -931,6 +1065,17 @@ describe("String Comparators", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -940,47 +1085,51 @@ describe("String Comparators", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_GT: String - title_GTE: String - title_IN: [String] - title_LT: String - title_LTE: String - title_STARTS_WITH: String + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_GT: String @deprecated(reason: \\"Please use the relevant generic filter title: { gt: ... }\\") + title_GTE: String @deprecated(reason: \\"Please use the relevant generic filter title: { gte: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_LT: String @deprecated(reason: \\"Please use the relevant generic filter title: { lt: ... }\\") + title_LTE: String @deprecated(reason: \\"Please use the relevant generic filter title: { lte: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -1028,6 +1177,31 @@ describe("String Comparators", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + gt: String + gte: String + in: [String!] + lt: String + lte: String + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/subscriptions.test.ts b/packages/graphql/tests/schema/subscriptions.test.ts index 8dd316cabb..1bf2961046 100644 --- a/packages/graphql/tests/schema/subscriptions.test.ts +++ b/packages/graphql/tests/schema/subscriptions.test.ts @@ -91,6 +91,17 @@ describe("Subscriptions", () => { name: String! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -102,15 +113,17 @@ describe("Subscriptions", () => { AND: [ActorSubscriptionWhere!] NOT: ActorSubscriptionWhere OR: [ActorSubscriptionWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } input ActorUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } type ActorUpdatedEvent { @@ -124,11 +137,12 @@ describe("Subscriptions", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -137,6 +151,16 @@ describe("Subscriptions", () => { totalCount: Int! } + \\"\\"\\"Boolean filters\\"\\"\\" + input BooleanScalarFilters { + eq: Boolean + } + + \\"\\"\\"Boolean mutations\\"\\"\\" + input BooleanScalarMutations { + set: Boolean + } + type CreateActorsMutationResponse { actors: [Actor!]! info: CreateInfo! @@ -178,9 +202,37 @@ describe("Subscriptions", () => { sum: Float } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -190,6 +242,23 @@ describe("Subscriptions", () => { sum: Int } + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie { actorCount: Int actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! @@ -213,6 +282,7 @@ describe("Subscriptions", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -231,6 +301,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 } @@ -263,21 +352,22 @@ describe("Subscriptions", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -302,7 +392,6 @@ describe("Subscriptions", () => { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -355,38 +444,46 @@ describe("Subscriptions", () => { AND: [MovieSubscriptionWhere!] NOT: MovieSubscriptionWhere OR: [MovieSubscriptionWhere!] - actorCount_EQ: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - averageRating_EQ: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive_EQ: Boolean + actorCount: IntScalarFilters + actorCount_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { eq: ... }\\") + actorCount_GT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gt: ... }\\") + actorCount_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gte: ... }\\") + actorCount_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter actorCount: { in: ... }\\") + actorCount_LT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lt: ... }\\") + actorCount_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lte: ... }\\") + averageRating: FloatScalarFilters + averageRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { eq: ... }\\") + averageRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gt: ... }\\") + averageRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gte: ... }\\") + averageRating_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter averageRating: { in: ... }\\") + averageRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lt: ... }\\") + averageRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + isActive: BooleanScalarFilters + isActive_EQ: Boolean @deprecated(reason: \\"Please use the relevant generic filter isActive: { eq: ... }\\") } input MovieUpdateInput { - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actorCount_SET: Int + actorCount: IntScalarMutations + actorCount_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'actorCount: { decrement: ... } }' instead.\\") + actorCount_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'actorCount: { increment: ... } }' instead.\\") + actorCount_SET: Int @deprecated(reason: \\"Please use the generic mutation 'actorCount: { set: ... } }' instead.\\") actors: [MovieActorsUpdateFieldInput!] - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SET: Float - averageRating_SUBTRACT: Float - id_SET: ID - isActive_SET: Boolean + averageRating: FloatScalarMutations + averageRating_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { add: ... } }' instead.\\") + averageRating_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { divide: ... } }' instead.\\") + averageRating_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { multiply: ... } }' instead.\\") + averageRating_SET: Float @deprecated(reason: \\"Please use the generic mutation 'averageRating: { set: ... } }' instead.\\") + averageRating_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { subtract: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + isActive: BooleanScalarMutations + isActive_SET: Boolean @deprecated(reason: \\"Please use the generic mutation 'isActive: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -400,49 +497,55 @@ describe("Subscriptions", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount_EQ: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int + actorCount: IntScalarFilters + actorCount_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { eq: ... }\\") + actorCount_GT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gt: ... }\\") + actorCount_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gte: ... }\\") + actorCount_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter actorCount: { in: ... }\\") + actorCount_LT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lt: ... }\\") + actorCount_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lte: ... }\\") + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - averageRating_EQ: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive_EQ: Boolean + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + averageRating: FloatScalarFilters + averageRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { eq: ... }\\") + averageRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gt: ... }\\") + averageRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gte: ... }\\") + averageRating_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter averageRating: { in: ... }\\") + averageRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lt: ... }\\") + averageRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + isActive: BooleanScalarFilters + isActive_EQ: Boolean @deprecated(reason: \\"Please use the relevant generic filter isActive: { eq: ... }\\") } type MoviesConnection { @@ -490,6 +593,27 @@ describe("Subscriptions", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Subscription { actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! @@ -605,13 +729,13 @@ describe("Subscriptions", () => { type ActorMovieMoviesNodeAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! - id: IDAggregateSelection! } input ActorMoviesAggregateInput { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -631,6 +755,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 } @@ -665,56 +808,48 @@ describe("Subscriptions", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - actorCount_AVERAGE_EQUAL: Float - actorCount_AVERAGE_GT: Float - actorCount_AVERAGE_GTE: Float - actorCount_AVERAGE_LT: Float - actorCount_AVERAGE_LTE: Float - actorCount_MAX_EQUAL: Int - actorCount_MAX_GT: Int - actorCount_MAX_GTE: Int - actorCount_MAX_LT: Int - actorCount_MAX_LTE: Int - actorCount_MIN_EQUAL: Int - actorCount_MIN_GT: Int - actorCount_MIN_GTE: Int - actorCount_MIN_LT: Int - actorCount_MIN_LTE: Int - actorCount_SUM_EQUAL: Int - actorCount_SUM_GT: Int - actorCount_SUM_GTE: Int - actorCount_SUM_LT: Int - actorCount_SUM_LTE: Int - averageRating_AVERAGE_EQUAL: Float - averageRating_AVERAGE_GT: Float - averageRating_AVERAGE_GTE: Float - averageRating_AVERAGE_LT: Float - averageRating_AVERAGE_LTE: Float - averageRating_MAX_EQUAL: Float - averageRating_MAX_GT: Float - averageRating_MAX_GTE: Float - averageRating_MAX_LT: Float - averageRating_MAX_LTE: Float - averageRating_MIN_EQUAL: Float - averageRating_MIN_GT: Float - averageRating_MIN_GTE: Float - averageRating_MIN_LT: Float - averageRating_MIN_LTE: Float - averageRating_SUM_EQUAL: Float - averageRating_SUM_GT: Float - averageRating_SUM_GTE: Float - averageRating_SUM_LT: Float - averageRating_SUM_LTE: Float - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + actorCount: IntScalarAggregationFilters + actorCount_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { eq: ... } } }' instead.\\") + actorCount_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { gt: ... } } }' instead.\\") + actorCount_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { gte: ... } } }' instead.\\") + actorCount_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { lt: ... } } }' instead.\\") + actorCount_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { lte: ... } } }' instead.\\") + actorCount_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { eq: ... } } }' instead.\\") + actorCount_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { gt: ... } } }' instead.\\") + actorCount_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { gte: ... } } }' instead.\\") + actorCount_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { lt: ... } } }' instead.\\") + actorCount_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { lte: ... } } }' instead.\\") + actorCount_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { eq: ... } } }' instead.\\") + actorCount_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { gt: ... } } }' instead.\\") + actorCount_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { gte: ... } } }' instead.\\") + actorCount_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { lt: ... } } }' instead.\\") + actorCount_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { lte: ... } } }' instead.\\") + actorCount_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { eq: ... } } }' instead.\\") + actorCount_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { gt: ... } } }' instead.\\") + actorCount_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { gte: ... } } }' instead.\\") + actorCount_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { lt: ... } } }' instead.\\") + actorCount_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { lte: ... } } }' instead.\\") + averageRating: FloatScalarAggregationFilters + averageRating_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { eq: ... } } }' instead.\\") + averageRating_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gt: ... } } }' instead.\\") + averageRating_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gte: ... } } }' instead.\\") + averageRating_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lt: ... } } }' instead.\\") + averageRating_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lte: ... } } }' instead.\\") + averageRating_MAX_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { eq: ... } } }' instead.\\") + averageRating_MAX_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gt: ... } } }' instead.\\") + averageRating_MAX_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gte: ... } } }' instead.\\") + averageRating_MAX_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lt: ... } } }' instead.\\") + averageRating_MAX_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lte: ... } } }' instead.\\") + averageRating_MIN_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { eq: ... } } }' instead.\\") + averageRating_MIN_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gt: ... } } }' instead.\\") + averageRating_MIN_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gte: ... } } }' instead.\\") + averageRating_MIN_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lt: ... } } }' instead.\\") + averageRating_MIN_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lte: ... } } }' instead.\\") + averageRating_SUM_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { eq: ... } } }' instead.\\") + averageRating_SUM_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gt: ... } } }' instead.\\") + averageRating_SUM_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gte: ... } } }' instead.\\") + averageRating_SUM_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lt: ... } } }' instead.\\") + averageRating_SUM_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -735,6 +870,17 @@ describe("Subscriptions", () => { where: ActorMoviesConnectionWhere } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] } @@ -748,31 +894,33 @@ describe("Subscriptions", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") } type ActorsConnection { @@ -781,6 +929,16 @@ describe("Subscriptions", () => { totalCount: Int! } + \\"\\"\\"Boolean filters\\"\\"\\" + input BooleanScalarFilters { + eq: Boolean + } + + \\"\\"\\"Boolean mutations\\"\\"\\" + input BooleanScalarMutations { + set: Boolean + } + type CreateActorsMutationResponse { actors: [Actor!]! info: CreateInfo! @@ -822,9 +980,45 @@ describe("Subscriptions", () => { sum: Float } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Filters for an aggregation of a float field\\"\\"\\" + input FloatScalarAggregationFilters { + average: FloatScalarFilters + max: FloatScalarFilters + min: FloatScalarFilters + sum: FloatScalarFilters + } + + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -834,6 +1028,31 @@ describe("Subscriptions", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie { actorCount: Int actors(limit: Int, offset: Int, where: ActorWhere): [Actor!]! @@ -852,6 +1071,7 @@ describe("Subscriptions", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -870,6 +1090,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 @@ -918,7 +1157,6 @@ describe("Subscriptions", () => { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! count: Int! - id: IDAggregateSelection! } input MovieConnectInput { @@ -969,6 +1207,17 @@ describe("Subscriptions", () => { isActive: Boolean } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -983,38 +1232,46 @@ describe("Subscriptions", () => { AND: [MovieSubscriptionWhere!] NOT: MovieSubscriptionWhere OR: [MovieSubscriptionWhere!] - actorCount_EQ: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - averageRating_EQ: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive_EQ: Boolean + actorCount: IntScalarFilters + actorCount_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { eq: ... }\\") + actorCount_GT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gt: ... }\\") + actorCount_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gte: ... }\\") + actorCount_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter actorCount: { in: ... }\\") + actorCount_LT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lt: ... }\\") + actorCount_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lte: ... }\\") + averageRating: FloatScalarFilters + averageRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { eq: ... }\\") + averageRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gt: ... }\\") + averageRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gte: ... }\\") + averageRating_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter averageRating: { in: ... }\\") + averageRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lt: ... }\\") + averageRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + isActive: BooleanScalarFilters + isActive_EQ: Boolean @deprecated(reason: \\"Please use the relevant generic filter isActive: { eq: ... }\\") } input MovieUpdateInput { - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actorCount_SET: Int + actorCount: IntScalarMutations + actorCount_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'actorCount: { decrement: ... } }' instead.\\") + actorCount_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'actorCount: { increment: ... } }' instead.\\") + actorCount_SET: Int @deprecated(reason: \\"Please use the generic mutation 'actorCount: { set: ... } }' instead.\\") actors: [MovieActorsUpdateFieldInput!] - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SET: Float - averageRating_SUBTRACT: Float - id_SET: ID - isActive_SET: Boolean + averageRating: FloatScalarMutations + averageRating_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { add: ... } }' instead.\\") + averageRating_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { divide: ... } }' instead.\\") + averageRating_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { multiply: ... } }' instead.\\") + averageRating_SET: Float @deprecated(reason: \\"Please use the generic mutation 'averageRating: { set: ... } }' instead.\\") + averageRating_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { subtract: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + isActive: BooleanScalarMutations + isActive_SET: Boolean @deprecated(reason: \\"Please use the generic mutation 'isActive: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -1028,49 +1285,55 @@ describe("Subscriptions", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount_EQ: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int + actorCount: IntScalarFilters + actorCount_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { eq: ... }\\") + actorCount_GT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gt: ... }\\") + actorCount_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gte: ... }\\") + actorCount_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter actorCount: { in: ... }\\") + actorCount_LT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lt: ... }\\") + actorCount_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lte: ... }\\") + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - averageRating_EQ: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive_EQ: Boolean + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + averageRating: FloatScalarFilters + averageRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { eq: ... }\\") + averageRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gt: ... }\\") + averageRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gte: ... }\\") + averageRating_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter averageRating: { in: ... }\\") + averageRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lt: ... }\\") + averageRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + isActive: BooleanScalarFilters + isActive_EQ: Boolean @deprecated(reason: \\"Please use the relevant generic filter isActive: { eq: ... }\\") } type MoviesConnection { @@ -1182,11 +1445,32 @@ describe("Subscriptions", () => { union Actor = Person | Star + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input ActorWhere { Person: PersonWhere Star: StarWhere } + \\"\\"\\"Boolean filters\\"\\"\\" + input BooleanScalarFilters { + eq: Boolean + } + + \\"\\"\\"Boolean mutations\\"\\"\\" + input BooleanScalarMutations { + set: Boolean + } + \\"\\"\\" Information about the number of nodes and relationships created during a create mutation \\"\\"\\" @@ -1233,9 +1517,45 @@ describe("Subscriptions", () => { sum: Float } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Filters for an aggregation of a float field\\"\\"\\" + input FloatScalarAggregationFilters { + average: FloatScalarFilters + max: FloatScalarFilters + min: FloatScalarFilters + sum: FloatScalarFilters + } + + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -1245,6 +1565,31 @@ describe("Subscriptions", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie { actorCount: Int actors(limit: Int, offset: Int, where: ActorWhere): [Actor!]! @@ -1265,6 +1610,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 @@ -1387,7 +1751,6 @@ describe("Subscriptions", () => { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! count: Int! - id: IDAggregateSelection! } input MovieConnectInput { @@ -1438,6 +1801,17 @@ describe("Subscriptions", () => { isActive: Boolean } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -1452,38 +1826,46 @@ describe("Subscriptions", () => { AND: [MovieSubscriptionWhere!] NOT: MovieSubscriptionWhere OR: [MovieSubscriptionWhere!] - actorCount_EQ: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - averageRating_EQ: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive_EQ: Boolean + actorCount: IntScalarFilters + actorCount_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { eq: ... }\\") + actorCount_GT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gt: ... }\\") + actorCount_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gte: ... }\\") + actorCount_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter actorCount: { in: ... }\\") + actorCount_LT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lt: ... }\\") + actorCount_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lte: ... }\\") + averageRating: FloatScalarFilters + averageRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { eq: ... }\\") + averageRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gt: ... }\\") + averageRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gte: ... }\\") + averageRating_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter averageRating: { in: ... }\\") + averageRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lt: ... }\\") + averageRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + isActive: BooleanScalarFilters + isActive_EQ: Boolean @deprecated(reason: \\"Please use the relevant generic filter isActive: { eq: ... }\\") } input MovieUpdateInput { - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actorCount_SET: Int + actorCount: IntScalarMutations + actorCount_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'actorCount: { decrement: ... } }' instead.\\") + actorCount_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'actorCount: { increment: ... } }' instead.\\") + actorCount_SET: Int @deprecated(reason: \\"Please use the generic mutation 'actorCount: { set: ... } }' instead.\\") actors: MovieActorsUpdateInput - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SET: Float - averageRating_SUBTRACT: Float - id_SET: ID - isActive_SET: Boolean + averageRating: FloatScalarMutations + averageRating_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { add: ... } }' instead.\\") + averageRating_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { divide: ... } }' instead.\\") + averageRating_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { multiply: ... } }' instead.\\") + averageRating_SET: Float @deprecated(reason: \\"Please use the generic mutation 'averageRating: { set: ... } }' instead.\\") + averageRating_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { subtract: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + isActive: BooleanScalarMutations + isActive_SET: Boolean @deprecated(reason: \\"Please use the generic mutation 'isActive: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -1497,48 +1879,54 @@ describe("Subscriptions", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount_EQ: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int + actorCount: IntScalarFilters + actorCount_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { eq: ... }\\") + actorCount_GT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gt: ... }\\") + actorCount_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gte: ... }\\") + actorCount_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter actorCount: { in: ... }\\") + actorCount_LT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lt: ... }\\") + actorCount_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lte: ... }\\") + actors: ActorRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - averageRating_EQ: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive_EQ: Boolean + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + averageRating: FloatScalarFilters + averageRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { eq: ... }\\") + averageRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gt: ... }\\") + averageRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gte: ... }\\") + averageRating_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter averageRating: { in: ... }\\") + averageRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lt: ... }\\") + averageRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + isActive: BooleanScalarFilters + isActive_EQ: Boolean @deprecated(reason: \\"Please use the relevant generic filter isActive: { eq: ... }\\") } type MoviesConnection { @@ -1626,13 +2014,13 @@ describe("Subscriptions", () => { type PersonMovieMoviesNodeAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! - id: IDAggregateSelection! } input PersonMoviesAggregateInput { AND: [PersonMoviesAggregateInput!] NOT: PersonMoviesAggregateInput OR: [PersonMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1652,6 +2040,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 } @@ -1686,56 +2093,48 @@ describe("Subscriptions", () => { AND: [PersonMoviesNodeAggregationWhereInput!] NOT: PersonMoviesNodeAggregationWhereInput OR: [PersonMoviesNodeAggregationWhereInput!] - actorCount_AVERAGE_EQUAL: Float - actorCount_AVERAGE_GT: Float - actorCount_AVERAGE_GTE: Float - actorCount_AVERAGE_LT: Float - actorCount_AVERAGE_LTE: Float - actorCount_MAX_EQUAL: Int - actorCount_MAX_GT: Int - actorCount_MAX_GTE: Int - actorCount_MAX_LT: Int - actorCount_MAX_LTE: Int - actorCount_MIN_EQUAL: Int - actorCount_MIN_GT: Int - actorCount_MIN_GTE: Int - actorCount_MIN_LT: Int - actorCount_MIN_LTE: Int - actorCount_SUM_EQUAL: Int - actorCount_SUM_GT: Int - actorCount_SUM_GTE: Int - actorCount_SUM_LT: Int - actorCount_SUM_LTE: Int - averageRating_AVERAGE_EQUAL: Float - averageRating_AVERAGE_GT: Float - averageRating_AVERAGE_GTE: Float - averageRating_AVERAGE_LT: Float - averageRating_AVERAGE_LTE: Float - averageRating_MAX_EQUAL: Float - averageRating_MAX_GT: Float - averageRating_MAX_GTE: Float - averageRating_MAX_LT: Float - averageRating_MAX_LTE: Float - averageRating_MIN_EQUAL: Float - averageRating_MIN_GT: Float - averageRating_MIN_GTE: Float - averageRating_MIN_LT: Float - averageRating_MIN_LTE: Float - averageRating_SUM_EQUAL: Float - averageRating_SUM_GT: Float - averageRating_SUM_GTE: Float - averageRating_SUM_LT: Float - averageRating_SUM_LTE: Float - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + actorCount: IntScalarAggregationFilters + actorCount_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { eq: ... } } }' instead.\\") + actorCount_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { gt: ... } } }' instead.\\") + actorCount_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { gte: ... } } }' instead.\\") + actorCount_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { lt: ... } } }' instead.\\") + actorCount_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { lte: ... } } }' instead.\\") + actorCount_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { eq: ... } } }' instead.\\") + actorCount_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { gt: ... } } }' instead.\\") + actorCount_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { gte: ... } } }' instead.\\") + actorCount_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { lt: ... } } }' instead.\\") + actorCount_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { lte: ... } } }' instead.\\") + actorCount_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { eq: ... } } }' instead.\\") + actorCount_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { gt: ... } } }' instead.\\") + actorCount_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { gte: ... } } }' instead.\\") + actorCount_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { lt: ... } } }' instead.\\") + actorCount_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { lte: ... } } }' instead.\\") + actorCount_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { eq: ... } } }' instead.\\") + actorCount_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { gt: ... } } }' instead.\\") + actorCount_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { gte: ... } } }' instead.\\") + actorCount_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { lt: ... } } }' instead.\\") + actorCount_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { lte: ... } } }' instead.\\") + averageRating: FloatScalarAggregationFilters + averageRating_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { eq: ... } } }' instead.\\") + averageRating_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gt: ... } } }' instead.\\") + averageRating_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gte: ... } } }' instead.\\") + averageRating_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lt: ... } } }' instead.\\") + averageRating_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lte: ... } } }' instead.\\") + averageRating_MAX_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { eq: ... } } }' instead.\\") + averageRating_MAX_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gt: ... } } }' instead.\\") + averageRating_MAX_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gte: ... } } }' instead.\\") + averageRating_MAX_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lt: ... } } }' instead.\\") + averageRating_MAX_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lte: ... } } }' instead.\\") + averageRating_MIN_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { eq: ... } } }' instead.\\") + averageRating_MIN_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gt: ... } } }' instead.\\") + averageRating_MIN_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gte: ... } } }' instead.\\") + averageRating_MIN_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lt: ... } } }' instead.\\") + averageRating_MIN_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lte: ... } } }' instead.\\") + averageRating_SUM_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { eq: ... } } }' instead.\\") + averageRating_SUM_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gt: ... } } }' instead.\\") + averageRating_SUM_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gte: ... } } }' instead.\\") + averageRating_SUM_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lt: ... } } }' instead.\\") + averageRating_SUM_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lte: ... } } }' instead.\\") } type PersonMoviesRelationship { @@ -1769,31 +2168,33 @@ describe("Subscriptions", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] + movies: MovieRelationshipFilters moviesAggregate: PersonMoviesAggregateInput + moviesConnection: PersonMoviesConnectionFilters \\"\\"\\" Return People where all of the related PersonMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: PersonMoviesConnectionWhere + moviesConnection_ALL: PersonMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return People where none of the related PersonMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: PersonMoviesConnectionWhere + moviesConnection_NONE: PersonMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return People where one of the related PersonMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: PersonMoviesConnectionWhere + moviesConnection_SINGLE: PersonMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return People where some of the related PersonMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: PersonMoviesConnectionWhere + moviesConnection_SOME: PersonMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return People where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return People where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return People where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return People where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") } type Query { @@ -1870,13 +2271,13 @@ describe("Subscriptions", () => { type StarMovieMoviesNodeAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! - id: IDAggregateSelection! } input StarMoviesAggregateInput { AND: [StarMoviesAggregateInput!] NOT: StarMoviesAggregateInput OR: [StarMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1896,6 +2297,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 } @@ -1930,56 +2350,48 @@ describe("Subscriptions", () => { AND: [StarMoviesNodeAggregationWhereInput!] NOT: StarMoviesNodeAggregationWhereInput OR: [StarMoviesNodeAggregationWhereInput!] - actorCount_AVERAGE_EQUAL: Float - actorCount_AVERAGE_GT: Float - actorCount_AVERAGE_GTE: Float - actorCount_AVERAGE_LT: Float - actorCount_AVERAGE_LTE: Float - actorCount_MAX_EQUAL: Int - actorCount_MAX_GT: Int - actorCount_MAX_GTE: Int - actorCount_MAX_LT: Int - actorCount_MAX_LTE: Int - actorCount_MIN_EQUAL: Int - actorCount_MIN_GT: Int - actorCount_MIN_GTE: Int - actorCount_MIN_LT: Int - actorCount_MIN_LTE: Int - actorCount_SUM_EQUAL: Int - actorCount_SUM_GT: Int - actorCount_SUM_GTE: Int - actorCount_SUM_LT: Int - actorCount_SUM_LTE: Int - averageRating_AVERAGE_EQUAL: Float - averageRating_AVERAGE_GT: Float - averageRating_AVERAGE_GTE: Float - averageRating_AVERAGE_LT: Float - averageRating_AVERAGE_LTE: Float - averageRating_MAX_EQUAL: Float - averageRating_MAX_GT: Float - averageRating_MAX_GTE: Float - averageRating_MAX_LT: Float - averageRating_MAX_LTE: Float - averageRating_MIN_EQUAL: Float - averageRating_MIN_GT: Float - averageRating_MIN_GTE: Float - averageRating_MIN_LT: Float - averageRating_MIN_LTE: Float - averageRating_SUM_EQUAL: Float - averageRating_SUM_GT: Float - averageRating_SUM_GTE: Float - averageRating_SUM_LT: Float - averageRating_SUM_LTE: Float - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + actorCount: IntScalarAggregationFilters + actorCount_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { eq: ... } } }' instead.\\") + actorCount_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { gt: ... } } }' instead.\\") + actorCount_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { gte: ... } } }' instead.\\") + actorCount_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { lt: ... } } }' instead.\\") + actorCount_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { lte: ... } } }' instead.\\") + actorCount_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { eq: ... } } }' instead.\\") + actorCount_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { gt: ... } } }' instead.\\") + actorCount_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { gte: ... } } }' instead.\\") + actorCount_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { lt: ... } } }' instead.\\") + actorCount_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { lte: ... } } }' instead.\\") + actorCount_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { eq: ... } } }' instead.\\") + actorCount_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { gt: ... } } }' instead.\\") + actorCount_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { gte: ... } } }' instead.\\") + actorCount_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { lt: ... } } }' instead.\\") + actorCount_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { lte: ... } } }' instead.\\") + actorCount_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { eq: ... } } }' instead.\\") + actorCount_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { gt: ... } } }' instead.\\") + actorCount_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { gte: ... } } }' instead.\\") + actorCount_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { lt: ... } } }' instead.\\") + actorCount_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { lte: ... } } }' instead.\\") + averageRating: FloatScalarAggregationFilters + averageRating_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { eq: ... } } }' instead.\\") + averageRating_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gt: ... } } }' instead.\\") + averageRating_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gte: ... } } }' instead.\\") + averageRating_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lt: ... } } }' instead.\\") + averageRating_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lte: ... } } }' instead.\\") + averageRating_MAX_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { eq: ... } } }' instead.\\") + averageRating_MAX_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gt: ... } } }' instead.\\") + averageRating_MAX_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gte: ... } } }' instead.\\") + averageRating_MAX_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lt: ... } } }' instead.\\") + averageRating_MAX_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lte: ... } } }' instead.\\") + averageRating_MIN_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { eq: ... } } }' instead.\\") + averageRating_MIN_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gt: ... } } }' instead.\\") + averageRating_MIN_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gte: ... } } }' instead.\\") + averageRating_MIN_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lt: ... } } }' instead.\\") + averageRating_MIN_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lte: ... } } }' instead.\\") + averageRating_SUM_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { eq: ... } } }' instead.\\") + averageRating_SUM_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gt: ... } } }' instead.\\") + averageRating_SUM_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gte: ... } } }' instead.\\") + averageRating_SUM_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lt: ... } } }' instead.\\") + averageRating_SUM_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lte: ... } } }' instead.\\") } type StarMoviesRelationship { @@ -2013,31 +2425,33 @@ describe("Subscriptions", () => { AND: [StarWhere!] NOT: StarWhere OR: [StarWhere!] + movies: MovieRelationshipFilters moviesAggregate: StarMoviesAggregateInput + moviesConnection: StarMoviesConnectionFilters \\"\\"\\" Return Stars where all of the related StarMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: StarMoviesConnectionWhere + moviesConnection_ALL: StarMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Stars where none of the related StarMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: StarMoviesConnectionWhere + moviesConnection_NONE: StarMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Stars where one of the related StarMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: StarMoviesConnectionWhere + moviesConnection_SINGLE: StarMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Stars where some of the related StarMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: StarMoviesConnectionWhere + moviesConnection_SOME: StarMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Stars where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Stars where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Stars where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Stars where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") } type StarsConnection { @@ -2132,26 +2546,27 @@ describe("Subscriptions", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_MAX_EQUAL: Int - screenTime_MAX_GT: Int - screenTime_MAX_GTE: Int - screenTime_MAX_LT: Int - screenTime_MAX_LTE: Int - screenTime_MIN_EQUAL: Int - screenTime_MIN_GT: Int - screenTime_MIN_GTE: Int - screenTime_MIN_LT: Int - screenTime_MIN_LTE: Int - screenTime_SUM_EQUAL: Int - screenTime_SUM_GT: Int - screenTime_SUM_GTE: Int - screenTime_SUM_LT: Int - screenTime_SUM_LTE: Int + screenTime: IntScalarAggregationFilters + screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { eq: ... } } }' instead.\\") + screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gt: ... } } }' instead.\\") + screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gte: ... } } }' instead.\\") + screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lt: ... } } }' instead.\\") + screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lte: ... } } }' instead.\\") + screenTime_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { eq: ... } } }' instead.\\") + screenTime_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gt: ... } } }' instead.\\") + screenTime_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gte: ... } } }' instead.\\") + screenTime_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lt: ... } } }' instead.\\") + screenTime_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lte: ... } } }' instead.\\") + screenTime_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { eq: ... } } }' instead.\\") + screenTime_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gt: ... } } }' instead.\\") + screenTime_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gte: ... } } }' instead.\\") + screenTime_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lt: ... } } }' instead.\\") + screenTime_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lte: ... } } }' instead.\\") + screenTime_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { eq: ... } } }' instead.\\") + screenTime_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gt: ... } } }' instead.\\") + screenTime_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gte: ... } } }' instead.\\") + screenTime_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lt: ... } } }' instead.\\") + screenTime_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lte: ... } } }' instead.\\") } input ActedInCreateInput { @@ -2163,21 +2578,23 @@ describe("Subscriptions", () => { } input ActedInUpdateInput { - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - screenTime_SET: Int + screenTime: IntScalarMutations + screenTime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { decrement: ... } }' instead.\\") + screenTime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { increment: ... } }' instead.\\") + screenTime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'screenTime: { set: ... } }' instead.\\") } input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime_EQ: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int + screenTime: IntScalarFilters + screenTime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { eq: ... }\\") + screenTime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gt: ... }\\") + screenTime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gte: ... }\\") + screenTime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter screenTime: { in: ... }\\") + screenTime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lt: ... }\\") + screenTime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lte: ... }\\") } type Actor { @@ -2233,13 +2650,13 @@ describe("Subscriptions", () => { type ActorMovieMoviesNodeAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! - id: IDAggregateSelection! } input ActorMoviesAggregateInput { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -2259,6 +2676,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 } @@ -2293,56 +2729,48 @@ describe("Subscriptions", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - actorCount_AVERAGE_EQUAL: Float - actorCount_AVERAGE_GT: Float - actorCount_AVERAGE_GTE: Float - actorCount_AVERAGE_LT: Float - actorCount_AVERAGE_LTE: Float - actorCount_MAX_EQUAL: Int - actorCount_MAX_GT: Int - actorCount_MAX_GTE: Int - actorCount_MAX_LT: Int - actorCount_MAX_LTE: Int - actorCount_MIN_EQUAL: Int - actorCount_MIN_GT: Int - actorCount_MIN_GTE: Int - actorCount_MIN_LT: Int - actorCount_MIN_LTE: Int - actorCount_SUM_EQUAL: Int - actorCount_SUM_GT: Int - actorCount_SUM_GTE: Int - actorCount_SUM_LT: Int - actorCount_SUM_LTE: Int - averageRating_AVERAGE_EQUAL: Float - averageRating_AVERAGE_GT: Float - averageRating_AVERAGE_GTE: Float - averageRating_AVERAGE_LT: Float - averageRating_AVERAGE_LTE: Float - averageRating_MAX_EQUAL: Float - averageRating_MAX_GT: Float - averageRating_MAX_GTE: Float - averageRating_MAX_LT: Float - averageRating_MAX_LTE: Float - averageRating_MIN_EQUAL: Float - averageRating_MIN_GT: Float - averageRating_MIN_GTE: Float - averageRating_MIN_LT: Float - averageRating_MIN_LTE: Float - averageRating_SUM_EQUAL: Float - averageRating_SUM_GT: Float - averageRating_SUM_GTE: Float - averageRating_SUM_LT: Float - averageRating_SUM_LTE: Float - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + actorCount: IntScalarAggregationFilters + actorCount_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { eq: ... } } }' instead.\\") + actorCount_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { gt: ... } } }' instead.\\") + actorCount_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { gte: ... } } }' instead.\\") + actorCount_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { lt: ... } } }' instead.\\") + actorCount_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { lte: ... } } }' instead.\\") + actorCount_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { eq: ... } } }' instead.\\") + actorCount_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { gt: ... } } }' instead.\\") + actorCount_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { gte: ... } } }' instead.\\") + actorCount_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { lt: ... } } }' instead.\\") + actorCount_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { lte: ... } } }' instead.\\") + actorCount_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { eq: ... } } }' instead.\\") + actorCount_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { gt: ... } } }' instead.\\") + actorCount_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { gte: ... } } }' instead.\\") + actorCount_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { lt: ... } } }' instead.\\") + actorCount_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { lte: ... } } }' instead.\\") + actorCount_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { eq: ... } } }' instead.\\") + actorCount_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { gt: ... } } }' instead.\\") + actorCount_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { gte: ... } } }' instead.\\") + actorCount_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { lt: ... } } }' instead.\\") + actorCount_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { lte: ... } } }' instead.\\") + averageRating: FloatScalarAggregationFilters + averageRating_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { eq: ... } } }' instead.\\") + averageRating_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gt: ... } } }' instead.\\") + averageRating_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gte: ... } } }' instead.\\") + averageRating_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lt: ... } } }' instead.\\") + averageRating_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lte: ... } } }' instead.\\") + averageRating_MAX_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { eq: ... } } }' instead.\\") + averageRating_MAX_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gt: ... } } }' instead.\\") + averageRating_MAX_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gte: ... } } }' instead.\\") + averageRating_MAX_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lt: ... } } }' instead.\\") + averageRating_MAX_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lte: ... } } }' instead.\\") + averageRating_MIN_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { eq: ... } } }' instead.\\") + averageRating_MIN_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gt: ... } } }' instead.\\") + averageRating_MIN_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gte: ... } } }' instead.\\") + averageRating_MIN_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lt: ... } } }' instead.\\") + averageRating_MIN_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lte: ... } } }' instead.\\") + averageRating_SUM_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { eq: ... } } }' instead.\\") + averageRating_SUM_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gt: ... } } }' instead.\\") + averageRating_SUM_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gte: ... } } }' instead.\\") + averageRating_SUM_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lt: ... } } }' instead.\\") + averageRating_SUM_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -2363,6 +2791,17 @@ describe("Subscriptions", () => { where: ActorMoviesConnectionWhere } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input ActorUpdateInput { movies: [ActorMoviesUpdateFieldInput!] } @@ -2376,31 +2815,33 @@ describe("Subscriptions", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") } type ActorsConnection { @@ -2409,6 +2850,16 @@ describe("Subscriptions", () => { totalCount: Int! } + \\"\\"\\"Boolean filters\\"\\"\\" + input BooleanScalarFilters { + eq: Boolean + } + + \\"\\"\\"Boolean mutations\\"\\"\\" + input BooleanScalarMutations { + set: Boolean + } + type CreateActorsMutationResponse { actors: [Actor!]! info: CreateInfo! @@ -2450,9 +2901,45 @@ describe("Subscriptions", () => { sum: Float } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Filters for an aggregation of a float field\\"\\"\\" + input FloatScalarAggregationFilters { + average: FloatScalarFilters + max: FloatScalarFilters + min: FloatScalarFilters + sum: FloatScalarFilters + } + + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -2462,6 +2949,31 @@ describe("Subscriptions", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie { actorCount: Int actors(limit: Int, offset: Int, where: ActorWhere): [Actor!]! @@ -2485,6 +2997,7 @@ describe("Subscriptions", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -2505,6 +3018,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 } @@ -2561,7 +3093,6 @@ describe("Subscriptions", () => { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! count: Int! - id: IDAggregateSelection! } input MovieConnectInput { @@ -2612,6 +3143,17 @@ describe("Subscriptions", () => { isActive: Boolean } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -2626,38 +3168,46 @@ describe("Subscriptions", () => { AND: [MovieSubscriptionWhere!] NOT: MovieSubscriptionWhere OR: [MovieSubscriptionWhere!] - actorCount_EQ: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - averageRating_EQ: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive_EQ: Boolean + actorCount: IntScalarFilters + actorCount_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { eq: ... }\\") + actorCount_GT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gt: ... }\\") + actorCount_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gte: ... }\\") + actorCount_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter actorCount: { in: ... }\\") + actorCount_LT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lt: ... }\\") + actorCount_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lte: ... }\\") + averageRating: FloatScalarFilters + averageRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { eq: ... }\\") + averageRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gt: ... }\\") + averageRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gte: ... }\\") + averageRating_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter averageRating: { in: ... }\\") + averageRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lt: ... }\\") + averageRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + isActive: BooleanScalarFilters + isActive_EQ: Boolean @deprecated(reason: \\"Please use the relevant generic filter isActive: { eq: ... }\\") } input MovieUpdateInput { - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actorCount_SET: Int + actorCount: IntScalarMutations + actorCount_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'actorCount: { decrement: ... } }' instead.\\") + actorCount_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'actorCount: { increment: ... } }' instead.\\") + actorCount_SET: Int @deprecated(reason: \\"Please use the generic mutation 'actorCount: { set: ... } }' instead.\\") actors: [MovieActorsUpdateFieldInput!] - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SET: Float - averageRating_SUBTRACT: Float - id_SET: ID - isActive_SET: Boolean + averageRating: FloatScalarMutations + averageRating_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { add: ... } }' instead.\\") + averageRating_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { divide: ... } }' instead.\\") + averageRating_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { multiply: ... } }' instead.\\") + averageRating_SET: Float @deprecated(reason: \\"Please use the generic mutation 'averageRating: { set: ... } }' instead.\\") + averageRating_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { subtract: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + isActive: BooleanScalarMutations + isActive_SET: Boolean @deprecated(reason: \\"Please use the generic mutation 'isActive: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -2671,49 +3221,55 @@ describe("Subscriptions", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount_EQ: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int + actorCount: IntScalarFilters + actorCount_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { eq: ... }\\") + actorCount_GT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gt: ... }\\") + actorCount_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gte: ... }\\") + actorCount_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter actorCount: { in: ... }\\") + actorCount_LT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lt: ... }\\") + actorCount_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lte: ... }\\") + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - averageRating_EQ: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive_EQ: Boolean + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + averageRating: FloatScalarFilters + averageRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { eq: ... }\\") + averageRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gt: ... }\\") + averageRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gte: ... }\\") + averageRating_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter averageRating: { in: ... }\\") + averageRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lt: ... }\\") + averageRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + isActive: BooleanScalarFilters + isActive_EQ: Boolean @deprecated(reason: \\"Please use the relevant generic filter isActive: { eq: ... }\\") } type MoviesConnection { @@ -2854,6 +3410,17 @@ describe("Subscriptions", () => { name: String! } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -2865,15 +3432,17 @@ describe("Subscriptions", () => { AND: [ActorSubscriptionWhere!] NOT: ActorSubscriptionWhere OR: [ActorSubscriptionWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } input ActorUpdateInput { - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } type ActorUpdatedEvent { @@ -2887,11 +3456,12 @@ describe("Subscriptions", () => { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -2900,6 +3470,16 @@ describe("Subscriptions", () => { totalCount: Int! } + \\"\\"\\"Boolean filters\\"\\"\\" + input BooleanScalarFilters { + eq: Boolean + } + + \\"\\"\\"Boolean mutations\\"\\"\\" + input BooleanScalarMutations { + set: Boolean + } + type CreateActorsMutationResponse { actors: [Actor!]! info: CreateInfo! @@ -2941,9 +3521,37 @@ describe("Subscriptions", () => { sum: Float } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -2953,6 +3561,23 @@ describe("Subscriptions", () => { sum: Int } + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie { actorCount: Int actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! @@ -2976,6 +3601,7 @@ describe("Subscriptions", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -2994,6 +3620,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 } @@ -3026,21 +3671,22 @@ describe("Subscriptions", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -3065,7 +3711,6 @@ describe("Subscriptions", () => { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -3096,66 +3741,76 @@ describe("Subscriptions", () => { } input MovieUpdateInput { - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actorCount_SET: Int + actorCount: IntScalarMutations + actorCount_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'actorCount: { decrement: ... } }' instead.\\") + actorCount_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'actorCount: { increment: ... } }' instead.\\") + actorCount_SET: Int @deprecated(reason: \\"Please use the generic mutation 'actorCount: { set: ... } }' instead.\\") actors: [MovieActorsUpdateFieldInput!] - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SET: Float - averageRating_SUBTRACT: Float - id_SET: ID - isActive_SET: Boolean + averageRating: FloatScalarMutations + averageRating_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { add: ... } }' instead.\\") + averageRating_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { divide: ... } }' instead.\\") + averageRating_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { multiply: ... } }' instead.\\") + averageRating_SET: Float @deprecated(reason: \\"Please use the generic mutation 'averageRating: { set: ... } }' instead.\\") + averageRating_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { subtract: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + isActive: BooleanScalarMutations + isActive_SET: Boolean @deprecated(reason: \\"Please use the generic mutation 'isActive: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount_EQ: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int + actorCount: IntScalarFilters + actorCount_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { eq: ... }\\") + actorCount_GT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gt: ... }\\") + actorCount_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gte: ... }\\") + actorCount_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter actorCount: { in: ... }\\") + actorCount_LT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lt: ... }\\") + actorCount_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lte: ... }\\") + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - averageRating_EQ: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive_EQ: Boolean + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + averageRating: FloatScalarFilters + averageRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { eq: ... }\\") + averageRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gt: ... }\\") + averageRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gte: ... }\\") + averageRating_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter averageRating: { in: ... }\\") + averageRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lt: ... }\\") + averageRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + isActive: BooleanScalarFilters + isActive_EQ: Boolean @deprecated(reason: \\"Please use the relevant generic filter isActive: { eq: ... }\\") } type MoviesConnection { @@ -3203,6 +3858,27 @@ describe("Subscriptions", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type Subscription { actorCreated(where: ActorSubscriptionWhere): ActorCreatedEvent! actorDeleted(where: ActorSubscriptionWhere): ActorDeletedEvent! @@ -3269,11 +3945,32 @@ describe("Subscriptions", () => { union Actor = Person | Star + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + input ActorWhere { Person: PersonWhere Star: StarWhere } + \\"\\"\\"Boolean filters\\"\\"\\" + input BooleanScalarFilters { + eq: Boolean + } + + \\"\\"\\"Boolean mutations\\"\\"\\" + input BooleanScalarMutations { + set: Boolean + } + \\"\\"\\" Information about the number of nodes and relationships created during a create mutation \\"\\"\\" @@ -3320,9 +4017,45 @@ describe("Subscriptions", () => { sum: Float } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Filters for an aggregation of a float field\\"\\"\\" + input FloatScalarAggregationFilters { + average: FloatScalarFilters + max: FloatScalarFilters + min: FloatScalarFilters + sum: FloatScalarFilters + } + + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + + \\"\\"\\"Float mutations\\"\\"\\" + input FloatScalarMutations { + add: Float + divide: Float + multiply: Float + set: Float + subtract: Float + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type IntAggregateSelection { @@ -3332,6 +4065,31 @@ describe("Subscriptions", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie { actorCount: Int actors(limit: Int, offset: Int, where: ActorWhere): [Actor!]! @@ -3352,6 +4110,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 @@ -3474,7 +4251,6 @@ describe("Subscriptions", () => { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! count: Int! - id: IDAggregateSelection! } input MovieConnectInput { @@ -3525,6 +4301,17 @@ describe("Subscriptions", () => { isActive: Boolean } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + \\"\\"\\" Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. \\"\\"\\" @@ -3539,38 +4326,46 @@ describe("Subscriptions", () => { AND: [MovieSubscriptionWhere!] NOT: MovieSubscriptionWhere OR: [MovieSubscriptionWhere!] - actorCount_EQ: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int - averageRating_EQ: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive_EQ: Boolean + actorCount: IntScalarFilters + actorCount_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { eq: ... }\\") + actorCount_GT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gt: ... }\\") + actorCount_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gte: ... }\\") + actorCount_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter actorCount: { in: ... }\\") + actorCount_LT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lt: ... }\\") + actorCount_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lte: ... }\\") + averageRating: FloatScalarFilters + averageRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { eq: ... }\\") + averageRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gt: ... }\\") + averageRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gte: ... }\\") + averageRating_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter averageRating: { in: ... }\\") + averageRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lt: ... }\\") + averageRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + isActive: BooleanScalarFilters + isActive_EQ: Boolean @deprecated(reason: \\"Please use the relevant generic filter isActive: { eq: ... }\\") } input MovieUpdateInput { - actorCount_DECREMENT: Int - actorCount_INCREMENT: Int - actorCount_SET: Int + actorCount: IntScalarMutations + actorCount_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'actorCount: { decrement: ... } }' instead.\\") + actorCount_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'actorCount: { increment: ... } }' instead.\\") + actorCount_SET: Int @deprecated(reason: \\"Please use the generic mutation 'actorCount: { set: ... } }' instead.\\") actors: MovieActorsUpdateInput - averageRating_ADD: Float - averageRating_DIVIDE: Float - averageRating_MULTIPLY: Float - averageRating_SET: Float - averageRating_SUBTRACT: Float - id_SET: ID - isActive_SET: Boolean + averageRating: FloatScalarMutations + averageRating_ADD: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { add: ... } }' instead.\\") + averageRating_DIVIDE: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { divide: ... } }' instead.\\") + averageRating_MULTIPLY: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { multiply: ... } }' instead.\\") + averageRating_SET: Float @deprecated(reason: \\"Please use the generic mutation 'averageRating: { set: ... } }' instead.\\") + averageRating_SUBTRACT: Float @deprecated(reason: \\"Please use the relevant generic mutation 'averageRating: { subtract: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + isActive: BooleanScalarMutations + isActive_SET: Boolean @deprecated(reason: \\"Please use the generic mutation 'isActive: { set: ... } }' instead.\\") } type MovieUpdatedEvent { @@ -3584,48 +4379,54 @@ describe("Subscriptions", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - actorCount_EQ: Int - actorCount_GT: Int - actorCount_GTE: Int - actorCount_IN: [Int] - actorCount_LT: Int - actorCount_LTE: Int + actorCount: IntScalarFilters + actorCount_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { eq: ... }\\") + actorCount_GT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gt: ... }\\") + actorCount_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { gte: ... }\\") + actorCount_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter actorCount: { in: ... }\\") + actorCount_LT: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lt: ... }\\") + actorCount_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter actorCount: { lte: ... }\\") + actors: ActorRelationshipFilters + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere - averageRating_EQ: Float - averageRating_GT: Float - averageRating_GTE: Float - averageRating_IN: [Float] - averageRating_LT: Float - averageRating_LTE: Float - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - isActive_EQ: Boolean + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + averageRating: FloatScalarFilters + averageRating_EQ: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { eq: ... }\\") + averageRating_GT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gt: ... }\\") + averageRating_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { gte: ... }\\") + averageRating_IN: [Float] @deprecated(reason: \\"Please use the relevant generic filter averageRating: { in: ... }\\") + averageRating_LT: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lt: ... }\\") + averageRating_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter averageRating: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + isActive: BooleanScalarFilters + isActive_EQ: Boolean @deprecated(reason: \\"Please use the relevant generic filter isActive: { eq: ... }\\") } type MoviesConnection { @@ -3713,13 +4514,13 @@ describe("Subscriptions", () => { type PersonMovieMoviesNodeAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! - id: IDAggregateSelection! } input PersonMoviesAggregateInput { AND: [PersonMoviesAggregateInput!] NOT: PersonMoviesAggregateInput OR: [PersonMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -3739,6 +4540,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 } @@ -3773,56 +4593,48 @@ describe("Subscriptions", () => { AND: [PersonMoviesNodeAggregationWhereInput!] NOT: PersonMoviesNodeAggregationWhereInput OR: [PersonMoviesNodeAggregationWhereInput!] - actorCount_AVERAGE_EQUAL: Float - actorCount_AVERAGE_GT: Float - actorCount_AVERAGE_GTE: Float - actorCount_AVERAGE_LT: Float - actorCount_AVERAGE_LTE: Float - actorCount_MAX_EQUAL: Int - actorCount_MAX_GT: Int - actorCount_MAX_GTE: Int - actorCount_MAX_LT: Int - actorCount_MAX_LTE: Int - actorCount_MIN_EQUAL: Int - actorCount_MIN_GT: Int - actorCount_MIN_GTE: Int - actorCount_MIN_LT: Int - actorCount_MIN_LTE: Int - actorCount_SUM_EQUAL: Int - actorCount_SUM_GT: Int - actorCount_SUM_GTE: Int - actorCount_SUM_LT: Int - actorCount_SUM_LTE: Int - averageRating_AVERAGE_EQUAL: Float - averageRating_AVERAGE_GT: Float - averageRating_AVERAGE_GTE: Float - averageRating_AVERAGE_LT: Float - averageRating_AVERAGE_LTE: Float - averageRating_MAX_EQUAL: Float - averageRating_MAX_GT: Float - averageRating_MAX_GTE: Float - averageRating_MAX_LT: Float - averageRating_MAX_LTE: Float - averageRating_MIN_EQUAL: Float - averageRating_MIN_GT: Float - averageRating_MIN_GTE: Float - averageRating_MIN_LT: Float - averageRating_MIN_LTE: Float - averageRating_SUM_EQUAL: Float - averageRating_SUM_GT: Float - averageRating_SUM_GTE: Float - averageRating_SUM_LT: Float - averageRating_SUM_LTE: Float - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + actorCount: IntScalarAggregationFilters + actorCount_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { eq: ... } } }' instead.\\") + actorCount_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { gt: ... } } }' instead.\\") + actorCount_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { gte: ... } } }' instead.\\") + actorCount_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { lt: ... } } }' instead.\\") + actorCount_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { lte: ... } } }' instead.\\") + actorCount_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { eq: ... } } }' instead.\\") + actorCount_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { gt: ... } } }' instead.\\") + actorCount_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { gte: ... } } }' instead.\\") + actorCount_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { lt: ... } } }' instead.\\") + actorCount_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { lte: ... } } }' instead.\\") + actorCount_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { eq: ... } } }' instead.\\") + actorCount_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { gt: ... } } }' instead.\\") + actorCount_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { gte: ... } } }' instead.\\") + actorCount_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { lt: ... } } }' instead.\\") + actorCount_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { lte: ... } } }' instead.\\") + actorCount_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { eq: ... } } }' instead.\\") + actorCount_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { gt: ... } } }' instead.\\") + actorCount_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { gte: ... } } }' instead.\\") + actorCount_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { lt: ... } } }' instead.\\") + actorCount_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { lte: ... } } }' instead.\\") + averageRating: FloatScalarAggregationFilters + averageRating_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { eq: ... } } }' instead.\\") + averageRating_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gt: ... } } }' instead.\\") + averageRating_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gte: ... } } }' instead.\\") + averageRating_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lt: ... } } }' instead.\\") + averageRating_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lte: ... } } }' instead.\\") + averageRating_MAX_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { eq: ... } } }' instead.\\") + averageRating_MAX_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gt: ... } } }' instead.\\") + averageRating_MAX_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gte: ... } } }' instead.\\") + averageRating_MAX_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lt: ... } } }' instead.\\") + averageRating_MAX_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lte: ... } } }' instead.\\") + averageRating_MIN_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { eq: ... } } }' instead.\\") + averageRating_MIN_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gt: ... } } }' instead.\\") + averageRating_MIN_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gte: ... } } }' instead.\\") + averageRating_MIN_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lt: ... } } }' instead.\\") + averageRating_MIN_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lte: ... } } }' instead.\\") + averageRating_SUM_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { eq: ... } } }' instead.\\") + averageRating_SUM_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gt: ... } } }' instead.\\") + averageRating_SUM_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gte: ... } } }' instead.\\") + averageRating_SUM_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lt: ... } } }' instead.\\") + averageRating_SUM_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lte: ... } } }' instead.\\") } type PersonMoviesRelationship { @@ -3856,31 +4668,33 @@ describe("Subscriptions", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] + movies: MovieRelationshipFilters moviesAggregate: PersonMoviesAggregateInput + moviesConnection: PersonMoviesConnectionFilters \\"\\"\\" Return People where all of the related PersonMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: PersonMoviesConnectionWhere + moviesConnection_ALL: PersonMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return People where none of the related PersonMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: PersonMoviesConnectionWhere + moviesConnection_NONE: PersonMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return People where one of the related PersonMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: PersonMoviesConnectionWhere + moviesConnection_SINGLE: PersonMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return People where some of the related PersonMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: PersonMoviesConnectionWhere + moviesConnection_SOME: PersonMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return People where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return People where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return People where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return People where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") } type Query { @@ -3947,13 +4761,13 @@ describe("Subscriptions", () => { type StarMovieMoviesNodeAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! - id: IDAggregateSelection! } input StarMoviesAggregateInput { AND: [StarMoviesAggregateInput!] NOT: StarMoviesAggregateInput OR: [StarMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -3973,6 +4787,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 } @@ -4007,56 +4840,48 @@ describe("Subscriptions", () => { AND: [StarMoviesNodeAggregationWhereInput!] NOT: StarMoviesNodeAggregationWhereInput OR: [StarMoviesNodeAggregationWhereInput!] - actorCount_AVERAGE_EQUAL: Float - actorCount_AVERAGE_GT: Float - actorCount_AVERAGE_GTE: Float - actorCount_AVERAGE_LT: Float - actorCount_AVERAGE_LTE: Float - actorCount_MAX_EQUAL: Int - actorCount_MAX_GT: Int - actorCount_MAX_GTE: Int - actorCount_MAX_LT: Int - actorCount_MAX_LTE: Int - actorCount_MIN_EQUAL: Int - actorCount_MIN_GT: Int - actorCount_MIN_GTE: Int - actorCount_MIN_LT: Int - actorCount_MIN_LTE: Int - actorCount_SUM_EQUAL: Int - actorCount_SUM_GT: Int - actorCount_SUM_GTE: Int - actorCount_SUM_LT: Int - actorCount_SUM_LTE: Int - averageRating_AVERAGE_EQUAL: Float - averageRating_AVERAGE_GT: Float - averageRating_AVERAGE_GTE: Float - averageRating_AVERAGE_LT: Float - averageRating_AVERAGE_LTE: Float - averageRating_MAX_EQUAL: Float - averageRating_MAX_GT: Float - averageRating_MAX_GTE: Float - averageRating_MAX_LT: Float - averageRating_MAX_LTE: Float - averageRating_MIN_EQUAL: Float - averageRating_MIN_GT: Float - averageRating_MIN_GTE: Float - averageRating_MIN_LT: Float - averageRating_MIN_LTE: Float - averageRating_SUM_EQUAL: Float - averageRating_SUM_GT: Float - averageRating_SUM_GTE: Float - averageRating_SUM_LT: Float - averageRating_SUM_LTE: Float - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + actorCount: IntScalarAggregationFilters + actorCount_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { eq: ... } } }' instead.\\") + actorCount_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { gt: ... } } }' instead.\\") + actorCount_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { gte: ... } } }' instead.\\") + actorCount_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { lt: ... } } }' instead.\\") + actorCount_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { average: { lte: ... } } }' instead.\\") + actorCount_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { eq: ... } } }' instead.\\") + actorCount_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { gt: ... } } }' instead.\\") + actorCount_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { gte: ... } } }' instead.\\") + actorCount_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { lt: ... } } }' instead.\\") + actorCount_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { max: { lte: ... } } }' instead.\\") + actorCount_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { eq: ... } } }' instead.\\") + actorCount_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { gt: ... } } }' instead.\\") + actorCount_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { gte: ... } } }' instead.\\") + actorCount_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { lt: ... } } }' instead.\\") + actorCount_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { min: { lte: ... } } }' instead.\\") + actorCount_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { eq: ... } } }' instead.\\") + actorCount_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { gt: ... } } }' instead.\\") + actorCount_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { gte: ... } } }' instead.\\") + actorCount_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { lt: ... } } }' instead.\\") + actorCount_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'actorCount: { sum: { lte: ... } } }' instead.\\") + averageRating: FloatScalarAggregationFilters + averageRating_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { eq: ... } } }' instead.\\") + averageRating_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gt: ... } } }' instead.\\") + averageRating_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { gte: ... } } }' instead.\\") + averageRating_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lt: ... } } }' instead.\\") + averageRating_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { average: { lte: ... } } }' instead.\\") + averageRating_MAX_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { eq: ... } } }' instead.\\") + averageRating_MAX_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gt: ... } } }' instead.\\") + averageRating_MAX_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { gte: ... } } }' instead.\\") + averageRating_MAX_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lt: ... } } }' instead.\\") + averageRating_MAX_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { max: { lte: ... } } }' instead.\\") + averageRating_MIN_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { eq: ... } } }' instead.\\") + averageRating_MIN_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gt: ... } } }' instead.\\") + averageRating_MIN_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { gte: ... } } }' instead.\\") + averageRating_MIN_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lt: ... } } }' instead.\\") + averageRating_MIN_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { min: { lte: ... } } }' instead.\\") + averageRating_SUM_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { eq: ... } } }' instead.\\") + averageRating_SUM_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gt: ... } } }' instead.\\") + averageRating_SUM_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { gte: ... } } }' instead.\\") + averageRating_SUM_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lt: ... } } }' instead.\\") + averageRating_SUM_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'averageRating: { sum: { lte: ... } } }' instead.\\") } type StarMoviesRelationship { @@ -4085,31 +4910,33 @@ describe("Subscriptions", () => { AND: [StarWhere!] NOT: StarWhere OR: [StarWhere!] + movies: MovieRelationshipFilters moviesAggregate: StarMoviesAggregateInput + moviesConnection: StarMoviesConnectionFilters \\"\\"\\" Return Stars where all of the related StarMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: StarMoviesConnectionWhere + moviesConnection_ALL: StarMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Stars where none of the related StarMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: StarMoviesConnectionWhere + moviesConnection_NONE: StarMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Stars where one of the related StarMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: StarMoviesConnectionWhere + moviesConnection_SINGLE: StarMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Stars where some of the related StarMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: StarMoviesConnectionWhere + moviesConnection_SOME: StarMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Stars where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Stars where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Stars where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Stars where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") } type StarsConnection { diff --git a/packages/graphql/tests/schema/types/bigint.test.ts b/packages/graphql/tests/schema/types/bigint.test.ts index b4f0fc5c37..48fd45ceca 100644 --- a/packages/graphql/tests/schema/types/bigint.test.ts +++ b/packages/graphql/tests/schema/types/bigint.test.ts @@ -51,6 +51,23 @@ describe("Bigint", () => { sum: BigInt } + \\"\\"\\"BigInt filters\\"\\"\\" + input BigIntScalarFilters { + eq: BigInt + gt: BigInt + gte: BigInt + in: [BigInt!] + lt: BigInt + lte: BigInt + } + + \\"\\"\\"BigInt mutations\\"\\"\\" + input BigIntScalarMutations { + add: BigInt + set: BigInt + subtract: BigInt + } + type CreateFilesMutationResponse { files: [File!]! info: CreateInfo! @@ -102,27 +119,31 @@ describe("Bigint", () => { } input FileUpdateInput { - name_SET: String - size_DECREMENT: BigInt - size_INCREMENT: BigInt - size_SET: BigInt + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") + size: BigIntScalarMutations + size_DECREMENT: BigInt @deprecated(reason: \\"Please use the relevant generic mutation 'size: { decrement: ... } }' instead.\\") + size_INCREMENT: BigInt @deprecated(reason: \\"Please use the relevant generic mutation 'size: { increment: ... } }' instead.\\") + size_SET: BigInt @deprecated(reason: \\"Please use the generic mutation 'size: { set: ... } }' instead.\\") } input FileWhere { AND: [FileWhere!] NOT: FileWhere OR: [FileWhere!] - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String - size_EQ: BigInt - size_GT: BigInt - size_GTE: BigInt - size_IN: [BigInt!] - size_LT: BigInt - size_LTE: BigInt + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + size: BigIntScalarFilters + size_EQ: BigInt @deprecated(reason: \\"Please use the relevant generic filter size: { eq: ... }\\") + size_GT: BigInt @deprecated(reason: \\"Please use the relevant generic filter size: { gt: ... }\\") + size_GTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter size: { gte: ... }\\") + size_IN: [BigInt!] @deprecated(reason: \\"Please use the relevant generic filter size: { in: ... }\\") + size_LT: BigInt @deprecated(reason: \\"Please use the relevant generic filter size: { lt: ... }\\") + size_LTE: BigInt @deprecated(reason: \\"Please use the relevant generic filter size: { lte: ... }\\") } type FilesConnection { @@ -164,6 +185,20 @@ describe("Bigint", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateFilesMutationResponse { files: [File!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/types/date.test.ts b/packages/graphql/tests/schema/types/date.test.ts index 224408cc5e..5c31c7f9f4 100644 --- a/packages/graphql/tests/schema/types/date.test.ts +++ b/packages/graphql/tests/schema/types/date.test.ts @@ -55,6 +55,21 @@ describe("Date", () => { \\"\\"\\"A date, represented as a 'yyyy-mm-dd' string\\"\\"\\" scalar Date + \\"\\"\\"Date filters\\"\\"\\" + input DateScalarFilters { + eq: Date + gt: Date + gte: Date + in: [Date!] + lt: Date + lte: Date + } + + \\"\\"\\"Date mutations\\"\\"\\" + input DateScalarMutations { + set: Date + } + \\"\\"\\" Information about the number of nodes and relationships deleted during a delete mutation \\"\\"\\" @@ -63,9 +78,18 @@ describe("Date", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -75,7 +99,6 @@ describe("Date", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieCreateInput { @@ -97,25 +120,29 @@ describe("Date", () => { } input MovieUpdateInput { - date_SET: Date - id_SET: ID + date: DateScalarMutations + date_SET: Date @deprecated(reason: \\"Please use the generic mutation 'date: { set: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - date_EQ: Date - date_GT: Date - date_GTE: Date - date_IN: [Date] - date_LT: Date - date_LTE: Date - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + date: DateScalarFilters + date_EQ: Date @deprecated(reason: \\"Please use the relevant generic filter date: { eq: ... }\\") + date_GT: Date @deprecated(reason: \\"Please use the relevant generic filter date: { gt: ... }\\") + date_GTE: Date @deprecated(reason: \\"Please use the relevant generic filter date: { gte: ... }\\") + date_IN: [Date] @deprecated(reason: \\"Please use the relevant generic filter date: { in: ... }\\") + date_LT: Date @deprecated(reason: \\"Please use the relevant generic filter date: { lt: ... }\\") + date_LTE: Date @deprecated(reason: \\"Please use the relevant generic filter date: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { diff --git a/packages/graphql/tests/schema/types/datetime.test.ts b/packages/graphql/tests/schema/types/datetime.test.ts index 623a8058a1..7b2acdc58b 100644 --- a/packages/graphql/tests/schema/types/datetime.test.ts +++ b/packages/graphql/tests/schema/types/datetime.test.ts @@ -60,6 +60,21 @@ describe("Datetime", () => { min: DateTime } + \\"\\"\\"DateTime filters\\"\\"\\" + input DateTimeScalarFilters { + eq: DateTime + gt: DateTime + gte: DateTime + in: [DateTime!] + lt: DateTime + lte: DateTime + } + + \\"\\"\\"DateTime mutations\\"\\"\\" + input DateTimeScalarMutations { + set: DateTime + } + \\"\\"\\" Information about the number of nodes and relationships deleted during a delete mutation \\"\\"\\" @@ -68,9 +83,18 @@ describe("Datetime", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -81,7 +105,6 @@ describe("Datetime", () => { type MovieAggregateSelection { count: Int! datetime: DateTimeAggregateSelection! - id: IDAggregateSelection! } input MovieCreateInput { @@ -103,25 +126,29 @@ describe("Datetime", () => { } input MovieUpdateInput { - datetime_SET: DateTime - id_SET: ID + datetime: DateTimeScalarMutations + datetime_SET: DateTime @deprecated(reason: \\"Please use the generic mutation 'datetime: { set: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - datetime_EQ: DateTime - datetime_GT: DateTime - datetime_GTE: DateTime - datetime_IN: [DateTime] - datetime_LT: DateTime - datetime_LTE: DateTime - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + datetime: DateTimeScalarFilters + datetime_EQ: DateTime @deprecated(reason: \\"Please use the relevant generic filter datetime: { eq: ... }\\") + datetime_GT: DateTime @deprecated(reason: \\"Please use the relevant generic filter datetime: { gt: ... }\\") + datetime_GTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter datetime: { gte: ... }\\") + datetime_IN: [DateTime] @deprecated(reason: \\"Please use the relevant generic filter datetime: { in: ... }\\") + datetime_LT: DateTime @deprecated(reason: \\"Please use the relevant generic filter datetime: { lt: ... }\\") + datetime_LTE: DateTime @deprecated(reason: \\"Please use the relevant generic filter datetime: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { diff --git a/packages/graphql/tests/schema/types/duration.test.ts b/packages/graphql/tests/schema/types/duration.test.ts index fd09d971b7..b829d161c1 100644 --- a/packages/graphql/tests/schema/types/duration.test.ts +++ b/packages/graphql/tests/schema/types/duration.test.ts @@ -68,9 +68,33 @@ describe("Duration", () => { min: Duration } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"Duration filters\\"\\"\\" + input DurationScalarFilters { + eq: Duration + gt: Duration + gte: Duration + in: [Duration!] + lt: Duration + lte: Duration + } + + \\"\\"\\"Duration mutations\\"\\"\\" + input DurationScalarMutations { + set: Duration + } + + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -81,7 +105,6 @@ describe("Duration", () => { type MovieAggregateSelection { count: Int! duration: DurationAggregateSelection! - id: IDAggregateSelection! } input MovieCreateInput { @@ -103,25 +126,29 @@ describe("Duration", () => { } input MovieUpdateInput { - duration_SET: Duration - id_SET: ID + duration: DurationScalarMutations + duration_SET: Duration @deprecated(reason: \\"Please use the generic mutation 'duration: { set: ... } }' instead.\\") + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - duration_EQ: Duration - duration_GT: Duration - duration_GTE: Duration - duration_IN: [Duration] - duration_LT: Duration - duration_LTE: Duration - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + duration: DurationScalarFilters + duration_EQ: Duration @deprecated(reason: \\"Please use the relevant generic filter duration: { eq: ... }\\") + duration_GT: Duration @deprecated(reason: \\"Please use the relevant generic filter duration: { gt: ... }\\") + duration_GTE: Duration @deprecated(reason: \\"Please use the relevant generic filter duration: { gte: ... }\\") + duration_IN: [Duration] @deprecated(reason: \\"Please use the relevant generic filter duration: { in: ... }\\") + duration_LT: Duration @deprecated(reason: \\"Please use the relevant generic filter duration: { lt: ... }\\") + duration_LTE: Duration @deprecated(reason: \\"Please use the relevant generic filter duration: { lte: ... }\\") + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type MoviesConnection { diff --git a/packages/graphql/tests/schema/types/localdatetime.test.ts b/packages/graphql/tests/schema/types/localdatetime.test.ts index 478439d85c..3dfb8a2e38 100644 --- a/packages/graphql/tests/schema/types/localdatetime.test.ts +++ b/packages/graphql/tests/schema/types/localdatetime.test.ts @@ -60,9 +60,18 @@ describe("Localdatetime", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } \\"\\"\\"A local datetime, represented as 'YYYY-MM-DDTHH:MM:SS'\\"\\"\\" @@ -73,6 +82,21 @@ describe("Localdatetime", () => { min: LocalDateTime } + \\"\\"\\"LocalDateTime filters\\"\\"\\" + input LocalDateTimeScalarFilters { + eq: LocalDateTime + gt: LocalDateTime + gte: LocalDateTime + in: [LocalDateTime!] + lt: LocalDateTime + lte: LocalDateTime + } + + \\"\\"\\"LocalDateTime mutations\\"\\"\\" + input LocalDateTimeScalarMutations { + set: LocalDateTime + } + type Movie { id: ID localDT: LocalDateTime @@ -80,7 +104,6 @@ describe("Localdatetime", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! localDT: LocalDateTimeAggregateSelection! } @@ -103,25 +126,29 @@ describe("Localdatetime", () => { } input MovieUpdateInput { - id_SET: ID - localDT_SET: LocalDateTime + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + localDT: LocalDateTimeScalarMutations + localDT_SET: LocalDateTime @deprecated(reason: \\"Please use the generic mutation 'localDT: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - localDT_EQ: LocalDateTime - localDT_GT: LocalDateTime - localDT_GTE: LocalDateTime - localDT_IN: [LocalDateTime] - localDT_LT: LocalDateTime - localDT_LTE: LocalDateTime + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + localDT: LocalDateTimeScalarFilters + localDT_EQ: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter localDT: { eq: ... }\\") + localDT_GT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter localDT: { gt: ... }\\") + localDT_GTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter localDT: { gte: ... }\\") + localDT_IN: [LocalDateTime] @deprecated(reason: \\"Please use the relevant generic filter localDT: { in: ... }\\") + localDT_LT: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter localDT: { lt: ... }\\") + localDT_LTE: LocalDateTime @deprecated(reason: \\"Please use the relevant generic filter localDT: { lte: ... }\\") } type MoviesConnection { diff --git a/packages/graphql/tests/schema/types/localtime.test.ts b/packages/graphql/tests/schema/types/localtime.test.ts index 7a48f26eff..951d8175a4 100644 --- a/packages/graphql/tests/schema/types/localtime.test.ts +++ b/packages/graphql/tests/schema/types/localtime.test.ts @@ -60,9 +60,18 @@ describe("Localtime", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } \\"\\"\\" @@ -75,6 +84,21 @@ describe("Localtime", () => { min: LocalTime } + \\"\\"\\"LocalTime filters\\"\\"\\" + input LocalTimeScalarFilters { + eq: LocalTime + gt: LocalTime + gte: LocalTime + in: [LocalTime!] + lt: LocalTime + lte: LocalTime + } + + \\"\\"\\"LocalTime mutations\\"\\"\\" + input LocalTimeScalarMutations { + set: LocalTime + } + type Movie { id: ID time: LocalTime @@ -82,7 +106,6 @@ describe("Localtime", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! time: LocalTimeAggregateSelection! } @@ -105,25 +128,29 @@ describe("Localtime", () => { } input MovieUpdateInput { - id_SET: ID - time_SET: LocalTime + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + time: LocalTimeScalarMutations + time_SET: LocalTime @deprecated(reason: \\"Please use the generic mutation 'time: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - time_EQ: LocalTime - time_GT: LocalTime - time_GTE: LocalTime - time_IN: [LocalTime] - time_LT: LocalTime - time_LTE: LocalTime + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + time: LocalTimeScalarFilters + time_EQ: LocalTime @deprecated(reason: \\"Please use the relevant generic filter time: { eq: ... }\\") + time_GT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter time: { gt: ... }\\") + time_GTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter time: { gte: ... }\\") + time_IN: [LocalTime] @deprecated(reason: \\"Please use the relevant generic filter time: { in: ... }\\") + time_LT: LocalTime @deprecated(reason: \\"Please use the relevant generic filter time: { lt: ... }\\") + time_LTE: LocalTime @deprecated(reason: \\"Please use the relevant generic filter time: { lte: ... }\\") } type MoviesConnection { diff --git a/packages/graphql/tests/schema/types/point.test.ts b/packages/graphql/tests/schema/types/point.test.ts index 6a1de55194..323da4d94a 100644 --- a/packages/graphql/tests/schema/types/point.test.ts +++ b/packages/graphql/tests/schema/types/point.test.ts @@ -84,20 +84,22 @@ describe("Point", () => { } input MovieUpdateInput { - filmedAt_SET: PointInput + filmedAt: PointMutations + filmedAt_SET: PointInput @deprecated(reason: \\"Please use the generic mutation 'filmedAt: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - filmedAt_DISTANCE: PointDistance - filmedAt_EQ: PointInput - filmedAt_GT: PointDistance - filmedAt_GTE: PointDistance - filmedAt_IN: [PointInput!] - filmedAt_LT: PointDistance - filmedAt_LTE: PointDistance + filmedAt: PointFilters + filmedAt_DISTANCE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter filmedAt: { distance: ... }\\") + filmedAt_EQ: PointInput @deprecated(reason: \\"Please use the relevant generic filter filmedAt: { eq: ... }\\") + filmedAt_GT: PointDistance @deprecated(reason: \\"Please use the relevant generic filter filmedAt: { gt: ... }\\") + filmedAt_GTE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter filmedAt: { gte: ... }\\") + filmedAt_IN: [PointInput!] @deprecated(reason: \\"Please use the relevant generic filter filmedAt: { in: ... }\\") + filmedAt_LT: PointDistance @deprecated(reason: \\"Please use the relevant generic filter filmedAt: { lt: ... }\\") + filmedAt_LTE: PointDistance @deprecated(reason: \\"Please use the relevant generic filter filmedAt: { lte: ... }\\") } type MoviesConnection { @@ -138,6 +140,23 @@ describe("Point", () => { point: PointInput! } + \\"\\"\\"Distance filters\\"\\"\\" + input PointDistanceFilters { + eq: Float + from: PointInput! + gt: Float + gte: Float + lt: Float + lte: Float + } + + \\"\\"\\"Point filters\\"\\"\\" + input PointFilters { + distance: PointDistanceFilters + eq: PointInput + in: [PointInput!] + } + \\"\\"\\"Input type for a point\\"\\"\\" input PointInput { height: Float @@ -145,6 +164,11 @@ describe("Point", () => { longitude: Float! } + \\"\\"\\"Point mutations\\"\\"\\" + input PointMutations { + set: PointInput + } + type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! moviesAggregate(where: MovieWhere): MovieAggregateSelection! @@ -191,6 +215,15 @@ describe("Point", () => { mutation: Mutation } + \\"\\"\\"Distance filters for cartesian points\\"\\"\\" + input CartesianDistancePointFilters { + from: CartesianPointInput! + gt: Float + gte: Float + lt: Float + lte: Float + } + \\"\\"\\" A point in a two- or three-dimensional Cartesian coordinate system or in a three-dimensional cylindrical coordinate system. For more information, see https://neo4j.com/docs/graphql/4/type-definitions/types/spatial/#cartesian-point \\"\\"\\" @@ -208,6 +241,13 @@ describe("Point", () => { point: CartesianPointInput! } + \\"\\"\\"Cartesian Point filters\\"\\"\\" + input CartesianPointFilters { + distance: CartesianDistancePointFilters + eq: CartesianPointInput + in: [CartesianPointInput!] + } + \\"\\"\\"Input type for a cartesian point\\"\\"\\" input CartesianPointInput { x: Float! @@ -215,6 +255,11 @@ describe("Point", () => { z: Float } + \\"\\"\\"CartesianPoint mutations\\"\\"\\" + input CartesianPointMutations { + set: CartesianPointInput + } + \\"\\"\\" Information about the number of nodes and relationships created during a create mutation \\"\\"\\" @@ -261,20 +306,22 @@ describe("Point", () => { } input MachineUpdateInput { - partLocation_SET: CartesianPointInput + partLocation: CartesianPointMutations + partLocation_SET: CartesianPointInput @deprecated(reason: \\"Please use the generic mutation 'partLocation: { set: ... } }' instead.\\") } input MachineWhere { AND: [MachineWhere!] NOT: MachineWhere OR: [MachineWhere!] - partLocation_DISTANCE: CartesianPointDistance - partLocation_EQ: CartesianPointInput - partLocation_GT: CartesianPointDistance - partLocation_GTE: CartesianPointDistance - partLocation_IN: [CartesianPointInput!] - partLocation_LT: CartesianPointDistance - partLocation_LTE: CartesianPointDistance + partLocation: CartesianPointFilters + partLocation_DISTANCE: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter partLocation: { distance: ... }\\") + partLocation_EQ: CartesianPointInput @deprecated(reason: \\"Please use the relevant generic filter partLocation: { eq: ... }\\") + partLocation_GT: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter partLocation: { gt: ... }\\") + partLocation_GTE: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter partLocation: { gte: ... }\\") + partLocation_IN: [CartesianPointInput!] @deprecated(reason: \\"Please use the relevant generic filter partLocation: { in: ... }\\") + partLocation_LT: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter partLocation: { lt: ... }\\") + partLocation_LTE: CartesianPointDistance @deprecated(reason: \\"Please use the relevant generic filter partLocation: { lte: ... }\\") } type MachinesConnection { @@ -364,6 +411,13 @@ describe("Point", () => { relationshipsDeleted: Int! } + \\"\\"\\"Mutations for a list for PointInput\\"\\"\\" + input ListPointInputMutations { + pop: Int + push: [PointInput!] + set: [PointInput!] + } + type Movie { filmedAt: [Point!]! } @@ -382,17 +436,19 @@ describe("Point", () => { } input MovieUpdateInput { - filmedAt_POP: Int - filmedAt_PUSH: [PointInput!] - filmedAt_SET: [PointInput!] + filmedAt: ListPointInputMutations + filmedAt_POP: Int @deprecated(reason: \\"Please use the generic mutation 'filmedAt: { pop: ... } }' instead.\\") + filmedAt_PUSH: [PointInput!] @deprecated(reason: \\"Please use the generic mutation 'filmedAt: { push: ... } }' instead.\\") + filmedAt_SET: [PointInput!] @deprecated(reason: \\"Please use the generic mutation 'filmedAt: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - filmedAt_EQ: [PointInput!] - filmedAt_INCLUDES: PointInput + filmedAt: PointListFilters + filmedAt_EQ: [PointInput!] @deprecated(reason: \\"Please use the relevant generic filter filmedAt: { eq: ... }\\") + filmedAt_INCLUDES: PointInput @deprecated(reason: \\"Please use the relevant generic filter filmedAt: { includes: ... }\\") } type MoviesConnection { @@ -433,6 +489,12 @@ describe("Point", () => { longitude: Float! } + \\"\\"\\"Point list filters\\"\\"\\" + input PointListFilters { + eq: [PointInput!] + includes: PointInput + } + type Query { movies(limit: Int, offset: Int, where: MovieWhere): [Movie!]! moviesAggregate(where: MovieWhere): MovieAggregateSelection! @@ -489,6 +551,12 @@ describe("Point", () => { z: Float } + \\"\\"\\"CartesianPoint list filters\\"\\"\\" + input CartesianPointListFilters { + eq: [CartesianPointInput!] + includes: CartesianPointInput + } + \\"\\"\\" Information about the number of nodes and relationships created during a create mutation \\"\\"\\" @@ -510,6 +578,13 @@ describe("Point", () => { relationshipsDeleted: Int! } + \\"\\"\\"Mutations for a list for CartesianPointInput\\"\\"\\" + input ListCartesianPointInputMutations { + pop: Int + push: [CartesianPointInput!] + set: [CartesianPointInput!] + } + type Machine { partLocations: [CartesianPoint!]! } @@ -528,17 +603,19 @@ describe("Point", () => { } input MachineUpdateInput { - partLocations_POP: Int - partLocations_PUSH: [CartesianPointInput!] - partLocations_SET: [CartesianPointInput!] + partLocations: ListCartesianPointInputMutations + partLocations_POP: Int @deprecated(reason: \\"Please use the generic mutation 'partLocations: { pop: ... } }' instead.\\") + partLocations_PUSH: [CartesianPointInput!] @deprecated(reason: \\"Please use the generic mutation 'partLocations: { push: ... } }' instead.\\") + partLocations_SET: [CartesianPointInput!] @deprecated(reason: \\"Please use the generic mutation 'partLocations: { set: ... } }' instead.\\") } input MachineWhere { AND: [MachineWhere!] NOT: MachineWhere OR: [MachineWhere!] - partLocations_EQ: [CartesianPointInput!] - partLocations_INCLUDES: CartesianPointInput + partLocations: CartesianPointListFilters + partLocations_EQ: [CartesianPointInput!] @deprecated(reason: \\"Please use the relevant generic filter partLocations: { eq: ... }\\") + partLocations_INCLUDES: CartesianPointInput @deprecated(reason: \\"Please use the relevant generic filter partLocations: { includes: ... }\\") } type MachinesConnection { diff --git a/packages/graphql/tests/schema/types/time.test.ts b/packages/graphql/tests/schema/types/time.test.ts index 0912b5574d..bc86494773 100644 --- a/packages/graphql/tests/schema/types/time.test.ts +++ b/packages/graphql/tests/schema/types/time.test.ts @@ -60,9 +60,18 @@ describe("Time", () => { relationshipsDeleted: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -72,7 +81,6 @@ describe("Time", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! time: TimeAggregateSelection! } @@ -95,25 +103,29 @@ describe("Time", () => { } input MovieUpdateInput { - id_SET: ID - time_SET: Time + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") + time: TimeScalarMutations + time_SET: Time @deprecated(reason: \\"Please use the generic mutation 'time: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID - time_EQ: Time - time_GT: Time - time_GTE: Time - time_IN: [Time] - time_LT: Time - time_LTE: Time + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + time: TimeScalarFilters + time_EQ: Time @deprecated(reason: \\"Please use the relevant generic filter time: { eq: ... }\\") + time_GT: Time @deprecated(reason: \\"Please use the relevant generic filter time: { gt: ... }\\") + time_GTE: Time @deprecated(reason: \\"Please use the relevant generic filter time: { gte: ... }\\") + time_IN: [Time] @deprecated(reason: \\"Please use the relevant generic filter time: { in: ... }\\") + time_LT: Time @deprecated(reason: \\"Please use the relevant generic filter time: { lt: ... }\\") + time_LTE: Time @deprecated(reason: \\"Please use the relevant generic filter time: { lte: ... }\\") } type MoviesConnection { @@ -158,6 +170,21 @@ describe("Time", () => { min: Time } + \\"\\"\\"Time filters\\"\\"\\" + input TimeScalarFilters { + eq: Time + gt: Time + gte: Time + in: [Time!] + lt: Time + lte: Time + } + + \\"\\"\\"Time mutations\\"\\"\\" + input TimeScalarMutations { + set: Time + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" diff --git a/packages/graphql/tests/schema/union-interface-relationship.test.ts b/packages/graphql/tests/schema/union-interface-relationship.test.ts index 4705d9d374..0d31e963f5 100644 --- a/packages/graphql/tests/schema/union-interface-relationship.test.ts +++ b/packages/graphql/tests/schema/union-interface-relationship.test.ts @@ -93,26 +93,27 @@ describe("Union Interface Relationships", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - screenTime_AVERAGE_EQUAL: Float - screenTime_AVERAGE_GT: Float - screenTime_AVERAGE_GTE: Float - screenTime_AVERAGE_LT: Float - screenTime_AVERAGE_LTE: Float - screenTime_MAX_EQUAL: Int - screenTime_MAX_GT: Int - screenTime_MAX_GTE: Int - screenTime_MAX_LT: Int - screenTime_MAX_LTE: Int - screenTime_MIN_EQUAL: Int - screenTime_MIN_GT: Int - screenTime_MIN_GTE: Int - screenTime_MIN_LT: Int - screenTime_MIN_LTE: Int - screenTime_SUM_EQUAL: Int - screenTime_SUM_GT: Int - screenTime_SUM_GTE: Int - screenTime_SUM_LT: Int - screenTime_SUM_LTE: Int + screenTime: IntScalarAggregationFilters + screenTime_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { eq: ... } } }' instead.\\") + screenTime_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gt: ... } } }' instead.\\") + screenTime_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { gte: ... } } }' instead.\\") + screenTime_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lt: ... } } }' instead.\\") + screenTime_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { average: { lte: ... } } }' instead.\\") + screenTime_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { eq: ... } } }' instead.\\") + screenTime_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gt: ... } } }' instead.\\") + screenTime_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { gte: ... } } }' instead.\\") + screenTime_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lt: ... } } }' instead.\\") + screenTime_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { max: { lte: ... } } }' instead.\\") + screenTime_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { eq: ... } } }' instead.\\") + screenTime_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gt: ... } } }' instead.\\") + screenTime_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { gte: ... } } }' instead.\\") + screenTime_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lt: ... } } }' instead.\\") + screenTime_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { min: { lte: ... } } }' instead.\\") + screenTime_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { eq: ... } } }' instead.\\") + screenTime_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gt: ... } } }' instead.\\") + screenTime_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { gte: ... } } }' instead.\\") + screenTime_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lt: ... } } }' instead.\\") + screenTime_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'screenTime: { sum: { lte: ... } } }' instead.\\") } input ActedInCreateInput { @@ -124,21 +125,23 @@ describe("Union Interface Relationships", () => { } input ActedInUpdateInput { - screenTime_DECREMENT: Int - screenTime_INCREMENT: Int - screenTime_SET: Int + screenTime: IntScalarMutations + screenTime_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { decrement: ... } }' instead.\\") + screenTime_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'screenTime: { increment: ... } }' instead.\\") + screenTime_SET: Int @deprecated(reason: \\"Please use the generic mutation 'screenTime: { set: ... } }' instead.\\") } input ActedInWhere { AND: [ActedInWhere!] NOT: ActedInWhere OR: [ActedInWhere!] - screenTime_EQ: Int - screenTime_GT: Int - screenTime_GTE: Int - screenTime_IN: [Int!] - screenTime_LT: Int - screenTime_LTE: Int + screenTime: IntScalarFilters + screenTime_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { eq: ... }\\") + screenTime_GT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gt: ... }\\") + screenTime_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { gte: ... }\\") + screenTime_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter screenTime: { in: ... }\\") + screenTime_LT: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lt: ... }\\") + screenTime_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter screenTime: { lte: ... }\\") } type Actor { @@ -201,6 +204,7 @@ describe("Union Interface Relationships", () => { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput OR: [ActorMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -222,6 +226,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 @@ -259,41 +282,43 @@ describe("Union Interface Relationships", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - imdbId_AVERAGE_EQUAL: Float - imdbId_AVERAGE_GT: Float - imdbId_AVERAGE_GTE: Float - imdbId_AVERAGE_LT: Float - imdbId_AVERAGE_LTE: Float - imdbId_MAX_EQUAL: Int - imdbId_MAX_GT: Int - imdbId_MAX_GTE: Int - imdbId_MAX_LT: Int - imdbId_MAX_LTE: Int - imdbId_MIN_EQUAL: Int - imdbId_MIN_GT: Int - imdbId_MIN_GTE: Int - imdbId_MIN_LT: Int - imdbId_MIN_LTE: Int - imdbId_SUM_EQUAL: Int - imdbId_SUM_GT: Int - imdbId_SUM_GTE: Int - imdbId_SUM_LT: Int - imdbId_SUM_LTE: Int - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + imdbId: IntScalarAggregationFilters + imdbId_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { average: { eq: ... } } }' instead.\\") + imdbId_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { average: { gt: ... } } }' instead.\\") + imdbId_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { average: { gte: ... } } }' instead.\\") + imdbId_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { average: { lt: ... } } }' instead.\\") + imdbId_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { average: { lte: ... } } }' instead.\\") + imdbId_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { max: { eq: ... } } }' instead.\\") + imdbId_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { max: { gt: ... } } }' instead.\\") + imdbId_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { max: { gte: ... } } }' instead.\\") + imdbId_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { max: { lt: ... } } }' instead.\\") + imdbId_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { max: { lte: ... } } }' instead.\\") + imdbId_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { min: { eq: ... } } }' instead.\\") + imdbId_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { min: { gt: ... } } }' instead.\\") + imdbId_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { min: { gte: ... } } }' instead.\\") + imdbId_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { min: { lt: ... } } }' instead.\\") + imdbId_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { min: { lte: ... } } }' instead.\\") + imdbId_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { sum: { eq: ... } } }' instead.\\") + imdbId_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { sum: { gt: ... } } }' instead.\\") + imdbId_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { sum: { gte: ... } } }' instead.\\") + imdbId_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { sum: { lt: ... } } }' instead.\\") + imdbId_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { sum: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type ActorMoviesRelationship { @@ -316,6 +341,17 @@ describe("Union Interface Relationships", () => { where: ActorMoviesConnectionWhere } + input ActorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" + all: ActorWhere + \\"\\"\\"Filter type where none of the related Actors match this filter\\"\\"\\" + none: ActorWhere + \\"\\"\\"Filter type where one of the related Actors match this filter\\"\\"\\" + single: ActorWhere + \\"\\"\\"Filter type where some of the related Actors match this filter\\"\\"\\" + some: ActorWhere + } + \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -325,53 +361,59 @@ describe("Union Interface Relationships", () => { } input ActorUpdateInput { - id_DECREMENT: Int - id_INCREMENT: Int - id_SET: Int + id: IntScalarMutations + id_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'id: { decrement: ... } }' instead.\\") + id_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'id: { increment: ... } }' instead.\\") + id_SET: Int @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") movies: [ActorMoviesUpdateFieldInput!] - name_SET: String + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") } input ActorWhere { AND: [ActorWhere!] NOT: ActorWhere OR: [ActorWhere!] - id_EQ: Int - id_GT: Int - id_GTE: Int - id_IN: [Int] - id_LT: Int - id_LTE: Int + id: IntScalarFilters + id_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_GT: Int @deprecated(reason: \\"Please use the relevant generic filter id: { gt: ... }\\") + id_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter id: { gte: ... }\\") + id_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_LT: Int @deprecated(reason: \\"Please use the relevant generic filter id: { lt: ... }\\") + id_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter id: { lte: ... }\\") + movies: MovieRelationshipFilters moviesAggregate: ActorMoviesAggregateInput + moviesConnection: ActorMoviesConnectionFilters \\"\\"\\" Return Actors where all of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: ActorMoviesConnectionWhere + moviesConnection_ALL: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where none of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: ActorMoviesConnectionWhere + moviesConnection_NONE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where one of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: ActorMoviesConnectionWhere + moviesConnection_SINGLE: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Actors where some of the related ActorMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: ActorMoviesConnectionWhere + moviesConnection_SOME: ActorMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Actors where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return Actors where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return Actors where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return Actors where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") } type ActorsConnection { @@ -433,30 +475,53 @@ describe("Union Interface Relationships", () => { } input DirectedUpdateInput { - year_DECREMENT: Int - year_INCREMENT: Int - year_SET: Int + year: IntScalarMutations + year_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'year: { decrement: ... } }' instead.\\") + year_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'year: { increment: ... } }' instead.\\") + year_SET: Int @deprecated(reason: \\"Please use the generic mutation 'year: { set: ... } }' instead.\\") } input DirectedWhere { AND: [DirectedWhere!] NOT: DirectedWhere OR: [DirectedWhere!] - year_EQ: Int - year_GT: Int - year_GTE: Int - year_IN: [Int!] - year_LT: Int - year_LTE: Int + year: IntScalarFilters + year_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter year: { eq: ... }\\") + year_GT: Int @deprecated(reason: \\"Please use the relevant generic filter year: { gt: ... }\\") + year_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter year: { gte: ... }\\") + year_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter year: { in: ... }\\") + year_LT: Int @deprecated(reason: \\"Please use the relevant generic filter year: { lt: ... }\\") + year_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter year: { lte: ... }\\") } union Director = Actor | Person + input DirectorRelationshipFilters { + \\"\\"\\"Filter type where all of the related Directors match this filter\\"\\"\\" + all: DirectorWhere + \\"\\"\\"Filter type where none of the related Directors match this filter\\"\\"\\" + none: DirectorWhere + \\"\\"\\"Filter type where one of the related Directors match this filter\\"\\"\\" + single: DirectorWhere + \\"\\"\\"Filter type where some of the related Directors match this filter\\"\\"\\" + some: DirectorWhere + } + input DirectorWhere { Actor: ActorWhere Person: PersonWhere } + \\"\\"\\"Float filters\\"\\"\\" + input FloatScalarFilters { + eq: Float + gt: Float + gte: Float + in: [Float!] + lt: Float + lte: Float + } + type Influencer implements Reviewer { reputation: Int! reviewerId: Int @@ -491,36 +556,42 @@ describe("Union Interface Relationships", () => { } input InfluencerUpdateInput { - reputation_DECREMENT: Int - reputation_INCREMENT: Int - reputation_SET: Int - reviewerId_DECREMENT: Int - reviewerId_INCREMENT: Int - reviewerId_SET: Int - url_SET: String + reputation: IntScalarMutations + reputation_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'reputation: { decrement: ... } }' instead.\\") + reputation_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'reputation: { increment: ... } }' instead.\\") + reputation_SET: Int @deprecated(reason: \\"Please use the generic mutation 'reputation: { set: ... } }' instead.\\") + reviewerId: IntScalarMutations + reviewerId_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'reviewerId: { decrement: ... } }' instead.\\") + reviewerId_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'reviewerId: { increment: ... } }' instead.\\") + reviewerId_SET: Int @deprecated(reason: \\"Please use the generic mutation 'reviewerId: { set: ... } }' instead.\\") + url: StringScalarMutations + url_SET: String @deprecated(reason: \\"Please use the generic mutation 'url: { set: ... } }' instead.\\") } input InfluencerWhere { AND: [InfluencerWhere!] NOT: InfluencerWhere OR: [InfluencerWhere!] - reputation_EQ: Int - reputation_GT: Int - reputation_GTE: Int - reputation_IN: [Int!] - reputation_LT: Int - reputation_LTE: Int - reviewerId_EQ: Int - reviewerId_GT: Int - reviewerId_GTE: Int - reviewerId_IN: [Int] - reviewerId_LT: Int - reviewerId_LTE: Int - url_CONTAINS: String - url_ENDS_WITH: String - url_EQ: String - url_IN: [String!] - url_STARTS_WITH: String + reputation: IntScalarFilters + reputation_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter reputation: { eq: ... }\\") + reputation_GT: Int @deprecated(reason: \\"Please use the relevant generic filter reputation: { gt: ... }\\") + reputation_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter reputation: { gte: ... }\\") + reputation_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter reputation: { in: ... }\\") + reputation_LT: Int @deprecated(reason: \\"Please use the relevant generic filter reputation: { lt: ... }\\") + reputation_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter reputation: { lte: ... }\\") + reviewerId: IntScalarFilters + reviewerId_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter reviewerId: { eq: ... }\\") + reviewerId_GT: Int @deprecated(reason: \\"Please use the relevant generic filter reviewerId: { gt: ... }\\") + reviewerId_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter reviewerId: { gte: ... }\\") + reviewerId_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter reviewerId: { in: ... }\\") + reviewerId_LT: Int @deprecated(reason: \\"Please use the relevant generic filter reviewerId: { lt: ... }\\") + reviewerId_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter reviewerId: { lte: ... }\\") + url: StringScalarFilters + url_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter url: { contains: ... }\\") + url_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter url: { endsWith: ... }\\") + url_EQ: String @deprecated(reason: \\"Please use the relevant generic filter url: { eq: ... }\\") + url_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter url: { in: ... }\\") + url_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter url: { startsWith: ... }\\") } type InfluencersConnection { @@ -536,6 +607,31 @@ describe("Union Interface Relationships", () => { sum: Int } + \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" + input IntScalarAggregationFilters { + average: FloatScalarFilters + max: IntScalarFilters + min: IntScalarFilters + sum: IntScalarFilters + } + + \\"\\"\\"Int filters\\"\\"\\" + input IntScalarFilters { + eq: Int + gt: Int + gte: Int + in: [Int!] + lt: Int + lte: Int + } + + \\"\\"\\"Int mutations\\"\\"\\" + input IntScalarMutations { + add: Int + set: Int + subtract: Int + } + type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @@ -568,6 +664,7 @@ describe("Union Interface Relationships", () => { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput OR: [MovieActorsAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -589,6 +686,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 @@ -626,41 +742,43 @@ describe("Union Interface Relationships", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - id_AVERAGE_EQUAL: Float - id_AVERAGE_GT: Float - id_AVERAGE_GTE: Float - id_AVERAGE_LT: Float - id_AVERAGE_LTE: Float - id_MAX_EQUAL: Int - id_MAX_GT: Int - id_MAX_GTE: Int - id_MAX_LT: Int - id_MAX_LTE: Int - id_MIN_EQUAL: Int - id_MIN_GT: Int - id_MIN_GTE: Int - id_MIN_LT: Int - id_MIN_LTE: Int - id_SUM_EQUAL: Int - id_SUM_GT: Int - id_SUM_GTE: Int - id_SUM_LT: Int - id_SUM_LTE: Int - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int + id: IntScalarAggregationFilters + id_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'id: { average: { eq: ... } } }' instead.\\") + id_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'id: { average: { gt: ... } } }' instead.\\") + id_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'id: { average: { gte: ... } } }' instead.\\") + id_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'id: { average: { lt: ... } } }' instead.\\") + id_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'id: { average: { lte: ... } } }' instead.\\") + id_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { max: { eq: ... } } }' instead.\\") + id_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { max: { gt: ... } } }' instead.\\") + id_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { max: { gte: ... } } }' instead.\\") + id_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { max: { lt: ... } } }' instead.\\") + id_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { max: { lte: ... } } }' instead.\\") + id_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { min: { eq: ... } } }' instead.\\") + id_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { min: { gt: ... } } }' instead.\\") + id_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { min: { gte: ... } } }' instead.\\") + id_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { min: { lt: ... } } }' instead.\\") + id_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { min: { lte: ... } } }' instead.\\") + id_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { sum: { eq: ... } } }' instead.\\") + id_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { sum: { gt: ... } } }' instead.\\") + id_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { sum: { gte: ... } } }' instead.\\") + id_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { sum: { lt: ... } } }' instead.\\") + id_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'id: { sum: { lte: ... } } }' instead.\\") + name: StringScalarAggregationFilters + name_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { eq: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { gte: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lt: ... } } }' instead.\\") + name_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'name: { averageLength: { lte: ... } } }' instead.\\") + name_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { eq: ... } } }' instead.\\") + name_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gt: ... } } }' instead.\\") + name_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { gte: ... } } }' instead.\\") + name_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lt: ... } } }' instead.\\") + name_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { longestLength: { lte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { eq: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { gte: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lt: ... } } }' instead.\\") + name_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'name: { shortestLength: { lte: ... } } }' instead.\\") } type MovieActorsRelationship { @@ -772,6 +890,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 } @@ -866,6 +1003,17 @@ describe("Union Interface Relationships", () => { node: Movie! } + input MovieRelationshipFilters { + \\"\\"\\"Filter type where all of the related Movies match this filter\\"\\"\\" + all: MovieWhere + \\"\\"\\"Filter type where none of the related Movies match this filter\\"\\"\\" + none: MovieWhere + \\"\\"\\"Filter type where one of the related Movies match this filter\\"\\"\\" + single: MovieWhere + \\"\\"\\"Filter type where some of the related Movies match this filter\\"\\"\\" + some: MovieWhere + } + type MovieReviewerReviewersAggregationSelection { count: Int! edge: MovieReviewerReviewersEdgeAggregateSelection @@ -885,6 +1033,7 @@ describe("Union Interface Relationships", () => { AND: [MovieReviewersAggregateInput!] NOT: MovieReviewersAggregateInput OR: [MovieReviewersAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -905,6 +1054,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 @@ -940,46 +1108,48 @@ describe("Union Interface Relationships", () => { AND: [MovieReviewersNodeAggregationWhereInput!] NOT: MovieReviewersNodeAggregationWhereInput OR: [MovieReviewersNodeAggregationWhereInput!] - reputation_AVERAGE_EQUAL: Float - reputation_AVERAGE_GT: Float - reputation_AVERAGE_GTE: Float - reputation_AVERAGE_LT: Float - reputation_AVERAGE_LTE: Float - reputation_MAX_EQUAL: Int - reputation_MAX_GT: Int - reputation_MAX_GTE: Int - reputation_MAX_LT: Int - reputation_MAX_LTE: Int - reputation_MIN_EQUAL: Int - reputation_MIN_GT: Int - reputation_MIN_GTE: Int - reputation_MIN_LT: Int - reputation_MIN_LTE: Int - reputation_SUM_EQUAL: Int - reputation_SUM_GT: Int - reputation_SUM_GTE: Int - reputation_SUM_LT: Int - reputation_SUM_LTE: Int - reviewerId_AVERAGE_EQUAL: Float - reviewerId_AVERAGE_GT: Float - reviewerId_AVERAGE_GTE: Float - reviewerId_AVERAGE_LT: Float - reviewerId_AVERAGE_LTE: Float - reviewerId_MAX_EQUAL: Int - reviewerId_MAX_GT: Int - reviewerId_MAX_GTE: Int - reviewerId_MAX_LT: Int - reviewerId_MAX_LTE: Int - reviewerId_MIN_EQUAL: Int - reviewerId_MIN_GT: Int - reviewerId_MIN_GTE: Int - reviewerId_MIN_LT: Int - reviewerId_MIN_LTE: Int - reviewerId_SUM_EQUAL: Int - reviewerId_SUM_GT: Int - reviewerId_SUM_GTE: Int - reviewerId_SUM_LT: Int - reviewerId_SUM_LTE: Int + reputation: IntScalarAggregationFilters + reputation_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'reputation: { average: { eq: ... } } }' instead.\\") + reputation_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'reputation: { average: { gt: ... } } }' instead.\\") + reputation_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'reputation: { average: { gte: ... } } }' instead.\\") + reputation_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'reputation: { average: { lt: ... } } }' instead.\\") + reputation_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'reputation: { average: { lte: ... } } }' instead.\\") + reputation_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'reputation: { max: { eq: ... } } }' instead.\\") + reputation_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'reputation: { max: { gt: ... } } }' instead.\\") + reputation_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'reputation: { max: { gte: ... } } }' instead.\\") + reputation_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'reputation: { max: { lt: ... } } }' instead.\\") + reputation_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'reputation: { max: { lte: ... } } }' instead.\\") + reputation_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'reputation: { min: { eq: ... } } }' instead.\\") + reputation_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'reputation: { min: { gt: ... } } }' instead.\\") + reputation_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'reputation: { min: { gte: ... } } }' instead.\\") + reputation_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'reputation: { min: { lt: ... } } }' instead.\\") + reputation_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'reputation: { min: { lte: ... } } }' instead.\\") + reputation_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'reputation: { sum: { eq: ... } } }' instead.\\") + reputation_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'reputation: { sum: { gt: ... } } }' instead.\\") + reputation_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'reputation: { sum: { gte: ... } } }' instead.\\") + reputation_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'reputation: { sum: { lt: ... } } }' instead.\\") + reputation_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'reputation: { sum: { lte: ... } } }' instead.\\") + reviewerId: IntScalarAggregationFilters + reviewerId_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'reviewerId: { average: { eq: ... } } }' instead.\\") + reviewerId_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'reviewerId: { average: { gt: ... } } }' instead.\\") + reviewerId_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'reviewerId: { average: { gte: ... } } }' instead.\\") + reviewerId_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'reviewerId: { average: { lt: ... } } }' instead.\\") + reviewerId_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'reviewerId: { average: { lte: ... } } }' instead.\\") + reviewerId_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'reviewerId: { max: { eq: ... } } }' instead.\\") + reviewerId_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'reviewerId: { max: { gt: ... } } }' instead.\\") + reviewerId_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'reviewerId: { max: { gte: ... } } }' instead.\\") + reviewerId_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'reviewerId: { max: { lt: ... } } }' instead.\\") + reviewerId_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'reviewerId: { max: { lte: ... } } }' instead.\\") + reviewerId_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'reviewerId: { min: { eq: ... } } }' instead.\\") + reviewerId_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'reviewerId: { min: { gt: ... } } }' instead.\\") + reviewerId_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'reviewerId: { min: { gte: ... } } }' instead.\\") + reviewerId_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'reviewerId: { min: { lt: ... } } }' instead.\\") + reviewerId_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'reviewerId: { min: { lte: ... } } }' instead.\\") + reviewerId_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'reviewerId: { sum: { eq: ... } } }' instead.\\") + reviewerId_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'reviewerId: { sum: { gt: ... } } }' instead.\\") + reviewerId_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'reviewerId: { sum: { gte: ... } } }' instead.\\") + reviewerId_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'reviewerId: { sum: { lt: ... } } }' instead.\\") + reviewerId_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'reviewerId: { sum: { lte: ... } } }' instead.\\") } type MovieReviewersRelationship { @@ -1013,102 +1183,112 @@ describe("Union Interface Relationships", () => { input MovieUpdateInput { actors: [MovieActorsUpdateFieldInput!] directors: MovieDirectorsUpdateInput - imdbId_DECREMENT: Int - imdbId_INCREMENT: Int - imdbId_SET: Int + imdbId: IntScalarMutations + imdbId_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'imdbId: { decrement: ... } }' instead.\\") + imdbId_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'imdbId: { increment: ... } }' instead.\\") + imdbId_SET: Int @deprecated(reason: \\"Please use the generic mutation 'imdbId: { set: ... } }' instead.\\") reviewers: [MovieReviewersUpdateFieldInput!] - title_SET: String + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] + actors: ActorRelationshipFilters actorsAggregate: MovieActorsAggregateInput + actorsConnection: MovieActorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_ALL: MovieActorsConnectionWhere + actorsConnection_ALL: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_NONE: MovieActorsConnectionWhere + actorsConnection_NONE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SINGLE: MovieActorsConnectionWhere + actorsConnection_SINGLE: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieActorsConnections match this filter \\"\\"\\" - actorsConnection_SOME: MovieActorsConnectionWhere + actorsConnection_SOME: MovieActorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'actorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Actors match this filter\\"\\"\\" - actors_ALL: ActorWhere + actors_ALL: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Actors match this filter\\"\\"\\" - actors_NONE: ActorWhere + actors_NONE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Actors match this filter\\"\\"\\" - actors_SINGLE: ActorWhere + actors_SINGLE: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Actors match this filter\\"\\"\\" - actors_SOME: ActorWhere + actors_SOME: ActorWhere @deprecated(reason: \\"Please use the relevant generic filter 'actors: { some: ... }' instead.\\") + directors: DirectorRelationshipFilters + directorsConnection: MovieDirectorsConnectionFilters \\"\\"\\" Return Movies where all of the related MovieDirectorsConnections match this filter \\"\\"\\" - directorsConnection_ALL: MovieDirectorsConnectionWhere + directorsConnection_ALL: MovieDirectorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorsConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieDirectorsConnections match this filter \\"\\"\\" - directorsConnection_NONE: MovieDirectorsConnectionWhere + directorsConnection_NONE: MovieDirectorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorsConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieDirectorsConnections match this filter \\"\\"\\" - directorsConnection_SINGLE: MovieDirectorsConnectionWhere + directorsConnection_SINGLE: MovieDirectorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorsConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieDirectorsConnections match this filter \\"\\"\\" - directorsConnection_SOME: MovieDirectorsConnectionWhere + directorsConnection_SOME: MovieDirectorsConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'directorsConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Directors match this filter\\"\\"\\" - directors_ALL: DirectorWhere + directors_ALL: DirectorWhere @deprecated(reason: \\"Please use the relevant generic filter 'directors: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Directors match this filter\\"\\"\\" - directors_NONE: DirectorWhere + directors_NONE: DirectorWhere @deprecated(reason: \\"Please use the relevant generic filter 'directors: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Directors match this filter\\"\\"\\" - directors_SINGLE: DirectorWhere + directors_SINGLE: DirectorWhere @deprecated(reason: \\"Please use the relevant generic filter 'directors: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Directors match this filter\\"\\"\\" - directors_SOME: DirectorWhere - imdbId_EQ: Int - imdbId_GT: Int - imdbId_GTE: Int - imdbId_IN: [Int] - imdbId_LT: Int - imdbId_LTE: Int + directors_SOME: DirectorWhere @deprecated(reason: \\"Please use the relevant generic filter 'directors: { some: ... }' instead.\\") + imdbId: IntScalarFilters + imdbId_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter imdbId: { eq: ... }\\") + imdbId_GT: Int @deprecated(reason: \\"Please use the relevant generic filter imdbId: { gt: ... }\\") + imdbId_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter imdbId: { gte: ... }\\") + imdbId_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter imdbId: { in: ... }\\") + imdbId_LT: Int @deprecated(reason: \\"Please use the relevant generic filter imdbId: { lt: ... }\\") + imdbId_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter imdbId: { lte: ... }\\") + reviewers: ReviewerRelationshipFilters reviewersAggregate: MovieReviewersAggregateInput + reviewersConnection: MovieReviewersConnectionFilters \\"\\"\\" Return Movies where all of the related MovieReviewersConnections match this filter \\"\\"\\" - reviewersConnection_ALL: MovieReviewersConnectionWhere + reviewersConnection_ALL: MovieReviewersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'reviewersConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieReviewersConnections match this filter \\"\\"\\" - reviewersConnection_NONE: MovieReviewersConnectionWhere + reviewersConnection_NONE: MovieReviewersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'reviewersConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieReviewersConnections match this filter \\"\\"\\" - reviewersConnection_SINGLE: MovieReviewersConnectionWhere + reviewersConnection_SINGLE: MovieReviewersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'reviewersConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieReviewersConnections match this filter \\"\\"\\" - reviewersConnection_SOME: MovieReviewersConnectionWhere + reviewersConnection_SOME: MovieReviewersConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'reviewersConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Reviewers match this filter\\"\\"\\" - reviewers_ALL: ReviewerWhere + reviewers_ALL: ReviewerWhere @deprecated(reason: \\"Please use the relevant generic filter 'reviewers: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Reviewers match this filter\\"\\"\\" - reviewers_NONE: ReviewerWhere + reviewers_NONE: ReviewerWhere @deprecated(reason: \\"Please use the relevant generic filter 'reviewers: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Reviewers match this filter\\"\\"\\" - reviewers_SINGLE: ReviewerWhere + reviewers_SINGLE: ReviewerWhere @deprecated(reason: \\"Please use the relevant generic filter 'reviewers: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Reviewers match this filter\\"\\"\\" - reviewers_SOME: ReviewerWhere - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String!] - title_STARTS_WITH: String + reviewers_SOME: ReviewerWhere @deprecated(reason: \\"Please use the relevant generic filter 'reviewers: { some: ... }' instead.\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -1212,6 +1392,7 @@ describe("Union Interface Relationships", () => { AND: [PersonMoviesAggregateInput!] NOT: PersonMoviesAggregateInput OR: [PersonMoviesAggregateInput!] + count: IntScalarFilters count_EQ: Int count_GT: Int count_GTE: Int @@ -1233,6 +1414,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 @@ -1270,41 +1470,43 @@ describe("Union Interface Relationships", () => { AND: [PersonMoviesNodeAggregationWhereInput!] NOT: PersonMoviesNodeAggregationWhereInput OR: [PersonMoviesNodeAggregationWhereInput!] - imdbId_AVERAGE_EQUAL: Float - imdbId_AVERAGE_GT: Float - imdbId_AVERAGE_GTE: Float - imdbId_AVERAGE_LT: Float - imdbId_AVERAGE_LTE: Float - imdbId_MAX_EQUAL: Int - imdbId_MAX_GT: Int - imdbId_MAX_GTE: Int - imdbId_MAX_LT: Int - imdbId_MAX_LTE: Int - imdbId_MIN_EQUAL: Int - imdbId_MIN_GT: Int - imdbId_MIN_GTE: Int - imdbId_MIN_LT: Int - imdbId_MIN_LTE: Int - imdbId_SUM_EQUAL: Int - imdbId_SUM_GT: Int - imdbId_SUM_GTE: Int - imdbId_SUM_LT: Int - imdbId_SUM_LTE: Int - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int + imdbId: IntScalarAggregationFilters + imdbId_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { average: { eq: ... } } }' instead.\\") + imdbId_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { average: { gt: ... } } }' instead.\\") + imdbId_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { average: { gte: ... } } }' instead.\\") + imdbId_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { average: { lt: ... } } }' instead.\\") + imdbId_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { average: { lte: ... } } }' instead.\\") + imdbId_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { max: { eq: ... } } }' instead.\\") + imdbId_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { max: { gt: ... } } }' instead.\\") + imdbId_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { max: { gte: ... } } }' instead.\\") + imdbId_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { max: { lt: ... } } }' instead.\\") + imdbId_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { max: { lte: ... } } }' instead.\\") + imdbId_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { min: { eq: ... } } }' instead.\\") + imdbId_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { min: { gt: ... } } }' instead.\\") + imdbId_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { min: { gte: ... } } }' instead.\\") + imdbId_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { min: { lt: ... } } }' instead.\\") + imdbId_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { min: { lte: ... } } }' instead.\\") + imdbId_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { sum: { eq: ... } } }' instead.\\") + imdbId_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { sum: { gt: ... } } }' instead.\\") + imdbId_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { sum: { gte: ... } } }' instead.\\") + imdbId_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { sum: { lt: ... } } }' instead.\\") + imdbId_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'imdbId: { sum: { lte: ... } } }' instead.\\") + title: StringScalarAggregationFilters + title_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { eq: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { gte: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lt: ... } } }' instead.\\") + title_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'title: { averageLength: { lte: ... } } }' instead.\\") + title_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { eq: ... } } }' instead.\\") + title_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gt: ... } } }' instead.\\") + title_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { gte: ... } } }' instead.\\") + title_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lt: ... } } }' instead.\\") + title_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { longestLength: { lte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { eq: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { gte: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lt: ... } } }' instead.\\") + title_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'title: { shortestLength: { lte: ... } } }' instead.\\") } type PersonMoviesRelationship { @@ -1338,71 +1540,81 @@ describe("Union Interface Relationships", () => { } input PersonUpdateInput { - id_DECREMENT: Int - id_INCREMENT: Int - id_SET: Int + id: IntScalarMutations + id_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'id: { decrement: ... } }' instead.\\") + id_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'id: { increment: ... } }' instead.\\") + id_SET: Int @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") movies: [PersonMoviesUpdateFieldInput!] - name_SET: String - reputation_DECREMENT: Int - reputation_INCREMENT: Int - reputation_SET: Int - reviewerId_DECREMENT: Int - reviewerId_INCREMENT: Int - reviewerId_SET: Int + name: StringScalarMutations + name_SET: String @deprecated(reason: \\"Please use the generic mutation 'name: { set: ... } }' instead.\\") + reputation: IntScalarMutations + reputation_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'reputation: { decrement: ... } }' instead.\\") + reputation_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'reputation: { increment: ... } }' instead.\\") + reputation_SET: Int @deprecated(reason: \\"Please use the generic mutation 'reputation: { set: ... } }' instead.\\") + reviewerId: IntScalarMutations + reviewerId_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'reviewerId: { decrement: ... } }' instead.\\") + reviewerId_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'reviewerId: { increment: ... } }' instead.\\") + reviewerId_SET: Int @deprecated(reason: \\"Please use the generic mutation 'reviewerId: { set: ... } }' instead.\\") } input PersonWhere { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - id_EQ: Int - id_GT: Int - id_GTE: Int - id_IN: [Int] - id_LT: Int - id_LTE: Int + id: IntScalarFilters + id_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_GT: Int @deprecated(reason: \\"Please use the relevant generic filter id: { gt: ... }\\") + id_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter id: { gte: ... }\\") + id_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_LT: Int @deprecated(reason: \\"Please use the relevant generic filter id: { lt: ... }\\") + id_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter id: { lte: ... }\\") + movies: MovieRelationshipFilters moviesAggregate: PersonMoviesAggregateInput + moviesConnection: PersonMoviesConnectionFilters \\"\\"\\" Return People where all of the related PersonMoviesConnections match this filter \\"\\"\\" - moviesConnection_ALL: PersonMoviesConnectionWhere + moviesConnection_ALL: PersonMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return People where none of the related PersonMoviesConnections match this filter \\"\\"\\" - moviesConnection_NONE: PersonMoviesConnectionWhere + moviesConnection_NONE: PersonMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return People where one of the related PersonMoviesConnections match this filter \\"\\"\\" - moviesConnection_SINGLE: PersonMoviesConnectionWhere + moviesConnection_SINGLE: PersonMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return People where some of the related PersonMoviesConnections match this filter \\"\\"\\" - moviesConnection_SOME: PersonMoviesConnectionWhere + moviesConnection_SOME: PersonMoviesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'moviesConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return People where all of the related Movies match this filter\\"\\"\\" - movies_ALL: MovieWhere + movies_ALL: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { all: ... }' instead.\\") \\"\\"\\"Return People where none of the related Movies match this filter\\"\\"\\" - movies_NONE: MovieWhere + movies_NONE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { none: ... }' instead.\\") \\"\\"\\"Return People where one of the related Movies match this filter\\"\\"\\" - movies_SINGLE: MovieWhere + movies_SINGLE: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { single: ... }' instead.\\") \\"\\"\\"Return People where some of the related Movies match this filter\\"\\"\\" - movies_SOME: MovieWhere - name_CONTAINS: String - name_ENDS_WITH: String - name_EQ: String - name_IN: [String!] - name_STARTS_WITH: String - reputation_EQ: Int - reputation_GT: Int - reputation_GTE: Int - reputation_IN: [Int!] - reputation_LT: Int - reputation_LTE: Int - reviewerId_EQ: Int - reviewerId_GT: Int - reviewerId_GTE: Int - reviewerId_IN: [Int] - reviewerId_LT: Int - reviewerId_LTE: Int + movies_SOME: MovieWhere @deprecated(reason: \\"Please use the relevant generic filter 'movies: { some: ... }' instead.\\") + name: StringScalarFilters + name_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter name: { contains: ... }\\") + name_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { endsWith: ... }\\") + name_EQ: String @deprecated(reason: \\"Please use the relevant generic filter name: { eq: ... }\\") + name_IN: [String!] @deprecated(reason: \\"Please use the relevant generic filter name: { in: ... }\\") + name_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter name: { startsWith: ... }\\") + reputation: IntScalarFilters + reputation_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter reputation: { eq: ... }\\") + reputation_GT: Int @deprecated(reason: \\"Please use the relevant generic filter reputation: { gt: ... }\\") + reputation_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter reputation: { gte: ... }\\") + reputation_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter reputation: { in: ... }\\") + reputation_LT: Int @deprecated(reason: \\"Please use the relevant generic filter reputation: { lt: ... }\\") + reputation_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter reputation: { lte: ... }\\") + reviewerId: IntScalarFilters + reviewerId_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter reviewerId: { eq: ... }\\") + reviewerId_GT: Int @deprecated(reason: \\"Please use the relevant generic filter reviewerId: { gt: ... }\\") + reviewerId_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter reviewerId: { gte: ... }\\") + reviewerId_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter reviewerId: { in: ... }\\") + reviewerId_LT: Int @deprecated(reason: \\"Please use the relevant generic filter reviewerId: { lt: ... }\\") + reviewerId_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter reviewerId: { lte: ... }\\") } type Query { @@ -1437,26 +1649,27 @@ describe("Union Interface Relationships", () => { AND: [ReviewAggregationWhereInput!] NOT: ReviewAggregationWhereInput OR: [ReviewAggregationWhereInput!] - score_AVERAGE_EQUAL: Float - score_AVERAGE_GT: Float - score_AVERAGE_GTE: Float - score_AVERAGE_LT: Float - score_AVERAGE_LTE: Float - score_MAX_EQUAL: Int - score_MAX_GT: Int - score_MAX_GTE: Int - score_MAX_LT: Int - score_MAX_LTE: Int - score_MIN_EQUAL: Int - score_MIN_GT: Int - score_MIN_GTE: Int - score_MIN_LT: Int - score_MIN_LTE: Int - score_SUM_EQUAL: Int - score_SUM_GT: Int - score_SUM_GTE: Int - score_SUM_LT: Int - score_SUM_LTE: Int + score: IntScalarAggregationFilters + score_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'score: { average: { eq: ... } } }' instead.\\") + score_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'score: { average: { gt: ... } } }' instead.\\") + score_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'score: { average: { gte: ... } } }' instead.\\") + score_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'score: { average: { lt: ... } } }' instead.\\") + score_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'score: { average: { lte: ... } } }' instead.\\") + score_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'score: { max: { eq: ... } } }' instead.\\") + score_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'score: { max: { gt: ... } } }' instead.\\") + score_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'score: { max: { gte: ... } } }' instead.\\") + score_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'score: { max: { lt: ... } } }' instead.\\") + score_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'score: { max: { lte: ... } } }' instead.\\") + score_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'score: { min: { eq: ... } } }' instead.\\") + score_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'score: { min: { gt: ... } } }' instead.\\") + score_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'score: { min: { gte: ... } } }' instead.\\") + score_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'score: { min: { lt: ... } } }' instead.\\") + score_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'score: { min: { lte: ... } } }' instead.\\") + score_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'score: { sum: { eq: ... } } }' instead.\\") + score_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'score: { sum: { gt: ... } } }' instead.\\") + score_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'score: { sum: { gte: ... } } }' instead.\\") + score_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'score: { sum: { lt: ... } } }' instead.\\") + score_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'score: { sum: { lte: ... } } }' instead.\\") } input ReviewCreateInput { @@ -1468,21 +1681,23 @@ describe("Union Interface Relationships", () => { } input ReviewUpdateInput { - score_DECREMENT: Int - score_INCREMENT: Int - score_SET: Int + score: IntScalarMutations + score_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'score: { decrement: ... } }' instead.\\") + score_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'score: { increment: ... } }' instead.\\") + score_SET: Int @deprecated(reason: \\"Please use the generic mutation 'score: { set: ... } }' instead.\\") } input ReviewWhere { AND: [ReviewWhere!] NOT: ReviewWhere OR: [ReviewWhere!] - score_EQ: Int - score_GT: Int - score_GTE: Int - score_IN: [Int!] - score_LT: Int - score_LTE: Int + score: IntScalarFilters + score_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter score: { eq: ... }\\") + score_GT: Int @deprecated(reason: \\"Please use the relevant generic filter score: { gt: ... }\\") + score_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter score: { gte: ... }\\") + score_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter score: { in: ... }\\") + score_LT: Int @deprecated(reason: \\"Please use the relevant generic filter score: { lt: ... }\\") + score_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter score: { lte: ... }\\") } interface Reviewer { @@ -1515,6 +1730,17 @@ describe("Union Interface Relationships", () => { Person } + input ReviewerRelationshipFilters { + \\"\\"\\"Filter type where all of the related Reviewers match this filter\\"\\"\\" + all: ReviewerWhere + \\"\\"\\"Filter type where none of the related Reviewers match this filter\\"\\"\\" + none: ReviewerWhere + \\"\\"\\"Filter type where one of the related Reviewers match this filter\\"\\"\\" + single: ReviewerWhere + \\"\\"\\"Filter type where some of the related Reviewers match this filter\\"\\"\\" + some: ReviewerWhere + } + \\"\\"\\" Fields to sort Reviewers by. The order in which sorts are applied is not guaranteed when specifying many fields in one ReviewerSort object. \\"\\"\\" @@ -1524,31 +1750,35 @@ describe("Union Interface Relationships", () => { } input ReviewerUpdateInput { - reputation_DECREMENT: Int - reputation_INCREMENT: Int - reputation_SET: Int - reviewerId_DECREMENT: Int - reviewerId_INCREMENT: Int - reviewerId_SET: Int + reputation: IntScalarMutations + reputation_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'reputation: { decrement: ... } }' instead.\\") + reputation_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'reputation: { increment: ... } }' instead.\\") + reputation_SET: Int @deprecated(reason: \\"Please use the generic mutation 'reputation: { set: ... } }' instead.\\") + reviewerId: IntScalarMutations + reviewerId_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'reviewerId: { decrement: ... } }' instead.\\") + reviewerId_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'reviewerId: { increment: ... } }' instead.\\") + reviewerId_SET: Int @deprecated(reason: \\"Please use the generic mutation 'reviewerId: { set: ... } }' instead.\\") } input ReviewerWhere { AND: [ReviewerWhere!] NOT: ReviewerWhere OR: [ReviewerWhere!] - reputation_EQ: Int - reputation_GT: Int - reputation_GTE: Int - reputation_IN: [Int!] - reputation_LT: Int - reputation_LTE: Int - reviewerId_EQ: Int - reviewerId_GT: Int - reviewerId_GTE: Int - reviewerId_IN: [Int] - reviewerId_LT: Int - reviewerId_LTE: Int - typename_IN: [ReviewerImplementation!] + reputation: IntScalarFilters + reputation_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter reputation: { eq: ... }\\") + reputation_GT: Int @deprecated(reason: \\"Please use the relevant generic filter reputation: { gt: ... }\\") + reputation_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter reputation: { gte: ... }\\") + reputation_IN: [Int!] @deprecated(reason: \\"Please use the relevant generic filter reputation: { in: ... }\\") + reputation_LT: Int @deprecated(reason: \\"Please use the relevant generic filter reputation: { lt: ... }\\") + reputation_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter reputation: { lte: ... }\\") + reviewerId: IntScalarFilters + reviewerId_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter reviewerId: { eq: ... }\\") + reviewerId_GT: Int @deprecated(reason: \\"Please use the relevant generic filter reviewerId: { gt: ... }\\") + reviewerId_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter reviewerId: { gte: ... }\\") + reviewerId_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter reviewerId: { in: ... }\\") + reviewerId_LT: Int @deprecated(reason: \\"Please use the relevant generic filter reviewerId: { lt: ... }\\") + reviewerId_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter reviewerId: { lte: ... }\\") + typename: [ReviewerImplementation!] } type ReviewersConnection { @@ -1570,6 +1800,27 @@ describe("Union Interface Relationships", () => { shortest: String } + \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" + input StringScalarAggregationFilters { + averageLength: FloatScalarFilters + longestLength: IntScalarFilters + shortestLength: IntScalarFilters + } + + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + type UpdateActorsMutationResponse { actors: [Actor!]! info: UpdateInfo! diff --git a/packages/graphql/tests/schema/unions.test.ts b/packages/graphql/tests/schema/unions.test.ts index f6a937b147..104c4dfd91 100644 --- a/packages/graphql/tests/schema/unions.test.ts +++ b/packages/graphql/tests/schema/unions.test.ts @@ -78,7 +78,6 @@ describe("Unions", () => { type GenreAggregateSelection { count: Int! - id: IDAggregateSelection! } input GenreConnectWhere { @@ -102,18 +101,20 @@ describe("Unions", () => { } input GenreUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } input GenreWhere { AND: [GenreWhere!] NOT: GenreWhere OR: [GenreWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") } type GenresConnection { @@ -122,9 +123,18 @@ describe("Unions", () => { totalCount: Int! } - type IDAggregateSelection { - longest: ID - shortest: ID + \\"\\"\\"ID filters\\"\\"\\" + input IDScalarFilters { + contains: ID + endsWith: ID + eq: ID + in: [ID!] + startsWith: ID + } + + \\"\\"\\"ID mutations\\"\\"\\" + input IDScalarMutations { + set: ID } type Movie { @@ -136,7 +146,6 @@ describe("Unions", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! } input MovieConnectInput { @@ -176,6 +185,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 @@ -299,7 +327,8 @@ describe("Unions", () => { } input MovieUpdateInput { - id_SET: ID + id: IDScalarMutations + id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") search: MovieSearchUpdateInput } @@ -307,35 +336,38 @@ describe("Unions", () => { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - id_CONTAINS: ID - id_ENDS_WITH: ID - id_EQ: ID - id_IN: [ID] - id_STARTS_WITH: ID + id: IDScalarFilters + id_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter id: { contains: ... }\\") + id_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { endsWith: ... }\\") + id_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter id: { eq: ... }\\") + id_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter id: { in: ... }\\") + id_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter id: { startsWith: ... }\\") + search: SearchRelationshipFilters + searchConnection: MovieSearchConnectionFilters \\"\\"\\" Return Movies where all of the related MovieSearchConnections match this filter \\"\\"\\" - searchConnection_ALL: MovieSearchConnectionWhere + searchConnection_ALL: MovieSearchConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'searchConnection: { all: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where none of the related MovieSearchConnections match this filter \\"\\"\\" - searchConnection_NONE: MovieSearchConnectionWhere + searchConnection_NONE: MovieSearchConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'searchConnection: { none: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where one of the related MovieSearchConnections match this filter \\"\\"\\" - searchConnection_SINGLE: MovieSearchConnectionWhere + searchConnection_SINGLE: MovieSearchConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'searchConnection: { single: { node: ... } } }' instead.\\") \\"\\"\\" Return Movies where some of the related MovieSearchConnections match this filter \\"\\"\\" - searchConnection_SOME: MovieSearchConnectionWhere + searchConnection_SOME: MovieSearchConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'searchConnection: { some: { node: ... } } }' instead.\\") \\"\\"\\"Return Movies where all of the related Searches match this filter\\"\\"\\" - search_ALL: SearchWhere + search_ALL: SearchWhere @deprecated(reason: \\"Please use the relevant generic filter 'search: { all: ... }' instead.\\") \\"\\"\\"Return Movies where none of the related Searches match this filter\\"\\"\\" - search_NONE: SearchWhere + search_NONE: SearchWhere @deprecated(reason: \\"Please use the relevant generic filter 'search: { none: ... }' instead.\\") \\"\\"\\"Return Movies where one of the related Searches match this filter\\"\\"\\" - search_SINGLE: SearchWhere + search_SINGLE: SearchWhere @deprecated(reason: \\"Please use the relevant generic filter 'search: { single: ... }' instead.\\") \\"\\"\\"Return Movies where some of the related Searches match this filter\\"\\"\\" - search_SOME: SearchWhere + search_SOME: SearchWhere @deprecated(reason: \\"Please use the relevant generic filter 'search: { some: ... }' instead.\\") } type MoviesConnection { @@ -373,6 +405,17 @@ describe("Unions", () => { union Search = Genre | Movie + input SearchRelationshipFilters { + \\"\\"\\"Filter type where all of the related Searches match this filter\\"\\"\\" + all: SearchWhere + \\"\\"\\"Filter type where none of the related Searches match this filter\\"\\"\\" + none: SearchWhere + \\"\\"\\"Filter type where one of the related Searches match this filter\\"\\"\\" + single: SearchWhere + \\"\\"\\"Filter type where some of the related Searches match this filter\\"\\"\\" + some: SearchWhere + } + input SearchWhere { Genre: GenreWhere Movie: MovieWhere diff --git a/packages/graphql/tests/schema/vector.test.ts b/packages/graphql/tests/schema/vector.test.ts index d28798ded1..8ead638dc1 100644 --- a/packages/graphql/tests/schema/vector.test.ts +++ b/packages/graphql/tests/schema/vector.test.ts @@ -126,24 +126,28 @@ describe("@vector schema", () => { } input MovieUpdateInput { - description_SET: String - title_SET: String + description: StringScalarMutations + description_SET: String @deprecated(reason: \\"Please use the generic mutation 'description: { set: ... } }' instead.\\") + title: StringScalarMutations + title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") } input MovieWhere { AND: [MovieWhere!] NOT: MovieWhere OR: [MovieWhere!] - description_CONTAINS: String - description_ENDS_WITH: String - description_EQ: String - description_IN: [String] - description_STARTS_WITH: String - title_CONTAINS: String - title_ENDS_WITH: String - title_EQ: String - title_IN: [String] - title_STARTS_WITH: String + description: StringScalarFilters + description_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter description: { contains: ... }\\") + description_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { endsWith: ... }\\") + description_EQ: String @deprecated(reason: \\"Please use the relevant generic filter description: { eq: ... }\\") + description_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter description: { in: ... }\\") + description_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter description: { startsWith: ... }\\") + title: StringScalarFilters + title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") + title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") + title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") + title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") + title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") } type MoviesConnection { @@ -193,6 +197,20 @@ describe("@vector schema", () => { shortest: String } + \\"\\"\\"String filters\\"\\"\\" + input StringScalarFilters { + contains: String + endsWith: String + eq: String + in: [String!] + startsWith: String + } + + \\"\\"\\"String mutations\\"\\"\\" + input StringScalarMutations { + set: String + } + \\"\\"\\" Information about the number of nodes and relationships created and deleted during an update mutation \\"\\"\\" diff --git a/packages/graphql/tests/tck/advanced-filtering.test.ts b/packages/graphql/tests/tck/advanced-filtering.test.ts index fccc7bc159..05b8cc7e64 100644 --- a/packages/graphql/tests/tck/advanced-filtering.test.ts +++ b/packages/graphql/tests/tck/advanced-filtering.test.ts @@ -60,10 +60,10 @@ describe("Cypher Advanced Filtering", () => { }); }); - test("implicit EQ", async () => { + test("equals", async () => { const query = /* GraphQL */ ` { - movies(where: { title_EQ: "The Matrix" }) { + movies(where: { title: { eq: "The Matrix" } }) { title } } @@ -84,34 +84,10 @@ describe("Cypher Advanced Filtering", () => { `); }); - test("EQ", async () => { + test("in", 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("IN", async () => { - const query = /* GraphQL */ ` - { - movies(where: { _id_IN: ["123"] }) { + movies(where: { _id: { in: ["123"] } }) { _id } } @@ -134,10 +110,10 @@ describe("Cypher Advanced Filtering", () => { `); }); - test("REGEX", async () => { + test("matches", async () => { const query = /* GraphQL */ ` { - movies(where: { id_MATCHES: "(?i)123.*" }) { + movies(where: { id: { matches: "(?i)123.*" } }) { id } } @@ -161,7 +137,7 @@ describe("Cypher Advanced Filtering", () => { test("NOT", async () => { const query = /* GraphQL */ ` { - movies(where: { NOT: { id_EQ: "123" } }) { + movies(where: { NOT: { id: { eq: "123" } } }) { id } } @@ -182,10 +158,10 @@ describe("Cypher Advanced Filtering", () => { `); }); - test("CONTAINS", async () => { + test("contains", async () => { const query = /* GraphQL */ ` { - movies(where: { id_CONTAINS: "123" }) { + movies(where: { id: { contains: "123" } }) { id } } @@ -206,10 +182,10 @@ describe("Cypher Advanced Filtering", () => { `); }); - test("STARTS_WITH", async () => { + test("startsWith", async () => { const query = /* GraphQL */ ` { - movies(where: { id_STARTS_WITH: "123" }) { + movies(where: { id: { startsWith: "123" } }) { id } } @@ -230,10 +206,10 @@ describe("Cypher Advanced Filtering", () => { `); }); - test("ENDS_WITH", async () => { + test("endsWith", async () => { const query = /* GraphQL */ ` { - movies(where: { id_ENDS_WITH: "123" }) { + movies(where: { id: { endsWith: "123" } }) { id } } @@ -254,10 +230,10 @@ describe("Cypher Advanced Filtering", () => { `); }); - test("LT", async () => { + test("lessThan", async () => { const query = /* GraphQL */ ` { - movies(where: { actorCount_LT: 123 }) { + movies(where: { actorCount: { lt: 123 } }) { actorCount } } @@ -281,10 +257,10 @@ describe("Cypher Advanced Filtering", () => { `); }); - test("LT BigInt", async () => { + test("lessThan BigInt", async () => { const query = /* GraphQL */ ` { - movies(where: { budget_LT: 9223372036854775807 }) { + movies(where: { budget: { lt: 9223372036854775807 } }) { budget } } @@ -308,10 +284,10 @@ describe("Cypher Advanced Filtering", () => { `); }); - test("LT String", async () => { + test("lessThan String", async () => { const query = /* GraphQL */ ` { - movies(where: { title_LT: "The Matrix Revolutions" }) { + movies(where: { title: { lt: "The Matrix Revolutions" } }) { title } } @@ -331,10 +307,10 @@ describe("Cypher Advanced Filtering", () => { `); }); - test("LTE", async () => { + test("lessThanEquals", async () => { const query = /* GraphQL */ ` { - movies(where: { actorCount_LTE: 123 }) { + movies(where: { actorCount: { lte: 123 } }) { actorCount } } @@ -358,10 +334,10 @@ describe("Cypher Advanced Filtering", () => { `); }); - test("LTE BigInt", async () => { + test("lessThanEquals BigInt", async () => { const query = /* GraphQL */ ` { - movies(where: { budget_LTE: 9223372036854775807 }) { + movies(where: { budget: { lte: 9223372036854775807 } }) { budget } } @@ -385,10 +361,10 @@ describe("Cypher Advanced Filtering", () => { `); }); - test("LTE String", async () => { + test("lessThanEquals String", async () => { const query = /* GraphQL */ ` { - movies(where: { title_LTE: "The Matrix Revolutions" }) { + movies(where: { title: { lte: "The Matrix Revolutions" } }) { title } } @@ -408,10 +384,10 @@ describe("Cypher Advanced Filtering", () => { `); }); - test("GT", async () => { + test("greaterThan", async () => { const query = /* GraphQL */ ` { - movies(where: { actorCount_GT: 123 }) { + movies(where: { actorCount: { gt: 123 } }) { actorCount } } @@ -435,10 +411,10 @@ describe("Cypher Advanced Filtering", () => { `); }); - test("GT BigInt", async () => { + test("greaterThan BigInt", async () => { const query = /* GraphQL */ ` { - movies(where: { budget_GT: 9223372036854775000 }) { + movies(where: { budget: { gt: 9223372036854775000 } }) { budget } } @@ -462,10 +438,10 @@ describe("Cypher Advanced Filtering", () => { `); }); - test("GT String", async () => { + test("greaterThan String", async () => { const query = /* GraphQL */ ` { - movies(where: { title_GT: "The Matrix Revolutions" }) { + movies(where: { title: { gt: "The Matrix Revolutions" } }) { title } } @@ -485,10 +461,10 @@ describe("Cypher Advanced Filtering", () => { `); }); - test("GTE", async () => { + test("greaterThanEquals", async () => { const query = /* GraphQL */ ` { - movies(where: { actorCount_GTE: 123 }) { + movies(where: { actorCount: { gte: 123 } }) { actorCount } } @@ -512,10 +488,10 @@ describe("Cypher Advanced Filtering", () => { `); }); - test("GTE BigInt", async () => { + test("greaterThanEquals BigInt", async () => { const query = /* GraphQL */ ` { - movies(where: { budget_GTE: 9223372036854775000 }) { + movies(where: { budget: { gte: 9223372036854775000 } }) { budget } } @@ -539,10 +515,10 @@ describe("Cypher Advanced Filtering", () => { `); }); - test("GTE String", async () => { + test("greaterThanEquals String", async () => { const query = /* GraphQL */ ` { - movies(where: { title_GTE: "The Matrix Revolutions" }) { + movies(where: { title: { gte: "The Matrix Revolutions" } }) { title } } @@ -566,7 +542,7 @@ describe("Cypher Advanced Filtering", () => { test("equality", async () => { const query = /* GraphQL */ ` { - movies(where: { genres_SOME: { name_EQ: "some genre" } }) { + movies(where: { genres: { some: { name: { eq: "some genre" } } } }) { actorCount } } @@ -590,46 +566,19 @@ describe("Cypher Advanced Filtering", () => { `); }); - test("NONE", async () => { - const query = /* GraphQL */ ` - { - movies(where: { genres_NONE: { name_EQ: "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_EQ: "some genre" } }) { + movies(where: { genres: { ${operator}: { name: { eq: "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); @@ -650,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); @@ -669,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); @@ -685,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); @@ -711,7 +662,7 @@ describe("Cypher Advanced Filtering", () => { test("Node and relationship properties equality", async () => { const query = /* GraphQL */ ` { - movies(where: { genresConnection_SOME: { node: { name_EQ: "some genre" } } }) { + movies(where: { genresConnection: { some: { node: { name: { eq: "some genre" } } } } }) { actorCount } } @@ -738,7 +689,7 @@ describe("Cypher Advanced Filtering", () => { test("Node and relationship properties NONE", async () => { const query = /* GraphQL */ ` { - movies(where: { genresConnection_NONE: { node: { name_EQ: "some genre" } } }) { + movies(where: { genresConnection: { none: { node: { name: { eq: "some genre" } } } } }) { actorCount } } @@ -763,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_EQ: "some genre" } } }) { + movies(where: { genresConnection: { ${operator}: { node: { name: { eq: "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); @@ -795,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); @@ -814,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); @@ -830,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/aggregations/alias-directive.test.ts b/packages/graphql/tests/tck/aggregations/alias-directive.test.ts index c47e4dd4a6..fe43341771 100644 --- a/packages/graphql/tests/tck/aggregations/alias-directive.test.ts +++ b/packages/graphql/tests/tck/aggregations/alias-directive.test.ts @@ -43,10 +43,6 @@ describe("Cypher Aggregations Many with Alias directive", () => { const query = /* GraphQL */ ` { moviesAggregate { - id { - shortest - longest - } title { shortest longest @@ -68,25 +64,21 @@ describe("Cypher Aggregations Many with Alias directive", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "CALL { - MATCH (this:Movie) - RETURN { shortest: min(this._id), longest: max(this._id) } AS var0 - } - CALL { MATCH (this:Movie) WITH this ORDER BY size(this._title) DESC WITH collect(this._title) AS list - RETURN { longest: head(list), shortest: last(list) } AS var1 + RETURN { longest: head(list), shortest: last(list) } AS var0 } CALL { MATCH (this:Movie) - RETURN { min: min(this.\`_imdb Rating\`), max: max(this.\`_imdb Rating\`), average: avg(this.\`_imdb Rating\`) } AS var2 + RETURN { min: min(this.\`_imdb Rating\`), max: max(this.\`_imdb Rating\`), average: avg(this.\`_imdb Rating\`) } AS var1 } CALL { MATCH (this:Movie) - RETURN { min: apoc.date.convertFormat(toString(min(this._createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\"), max: apoc.date.convertFormat(toString(max(this._createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var3 + RETURN { min: apoc.date.convertFormat(toString(min(this._createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\"), max: apoc.date.convertFormat(toString(max(this._createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var2 } - RETURN { id: var0, title: var1, imdbRating: var2, createdAt: var3 }" + RETURN { title: var0, imdbRating: var1, createdAt: var2 }" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); diff --git a/packages/graphql/tests/tck/aggregations/alias.test.ts b/packages/graphql/tests/tck/aggregations/alias.test.ts index c25a93322d..d0c2624073 100644 --- a/packages/graphql/tests/tck/aggregations/alias.test.ts +++ b/packages/graphql/tests/tck/aggregations/alias.test.ts @@ -44,10 +44,6 @@ describe("Cypher Aggregations Many while Alias fields", () => { { moviesAggregate { _count: count - _id: id { - _shortest: shortest - _longest: longest - } _title: title { _shortest: shortest _longest: longest @@ -72,26 +68,22 @@ describe("Cypher Aggregations Many while Alias fields", () => { MATCH (this:Movie) RETURN count(this) AS var0 } - CALL { - MATCH (this:Movie) - RETURN { _shortest: min(this.id), _longest: max(this.id) } AS var1 - } CALL { MATCH (this:Movie) WITH this ORDER BY size(this.title) DESC WITH collect(this.title) AS list - RETURN { _longest: head(list), _shortest: last(list) } AS var2 + RETURN { _longest: head(list), _shortest: last(list) } AS var1 } CALL { MATCH (this:Movie) - RETURN { _min: min(this.imdbRating), _max: max(this.imdbRating), _average: avg(this.imdbRating) } AS var3 + RETURN { _min: min(this.imdbRating), _max: max(this.imdbRating), _average: avg(this.imdbRating) } AS var2 } CALL { MATCH (this:Movie) - RETURN { _min: apoc.date.convertFormat(toString(min(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\"), _max: apoc.date.convertFormat(toString(max(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var4 + RETURN { _min: apoc.date.convertFormat(toString(min(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\"), _max: apoc.date.convertFormat(toString(max(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var3 } - RETURN { _count: var0, _id: var1, _title: var2, _imdbRating: var3, _createdAt: var4 }" + RETURN { _count: var0, _title: var1, _imdbRating: var2, _createdAt: var3 }" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); diff --git a/packages/graphql/tests/tck/aggregations/auth.test.ts b/packages/graphql/tests/tck/aggregations/auth.test.ts index d16eb2e362..03a3551f3c 100644 --- a/packages/graphql/tests/tck/aggregations/auth.test.ts +++ b/packages/graphql/tests/tck/aggregations/auth.test.ts @@ -31,34 +31,34 @@ describe("Cypher Aggregations with Auth", () => { type User @node { id: ID @authorization( - validate: [{ operations: [READ], when: [BEFORE], where: { node: { id_EQ: "$jwt.sub" } } }] + validate: [{ operations: [READ], when: [BEFORE], where: { node: { id: { eq: "$jwt.sub" } } } }] ) name: String! @authorization( - validate: [{ operations: [READ], when: [BEFORE], where: { node: { id_EQ: "$jwt.sub" } } }] + validate: [{ operations: [READ], when: [BEFORE], where: { node: { id: { eq: "$jwt.sub" } } } }] ) imdbRatingInt: Int! @authorization( - validate: [{ operations: [READ], when: [BEFORE], where: { node: { id_EQ: "$jwt.sub" } } }] + validate: [{ operations: [READ], when: [BEFORE], where: { node: { id: { eq: "$jwt.sub" } } } }] ) imdbRatingFloat: Float! @authorization( - validate: [{ operations: [READ], when: [BEFORE], where: { node: { id_EQ: "$jwt.sub" } } }] + validate: [{ operations: [READ], when: [BEFORE], where: { node: { id: { eq: "$jwt.sub" } } } }] ) imdbRatingBigInt: BigInt! @authorization( - validate: [{ operations: [READ], when: [BEFORE], where: { node: { id_EQ: "$jwt.sub" } } }] + validate: [{ operations: [READ], when: [BEFORE], where: { node: { id: { eq: "$jwt.sub" } } } }] ) createdAt: DateTime @authorization( - validate: [{ operations: [READ], when: [BEFORE], where: { node: { id_EQ: "$jwt.sub" } } }] + validate: [{ operations: [READ], when: [BEFORE], where: { node: { id: { eq: "$jwt.sub" } } } }] ) } extend type User @authorization( - validate: [{ operations: [AGGREGATE], when: [BEFORE], where: { node: { id_EQ: "$jwt.sub" } } }] - filter: [{ operations: [AGGREGATE], where: { node: { id_EQ: "$jwt.sub" } } }] + validate: [{ operations: [AGGREGATE], when: [BEFORE], where: { node: { id: { eq: "$jwt.sub" } } } }] + filter: [{ operations: [AGGREGATE], where: { node: { id: { eq: "$jwt.sub" } } } }] ) `; @@ -103,7 +103,7 @@ describe("Cypher Aggregations with Auth", () => { test("Count with WHERE", async () => { const query = /* GraphQL */ ` { - usersAggregate(where: { name_EQ: "some-name" }) { + usersAggregate(where: { name: { eq: "some-name" } }) { count } } @@ -238,41 +238,6 @@ describe("Cypher Aggregations with Auth", () => { `); }); - test("Field ID with auth", async () => { - const query = /* GraphQL */ ` - { - usersAggregate { - id { - shortest - longest - } - } - } - `; - - const token = createBearerToken("secret", { sub: "super_admin" }); - const result = await translateQuery(neoSchema, query, { token }); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { - MATCH (this:User) - WHERE (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) - RETURN { shortest: min(this.id), longest: max(this.id) } AS var0 - } - RETURN { id: var0 }" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(` - "{ - \\"isAuthenticated\\": true, - \\"jwt\\": { - \\"roles\\": [], - \\"sub\\": \\"super_admin\\" - } - }" - `); - }); - test("Field String with auth", async () => { const query = /* GraphQL */ ` { diff --git a/packages/graphql/tests/tck/aggregations/count.test.ts b/packages/graphql/tests/tck/aggregations/count.test.ts index 4baf2ecc1b..5aef47a2ef 100644 --- a/packages/graphql/tests/tck/aggregations/count.test.ts +++ b/packages/graphql/tests/tck/aggregations/count.test.ts @@ -61,7 +61,7 @@ describe("Cypher Aggregations Count", () => { test("Count with WHERE", async () => { const query = /* GraphQL */ ` { - moviesAggregate(where: { title_EQ: "some-title" }) { + moviesAggregate(where: { title: { eq: "some-title" } }) { count } } diff --git a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-where.test.ts b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-where.test.ts index 5eb36a7960..4100ceefd4 100644 --- a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-where.test.ts +++ b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-where.test.ts @@ -50,7 +50,7 @@ describe("Field Level Aggregations Where", () => { query { movies { title - actorsAggregate(where: { age_GT: 40 }) { + actorsAggregate(where: { age: { gt: 40 } }) { count } } diff --git a/packages/graphql/tests/tck/aggregations/id.test.ts b/packages/graphql/tests/tck/aggregations/id.test.ts deleted file mode 100644 index f38f77244b..0000000000 --- a/packages/graphql/tests/tck/aggregations/id.test.ts +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Neo4jGraphQL } from "../../../src"; -import { formatCypher, formatParams, translateQuery } from "../utils/tck-test-utils"; - -describe("Cypher Aggregations ID", () => { - let typeDefs: string; - let neoSchema: Neo4jGraphQL; - - beforeAll(() => { - typeDefs = /* GraphQL */ ` - type Movie @node { - id: ID! - } - `; - - neoSchema = new Neo4jGraphQL({ - typeDefs, - }); - }); - - test("Min", async () => { - const query = /* GraphQL */ ` - { - moviesAggregate { - id { - shortest - } - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { - MATCH (this:Movie) - RETURN { shortest: min(this.id) } AS var0 - } - RETURN { id: var0 }" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); - - test("Max", async () => { - const query = /* GraphQL */ ` - { - moviesAggregate { - id { - longest - } - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { - MATCH (this:Movie) - RETURN { longest: max(this.id) } AS var0 - } - RETURN { id: var0 }" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); - - test("Min and Max", async () => { - const query = /* GraphQL */ ` - { - moviesAggregate { - id { - shortest - longest - } - } - } - `; - - const result = await translateQuery(neoSchema, query); - - expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "CALL { - MATCH (this:Movie) - RETURN { shortest: min(this.id), longest: max(this.id) } AS var0 - } - RETURN { id: var0 }" - `); - - expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); - }); -}); diff --git a/packages/graphql/tests/tck/aggregations/label.test.ts b/packages/graphql/tests/tck/aggregations/label.test.ts index e7af1838f3..7b462a0b9c 100644 --- a/packages/graphql/tests/tck/aggregations/label.test.ts +++ b/packages/graphql/tests/tck/aggregations/label.test.ts @@ -50,10 +50,6 @@ describe("Cypher Aggregations Many while Alias fields", () => { const query = /* GraphQL */ ` { moviesAggregate { - _id: id { - _shortest: shortest - _longest: longest - } _title: title { _shortest: shortest _longest: longest @@ -75,25 +71,21 @@ describe("Cypher Aggregations Many while Alias fields", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "CALL { - MATCH (this:Film) - RETURN { _shortest: min(this.id), _longest: max(this.id) } AS var0 - } - CALL { MATCH (this:Film) WITH this ORDER BY size(this.title) DESC WITH collect(this.title) AS list - RETURN { _longest: head(list), _shortest: last(list) } AS var1 + RETURN { _longest: head(list), _shortest: last(list) } AS var0 } CALL { MATCH (this:Film) - RETURN { _min: min(this.imdbRating), _max: max(this.imdbRating), _average: avg(this.imdbRating) } AS var2 + RETURN { _min: min(this.imdbRating), _max: max(this.imdbRating), _average: avg(this.imdbRating) } AS var1 } CALL { MATCH (this:Film) - RETURN { _min: apoc.date.convertFormat(toString(min(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\"), _max: apoc.date.convertFormat(toString(max(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var3 + RETURN { _min: apoc.date.convertFormat(toString(min(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\"), _max: apoc.date.convertFormat(toString(max(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var2 } - RETURN { _id: var0, _title: var1, _imdbRating: var2, _createdAt: var3 }" + RETURN { _title: var0, _imdbRating: var1, _createdAt: var2 }" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -103,10 +95,6 @@ describe("Cypher Aggregations Many while Alias fields", () => { const query = /* GraphQL */ ` { actorsAggregate { - _id: id { - _shortest: shortest - _longest: longest - } _name: name { _shortest: shortest _longest: longest @@ -128,25 +116,21 @@ describe("Cypher Aggregations Many while Alias fields", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "CALL { - MATCH (this:Actor:Person:Alien) - RETURN { _shortest: min(this.id), _longest: max(this.id) } AS var0 - } - CALL { MATCH (this:Actor:Person:Alien) WITH this ORDER BY size(this.name) DESC WITH collect(this.name) AS list - RETURN { _longest: head(list), _shortest: last(list) } AS var1 + RETURN { _longest: head(list), _shortest: last(list) } AS var0 } CALL { MATCH (this:Actor:Person:Alien) - RETURN { _min: min(this.imdbRating), _max: max(this.imdbRating), _average: avg(this.imdbRating) } AS var2 + RETURN { _min: min(this.imdbRating), _max: max(this.imdbRating), _average: avg(this.imdbRating) } AS var1 } CALL { MATCH (this:Actor:Person:Alien) - RETURN { _min: apoc.date.convertFormat(toString(min(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\"), _max: apoc.date.convertFormat(toString(max(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var3 + RETURN { _min: apoc.date.convertFormat(toString(min(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\"), _max: apoc.date.convertFormat(toString(max(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var2 } - RETURN { _id: var0, _name: var1, _imdbRating: var2, _createdAt: var3 }" + RETURN { _name: var0, _imdbRating: var1, _createdAt: var2 }" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); diff --git a/packages/graphql/tests/tck/aggregations/many.test.ts b/packages/graphql/tests/tck/aggregations/many.test.ts index 079a9bd26f..98631af1da 100644 --- a/packages/graphql/tests/tck/aggregations/many.test.ts +++ b/packages/graphql/tests/tck/aggregations/many.test.ts @@ -43,10 +43,6 @@ describe("Cypher Aggregations Many", () => { const query = /* GraphQL */ ` { moviesAggregate { - id { - shortest - longest - } title { shortest longest @@ -68,25 +64,21 @@ describe("Cypher Aggregations Many", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "CALL { - MATCH (this:Movie) - RETURN { shortest: min(this.id), longest: max(this.id) } AS var0 - } - CALL { MATCH (this:Movie) WITH this ORDER BY size(this.title) DESC WITH collect(this.title) AS list - RETURN { longest: head(list), shortest: last(list) } AS var1 + RETURN { longest: head(list), shortest: last(list) } AS var0 } CALL { MATCH (this:Movie) - RETURN { min: min(this.imdbRating), max: max(this.imdbRating), average: avg(this.imdbRating) } AS var2 + RETURN { min: min(this.imdbRating), max: max(this.imdbRating), average: avg(this.imdbRating) } AS var1 } CALL { MATCH (this:Movie) - RETURN { min: apoc.date.convertFormat(toString(min(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\"), max: apoc.date.convertFormat(toString(max(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var3 + RETURN { min: apoc.date.convertFormat(toString(min(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\"), max: apoc.date.convertFormat(toString(max(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var2 } - RETURN { id: var0, title: var1, imdbRating: var2, createdAt: var3 }" + RETURN { title: var0, imdbRating: var1, createdAt: var2 }" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); diff --git a/packages/graphql/tests/tck/aggregations/string.test.ts b/packages/graphql/tests/tck/aggregations/string.test.ts index c5569be1cc..3608269907 100644 --- a/packages/graphql/tests/tck/aggregations/string.test.ts +++ b/packages/graphql/tests/tck/aggregations/string.test.ts @@ -122,7 +122,7 @@ describe("Cypher Aggregations String", () => { test("Shortest with filter", async () => { const query = /* GraphQL */ ` { - moviesAggregate(where: { testId_EQ: "10" }) { + moviesAggregate(where: { testId: { eq: "10" } }) { title { shortest } diff --git a/packages/graphql/tests/tck/aggregations/where/count.test.ts b/packages/graphql/tests/tck/aggregations/where/count.test.ts index b3b4805a5e..98860827ff 100644 --- a/packages/graphql/tests/tck/aggregations/where/count.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/count.test.ts @@ -44,7 +44,7 @@ describe("Cypher Aggregations where with count", () => { test("Equality Count", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { count_EQ: 10 } }) { + posts(where: { likesAggregate: { count: { eq: 10 } } }) { content } } @@ -77,7 +77,7 @@ describe("Cypher Aggregations where with count", () => { test("LT Count", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { count_LT: 10 } }) { + posts(where: { likesAggregate: { count: { lt: 10 } } }) { content } } @@ -110,7 +110,7 @@ describe("Cypher Aggregations where with count", () => { test("LTE Count", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { count_LTE: 10 } }) { + posts(where: { likesAggregate: { count: { lte: 10 } } }) { content } } @@ -143,7 +143,7 @@ describe("Cypher Aggregations where with count", () => { test("GT Count", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { count_GT: 10 } }) { + posts(where: { likesAggregate: { count: { gt: 10 } } }) { content } } @@ -176,7 +176,7 @@ describe("Cypher Aggregations where with count", () => { test("GTE Count", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { count_GTE: 10 } }) { + posts(where: { likesAggregate: { count: { gte: 10 } } }) { content } } diff --git a/packages/graphql/tests/tck/aggregations/where/edge/bigint.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/bigint.test.ts index 8ef9e8f4af..d5001b6e70 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/bigint.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/bigint.test.ts @@ -49,7 +49,7 @@ describe("Cypher Aggregations where edge with BigInt", () => { test("AVERAGE_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someBigInt_AVERAGE_EQUAL: "2147483648" } } }) { + posts(where: { likesAggregate: { edge: { someBigInt: { average: { eq: "2147483648" } } } } }) { content } } @@ -82,7 +82,7 @@ describe("Cypher Aggregations where edge with BigInt", () => { test("AVERAGE_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someBigInt_AVERAGE_GT: "2147483648" } } }) { + posts(where: { likesAggregate: { edge: { someBigInt: { average: { gt: "2147483648" } } } } }) { content } } @@ -115,7 +115,7 @@ describe("Cypher Aggregations where edge with BigInt", () => { test("AVERAGE_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someBigInt_AVERAGE_GTE: "2147483648" } } }) { + posts(where: { likesAggregate: { edge: { someBigInt: { average: { gte: "2147483648" } } } } }) { content } } @@ -148,7 +148,7 @@ describe("Cypher Aggregations where edge with BigInt", () => { test("AVERAGE_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someBigInt_AVERAGE_LT: "2147483648" } } }) { + posts(where: { likesAggregate: { edge: { someBigInt: { average: { lt: "2147483648" } } } } }) { content } } @@ -181,7 +181,7 @@ describe("Cypher Aggregations where edge with BigInt", () => { test("AVERAGE_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someBigInt_AVERAGE_LTE: "2147483648" } } }) { + posts(where: { likesAggregate: { edge: { someBigInt: { average: { lte: "2147483648" } } } } }) { content } } @@ -214,7 +214,7 @@ describe("Cypher Aggregations where edge with BigInt", () => { test("SUM_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someBigInt_SUM_EQUAL: "2147483648" } } }) { + posts(where: { likesAggregate: { edge: { someBigInt: { sum: { eq: "2147483648" } } } } }) { content } } @@ -247,7 +247,7 @@ describe("Cypher Aggregations where edge with BigInt", () => { test("SUM_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someBigInt_SUM_GT: "2147483648" } } }) { + posts(where: { likesAggregate: { edge: { someBigInt: { sum: { gt: "2147483648" } } } } }) { content } } @@ -280,7 +280,7 @@ describe("Cypher Aggregations where edge with BigInt", () => { test("SUM_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someBigInt_SUM_GTE: "2147483648" } } }) { + posts(where: { likesAggregate: { edge: { someBigInt: { sum: { gte: "2147483648" } } } } }) { content } } @@ -313,7 +313,7 @@ describe("Cypher Aggregations where edge with BigInt", () => { test("SUM_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someBigInt_SUM_LT: "2147483648" } } }) { + posts(where: { likesAggregate: { edge: { someBigInt: { sum: { lt: "2147483648" } } } } }) { content } } @@ -346,7 +346,7 @@ describe("Cypher Aggregations where edge with BigInt", () => { test("SUM_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someBigInt_SUM_LTE: "2147483648" } } }) { + posts(where: { likesAggregate: { edge: { someBigInt: { sum: { lte: "2147483648" } } } } }) { content } } @@ -379,7 +379,7 @@ describe("Cypher Aggregations where edge with BigInt", () => { test("MIN_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someBigInt_MIN_EQUAL: "2147483648" } } }) { + posts(where: { likesAggregate: { edge: { someBigInt: { min: { eq: "2147483648" } } } } }) { content } } @@ -412,7 +412,7 @@ describe("Cypher Aggregations where edge with BigInt", () => { test("MIN_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someBigInt_MIN_GT: "2147483648" } } }) { + posts(where: { likesAggregate: { edge: { someBigInt: { min: { gt: "2147483648" } } } } }) { content } } @@ -445,7 +445,7 @@ describe("Cypher Aggregations where edge with BigInt", () => { test("MIN_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someBigInt_MIN_GTE: "2147483648" } } }) { + posts(where: { likesAggregate: { edge: { someBigInt: { min: { gte: "2147483648" } } } } }) { content } } @@ -478,7 +478,7 @@ describe("Cypher Aggregations where edge with BigInt", () => { test("MIN_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someBigInt_MIN_LT: "2147483648" } } }) { + posts(where: { likesAggregate: { edge: { someBigInt: { min: { lt: "2147483648" } } } } }) { content } } @@ -511,7 +511,7 @@ describe("Cypher Aggregations where edge with BigInt", () => { test("MIN_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someBigInt_MIN_LTE: "2147483648" } } }) { + posts(where: { likesAggregate: { edge: { someBigInt: { min: { lte: "2147483648" } } } } }) { content } } @@ -544,7 +544,7 @@ describe("Cypher Aggregations where edge with BigInt", () => { test("MAX_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someBigInt_MAX_EQUAL: "2147483648" } } }) { + posts(where: { likesAggregate: { edge: { someBigInt: { max: { eq: "2147483648" } } } } }) { content } } @@ -577,7 +577,7 @@ describe("Cypher Aggregations where edge with BigInt", () => { test("MAX_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someBigInt_MAX_GT: "2147483648" } } }) { + posts(where: { likesAggregate: { edge: { someBigInt: { max: { gt: "2147483648" } } } } }) { content } } @@ -610,7 +610,7 @@ describe("Cypher Aggregations where edge with BigInt", () => { test("MAX_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someBigInt_MAX_GTE: "2147483648" } } }) { + posts(where: { likesAggregate: { edge: { someBigInt: { max: { gte: "2147483648" } } } } }) { content } } @@ -643,7 +643,7 @@ describe("Cypher Aggregations where edge with BigInt", () => { test("MAX_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someBigInt_MAX_LT: "2147483648" } } }) { + posts(where: { likesAggregate: { edge: { someBigInt: { max: { lt: "2147483648" } } } } }) { content } } @@ -676,7 +676,7 @@ describe("Cypher Aggregations where edge with BigInt", () => { test("MAX_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someBigInt_MAX_LTE: "2147483648" } } }) { + posts(where: { likesAggregate: { edge: { someBigInt: { max: { lte: "2147483648" } } } } }) { content } } diff --git a/packages/graphql/tests/tck/aggregations/where/edge/datetime.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/datetime.test.ts index cd9028effa..229cbb7781 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/datetime.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/datetime.test.ts @@ -49,7 +49,9 @@ describe("Cypher Aggregations where edge with DateTime", () => { test("MIN_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDateTime_MIN_EQUAL: "2021-09-25T12:51:24.037Z" } } }) { + posts( + where: { likesAggregate: { edge: { someDateTime: { min: { eq: "2021-09-25T12:51:24.037Z" } } } } } + ) { content } } @@ -88,7 +90,9 @@ describe("Cypher Aggregations where edge with DateTime", () => { test("MIN_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDateTime_MIN_GT: "2021-09-25T12:51:24.037Z" } } }) { + posts( + where: { likesAggregate: { edge: { someDateTime: { min: { gt: "2021-09-25T12:51:24.037Z" } } } } } + ) { content } } @@ -127,7 +131,9 @@ describe("Cypher Aggregations where edge with DateTime", () => { test("MIN_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDateTime_MIN_GTE: "2021-09-25T12:51:24.037Z" } } }) { + posts( + where: { likesAggregate: { edge: { someDateTime: { min: { gte: "2021-09-25T12:51:24.037Z" } } } } } + ) { content } } @@ -166,7 +172,9 @@ describe("Cypher Aggregations where edge with DateTime", () => { test("MIN_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDateTime_MIN_LT: "2021-09-25T12:51:24.037Z" } } }) { + posts( + where: { likesAggregate: { edge: { someDateTime: { min: { lt: "2021-09-25T12:51:24.037Z" } } } } } + ) { content } } @@ -205,7 +213,9 @@ describe("Cypher Aggregations where edge with DateTime", () => { test("MIN_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDateTime_MIN_LTE: "2021-09-25T12:51:24.037Z" } } }) { + posts( + where: { likesAggregate: { edge: { someDateTime: { min: { lte: "2021-09-25T12:51:24.037Z" } } } } } + ) { content } } @@ -244,7 +254,9 @@ describe("Cypher Aggregations where edge with DateTime", () => { test("MAX_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDateTime_MAX_EQUAL: "2021-09-25T12:51:24.037Z" } } }) { + posts( + where: { likesAggregate: { edge: { someDateTime: { max: { eq: "2021-09-25T12:51:24.037Z" } } } } } + ) { content } } @@ -283,7 +295,9 @@ describe("Cypher Aggregations where edge with DateTime", () => { test("MAX_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDateTime_MAX_GT: "2021-09-25T12:51:24.037Z" } } }) { + posts( + where: { likesAggregate: { edge: { someDateTime: { max: { gt: "2021-09-25T12:51:24.037Z" } } } } } + ) { content } } @@ -322,7 +336,9 @@ describe("Cypher Aggregations where edge with DateTime", () => { test("MAX_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDateTime_MAX_GTE: "2021-09-25T12:51:24.037Z" } } }) { + posts( + where: { likesAggregate: { edge: { someDateTime: { max: { gte: "2021-09-25T12:51:24.037Z" } } } } } + ) { content } } @@ -361,7 +377,9 @@ describe("Cypher Aggregations where edge with DateTime", () => { test("MAX_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDateTime_MAX_LT: "2021-09-25T12:51:24.037Z" } } }) { + posts( + where: { likesAggregate: { edge: { someDateTime: { max: { lt: "2021-09-25T12:51:24.037Z" } } } } } + ) { content } } @@ -400,7 +418,9 @@ describe("Cypher Aggregations where edge with DateTime", () => { test("MAX_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDateTime_MAX_LTE: "2021-09-25T12:51:24.037Z" } } }) { + posts( + where: { likesAggregate: { edge: { someDateTime: { max: { lte: "2021-09-25T12:51:24.037Z" } } } } } + ) { content } } diff --git a/packages/graphql/tests/tck/aggregations/where/edge/duration.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/duration.test.ts index e1439f2146..3233f8f9d9 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/duration.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/duration.test.ts @@ -49,7 +49,7 @@ describe("Cypher Aggregations where edge with Duration", () => { test("AVERAGE_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDuration_AVERAGE_EQUAL: "P1Y" } } }) { + posts(where: { likesAggregate: { edge: { someDuration: { average: { eq: "P1Y" } } } } }) { content } } @@ -90,7 +90,7 @@ describe("Cypher Aggregations where edge with Duration", () => { test("AVERAGE_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDuration_AVERAGE_GT: "P1Y" } } }) { + posts(where: { likesAggregate: { edge: { someDuration: { average: { gt: "P1Y" } } } } }) { content } } @@ -131,7 +131,7 @@ describe("Cypher Aggregations where edge with Duration", () => { test("AVERAGE_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDuration_AVERAGE_GTE: "P1Y" } } }) { + posts(where: { likesAggregate: { edge: { someDuration: { average: { gte: "P1Y" } } } } }) { content } } @@ -172,7 +172,7 @@ describe("Cypher Aggregations where edge with Duration", () => { test("AVERAGE_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDuration_AVERAGE_LT: "P1Y" } } }) { + posts(where: { likesAggregate: { edge: { someDuration: { average: { lt: "P1Y" } } } } }) { content } } @@ -213,7 +213,7 @@ describe("Cypher Aggregations where edge with Duration", () => { test("AVERAGE_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDuration_AVERAGE_LTE: "P1Y" } } }) { + posts(where: { likesAggregate: { edge: { someDuration: { average: { lte: "P1Y" } } } } }) { content } } @@ -254,7 +254,7 @@ describe("Cypher Aggregations where edge with Duration", () => { test("MIN_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDuration_MIN_EQUAL: "P1Y" } } }) { + posts(where: { likesAggregate: { edge: { someDuration: { min: { eq: "P1Y" } } } } }) { content } } @@ -295,7 +295,7 @@ describe("Cypher Aggregations where edge with Duration", () => { test("MIN_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDuration_MIN_GT: "P1Y" } } }) { + posts(where: { likesAggregate: { edge: { someDuration: { min: { gt: "P1Y" } } } } }) { content } } @@ -336,7 +336,7 @@ describe("Cypher Aggregations where edge with Duration", () => { test("MIN_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDuration_MIN_GTE: "P1Y" } } }) { + posts(where: { likesAggregate: { edge: { someDuration: { min: { gte: "P1Y" } } } } }) { content } } @@ -377,7 +377,7 @@ describe("Cypher Aggregations where edge with Duration", () => { test("MIN_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDuration_MIN_LT: "P1Y" } } }) { + posts(where: { likesAggregate: { edge: { someDuration: { min: { lt: "P1Y" } } } } }) { content } } @@ -418,7 +418,7 @@ describe("Cypher Aggregations where edge with Duration", () => { test("MIN_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDuration_MIN_LTE: "P1Y" } } }) { + posts(where: { likesAggregate: { edge: { someDuration: { min: { lte: "P1Y" } } } } }) { content } } @@ -459,7 +459,7 @@ describe("Cypher Aggregations where edge with Duration", () => { test("MAX_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDuration_MAX_EQUAL: "P1Y" } } }) { + posts(where: { likesAggregate: { edge: { someDuration: { max: { eq: "P1Y" } } } } }) { content } } @@ -500,7 +500,7 @@ describe("Cypher Aggregations where edge with Duration", () => { test("MAX_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDuration_MAX_GT: "P1Y" } } }) { + posts(where: { likesAggregate: { edge: { someDuration: { max: { gt: "P1Y" } } } } }) { content } } @@ -541,7 +541,7 @@ describe("Cypher Aggregations where edge with Duration", () => { test("MAX_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDuration_MAX_GTE: "P1Y" } } }) { + posts(where: { likesAggregate: { edge: { someDuration: { max: { gte: "P1Y" } } } } }) { content } } @@ -582,7 +582,7 @@ describe("Cypher Aggregations where edge with Duration", () => { test("MAX_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDuration_MAX_LT: "P1Y" } } }) { + posts(where: { likesAggregate: { edge: { someDuration: { max: { lt: "P1Y" } } } } }) { content } } @@ -623,7 +623,7 @@ describe("Cypher Aggregations where edge with Duration", () => { test("MAX_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someDuration_MAX_LTE: "P1Y" } } }) { + posts(where: { likesAggregate: { edge: { someDuration: { max: { lte: "P1Y" } } } } }) { content } } diff --git a/packages/graphql/tests/tck/aggregations/where/edge/float.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/float.test.ts index 0dcd709067..68740a7306 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/float.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/float.test.ts @@ -49,7 +49,7 @@ describe("Cypher Aggregations where edge with Float", () => { test("AVERAGE_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someFloat_AVERAGE_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { edge: { someFloat: { average: { eq: 10 } } } } }) { content } } @@ -79,7 +79,7 @@ describe("Cypher Aggregations where edge with Float", () => { test("AVERAGE_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someFloat_AVERAGE_GT: 10 } } }) { + posts(where: { likesAggregate: { edge: { someFloat: { average: { gt: 10 } } } } }) { content } } @@ -109,7 +109,7 @@ describe("Cypher Aggregations where edge with Float", () => { test("AVERAGE_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someFloat_AVERAGE_GTE: 10 } } }) { + posts(where: { likesAggregate: { edge: { someFloat: { average: { gte: 10 } } } } }) { content } } @@ -139,7 +139,7 @@ describe("Cypher Aggregations where edge with Float", () => { test("AVERAGE_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someFloat_AVERAGE_LT: 10 } } }) { + posts(where: { likesAggregate: { edge: { someFloat: { average: { lt: 10 } } } } }) { content } } @@ -169,7 +169,7 @@ describe("Cypher Aggregations where edge with Float", () => { test("AVERAGE_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someFloat_AVERAGE_LTE: 10 } } }) { + posts(where: { likesAggregate: { edge: { someFloat: { average: { lte: 10 } } } } }) { content } } @@ -199,7 +199,7 @@ describe("Cypher Aggregations where edge with Float", () => { test("SUM_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someFloat_SUM_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { edge: { someFloat: { sum: { eq: 10 } } } } }) { content } } @@ -229,7 +229,7 @@ describe("Cypher Aggregations where edge with Float", () => { test("SUM_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someFloat_SUM_GT: 10 } } }) { + posts(where: { likesAggregate: { edge: { someFloat: { sum: { gt: 10 } } } } }) { content } } @@ -259,7 +259,7 @@ describe("Cypher Aggregations where edge with Float", () => { test("SUM_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someFloat_SUM_GTE: 10 } } }) { + posts(where: { likesAggregate: { edge: { someFloat: { sum: { gte: 10 } } } } }) { content } } @@ -289,7 +289,7 @@ describe("Cypher Aggregations where edge with Float", () => { test("SUM_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someFloat_SUM_LT: 10 } } }) { + posts(where: { likesAggregate: { edge: { someFloat: { sum: { lt: 10 } } } } }) { content } } @@ -319,7 +319,7 @@ describe("Cypher Aggregations where edge with Float", () => { test("SUM_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someFloat_SUM_LTE: 10 } } }) { + posts(where: { likesAggregate: { edge: { someFloat: { sum: { lte: 10 } } } } }) { content } } @@ -349,7 +349,7 @@ describe("Cypher Aggregations where edge with Float", () => { test("MIN_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someFloat_MIN_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { edge: { someFloat: { min: { eq: 10 } } } } }) { content } } @@ -379,7 +379,7 @@ describe("Cypher Aggregations where edge with Float", () => { test("MIN_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someFloat_MIN_GT: 10 } } }) { + posts(where: { likesAggregate: { edge: { someFloat: { min: { gt: 10 } } } } }) { content } } @@ -409,7 +409,7 @@ describe("Cypher Aggregations where edge with Float", () => { test("MIN_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someFloat_MIN_GTE: 10 } } }) { + posts(where: { likesAggregate: { edge: { someFloat: { min: { gte: 10 } } } } }) { content } } @@ -439,7 +439,7 @@ describe("Cypher Aggregations where edge with Float", () => { test("MIN_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someFloat_MIN_LT: 10 } } }) { + posts(where: { likesAggregate: { edge: { someFloat: { min: { lt: 10 } } } } }) { content } } @@ -469,7 +469,7 @@ describe("Cypher Aggregations where edge with Float", () => { test("MIN_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someFloat_MIN_LTE: 10 } } }) { + posts(where: { likesAggregate: { edge: { someFloat: { min: { lte: 10 } } } } }) { content } } @@ -499,7 +499,7 @@ describe("Cypher Aggregations where edge with Float", () => { test("MAX_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someFloat_MAX_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { edge: { someFloat: { max: { eq: 10 } } } } }) { content } } @@ -529,7 +529,7 @@ describe("Cypher Aggregations where edge with Float", () => { test("MAX_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someFloat_MAX_GT: 10 } } }) { + posts(where: { likesAggregate: { edge: { someFloat: { max: { gt: 10 } } } } }) { content } } @@ -559,7 +559,7 @@ describe("Cypher Aggregations where edge with Float", () => { test("MAX_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someFloat_MAX_GTE: 10 } } }) { + posts(where: { likesAggregate: { edge: { someFloat: { max: { gte: 10 } } } } }) { content } } @@ -589,7 +589,7 @@ describe("Cypher Aggregations where edge with Float", () => { test("MAX_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someFloat_MAX_LT: 10 } } }) { + posts(where: { likesAggregate: { edge: { someFloat: { max: { lt: 10 } } } } }) { content } } @@ -619,7 +619,7 @@ describe("Cypher Aggregations where edge with Float", () => { test("MAX_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someFloat_MAX_LTE: 10 } } }) { + posts(where: { likesAggregate: { edge: { someFloat: { max: { lte: 10 } } } } }) { content } } diff --git a/packages/graphql/tests/tck/aggregations/where/edge/int.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/int.test.ts index d673c73581..70dd501922 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/int.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/int.test.ts @@ -49,7 +49,7 @@ describe("Cypher Aggregations where edge with Int", () => { test("AVERAGE_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someInt_AVERAGE_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { edge: { someInt: { average: { eq: 10 } } } } }) { content } } @@ -79,7 +79,7 @@ describe("Cypher Aggregations where edge with Int", () => { test("AVERAGE_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someInt_AVERAGE_GT: 10 } } }) { + posts(where: { likesAggregate: { edge: { someInt: { average: { gt: 10 } } } } }) { content } } @@ -109,7 +109,7 @@ describe("Cypher Aggregations where edge with Int", () => { test("AVERAGE_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someInt_AVERAGE_GTE: 10 } } }) { + posts(where: { likesAggregate: { edge: { someInt: { average: { gte: 10 } } } } }) { content } } @@ -139,7 +139,7 @@ describe("Cypher Aggregations where edge with Int", () => { test("AVERAGE_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someInt_AVERAGE_LT: 10 } } }) { + posts(where: { likesAggregate: { edge: { someInt: { average: { lt: 10 } } } } }) { content } } @@ -169,7 +169,7 @@ describe("Cypher Aggregations where edge with Int", () => { test("AVERAGE_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someInt_AVERAGE_LTE: 10 } } }) { + posts(where: { likesAggregate: { edge: { someInt: { average: { lte: 10 } } } } }) { content } } @@ -199,7 +199,7 @@ describe("Cypher Aggregations where edge with Int", () => { test("SUM_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someInt_SUM_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { edge: { someInt: { sum: { eq: 10 } } } } }) { content } } @@ -232,7 +232,7 @@ describe("Cypher Aggregations where edge with Int", () => { test("SUM_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someInt_SUM_GT: 10 } } }) { + posts(where: { likesAggregate: { edge: { someInt: { sum: { gt: 10 } } } } }) { content } } @@ -265,7 +265,7 @@ describe("Cypher Aggregations where edge with Int", () => { test("SUM_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someInt_SUM_GTE: 10 } } }) { + posts(where: { likesAggregate: { edge: { someInt: { sum: { gte: 10 } } } } }) { content } } @@ -298,7 +298,7 @@ describe("Cypher Aggregations where edge with Int", () => { test("SUM_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someInt_SUM_LT: 10 } } }) { + posts(where: { likesAggregate: { edge: { someInt: { sum: { lt: 10 } } } } }) { content } } @@ -331,7 +331,7 @@ describe("Cypher Aggregations where edge with Int", () => { test("SUM_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someInt_SUM_LTE: 10 } } }) { + posts(where: { likesAggregate: { edge: { someInt: { sum: { lte: 10 } } } } }) { content } } @@ -364,7 +364,7 @@ describe("Cypher Aggregations where edge with Int", () => { test("MIN_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someInt_MIN_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { edge: { someInt: { min: { eq: 10 } } } } }) { content } } @@ -397,7 +397,7 @@ describe("Cypher Aggregations where edge with Int", () => { test("MIN_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someInt_MIN_GT: 10 } } }) { + posts(where: { likesAggregate: { edge: { someInt: { min: { gt: 10 } } } } }) { content } } @@ -430,7 +430,7 @@ describe("Cypher Aggregations where edge with Int", () => { test("MIN_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someInt_MIN_GTE: 10 } } }) { + posts(where: { likesAggregate: { edge: { someInt: { min: { gte: 10 } } } } }) { content } } @@ -463,7 +463,7 @@ describe("Cypher Aggregations where edge with Int", () => { test("MIN_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someInt_MIN_LT: 10 } } }) { + posts(where: { likesAggregate: { edge: { someInt: { min: { lt: 10 } } } } }) { content } } @@ -496,7 +496,7 @@ describe("Cypher Aggregations where edge with Int", () => { test("MIN_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someInt_MIN_LTE: 10 } } }) { + posts(where: { likesAggregate: { edge: { someInt: { min: { lte: 10 } } } } }) { content } } @@ -529,7 +529,7 @@ describe("Cypher Aggregations where edge with Int", () => { test("MAX_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someInt_MAX_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { edge: { someInt: { max: { eq: 10 } } } } }) { content } } @@ -562,7 +562,7 @@ describe("Cypher Aggregations where edge with Int", () => { test("MAX_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someInt_MAX_GT: 10 } } }) { + posts(where: { likesAggregate: { edge: { someInt: { max: { gt: 10 } } } } }) { content } } @@ -595,7 +595,7 @@ describe("Cypher Aggregations where edge with Int", () => { test("MAX_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someInt_MAX_GTE: 10 } } }) { + posts(where: { likesAggregate: { edge: { someInt: { max: { gte: 10 } } } } }) { content } } @@ -628,7 +628,7 @@ describe("Cypher Aggregations where edge with Int", () => { test("MAX_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someInt_MAX_LT: 10 } } }) { + posts(where: { likesAggregate: { edge: { someInt: { max: { lt: 10 } } } } }) { content } } @@ -661,7 +661,7 @@ describe("Cypher Aggregations where edge with Int", () => { test("MAX_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someInt_MAX_LTE: 10 } } }) { + posts(where: { likesAggregate: { edge: { someInt: { max: { lte: 10 } } } } }) { content } } diff --git a/packages/graphql/tests/tck/aggregations/where/edge/localdatetime.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/localdatetime.test.ts index 629c961f03..657d07b238 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/localdatetime.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/localdatetime.test.ts @@ -49,7 +49,9 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { test("MIN_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someLocalDateTime_MIN_EQUAL: "2003-09-14T12:00:00" } } }) { + posts( + where: { likesAggregate: { edge: { someLocalDateTime: { min: { eq: "2003-09-14T12:00:00" } } } } } + ) { content } } @@ -87,7 +89,9 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { test("MIN_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someLocalDateTime_MIN_GT: "2003-09-14T12:00:00" } } }) { + posts( + where: { likesAggregate: { edge: { someLocalDateTime: { min: { gt: "2003-09-14T12:00:00" } } } } } + ) { content } } @@ -125,7 +129,9 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { test("MIN_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someLocalDateTime_MIN_GTE: "2003-09-14T12:00:00" } } }) { + posts( + where: { likesAggregate: { edge: { someLocalDateTime: { min: { gte: "2003-09-14T12:00:00" } } } } } + ) { content } } @@ -163,7 +169,9 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { test("MIN_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someLocalDateTime_MIN_LT: "2003-09-14T12:00:00" } } }) { + posts( + where: { likesAggregate: { edge: { someLocalDateTime: { min: { lt: "2003-09-14T12:00:00" } } } } } + ) { content } } @@ -201,7 +209,9 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { test("MIN_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someLocalDateTime_MIN_LTE: "2003-09-14T12:00:00" } } }) { + posts( + where: { likesAggregate: { edge: { someLocalDateTime: { min: { lte: "2003-09-14T12:00:00" } } } } } + ) { content } } @@ -239,7 +249,9 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { test("MAX_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someLocalDateTime_MAX_EQUAL: "2003-09-14T12:00:00" } } }) { + posts( + where: { likesAggregate: { edge: { someLocalDateTime: { max: { eq: "2003-09-14T12:00:00" } } } } } + ) { content } } @@ -277,7 +289,9 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { test("MAX_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someLocalDateTime_MAX_GT: "2003-09-14T12:00:00" } } }) { + posts( + where: { likesAggregate: { edge: { someLocalDateTime: { max: { gt: "2003-09-14T12:00:00" } } } } } + ) { content } } @@ -315,7 +329,9 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { test("MAX_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someLocalDateTime_MAX_GTE: "2003-09-14T12:00:00" } } }) { + posts( + where: { likesAggregate: { edge: { someLocalDateTime: { max: { gte: "2003-09-14T12:00:00" } } } } } + ) { content } } @@ -353,7 +369,9 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { test("MAX_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someLocalDateTime_MAX_LT: "2003-09-14T12:00:00" } } }) { + posts( + where: { likesAggregate: { edge: { someLocalDateTime: { max: { lt: "2003-09-14T12:00:00" } } } } } + ) { content } } @@ -391,7 +409,9 @@ describe("Cypher Aggregations where edge with LocalDateTime", () => { test("MAX_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someLocalDateTime_MAX_LTE: "2003-09-14T12:00:00" } } }) { + posts( + where: { likesAggregate: { edge: { someLocalDateTime: { max: { lte: "2003-09-14T12:00:00" } } } } } + ) { content } } diff --git a/packages/graphql/tests/tck/aggregations/where/edge/localtime.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/localtime.test.ts index c4b4faef5f..237ee62a7c 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/localtime.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/localtime.test.ts @@ -49,7 +49,7 @@ describe("Cypher Aggregations where edge with LocalTime", () => { test("MIN_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someLocalTime_MIN_EQUAL: "12:00:00" } } }) { + posts(where: { likesAggregate: { edge: { someLocalTime: { min: { eq: "12:00:00" } } } } }) { content } } @@ -84,7 +84,7 @@ describe("Cypher Aggregations where edge with LocalTime", () => { test("MIN_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someLocalTime_MIN_GT: "12:00:00" } } }) { + posts(where: { likesAggregate: { edge: { someLocalTime: { min: { gt: "12:00:00" } } } } }) { content } } @@ -119,7 +119,7 @@ describe("Cypher Aggregations where edge with LocalTime", () => { test("MIN_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someLocalTime_MIN_GTE: "12:00:00" } } }) { + posts(where: { likesAggregate: { edge: { someLocalTime: { min: { gte: "12:00:00" } } } } }) { content } } @@ -154,7 +154,7 @@ describe("Cypher Aggregations where edge with LocalTime", () => { test("MIN_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someLocalTime_MIN_LT: "12:00:00" } } }) { + posts(where: { likesAggregate: { edge: { someLocalTime: { min: { lt: "12:00:00" } } } } }) { content } } @@ -189,7 +189,7 @@ describe("Cypher Aggregations where edge with LocalTime", () => { test("MIN_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someLocalTime_MIN_LTE: "12:00:00" } } }) { + posts(where: { likesAggregate: { edge: { someLocalTime: { min: { lte: "12:00:00" } } } } }) { content } } @@ -224,7 +224,7 @@ describe("Cypher Aggregations where edge with LocalTime", () => { test("MAX_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someLocalTime_MAX_EQUAL: "12:00:00" } } }) { + posts(where: { likesAggregate: { edge: { someLocalTime: { max: { eq: "12:00:00" } } } } }) { content } } @@ -259,7 +259,7 @@ describe("Cypher Aggregations where edge with LocalTime", () => { test("MAX_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someLocalTime_MAX_GT: "12:00:00" } } }) { + posts(where: { likesAggregate: { edge: { someLocalTime: { max: { gt: "12:00:00" } } } } }) { content } } @@ -294,7 +294,7 @@ describe("Cypher Aggregations where edge with LocalTime", () => { test("MAX_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someLocalTime_MAX_GTE: "12:00:00" } } }) { + posts(where: { likesAggregate: { edge: { someLocalTime: { max: { gte: "12:00:00" } } } } }) { content } } @@ -329,7 +329,7 @@ describe("Cypher Aggregations where edge with LocalTime", () => { test("MAX_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someLocalTime_MAX_LT: "12:00:00" } } }) { + posts(where: { likesAggregate: { edge: { someLocalTime: { max: { lt: "12:00:00" } } } } }) { content } } @@ -364,7 +364,7 @@ describe("Cypher Aggregations where edge with LocalTime", () => { test("MAX_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someLocalTime_MAX_LTE: "12:00:00" } } }) { + posts(where: { likesAggregate: { edge: { someLocalTime: { max: { lte: "12:00:00" } } } } }) { content } } diff --git a/packages/graphql/tests/tck/aggregations/where/edge/string.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/string.test.ts index 809c5337ca..9515709ade 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/string.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/string.test.ts @@ -46,10 +46,10 @@ describe("Cypher Aggregations where edge with String", () => { }); }); - test("SHORTEST_LENGTH_EQUAL", async () => { + test("shortestLength_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someString_SHORTEST_LENGTH_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { edge: { someString: { shortestLength: { eq: 10 } } } } }) { content } } @@ -79,10 +79,10 @@ describe("Cypher Aggregations where edge with String", () => { `); }); - test("SHORTEST_LENGTH_GT", async () => { + test("shortestLength_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someString_SHORTEST_LENGTH_GT: 10 } } }) { + posts(where: { likesAggregate: { edge: { someString: { shortestLength: { gt: 10 } } } } }) { content } } @@ -112,10 +112,10 @@ describe("Cypher Aggregations where edge with String", () => { `); }); - test("SHORTEST_LENGTH_GTE", async () => { + test("shortestLength_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someString_SHORTEST_LENGTH_GTE: 10 } } }) { + posts(where: { likesAggregate: { edge: { someString: { shortestLength: { gte: 10 } } } } }) { content } } @@ -145,10 +145,10 @@ describe("Cypher Aggregations where edge with String", () => { `); }); - test("SHORTEST_LENGTH_LT", async () => { + test("shortestLength_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someString_SHORTEST_LENGTH_LT: 10 } } }) { + posts(where: { likesAggregate: { edge: { someString: { shortestLength: { lt: 10 } } } } }) { content } } @@ -178,10 +178,10 @@ describe("Cypher Aggregations where edge with String", () => { `); }); - test("SHORTEST_LENGTH_LTE", async () => { + test("shortestLength_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someString_SHORTEST_LENGTH_LTE: 10 } } }) { + posts(where: { likesAggregate: { edge: { someString: { shortestLength: { lte: 10 } } } } }) { content } } @@ -211,10 +211,10 @@ describe("Cypher Aggregations where edge with String", () => { `); }); - test("LONGEST_LENGTH_EQUAL", async () => { + test("longestLength_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someString_LONGEST_LENGTH_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { edge: { someString: { longestLength: { eq: 10 } } } } }) { content } } @@ -244,10 +244,10 @@ describe("Cypher Aggregations where edge with String", () => { `); }); - test("LONGEST_LENGTH_GT", async () => { + test("longestLength_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someString_LONGEST_LENGTH_GT: 10 } } }) { + posts(where: { likesAggregate: { edge: { someString: { longestLength: { gt: 10 } } } } }) { content } } @@ -277,10 +277,10 @@ describe("Cypher Aggregations where edge with String", () => { `); }); - test("LONGEST_LENGTH_GTE", async () => { + test("longestLength_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someString_LONGEST_LENGTH_GTE: 10 } } }) { + posts(where: { likesAggregate: { edge: { someString: { longestLength: { gte: 10 } } } } }) { content } } @@ -310,10 +310,10 @@ describe("Cypher Aggregations where edge with String", () => { `); }); - test("LONGEST_LENGTH_LT", async () => { + test("longestLength_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someString_LONGEST_LENGTH_LT: 10 } } }) { + posts(where: { likesAggregate: { edge: { someString: { longestLength: { lt: 10 } } } } }) { content } } @@ -343,10 +343,10 @@ describe("Cypher Aggregations where edge with String", () => { `); }); - test("LONGEST_LENGTH_LTE", async () => { + test("longestLength_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someString_LONGEST_LENGTH_LTE: 10 } } }) { + posts(where: { likesAggregate: { edge: { someString: { longestLength: { lte: 10 } } } } }) { content } } @@ -376,10 +376,10 @@ describe("Cypher Aggregations where edge with String", () => { `); }); - test("AVERAGE_LENGTH_EQUAL", async () => { + test("averageLength_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someString_AVERAGE_LENGTH_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { edge: { someString: { averageLength: { eq: 10 } } } } }) { content } } @@ -406,10 +406,10 @@ describe("Cypher Aggregations where edge with String", () => { `); }); - test("AVERAGE_LENGTH_GT", async () => { + test("averageLength_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someString_AVERAGE_LENGTH_GT: 10 } } }) { + posts(where: { likesAggregate: { edge: { someString: { averageLength: { gt: 10 } } } } }) { content } } @@ -436,10 +436,10 @@ describe("Cypher Aggregations where edge with String", () => { `); }); - test("AVERAGE_LENGTH_GTE", async () => { + test("averageLength_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someString_AVERAGE_LENGTH_GTE: 10 } } }) { + posts(where: { likesAggregate: { edge: { someString: { averageLength: { gte: 10 } } } } }) { content } } @@ -466,10 +466,10 @@ describe("Cypher Aggregations where edge with String", () => { `); }); - test("AVERAGE_LENGTH_LT", async () => { + test("averageLength_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someString_AVERAGE_LENGTH_LT: 10 } } }) { + posts(where: { likesAggregate: { edge: { someString: { averageLength: { lt: 10 } } } } }) { content } } @@ -496,10 +496,10 @@ describe("Cypher Aggregations where edge with String", () => { `); }); - test("AVERAGE_LENGTH_LTE", async () => { + test("averageLength_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someString_AVERAGE_LENGTH_LTE: 10 } } }) { + posts(where: { likesAggregate: { edge: { someString: { averageLength: { lte: 10 } } } } }) { content } } diff --git a/packages/graphql/tests/tck/aggregations/where/edge/time.test.ts b/packages/graphql/tests/tck/aggregations/where/edge/time.test.ts index c70659f3ea..df102a2f96 100644 --- a/packages/graphql/tests/tck/aggregations/where/edge/time.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/edge/time.test.ts @@ -49,7 +49,7 @@ describe("Cypher Aggregations where edge with Time", () => { test("MIN_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someTime_MIN_EQUAL: "12:00:00" } } }) { + posts(where: { likesAggregate: { edge: { someTime: { min: { eq: "12:00:00" } } } } }) { content } } @@ -85,7 +85,7 @@ describe("Cypher Aggregations where edge with Time", () => { test("MIN_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someTime_MIN_GT: "12:00:00" } } }) { + posts(where: { likesAggregate: { edge: { someTime: { min: { gt: "12:00:00" } } } } }) { content } } @@ -121,7 +121,7 @@ describe("Cypher Aggregations where edge with Time", () => { test("MIN_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someTime_MIN_GTE: "12:00:00" } } }) { + posts(where: { likesAggregate: { edge: { someTime: { min: { gte: "12:00:00" } } } } }) { content } } @@ -157,7 +157,7 @@ describe("Cypher Aggregations where edge with Time", () => { test("MIN_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someTime_MIN_LT: "12:00:00" } } }) { + posts(where: { likesAggregate: { edge: { someTime: { min: { lt: "12:00:00" } } } } }) { content } } @@ -193,7 +193,7 @@ describe("Cypher Aggregations where edge with Time", () => { test("MIN_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someTime_MIN_LTE: "12:00:00" } } }) { + posts(where: { likesAggregate: { edge: { someTime: { min: { lte: "12:00:00" } } } } }) { content } } @@ -229,7 +229,7 @@ describe("Cypher Aggregations where edge with Time", () => { test("MAX_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someTime_MAX_EQUAL: "12:00:00" } } }) { + posts(where: { likesAggregate: { edge: { someTime: { max: { eq: "12:00:00" } } } } }) { content } } @@ -265,7 +265,7 @@ describe("Cypher Aggregations where edge with Time", () => { test("MAX_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someTime_MAX_GT: "12:00:00" } } }) { + posts(where: { likesAggregate: { edge: { someTime: { max: { gt: "12:00:00" } } } } }) { content } } @@ -301,7 +301,7 @@ describe("Cypher Aggregations where edge with Time", () => { test("MAX_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someTime_MAX_GTE: "12:00:00" } } }) { + posts(where: { likesAggregate: { edge: { someTime: { max: { gte: "12:00:00" } } } } }) { content } } @@ -337,7 +337,7 @@ describe("Cypher Aggregations where edge with Time", () => { test("MAX_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someTime_MAX_LT: "12:00:00" } } }) { + posts(where: { likesAggregate: { edge: { someTime: { max: { lt: "12:00:00" } } } } }) { content } } @@ -373,7 +373,7 @@ describe("Cypher Aggregations where edge with Time", () => { test("MAX_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { edge: { someTime_MAX_LTE: "12:00:00" } } }) { + posts(where: { likesAggregate: { edge: { someTime: { max: { lte: "12:00:00" } } } } }) { content } } diff --git a/packages/graphql/tests/tck/aggregations/where/logical.test.ts b/packages/graphql/tests/tck/aggregations/where/logical.test.ts index a332457b2d..5c0d5b2299 100644 --- a/packages/graphql/tests/tck/aggregations/where/logical.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/logical.test.ts @@ -44,7 +44,7 @@ describe("Cypher Aggregations where with logical AND plus OR", () => { test("AND", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { AND: [{ count_GT: 10 }, { count_LT: 20 }] } }) { + posts(where: { likesAggregate: { AND: [{ count: { gt: 10 } }, { count: { lt: 20 } }] } }) { content } } @@ -81,7 +81,7 @@ describe("Cypher Aggregations where with logical AND plus OR", () => { test("OR", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { OR: [{ count_GT: 10 }, { count_LT: 20 }] } }) { + posts(where: { likesAggregate: { OR: [{ count: { gt: 10 } }, { count: { lt: 20 } }] } }) { content } } @@ -118,7 +118,7 @@ describe("Cypher Aggregations where with logical AND plus OR", () => { test("NOT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { NOT: { count_GT: 10 } } }) { + posts(where: { likesAggregate: { NOT: { count: { gt: 10 } } } }) { content } } @@ -154,8 +154,8 @@ describe("Cypher Aggregations where with logical AND plus OR", () => { posts( where: { likesAggregate: { - AND: [{ count_GT: 10 }, { count_LT: 20 }] - OR: [{ count_GT: 10 }, { count_LT: 20 }] + AND: [{ count: { gt: 10 } }, { count: { lt: 20 } }] + OR: [{ count: { gt: 10 } }, { count: { lt: 20 } }] } } ) { @@ -206,9 +206,8 @@ describe("Cypher Aggregations where with logical AND plus OR", () => { posts( where: { likesAggregate: { - count_GT: 10 - count_LT: 20 - OR: [{ count_GT: 10 }, { count_LT: 20 }, { count_LT: 54 }] + count: { gt: 10, lt: 20 } + OR: [{ count: { gt: 10 } }, { count: { lt: 20 } }, { count: { lt: 54 } }] } } ) { @@ -224,7 +223,7 @@ describe("Cypher Aggregations where with logical AND plus OR", () => { CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) - RETURN (count(this1) < $param0 AND count(this1) > $param1 AND (count(this1) > $param2 OR count(this1) < $param3 OR count(this1) < $param4)) AS var2 + RETURN (count(this1) > $param0 AND count(this1) < $param1 AND (count(this1) > $param2 OR count(this1) < $param3 OR count(this1) < $param4)) AS var2 } WITH * WHERE var2 = true @@ -234,11 +233,11 @@ describe("Cypher Aggregations where with logical AND plus OR", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": { - \\"low\\": 20, + \\"low\\": 10, \\"high\\": 0 }, \\"param1\\": { - \\"low\\": 10, + \\"low\\": 20, \\"high\\": 0 }, \\"param2\\": { diff --git a/packages/graphql/tests/tck/aggregations/where/node/bigint.test.ts b/packages/graphql/tests/tck/aggregations/where/node/bigint.test.ts index 6e0aca951a..c62674a067 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/bigint.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/bigint.test.ts @@ -45,7 +45,7 @@ describe("Cypher Aggregations where node with BigInt", () => { test("AVERAGE_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someBigInt_AVERAGE_EQUAL: "2147483648" } } }) { + posts(where: { likesAggregate: { node: { someBigInt: { average: { eq: "2147483648" } } } } }) { content } } @@ -78,7 +78,7 @@ describe("Cypher Aggregations where node with BigInt", () => { test("AVERAGE_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someBigInt_AVERAGE_GT: "2147483648" } } }) { + posts(where: { likesAggregate: { node: { someBigInt: { average: { gt: "2147483648" } } } } }) { content } } @@ -111,7 +111,7 @@ describe("Cypher Aggregations where node with BigInt", () => { test("AVERAGE_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someBigInt_AVERAGE_GTE: "2147483648" } } }) { + posts(where: { likesAggregate: { node: { someBigInt: { average: { gte: "2147483648" } } } } }) { content } } @@ -144,7 +144,7 @@ describe("Cypher Aggregations where node with BigInt", () => { test("AVERAGE_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someBigInt_AVERAGE_LT: "2147483648" } } }) { + posts(where: { likesAggregate: { node: { someBigInt: { average: { lt: "2147483648" } } } } }) { content } } @@ -177,7 +177,7 @@ describe("Cypher Aggregations where node with BigInt", () => { test("AVERAGE_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someBigInt_AVERAGE_LTE: "2147483648" } } }) { + posts(where: { likesAggregate: { node: { someBigInt: { average: { lte: "2147483648" } } } } }) { content } } @@ -210,7 +210,7 @@ describe("Cypher Aggregations where node with BigInt", () => { test("SUM_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someBigInt_SUM_EQUAL: "2147483648" } } }) { + posts(where: { likesAggregate: { node: { someBigInt: { sum: { eq: "2147483648" } } } } }) { content } } @@ -243,7 +243,7 @@ describe("Cypher Aggregations where node with BigInt", () => { test("SUM_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someBigInt_SUM_GT: "2147483648" } } }) { + posts(where: { likesAggregate: { node: { someBigInt: { sum: { gt: "2147483648" } } } } }) { content } } @@ -276,7 +276,7 @@ describe("Cypher Aggregations where node with BigInt", () => { test("SUM_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someBigInt_SUM_GTE: "2147483648" } } }) { + posts(where: { likesAggregate: { node: { someBigInt: { sum: { gte: "2147483648" } } } } }) { content } } @@ -309,7 +309,7 @@ describe("Cypher Aggregations where node with BigInt", () => { test("SUM_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someBigInt_SUM_LT: "2147483648" } } }) { + posts(where: { likesAggregate: { node: { someBigInt: { sum: { lt: "2147483648" } } } } }) { content } } @@ -342,7 +342,7 @@ describe("Cypher Aggregations where node with BigInt", () => { test("SUM_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someBigInt_SUM_LTE: "2147483648" } } }) { + posts(where: { likesAggregate: { node: { someBigInt: { sum: { lte: "2147483648" } } } } }) { content } } @@ -375,7 +375,7 @@ describe("Cypher Aggregations where node with BigInt", () => { test("MIN_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someBigInt_MIN_EQUAL: "2147483648" } } }) { + posts(where: { likesAggregate: { node: { someBigInt: { min: { eq: "2147483648" } } } } }) { content } } @@ -408,7 +408,7 @@ describe("Cypher Aggregations where node with BigInt", () => { test("MIN_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someBigInt_MIN_GT: "2147483648" } } }) { + posts(where: { likesAggregate: { node: { someBigInt: { min: { gt: "2147483648" } } } } }) { content } } @@ -441,7 +441,7 @@ describe("Cypher Aggregations where node with BigInt", () => { test("MIN_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someBigInt_MIN_GTE: "2147483648" } } }) { + posts(where: { likesAggregate: { node: { someBigInt: { min: { gte: "2147483648" } } } } }) { content } } @@ -474,7 +474,7 @@ describe("Cypher Aggregations where node with BigInt", () => { test("MIN_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someBigInt_MIN_LT: "2147483648" } } }) { + posts(where: { likesAggregate: { node: { someBigInt: { min: { lt: "2147483648" } } } } }) { content } } @@ -507,7 +507,7 @@ describe("Cypher Aggregations where node with BigInt", () => { test("MIN_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someBigInt_MIN_LTE: "2147483648" } } }) { + posts(where: { likesAggregate: { node: { someBigInt: { min: { lte: "2147483648" } } } } }) { content } } @@ -540,7 +540,7 @@ describe("Cypher Aggregations where node with BigInt", () => { test("MAX_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someBigInt_MAX_EQUAL: "2147483648" } } }) { + posts(where: { likesAggregate: { node: { someBigInt: { max: { eq: "2147483648" } } } } }) { content } } @@ -573,7 +573,7 @@ describe("Cypher Aggregations where node with BigInt", () => { test("MAX_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someBigInt_MAX_GT: "2147483648" } } }) { + posts(where: { likesAggregate: { node: { someBigInt: { max: { gt: "2147483648" } } } } }) { content } } @@ -606,7 +606,7 @@ describe("Cypher Aggregations where node with BigInt", () => { test("MAX_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someBigInt_MAX_GTE: "2147483648" } } }) { + posts(where: { likesAggregate: { node: { someBigInt: { max: { gte: "2147483648" } } } } }) { content } } @@ -639,7 +639,7 @@ describe("Cypher Aggregations where node with BigInt", () => { test("MAX_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someBigInt_MAX_LT: "2147483648" } } }) { + posts(where: { likesAggregate: { node: { someBigInt: { max: { lt: "2147483648" } } } } }) { content } } @@ -672,7 +672,7 @@ describe("Cypher Aggregations where node with BigInt", () => { test("MAX_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someBigInt_MAX_LTE: "2147483648" } } }) { + posts(where: { likesAggregate: { node: { someBigInt: { max: { lte: "2147483648" } } } } }) { content } } diff --git a/packages/graphql/tests/tck/aggregations/where/node/datetime.test.ts b/packages/graphql/tests/tck/aggregations/where/node/datetime.test.ts index 68c3553c38..2dfa600783 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/datetime.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/datetime.test.ts @@ -45,7 +45,9 @@ describe("Cypher Aggregations where node with DateTime", () => { test("MIN_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDateTime_MIN_EQUAL: "2021-09-25T12:51:24.037Z" } } }) { + posts( + where: { likesAggregate: { node: { someDateTime: { min: { eq: "2021-09-25T12:51:24.037Z" } } } } } + ) { content } } @@ -84,7 +86,9 @@ describe("Cypher Aggregations where node with DateTime", () => { test("MIN_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDateTime_MIN_GT: "2021-09-25T12:51:24.037Z" } } }) { + posts( + where: { likesAggregate: { node: { someDateTime: { min: { gt: "2021-09-25T12:51:24.037Z" } } } } } + ) { content } } @@ -123,7 +127,9 @@ describe("Cypher Aggregations where node with DateTime", () => { test("MIN_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDateTime_MIN_GTE: "2021-09-25T12:51:24.037Z" } } }) { + posts( + where: { likesAggregate: { node: { someDateTime: { min: { gte: "2021-09-25T12:51:24.037Z" } } } } } + ) { content } } @@ -162,7 +168,9 @@ describe("Cypher Aggregations where node with DateTime", () => { test("MIN_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDateTime_MIN_LT: "2021-09-25T12:51:24.037Z" } } }) { + posts( + where: { likesAggregate: { node: { someDateTime: { min: { lt: "2021-09-25T12:51:24.037Z" } } } } } + ) { content } } @@ -201,7 +209,9 @@ describe("Cypher Aggregations where node with DateTime", () => { test("MIN_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDateTime_MIN_LTE: "2021-09-25T12:51:24.037Z" } } }) { + posts( + where: { likesAggregate: { node: { someDateTime: { min: { lte: "2021-09-25T12:51:24.037Z" } } } } } + ) { content } } @@ -240,7 +250,9 @@ describe("Cypher Aggregations where node with DateTime", () => { test("MAX_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDateTime_MAX_EQUAL: "2021-09-25T12:51:24.037Z" } } }) { + posts( + where: { likesAggregate: { node: { someDateTime: { max: { eq: "2021-09-25T12:51:24.037Z" } } } } } + ) { content } } @@ -279,7 +291,9 @@ describe("Cypher Aggregations where node with DateTime", () => { test("MAX_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDateTime_MAX_GT: "2021-09-25T12:51:24.037Z" } } }) { + posts( + where: { likesAggregate: { node: { someDateTime: { max: { gt: "2021-09-25T12:51:24.037Z" } } } } } + ) { content } } @@ -318,7 +332,9 @@ describe("Cypher Aggregations where node with DateTime", () => { test("MAX_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDateTime_MAX_GTE: "2021-09-25T12:51:24.037Z" } } }) { + posts( + where: { likesAggregate: { node: { someDateTime: { max: { gte: "2021-09-25T12:51:24.037Z" } } } } } + ) { content } } @@ -357,7 +373,9 @@ describe("Cypher Aggregations where node with DateTime", () => { test("MAX_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDateTime_MAX_LT: "2021-09-25T12:51:24.037Z" } } }) { + posts( + where: { likesAggregate: { node: { someDateTime: { max: { lt: "2021-09-25T12:51:24.037Z" } } } } } + ) { content } } @@ -396,7 +414,9 @@ describe("Cypher Aggregations where node with DateTime", () => { test("MAX_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDateTime_MAX_LTE: "2021-09-25T12:51:24.037Z" } } }) { + posts( + where: { likesAggregate: { node: { someDateTime: { max: { lte: "2021-09-25T12:51:24.037Z" } } } } } + ) { content } } diff --git a/packages/graphql/tests/tck/aggregations/where/node/duration.test.ts b/packages/graphql/tests/tck/aggregations/where/node/duration.test.ts index d545430191..48adf11d86 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/duration.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/duration.test.ts @@ -45,7 +45,7 @@ describe("Cypher Aggregations where node with Duration", () => { test("AVERAGE_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDuration_AVERAGE_EQUAL: "P1Y" } } }) { + posts(where: { likesAggregate: { node: { someDuration: { average: { eq: "P1Y" } } } } }) { content } } @@ -86,7 +86,7 @@ describe("Cypher Aggregations where node with Duration", () => { test("AVERAGE_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDuration_AVERAGE_GT: "P1Y" } } }) { + posts(where: { likesAggregate: { node: { someDuration: { average: { gt: "P1Y" } } } } }) { content } } @@ -127,7 +127,7 @@ describe("Cypher Aggregations where node with Duration", () => { test("AVERAGE_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDuration_AVERAGE_GTE: "P1Y" } } }) { + posts(where: { likesAggregate: { node: { someDuration: { average: { gte: "P1Y" } } } } }) { content } } @@ -168,7 +168,7 @@ describe("Cypher Aggregations where node with Duration", () => { test("AVERAGE_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDuration_AVERAGE_LT: "P1Y" } } }) { + posts(where: { likesAggregate: { node: { someDuration: { average: { lt: "P1Y" } } } } }) { content } } @@ -209,7 +209,7 @@ describe("Cypher Aggregations where node with Duration", () => { test("AVERAGE_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDuration_AVERAGE_LTE: "P1Y" } } }) { + posts(where: { likesAggregate: { node: { someDuration: { average: { lte: "P1Y" } } } } }) { content } } @@ -250,7 +250,7 @@ describe("Cypher Aggregations where node with Duration", () => { test("MIN_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDuration_MIN_EQUAL: "P1Y" } } }) { + posts(where: { likesAggregate: { node: { someDuration: { min: { eq: "P1Y" } } } } }) { content } } @@ -291,7 +291,7 @@ describe("Cypher Aggregations where node with Duration", () => { test("MIN_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDuration_MIN_GT: "P1Y" } } }) { + posts(where: { likesAggregate: { node: { someDuration: { min: { gt: "P1Y" } } } } }) { content } } @@ -332,7 +332,7 @@ describe("Cypher Aggregations where node with Duration", () => { test("MIN_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDuration_MIN_GTE: "P1Y" } } }) { + posts(where: { likesAggregate: { node: { someDuration: { min: { gte: "P1Y" } } } } }) { content } } @@ -373,7 +373,7 @@ describe("Cypher Aggregations where node with Duration", () => { test("MIN_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDuration_MIN_LT: "P1Y" } } }) { + posts(where: { likesAggregate: { node: { someDuration: { min: { lt: "P1Y" } } } } }) { content } } @@ -414,7 +414,7 @@ describe("Cypher Aggregations where node with Duration", () => { test("MIN_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDuration_MIN_LTE: "P1Y" } } }) { + posts(where: { likesAggregate: { node: { someDuration: { min: { lte: "P1Y" } } } } }) { content } } @@ -455,7 +455,7 @@ describe("Cypher Aggregations where node with Duration", () => { test("MAX_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDuration_MAX_EQUAL: "P1Y" } } }) { + posts(where: { likesAggregate: { node: { someDuration: { max: { eq: "P1Y" } } } } }) { content } } @@ -496,7 +496,7 @@ describe("Cypher Aggregations where node with Duration", () => { test("MAX_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDuration_MAX_GT: "P1Y" } } }) { + posts(where: { likesAggregate: { node: { someDuration: { max: { gt: "P1Y" } } } } }) { content } } @@ -537,7 +537,7 @@ describe("Cypher Aggregations where node with Duration", () => { test("MAX_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDuration_MAX_GTE: "P1Y" } } }) { + posts(where: { likesAggregate: { node: { someDuration: { max: { gte: "P1Y" } } } } }) { content } } @@ -578,7 +578,7 @@ describe("Cypher Aggregations where node with Duration", () => { test("MAX_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDuration_MAX_LT: "P1Y" } } }) { + posts(where: { likesAggregate: { node: { someDuration: { max: { lt: "P1Y" } } } } }) { content } } @@ -619,7 +619,7 @@ describe("Cypher Aggregations where node with Duration", () => { test("MAX_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someDuration_MAX_LTE: "P1Y" } } }) { + posts(where: { likesAggregate: { node: { someDuration: { max: { lte: "P1Y" } } } } }) { content } } diff --git a/packages/graphql/tests/tck/aggregations/where/node/float.test.ts b/packages/graphql/tests/tck/aggregations/where/node/float.test.ts index 9ddedb59b7..e4e65393d0 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/float.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/float.test.ts @@ -45,7 +45,7 @@ describe("Cypher Aggregations where node with Float", () => { test("AVERAGE_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someFloat_AVERAGE_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { node: { someFloat: { average: { eq: 10 } } } } }) { content } } @@ -75,7 +75,7 @@ describe("Cypher Aggregations where node with Float", () => { test("AVERAGE_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someFloat_AVERAGE_GT: 10 } } }) { + posts(where: { likesAggregate: { node: { someFloat: { average: { gt: 10 } } } } }) { content } } @@ -105,7 +105,7 @@ describe("Cypher Aggregations where node with Float", () => { test("AVERAGE_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someFloat_AVERAGE_GTE: 10 } } }) { + posts(where: { likesAggregate: { node: { someFloat: { average: { gte: 10 } } } } }) { content } } @@ -135,7 +135,7 @@ describe("Cypher Aggregations where node with Float", () => { test("AVERAGE_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someFloat_AVERAGE_LT: 10 } } }) { + posts(where: { likesAggregate: { node: { someFloat: { average: { lt: 10 } } } } }) { content } } @@ -165,7 +165,7 @@ describe("Cypher Aggregations where node with Float", () => { test("AVERAGE_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someFloat_AVERAGE_LTE: 10 } } }) { + posts(where: { likesAggregate: { node: { someFloat: { average: { lte: 10 } } } } }) { content } } @@ -195,7 +195,7 @@ describe("Cypher Aggregations where node with Float", () => { test("SUM_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someFloat_SUM_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { node: { someFloat: { sum: { eq: 10 } } } } }) { content } } @@ -225,7 +225,7 @@ describe("Cypher Aggregations where node with Float", () => { test("SUM_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someFloat_SUM_GT: 10 } } }) { + posts(where: { likesAggregate: { node: { someFloat: { sum: { gt: 10 } } } } }) { content } } @@ -255,7 +255,7 @@ describe("Cypher Aggregations where node with Float", () => { test("SUM_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someFloat_SUM_GTE: 10 } } }) { + posts(where: { likesAggregate: { node: { someFloat: { sum: { gte: 10 } } } } }) { content } } @@ -285,7 +285,7 @@ describe("Cypher Aggregations where node with Float", () => { test("SUM_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someFloat_SUM_LT: 10 } } }) { + posts(where: { likesAggregate: { node: { someFloat: { sum: { lt: 10 } } } } }) { content } } @@ -315,7 +315,7 @@ describe("Cypher Aggregations where node with Float", () => { test("SUM_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someFloat_SUM_LTE: 10 } } }) { + posts(where: { likesAggregate: { node: { someFloat: { sum: { lte: 10 } } } } }) { content } } @@ -345,7 +345,7 @@ describe("Cypher Aggregations where node with Float", () => { test("MIN_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someFloat_MIN_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { node: { someFloat: { min: { eq: 10 } } } } }) { content } } @@ -375,7 +375,7 @@ describe("Cypher Aggregations where node with Float", () => { test("MIN_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someFloat_MIN_GT: 10 } } }) { + posts(where: { likesAggregate: { node: { someFloat: { min: { gt: 10 } } } } }) { content } } @@ -405,7 +405,7 @@ describe("Cypher Aggregations where node with Float", () => { test("MIN_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someFloat_MIN_GTE: 10 } } }) { + posts(where: { likesAggregate: { node: { someFloat: { min: { gte: 10 } } } } }) { content } } @@ -435,7 +435,7 @@ describe("Cypher Aggregations where node with Float", () => { test("MIN_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someFloat_MIN_LT: 10 } } }) { + posts(where: { likesAggregate: { node: { someFloat: { min: { lt: 10 } } } } }) { content } } @@ -465,7 +465,7 @@ describe("Cypher Aggregations where node with Float", () => { test("MIN_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someFloat_MIN_LTE: 10 } } }) { + posts(where: { likesAggregate: { node: { someFloat: { min: { lte: 10 } } } } }) { content } } @@ -495,7 +495,7 @@ describe("Cypher Aggregations where node with Float", () => { test("MAX_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someFloat_MAX_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { node: { someFloat: { max: { eq: 10 } } } } }) { content } } @@ -525,7 +525,7 @@ describe("Cypher Aggregations where node with Float", () => { test("MAX_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someFloat_MAX_GT: 10 } } }) { + posts(where: { likesAggregate: { node: { someFloat: { max: { gt: 10 } } } } }) { content } } @@ -555,7 +555,7 @@ describe("Cypher Aggregations where node with Float", () => { test("MAX_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someFloat_MAX_GTE: 10 } } }) { + posts(where: { likesAggregate: { node: { someFloat: { max: { gte: 10 } } } } }) { content } } @@ -585,7 +585,7 @@ describe("Cypher Aggregations where node with Float", () => { test("MAX_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someFloat_MAX_LT: 10 } } }) { + posts(where: { likesAggregate: { node: { someFloat: { max: { lt: 10 } } } } }) { content } } @@ -615,7 +615,7 @@ describe("Cypher Aggregations where node with Float", () => { test("MAX_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someFloat_MAX_LTE: 10 } } }) { + posts(where: { likesAggregate: { node: { someFloat: { max: { lte: 10 } } } } }) { content } } diff --git a/packages/graphql/tests/tck/aggregations/where/node/int.test.ts b/packages/graphql/tests/tck/aggregations/where/node/int.test.ts index 5b1b3fe802..cb6c41cd4f 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/int.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/int.test.ts @@ -45,7 +45,7 @@ describe("Cypher Aggregations where node with Int", () => { test("AVERAGE_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someInt_AVERAGE_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { node: { someInt: { average: { eq: 10 } } } } }) { content } } @@ -75,7 +75,7 @@ describe("Cypher Aggregations where node with Int", () => { test("AVERAGE_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someInt_AVERAGE_GT: 10 } } }) { + posts(where: { likesAggregate: { node: { someInt: { average: { gt: 10 } } } } }) { content } } @@ -105,7 +105,7 @@ describe("Cypher Aggregations where node with Int", () => { test("AVERAGE_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someInt_AVERAGE_GTE: 10 } } }) { + posts(where: { likesAggregate: { node: { someInt: { average: { gte: 10 } } } } }) { content } } @@ -135,7 +135,7 @@ describe("Cypher Aggregations where node with Int", () => { test("AVERAGE_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someInt_AVERAGE_LT: 10 } } }) { + posts(where: { likesAggregate: { node: { someInt: { average: { lt: 10 } } } } }) { content } } @@ -165,7 +165,7 @@ describe("Cypher Aggregations where node with Int", () => { test("AVERAGE_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someInt_AVERAGE_LTE: 10 } } }) { + posts(where: { likesAggregate: { node: { someInt: { average: { lte: 10 } } } } }) { content } } @@ -195,7 +195,7 @@ describe("Cypher Aggregations where node with Int", () => { test("SUM_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someInt_SUM_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { node: { someInt: { sum: { eq: 10 } } } } }) { content } } @@ -228,7 +228,7 @@ describe("Cypher Aggregations where node with Int", () => { test("SUM_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someInt_SUM_GT: 10 } } }) { + posts(where: { likesAggregate: { node: { someInt: { sum: { gt: 10 } } } } }) { content } } @@ -261,7 +261,7 @@ describe("Cypher Aggregations where node with Int", () => { test("SUM_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someInt_SUM_GTE: 10 } } }) { + posts(where: { likesAggregate: { node: { someInt: { sum: { gte: 10 } } } } }) { content } } @@ -294,7 +294,7 @@ describe("Cypher Aggregations where node with Int", () => { test("SUM_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someInt_SUM_LT: 10 } } }) { + posts(where: { likesAggregate: { node: { someInt: { sum: { lt: 10 } } } } }) { content } } @@ -327,7 +327,7 @@ describe("Cypher Aggregations where node with Int", () => { test("SUM_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someInt_SUM_LTE: 10 } } }) { + posts(where: { likesAggregate: { node: { someInt: { sum: { lte: 10 } } } } }) { content } } @@ -360,7 +360,7 @@ describe("Cypher Aggregations where node with Int", () => { test("MIN_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someInt_MIN_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { node: { someInt: { min: { eq: 10 } } } } }) { content } } @@ -393,7 +393,7 @@ describe("Cypher Aggregations where node with Int", () => { test("MIN_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someInt_MIN_GT: 10 } } }) { + posts(where: { likesAggregate: { node: { someInt: { min: { gt: 10 } } } } }) { content } } @@ -426,7 +426,7 @@ describe("Cypher Aggregations where node with Int", () => { test("MIN_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someInt_MIN_GTE: 10 } } }) { + posts(where: { likesAggregate: { node: { someInt: { min: { gte: 10 } } } } }) { content } } @@ -459,7 +459,7 @@ describe("Cypher Aggregations where node with Int", () => { test("MIN_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someInt_MIN_LT: 10 } } }) { + posts(where: { likesAggregate: { node: { someInt: { min: { lt: 10 } } } } }) { content } } @@ -492,7 +492,7 @@ describe("Cypher Aggregations where node with Int", () => { test("MIN_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someInt_MIN_LTE: 10 } } }) { + posts(where: { likesAggregate: { node: { someInt: { min: { lte: 10 } } } } }) { content } } @@ -525,7 +525,7 @@ describe("Cypher Aggregations where node with Int", () => { test("MAX_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someInt_MAX_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { node: { someInt: { max: { eq: 10 } } } } }) { content } } @@ -558,7 +558,7 @@ describe("Cypher Aggregations where node with Int", () => { test("MAX_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someInt_MAX_GT: 10 } } }) { + posts(where: { likesAggregate: { node: { someInt: { max: { gt: 10 } } } } }) { content } } @@ -591,7 +591,7 @@ describe("Cypher Aggregations where node with Int", () => { test("MAX_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someInt_MAX_GTE: 10 } } }) { + posts(where: { likesAggregate: { node: { someInt: { max: { gte: 10 } } } } }) { content } } @@ -624,7 +624,7 @@ describe("Cypher Aggregations where node with Int", () => { test("MAX_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someInt_MAX_LT: 10 } } }) { + posts(where: { likesAggregate: { node: { someInt: { max: { lt: 10 } } } } }) { content } } @@ -657,7 +657,7 @@ describe("Cypher Aggregations where node with Int", () => { test("MAX_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someInt_MAX_LTE: 10 } } }) { + posts(where: { likesAggregate: { node: { someInt: { max: { lte: 10 } } } } }) { content } } diff --git a/packages/graphql/tests/tck/aggregations/where/node/localdatetime.test.ts b/packages/graphql/tests/tck/aggregations/where/node/localdatetime.test.ts index 8d026a5b9d..7d14f10ee0 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/localdatetime.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/localdatetime.test.ts @@ -45,7 +45,9 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { test("MIN_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someLocalDateTime_MIN_EQUAL: "2003-09-14T12:00:00" } } }) { + posts( + where: { likesAggregate: { node: { someLocalDateTime: { min: { eq: "2003-09-14T12:00:00" } } } } } + ) { content } } @@ -83,7 +85,9 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { test("MIN_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someLocalDateTime_MIN_GT: "2003-09-14T12:00:00" } } }) { + posts( + where: { likesAggregate: { node: { someLocalDateTime: { min: { gt: "2003-09-14T12:00:00" } } } } } + ) { content } } @@ -121,7 +125,9 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { test("MIN_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someLocalDateTime_MIN_GTE: "2003-09-14T12:00:00" } } }) { + posts( + where: { likesAggregate: { node: { someLocalDateTime: { min: { gte: "2003-09-14T12:00:00" } } } } } + ) { content } } @@ -159,7 +165,9 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { test("MIN_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someLocalDateTime_MIN_LT: "2003-09-14T12:00:00" } } }) { + posts( + where: { likesAggregate: { node: { someLocalDateTime: { min: { lt: "2003-09-14T12:00:00" } } } } } + ) { content } } @@ -197,7 +205,9 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { test("MIN_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someLocalDateTime_MIN_LTE: "2003-09-14T12:00:00" } } }) { + posts( + where: { likesAggregate: { node: { someLocalDateTime: { min: { lte: "2003-09-14T12:00:00" } } } } } + ) { content } } @@ -235,7 +245,9 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { test("MAX_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someLocalDateTime_MAX_EQUAL: "2003-09-14T12:00:00" } } }) { + posts( + where: { likesAggregate: { node: { someLocalDateTime: { max: { eq: "2003-09-14T12:00:00" } } } } } + ) { content } } @@ -273,7 +285,9 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { test("MAX_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someLocalDateTime_MAX_GT: "2003-09-14T12:00:00" } } }) { + posts( + where: { likesAggregate: { node: { someLocalDateTime: { max: { gt: "2003-09-14T12:00:00" } } } } } + ) { content } } @@ -311,7 +325,9 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { test("MAX_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someLocalDateTime_MAX_GTE: "2003-09-14T12:00:00" } } }) { + posts( + where: { likesAggregate: { node: { someLocalDateTime: { max: { gte: "2003-09-14T12:00:00" } } } } } + ) { content } } @@ -349,7 +365,9 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { test("MAX_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someLocalDateTime_MAX_LT: "2003-09-14T12:00:00" } } }) { + posts( + where: { likesAggregate: { node: { someLocalDateTime: { max: { lt: "2003-09-14T12:00:00" } } } } } + ) { content } } @@ -387,7 +405,9 @@ describe("Cypher Aggregations where node with LocalDateTime", () => { test("MAX_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someLocalDateTime_MAX_LTE: "2003-09-14T12:00:00" } } }) { + posts( + where: { likesAggregate: { node: { someLocalDateTime: { max: { lte: "2003-09-14T12:00:00" } } } } } + ) { content } } diff --git a/packages/graphql/tests/tck/aggregations/where/node/localtime.test.ts b/packages/graphql/tests/tck/aggregations/where/node/localtime.test.ts index 37ddd744d5..647be0d204 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/localtime.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/localtime.test.ts @@ -45,7 +45,7 @@ describe("Cypher Aggregations where node with LocalTime", () => { test("MIN_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someLocalTime_MIN_EQUAL: "12:00:00" } } }) { + posts(where: { likesAggregate: { node: { someLocalTime: { min: { eq: "12:00:00" } } } } }) { content } } @@ -80,7 +80,7 @@ describe("Cypher Aggregations where node with LocalTime", () => { test("MIN_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someLocalTime_MIN_GT: "12:00:00" } } }) { + posts(where: { likesAggregate: { node: { someLocalTime: { min: { gt: "12:00:00" } } } } }) { content } } @@ -115,7 +115,7 @@ describe("Cypher Aggregations where node with LocalTime", () => { test("MIN_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someLocalTime_MIN_GTE: "12:00:00" } } }) { + posts(where: { likesAggregate: { node: { someLocalTime: { min: { gte: "12:00:00" } } } } }) { content } } @@ -150,7 +150,7 @@ describe("Cypher Aggregations where node with LocalTime", () => { test("MIN_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someLocalTime_MIN_LT: "12:00:00" } } }) { + posts(where: { likesAggregate: { node: { someLocalTime: { min: { lt: "12:00:00" } } } } }) { content } } @@ -185,7 +185,7 @@ describe("Cypher Aggregations where node with LocalTime", () => { test("MIN_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someLocalTime_MIN_LTE: "12:00:00" } } }) { + posts(where: { likesAggregate: { node: { someLocalTime: { min: { lte: "12:00:00" } } } } }) { content } } @@ -220,7 +220,7 @@ describe("Cypher Aggregations where node with LocalTime", () => { test("MAX_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someLocalTime_MAX_EQUAL: "12:00:00" } } }) { + posts(where: { likesAggregate: { node: { someLocalTime: { max: { eq: "12:00:00" } } } } }) { content } } @@ -255,7 +255,7 @@ describe("Cypher Aggregations where node with LocalTime", () => { test("MAX_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someLocalTime_MAX_GT: "12:00:00" } } }) { + posts(where: { likesAggregate: { node: { someLocalTime: { max: { gt: "12:00:00" } } } } }) { content } } @@ -290,7 +290,7 @@ describe("Cypher Aggregations where node with LocalTime", () => { test("MAX_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someLocalTime_MAX_GTE: "12:00:00" } } }) { + posts(where: { likesAggregate: { node: { someLocalTime: { max: { gte: "12:00:00" } } } } }) { content } } @@ -325,7 +325,7 @@ describe("Cypher Aggregations where node with LocalTime", () => { test("MAX_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someLocalTime_MAX_LT: "12:00:00" } } }) { + posts(where: { likesAggregate: { node: { someLocalTime: { max: { lt: "12:00:00" } } } } }) { content } } @@ -360,7 +360,7 @@ describe("Cypher Aggregations where node with LocalTime", () => { test("MAX_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someLocalTime_MAX_LTE: "12:00:00" } } }) { + posts(where: { likesAggregate: { node: { someLocalTime: { max: { lte: "12:00:00" } } } } }) { content } } diff --git a/packages/graphql/tests/tck/aggregations/where/node/string.test.ts b/packages/graphql/tests/tck/aggregations/where/node/string.test.ts index 62fa509f73..943e936d23 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/string.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/string.test.ts @@ -45,7 +45,7 @@ describe("Cypher Aggregations where node with String", () => { test("SHORTEST_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_SHORTEST_LENGTH_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { shortestLength: { eq: 10 } } } } }) { content } } @@ -78,7 +78,7 @@ describe("Cypher Aggregations where node with String", () => { test("SHORTEST_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_SHORTEST_LENGTH_GT: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { shortestLength: { gt: 10 } } } } }) { content } } @@ -111,7 +111,7 @@ describe("Cypher Aggregations where node with String", () => { test("SHORTEST_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_SHORTEST_LENGTH_GTE: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { shortestLength: { gte: 10 } } } } }) { content } } @@ -144,7 +144,7 @@ describe("Cypher Aggregations where node with String", () => { test("SHORTEST_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_SHORTEST_LENGTH_LT: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { shortestLength: { lt: 10 } } } } }) { content } } @@ -177,7 +177,7 @@ describe("Cypher Aggregations where node with String", () => { test("SHORTEST_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_SHORTEST_LENGTH_LTE: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { shortestLength: { lte: 10 } } } } }) { content } } @@ -210,7 +210,7 @@ describe("Cypher Aggregations where node with String", () => { test("LONGEST_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_LONGEST_LENGTH_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { longestLength: { eq: 10 } } } } }) { content } } @@ -243,7 +243,7 @@ describe("Cypher Aggregations where node with String", () => { test("LONGEST_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_LONGEST_LENGTH_GT: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { longestLength: { gt: 10 } } } } }) { content } } @@ -276,7 +276,7 @@ describe("Cypher Aggregations where node with String", () => { test("LONGEST_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_LONGEST_LENGTH_GTE: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { longestLength: { gte: 10 } } } } }) { content } } @@ -309,7 +309,7 @@ describe("Cypher Aggregations where node with String", () => { test("LONGEST_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_LONGEST_LENGTH_LT: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { longestLength: { lt: 10 } } } } }) { content } } @@ -342,7 +342,7 @@ describe("Cypher Aggregations where node with String", () => { test("LONGEST_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_LONGEST_LENGTH_LTE: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { longestLength: { lte: 10 } } } } }) { content } } @@ -375,7 +375,7 @@ describe("Cypher Aggregations where node with String", () => { test("AVERAGE_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_AVERAGE_LENGTH_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { averageLength: { eq: 10 } } } } }) { content } } @@ -405,7 +405,7 @@ describe("Cypher Aggregations where node with String", () => { test("AVERAGE_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_AVERAGE_LENGTH_GT: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { averageLength: { gt: 10 } } } } }) { content } } @@ -435,7 +435,7 @@ describe("Cypher Aggregations where node with String", () => { test("AVERAGE_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_AVERAGE_LENGTH_GTE: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { averageLength: { gte: 10 } } } } }) { content } } @@ -465,7 +465,7 @@ describe("Cypher Aggregations where node with String", () => { test("AVERAGE_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_AVERAGE_LENGTH_LT: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { averageLength: { lt: 10 } } } } }) { content } } @@ -495,7 +495,7 @@ describe("Cypher Aggregations where node with String", () => { test("AVERAGE_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_AVERAGE_LENGTH_LTE: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { averageLength: { lte: 10 } } } } }) { content } } @@ -558,7 +558,7 @@ describe("Cypher Aggregations where node with String interface relationships of test("SHORTEST_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_SHORTEST_LENGTH_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { shortestLength: { eq: 10 } } } } }) { content } } @@ -592,7 +592,7 @@ describe("Cypher Aggregations where node with String interface relationships of test("SHORTEST_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_SHORTEST_LENGTH_GT: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { shortestLength: { gt: 10 } } } } }) { content } } @@ -626,7 +626,7 @@ describe("Cypher Aggregations where node with String interface relationships of test("SHORTEST_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_SHORTEST_LENGTH_GTE: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { shortestLength: { gte: 10 } } } } }) { content } } @@ -660,7 +660,7 @@ describe("Cypher Aggregations where node with String interface relationships of test("SHORTEST_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_SHORTEST_LENGTH_LT: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { shortestLength: { lt: 10 } } } } }) { content } } @@ -694,7 +694,7 @@ describe("Cypher Aggregations where node with String interface relationships of test("SHORTEST_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_SHORTEST_LENGTH_LTE: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { shortestLength: { lte: 10 } } } } }) { content } } @@ -728,7 +728,7 @@ describe("Cypher Aggregations where node with String interface relationships of test("LONGEST_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_LONGEST_LENGTH_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { longestLength: { eq: 10 } } } } }) { content } } @@ -762,7 +762,7 @@ describe("Cypher Aggregations where node with String interface relationships of test("LONGEST_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_LONGEST_LENGTH_GT: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { longestLength: { gt: 10 } } } } }) { content } } @@ -796,7 +796,7 @@ describe("Cypher Aggregations where node with String interface relationships of test("LONGEST_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_LONGEST_LENGTH_GTE: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { longestLength: { gte: 10 } } } } }) { content } } @@ -830,7 +830,7 @@ describe("Cypher Aggregations where node with String interface relationships of test("LONGEST_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_LONGEST_LENGTH_LT: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { longestLength: { lt: 10 } } } } }) { content } } @@ -864,7 +864,7 @@ describe("Cypher Aggregations where node with String interface relationships of test("LONGEST_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_LONGEST_LENGTH_LTE: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { longestLength: { lte: 10 } } } } }) { content } } @@ -898,7 +898,7 @@ describe("Cypher Aggregations where node with String interface relationships of test("AVERAGE_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_AVERAGE_LENGTH_EQUAL: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { averageLength: { eq: 10 } } } } }) { content } } @@ -929,7 +929,7 @@ describe("Cypher Aggregations where node with String interface relationships of test("AVERAGE_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_AVERAGE_LENGTH_GT: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { averageLength: { gt: 10 } } } } }) { content } } @@ -960,7 +960,7 @@ describe("Cypher Aggregations where node with String interface relationships of test("AVERAGE_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_AVERAGE_LENGTH_GTE: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { averageLength: { gte: 10 } } } } }) { content } } @@ -991,7 +991,7 @@ describe("Cypher Aggregations where node with String interface relationships of test("AVERAGE_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_AVERAGE_LENGTH_LT: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { averageLength: { lt: 10 } } } } }) { content } } @@ -1022,7 +1022,7 @@ describe("Cypher Aggregations where node with String interface relationships of test("AVERAGE_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { name_AVERAGE_LENGTH_LTE: 10 } } }) { + posts(where: { likesAggregate: { node: { name: { averageLength: { lte: 10 } } } } }) { content } } diff --git a/packages/graphql/tests/tck/aggregations/where/node/time.test.ts b/packages/graphql/tests/tck/aggregations/where/node/time.test.ts index 8108c6d8da..cbd91c97da 100644 --- a/packages/graphql/tests/tck/aggregations/where/node/time.test.ts +++ b/packages/graphql/tests/tck/aggregations/where/node/time.test.ts @@ -45,7 +45,7 @@ describe("Cypher Aggregations where node with Time", () => { test("MIN_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someTime_MIN_EQUAL: "12:00:00" } } }) { + posts(where: { likesAggregate: { node: { someTime: { min: { eq: "12:00:00" } } } } }) { content } } @@ -81,7 +81,7 @@ describe("Cypher Aggregations where node with Time", () => { test("MIN_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someTime_MIN_GT: "12:00:00" } } }) { + posts(where: { likesAggregate: { node: { someTime: { min: { gt: "12:00:00" } } } } }) { content } } @@ -117,7 +117,7 @@ describe("Cypher Aggregations where node with Time", () => { test("MIN_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someTime_MIN_GTE: "12:00:00" } } }) { + posts(where: { likesAggregate: { node: { someTime: { min: { gte: "12:00:00" } } } } }) { content } } @@ -153,7 +153,7 @@ describe("Cypher Aggregations where node with Time", () => { test("MIN_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someTime_MIN_LT: "12:00:00" } } }) { + posts(where: { likesAggregate: { node: { someTime: { min: { lt: "12:00:00" } } } } }) { content } } @@ -189,7 +189,7 @@ describe("Cypher Aggregations where node with Time", () => { test("MIN_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someTime_MIN_LTE: "12:00:00" } } }) { + posts(where: { likesAggregate: { node: { someTime: { min: { lte: "12:00:00" } } } } }) { content } } @@ -225,7 +225,7 @@ describe("Cypher Aggregations where node with Time", () => { test("MAX_EQUAL", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someTime_MAX_EQUAL: "12:00:00" } } }) { + posts(where: { likesAggregate: { node: { someTime: { max: { eq: "12:00:00" } } } } }) { content } } @@ -261,7 +261,7 @@ describe("Cypher Aggregations where node with Time", () => { test("MAX_GT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someTime_MAX_GT: "12:00:00" } } }) { + posts(where: { likesAggregate: { node: { someTime: { max: { gt: "12:00:00" } } } } }) { content } } @@ -297,7 +297,7 @@ describe("Cypher Aggregations where node with Time", () => { test("MAX_GTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someTime_MAX_GTE: "12:00:00" } } }) { + posts(where: { likesAggregate: { node: { someTime: { max: { gte: "12:00:00" } } } } }) { content } } @@ -333,7 +333,7 @@ describe("Cypher Aggregations where node with Time", () => { test("MAX_LT", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someTime_MAX_LT: "12:00:00" } } }) { + posts(where: { likesAggregate: { node: { someTime: { max: { lt: "12:00:00" } } } } }) { content } } @@ -369,7 +369,7 @@ describe("Cypher Aggregations where node with Time", () => { test("MAX_LTE", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { node: { someTime_MAX_LTE: "12:00:00" } } }) { + posts(where: { likesAggregate: { node: { someTime: { max: { lte: "12:00:00" } } } } }) { content } } diff --git a/packages/graphql/tests/tck/array-methods.test.ts b/packages/graphql/tests/tck/array-methods.test.ts index e6a85fc886..0934899eca 100644 --- a/packages/graphql/tests/tck/array-methods.test.ts +++ b/packages/graphql/tests/tck/array-methods.test.ts @@ -182,7 +182,9 @@ describe("Arrays Methods", () => { type Movie @node { title: String! ratings: [Float!]! - @authorization(validate: [{ operations: [UPDATE], where: { jwt: { roles_INCLUDES: "update" } } }]) + @authorization( + validate: [{ operations: [UPDATE], where: { jwt: { roles: { includes: "update" } } } }] + ) } `; @@ -336,7 +338,9 @@ describe("Arrays Methods", () => { type Movie @node { title: String! ratings: [Float!]! - @authorization(validate: [{ operations: [UPDATE], where: { jwt: { roles_INCLUDES: "update" } } }]) + @authorization( + validate: [{ operations: [UPDATE], where: { jwt: { roles: { includes: "update" } } } }] + ) } `; @@ -461,7 +465,7 @@ describe("Arrays Methods", () => { const query = /* GraphQL */ ` mutation { - updateActors(where: { id_EQ: 1 }, update: { actedIn: [{ update: { edge: { pay_PUSH: 10 } } }] }) { + updateActors(where: { id: { eq: 1 } }, update: { actedIn: [{ update: { edge: { pay_PUSH: 10 } } }] }) { actors { name actedIn { @@ -563,7 +567,7 @@ describe("Arrays Methods", () => { const query = /* GraphQL */ ` mutation { - updateActors(where: { id_EQ: 1 }, update: { actedIn: [{ update: { edge: { pay_POP: 1 } } }] }) { + updateActors(where: { id: { eq: 1 } }, update: { actedIn: [{ update: { edge: { pay_POP: 1 } } }] }) { actors { name actedIn { diff --git a/packages/graphql/tests/tck/arrays.test.ts b/packages/graphql/tests/tck/arrays.test.ts index ff6c94504e..460ca42a56 100644 --- a/packages/graphql/tests/tck/arrays.test.ts +++ b/packages/graphql/tests/tck/arrays.test.ts @@ -40,7 +40,7 @@ describe("Cypher Arrays", () => { test("WHERE INCLUDES", async () => { const query = /* GraphQL */ ` { - movies(where: { ratings_INCLUDES: 4.0 }) { + movies(where: { ratings: { includes: 4.0 } }) { title ratings } @@ -61,6 +61,4 @@ describe("Cypher Arrays", () => { }" `); }); - - }); diff --git a/packages/graphql/tests/tck/connections/alias.test.ts b/packages/graphql/tests/tck/connections/alias.test.ts index f55a794564..f875cdadb2 100644 --- a/packages/graphql/tests/tck/connections/alias.test.ts +++ b/packages/graphql/tests/tck/connections/alias.test.ts @@ -83,9 +83,9 @@ describe("Connections Alias", () => { test("Alias Top Level Connection Field Multiple Times", async () => { const query = /* GraphQL */ ` query { - movies(where: { title_EQ: "Forrest Gump" }) { + movies(where: { title: { eq: "Forrest Gump" } }) { title - hanks: actorsConnection(where: { node: { name_EQ: "Tom Hanks" } }) { + hanks: actorsConnection(where: { node: { name: { eq: "Tom Hanks" } } }) { edges { properties { screenTime @@ -95,7 +95,7 @@ describe("Connections Alias", () => { } } } - jenny: actorsConnection(where: { node: { name_EQ: "Robin Wright" } }) { + jenny: actorsConnection(where: { node: { name: { eq: "Robin Wright" } } }) { edges { properties { screenTime diff --git a/packages/graphql/tests/tck/connections/filtering/composite.test.ts b/packages/graphql/tests/tck/connections/filtering/composite.test.ts index ae64774029..cb88b738a3 100644 --- a/packages/graphql/tests/tck/connections/filtering/composite.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/composite.test.ts @@ -50,12 +50,12 @@ describe("Cypher -> Connections -> Filtering -> Composite", () => { test("Composite", async () => { const query = /* GraphQL */ ` query { - movies(where: { title_EQ: "Forrest Gump" }) { + movies(where: { title: { eq: "Forrest Gump" } }) { title actorsConnection( where: { - node: { AND: [{ firstName_EQ: "Tom" }, { lastName_EQ: "Hanks" }] } - edge: { AND: [{ screenTime_GT: 30 }, { screenTime_LT: 90 }] } + node: { AND: [{ firstName: { eq: "Tom" } }, { lastName: { eq: "Hanks" } }] } + edge: { AND: [{ screenTime: { gt: 30 } }, { screenTime: { lt: 90 } }] } } ) { edges { @@ -114,12 +114,12 @@ describe("Cypher -> Connections -> Filtering -> Composite", () => { test("Composite NOT", async () => { const query = /* GraphQL */ ` query { - movies(where: { title_EQ: "Forrest Gump" }) { + movies(where: { title: { eq: "Forrest Gump" } }) { title actorsConnection( where: { - node: { NOT: { firstName_EQ: "Tom", lastName_EQ: "Hanks" } } - edge: { NOT: { screenTime_GT: 30, screenTime_LT: 90 } } + node: { NOT: { firstName: { eq: "Tom" }, lastName: { eq: "Hanks" } } } + edge: { NOT: { screenTime: { gt: 30, lt: 90 } } } } ) { edges { @@ -144,7 +144,7 @@ describe("Cypher -> Connections -> Filtering -> Composite", () => { CALL { WITH this MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) - WHERE (NOT (this1.firstName = $param1 AND this1.lastName = $param2) AND NOT (this0.screenTime < $param3 AND this0.screenTime > $param4)) + WHERE (NOT (this1.firstName = $param1 AND this1.lastName = $param2) AND NOT (this0.screenTime > $param3 AND this0.screenTime < $param4)) WITH collect({ node: this1, relationship: this0 }) AS edges WITH edges, size(edges) AS totalCount CALL { @@ -164,11 +164,11 @@ describe("Cypher -> Connections -> Filtering -> Composite", () => { \\"param1\\": \\"Tom\\", \\"param2\\": \\"Hanks\\", \\"param3\\": { - \\"low\\": 90, + \\"low\\": 30, \\"high\\": 0 }, \\"param4\\": { - \\"low\\": 30, + \\"low\\": 90, \\"high\\": 0 } }" @@ -178,13 +178,13 @@ describe("Cypher -> Connections -> Filtering -> Composite", () => { test("Composite OR (edge and node)", async () => { const query = /* GraphQL */ ` query { - movies(where: { title_EQ: "Forrest Gump" }) { + movies(where: { title: { eq: "Forrest Gump" } }) { title actorsConnection( where: { OR: [ - { node: { AND: [{ firstName_EQ: "Tom" }, { lastName_EQ: "Hanks" }] } } - { edge: { AND: [{ screenTime_GT: 30 }, { screenTime_LT: 90 }] } } + { node: { AND: [{ firstName: { eq: "Tom" } }, { lastName: { eq: "Hanks" } }] } } + { edge: { AND: [{ screenTime: { gt: 30 } }, { screenTime: { lt: 90 } }] } } ] } ) { @@ -244,14 +244,14 @@ describe("Cypher -> Connections -> Filtering -> Composite", () => { test("Composite NOT with nested OR (edge and node)", async () => { const query = /* GraphQL */ ` query { - movies(where: { title_EQ: "Forrest Gump" }) { + movies(where: { title: { eq: "Forrest Gump" } }) { title actorsConnection( where: { NOT: { OR: [ - { node: { AND: [{ firstName_EQ: "Tom" }, { lastName_EQ: "Hanks" }] } } - { edge: { AND: [{ screenTime_GT: 30 }, { screenTime_LT: 90 }] } } + { node: { AND: [{ firstName: { eq: "Tom" } }, { lastName: { eq: "Hanks" } }] } } + { edge: { AND: [{ screenTime: { gt: 30 } }, { screenTime: { lt: 90 } }] } } ] } } @@ -312,7 +312,7 @@ describe("Cypher -> Connections -> Filtering -> Composite", () => { test("Composite NOT with complex nested filters", async () => { const query = /* GraphQL */ ` query { - movies(where: { title_EQ: "Forrest Gump" }) { + movies(where: { title: { eq: "Forrest Gump" } }) { title actorsConnection( where: { @@ -320,11 +320,15 @@ describe("Cypher -> Connections -> Filtering -> Composite", () => { AND: [ { OR: [ - { node: { AND: [{ firstName_EQ: "Tom" }, { lastName_EQ: "Hanks" }] } } - { edge: { AND: [{ screenTime_GT: 30 }, { screenTime_LT: 90 }] } } + { + node: { + AND: [{ firstName: { eq: "Tom" } }, { lastName: { eq: "Hanks" } }] + } + } + { edge: { AND: [{ screenTime: { gt: 30 } }, { screenTime: { lt: 90 } }] } } ] } - { node: { AND: [{ firstName_EQ: "Tommy" }, { lastName_EQ: "Ford" }] } } + { node: { AND: [{ firstName: { eq: "Tommy" } }, { lastName: { eq: "Ford" } }] } } ] } } diff --git a/packages/graphql/tests/tck/connections/filtering/interface-relationships.test.ts b/packages/graphql/tests/tck/connections/filtering/interface-relationships.test.ts index 8ecd1e8484..f7b872e87f 100644 --- a/packages/graphql/tests/tck/connections/filtering/interface-relationships.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/interface-relationships.test.ts @@ -53,7 +53,9 @@ describe("interface relationships with aliased fields", () => { type ProtectedActor @node @authorization( - validate: [{ where: { node: { actedInConnection_SOME: { node: { title_EQ: "$jwt.title" } } } } }] + validate: [ + { where: { node: { actedInConnection: { some: { node: { title: { eq: "$jwt.title" } } } } } } } + ] ) { name: String! @alias(property: "dbName") actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") @@ -68,7 +70,7 @@ describe("interface relationships with aliased fields", () => { test("should read and return interface relationship fields with interface relationship filter SOME", async () => { const query = /* GraphQL */ ` query Actors($title: String) { - actors(where: { actedInConnection_SOME: { node: { title_EQ: $title } } }) { + actors(where: { actedInConnection: { some: { node: { title: { eq: $title } } } } }) { name actedIn { title @@ -126,7 +128,7 @@ describe("interface relationships with aliased fields", () => { test("delete", async () => { const query = /* GraphQL */ ` mutation deleteActors($title: String) { - deleteActors(where: { actedInConnection_SOME: { node: { title_EQ: $title } } }) { + deleteActors(where: { actedInConnection: { some: { node: { title: { eq: $title } } } } }) { nodesDeleted relationshipsDeleted } diff --git a/packages/graphql/tests/tck/connections/filtering/node/and.test.ts b/packages/graphql/tests/tck/connections/filtering/node/and.test.ts index cb84dbcded..5147bc1729 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/and.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/and.test.ts @@ -52,7 +52,9 @@ describe("Cypher -> Connections -> Filtering -> Node -> AND", () => { query { movies { title - actorsConnection(where: { node: { AND: [{ firstName_EQ: "Tom" }, { lastName_EQ: "Hanks" }] } }) { + actorsConnection( + where: { node: { AND: [{ firstName: { eq: "Tom" } }, { lastName: { eq: "Hanks" } }] } } + ) { edges { properties { screenTime @@ -101,7 +103,7 @@ describe("Cypher -> Connections -> Filtering -> Node -> AND", () => { query { movies { title - actorsConnection(where: { node: { NOT: { firstName_EQ: "Tom" } } }) { + actorsConnection(where: { node: { NOT: { firstName: { eq: "Tom" } } } }) { edges { properties { screenTime diff --git a/packages/graphql/tests/tck/connections/filtering/node/arrays.test.ts b/packages/graphql/tests/tck/connections/filtering/node/arrays.test.ts index f5476967a9..4971bd6e42 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/arrays.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/arrays.test.ts @@ -52,7 +52,7 @@ describe("Cypher -> Connections -> Filtering -> Node -> Arrays", () => { query { movies { title - actorsConnection(where: { node: { name_IN: ["Tom Hanks", "Robin Wright"] } }) { + actorsConnection(where: { node: { name: { in: ["Tom Hanks", "Robin Wright"] } } }) { edges { properties { screenTime @@ -102,7 +102,7 @@ describe("Cypher -> Connections -> Filtering -> Node -> Arrays", () => { query { movies { title - actorsConnection(where: { node: { favouriteColours_INCLUDES: "Blue" } }) { + actorsConnection(where: { node: { favouriteColours: { includes: "Blue" } } }) { edges { properties { screenTime diff --git a/packages/graphql/tests/tck/connections/filtering/node/equality.test.ts b/packages/graphql/tests/tck/connections/filtering/node/equality.test.ts index d70e3797b0..301877c15c 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/equality.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/equality.test.ts @@ -51,7 +51,7 @@ describe("Cypher -> Connections -> Filtering -> Node -> Equality", () => { query { movies { title - actorsConnection(where: { node: { name_EQ: "Tom Hanks" } }) { + actorsConnection(where: { node: { name: { eq: "Tom Hanks" } } }) { edges { properties { screenTime @@ -98,7 +98,7 @@ describe("Cypher -> Connections -> Filtering -> Node -> Equality", () => { query { movies { title - actorsConnection(where: { node: { NOT: { name_EQ: "Tom Hanks" } } }) { + actorsConnection(where: { node: { NOT: { name: { eq: "Tom Hanks" } } } }) { edges { properties { screenTime diff --git a/packages/graphql/tests/tck/connections/filtering/node/numerical.test.ts b/packages/graphql/tests/tck/connections/filtering/node/numerical.test.ts index 5c72d242ab..61b5cf8669 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/numerical.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/numerical.test.ts @@ -52,7 +52,7 @@ describe("Cypher -> Connections -> Filtering -> Node -> Numerical", () => { query { movies { title - actorsConnection(where: { node: { age_LT: 60 } }) { + actorsConnection(where: { node: { age: { lt: 60 } } }) { edges { properties { screenTime @@ -103,7 +103,7 @@ describe("Cypher -> Connections -> Filtering -> Node -> Numerical", () => { query { movies { title - actorsConnection(where: { node: { age_LTE: 60 } }) { + actorsConnection(where: { node: { age: { lte: 60 } } }) { edges { properties { screenTime @@ -154,7 +154,7 @@ describe("Cypher -> Connections -> Filtering -> Node -> Numerical", () => { query { movies { title - actorsConnection(where: { node: { age_GT: 60 } }) { + actorsConnection(where: { node: { age: { gt: 60 } } }) { edges { properties { screenTime @@ -205,7 +205,7 @@ describe("Cypher -> Connections -> Filtering -> Node -> Numerical", () => { query { movies { title - actorsConnection(where: { node: { age_GTE: 60 } }) { + actorsConnection(where: { node: { age: { gte: 60 } } }) { edges { properties { screenTime diff --git a/packages/graphql/tests/tck/connections/filtering/node/or.test.ts b/packages/graphql/tests/tck/connections/filtering/node/or.test.ts index 3da74289d7..a9851115d3 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/or.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/or.test.ts @@ -52,7 +52,9 @@ describe("Cypher -> Connections -> Filtering -> Node -> OR", () => { query { movies { title - actorsConnection(where: { node: { OR: [{ firstName_EQ: "Tom" }, { lastName_EQ: "Hanks" }] } }) { + actorsConnection( + where: { node: { OR: [{ firstName: { eq: "Tom" } }, { lastName: { eq: "Hanks" } }] } } + ) { edges { properties { screenTime diff --git a/packages/graphql/tests/tck/connections/filtering/node/relationship.test.ts b/packages/graphql/tests/tck/connections/filtering/node/relationship.test.ts index 7f69d45953..9571d0cfe7 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/relationship.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/relationship.test.ts @@ -47,7 +47,7 @@ describe("Cypher -> Connections -> Filtering -> Node -> Relationship", () => { query { movies { title - actorsConnection(where: { node: { movies_SOME: { title_EQ: "Forrest Gump" } } }) { + actorsConnection(where: { node: { movies: { some: { title: { eq: "Forrest Gump" } } } } }) { edges { node { name diff --git a/packages/graphql/tests/tck/connections/filtering/node/string.test.ts b/packages/graphql/tests/tck/connections/filtering/node/string.test.ts index f71fa6ed3c..d25de1ec40 100644 --- a/packages/graphql/tests/tck/connections/filtering/node/string.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/node/string.test.ts @@ -100,12 +100,12 @@ describe("Cypher -> Connections -> Filtering -> Node -> String", () => { `); }); - test("STARTS_WITH", async () => { + test("startsWith", async () => { const query = /* GraphQL */ ` query { movies { title - actorsConnection(where: { node: { name_STARTS_WITH: "Tom" } }) { + actorsConnection(where: { node: { name: { startsWith: "Tom" } } }) { edges { properties { screenTime @@ -147,12 +147,12 @@ describe("Cypher -> Connections -> Filtering -> Node -> String", () => { `); }); - test("ENDS_WITH", async () => { + test("endsWith", async () => { const query = /* GraphQL */ ` query { movies { title - actorsConnection(where: { node: { name_ENDS_WITH: "Hanks" } }) { + actorsConnection(where: { node: { name: { endsWith: "Hanks" } } }) { edges { properties { screenTime diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/and.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/and.test.ts index c435c1ac53..0b2e9579eb 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/and.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/and.test.ts @@ -52,7 +52,9 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> AND", () => { query { movies { title - actorsConnection(where: { edge: { AND: [{ role_ENDS_WITH: "Gump" }, { screenTime_LT: 60 }] } }) { + actorsConnection( + where: { edge: { AND: [{ role: { endsWith: "Gump" } }, { screenTime: { lt: 60 } }] } } + ) { edges { properties { role @@ -104,7 +106,7 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> AND", () => { query { movies { title - actorsConnection(where: { edge: { NOT: { role_ENDS_WITH: "Gump" } } }) { + actorsConnection(where: { edge: { NOT: { role: { endsWith: "Gump" } } } }) { edges { properties { role diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/arrays.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/arrays.test.ts index 920a6fb52f..d20cada675 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/arrays.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/arrays.test.ts @@ -52,7 +52,7 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Arrays", () => { query { movies { title - actorsConnection(where: { edge: { screenTime_IN: [60, 70] } }) { + actorsConnection(where: { edge: { screenTime: { in: [60, 70] } } }) { edges { properties { screenTime @@ -108,7 +108,7 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Arrays", () => { query { movies { title - actorsConnection(where: { edge: { quotes_INCLUDES: "Life is like a box of chocolates" } }) { + actorsConnection(where: { edge: { quotes: { includes: "Life is like a box of chocolates" } } }) { edges { properties { screenTime diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/equality.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/equality.test.ts index 6c9fd63dde..8fb23e45ed 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/equality.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/equality.test.ts @@ -51,7 +51,7 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Equality", () => query { movies { title - actorsConnection(where: { edge: { screenTime_EQ: 60 } }) { + actorsConnection(where: { edge: { screenTime: { eq: 60 } } }) { edges { properties { screenTime @@ -101,7 +101,7 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Equality", () => query { movies { title - actorsConnection(where: { edge: { NOT: { screenTime_EQ: 60 } } }) { + actorsConnection(where: { edge: { NOT: { screenTime: { eq: 60 } } } }) { edges { properties { screenTime diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/numerical.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/numerical.test.ts index 8763d6a39a..02234fdc65 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/numerical.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/numerical.test.ts @@ -51,7 +51,7 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Numerical", () = query { movies { title - actorsConnection(where: { edge: { screenTime_LT: 60 } }) { + actorsConnection(where: { edge: { screenTime: { lt: 60 } } }) { edges { properties { screenTime @@ -101,7 +101,7 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Numerical", () = query { movies { title - actorsConnection(where: { edge: { screenTime_LTE: 60 } }) { + actorsConnection(where: { edge: { screenTime: { lte: 60 } } }) { edges { properties { screenTime @@ -151,7 +151,7 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Numerical", () = query { movies { title - actorsConnection(where: { edge: { screenTime_GT: 60 } }) { + actorsConnection(where: { edge: { screenTime: { gt: 60 } } }) { edges { properties { screenTime @@ -201,7 +201,7 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Numerical", () = query { movies { title - actorsConnection(where: { edge: { screenTime_GTE: 60 } }) { + actorsConnection(where: { edge: { screenTime: { gte: 60 } } }) { edges { properties { screenTime diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/or.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/or.test.ts index 965a7a40d6..e06e6754bd 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/or.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/or.test.ts @@ -52,7 +52,9 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> OR", () => { query { movies { title - actorsConnection(where: { edge: { OR: [{ role_ENDS_WITH: "Gump" }, { screenTime_LT: 60 }] } }) { + actorsConnection( + where: { edge: { OR: [{ role: { endsWith: "Gump" } }, { screenTime: { lt: 60 } }] } } + ) { edges { properties { role @@ -104,7 +106,9 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> OR", () => { { movies( where: { - actorsConnection_SOME: { OR: [{ node: { name_EQ: "Harry" } }, { edge: { role_EQ: "Tom" } }] } + actorsConnection: { + some: { OR: [{ node: { name: { eq: "Harry" } } }, { edge: { role: { eq: "Tom" } } }] } + } } ) { title diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/string.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/string.test.ts index 78651562d8..e11e650789 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/string.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/string.test.ts @@ -101,12 +101,12 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> String", () => { `); }); - test("STARTS_WITH", async () => { + test("startsWith", async () => { const query = /* GraphQL */ ` query { movies { title - actorsConnection(where: { edge: { role_STARTS_WITH: "Forrest" } }) { + actorsConnection(where: { edge: { role: { startsWith: "Forrest" } } }) { edges { properties { role @@ -148,14 +148,12 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> String", () => { `); }); - - - test("ENDS_WITH", async () => { + test("endsWith", async () => { const query = /* GraphQL */ ` query { movies { title - actorsConnection(where: { edge: { role_ENDS_WITH: "Gump" } }) { + actorsConnection(where: { edge: { role: { endsWith: "Gump" } } }) { edges { properties { role diff --git a/packages/graphql/tests/tck/connections/filtering/relationship/temporal.test.ts b/packages/graphql/tests/tck/connections/filtering/relationship/temporal.test.ts index 4cb178d361..c05110aa34 100644 --- a/packages/graphql/tests/tck/connections/filtering/relationship/temporal.test.ts +++ b/packages/graphql/tests/tck/connections/filtering/relationship/temporal.test.ts @@ -53,7 +53,9 @@ describe("Cypher -> Connections -> Filtering -> Relationship -> Temporal", () => movies { title actorsConnection( - where: { edge: { startDate_GT: "2000-01-01", endDateTime_LT: "2010-01-01T00:00:00.000Z" } } + where: { + edge: { startDate: { gt: "2000-01-01" }, endDateTime: { lt: "2010-01-01T00:00:00.000Z" } } + } ) { edges { properties { diff --git a/packages/graphql/tests/tck/connections/interfaces.test.ts b/packages/graphql/tests/tck/connections/interfaces.test.ts index 3c01e103d9..a4e284a453 100644 --- a/packages/graphql/tests/tck/connections/interfaces.test.ts +++ b/packages/graphql/tests/tck/connections/interfaces.test.ts @@ -112,7 +112,7 @@ describe("Cypher -> Connections -> Interfaces", () => { query { actors { name - actedInConnection(where: { node: { title_STARTS_WITH: "The " } }) { + actedInConnection(where: { node: { title: { startsWith: "The " } } }) { edges { properties { screenTime @@ -171,7 +171,7 @@ describe("Cypher -> Connections -> Interfaces", () => { query { actors { name - actedInConnection(where: { edge: { screenTime_GT: 60 } }) { + actedInConnection(where: { edge: { screenTime: { gt: 60 } } }) { edges { properties { screenTime diff --git a/packages/graphql/tests/tck/connections/mixed-nesting.test.ts b/packages/graphql/tests/tck/connections/mixed-nesting.test.ts index 48934c98b2..a67c53160e 100644 --- a/packages/graphql/tests/tck/connections/mixed-nesting.test.ts +++ b/packages/graphql/tests/tck/connections/mixed-nesting.test.ts @@ -49,16 +49,16 @@ describe("Mixed nesting", () => { test("Connection -> Relationship", async () => { const query = /* GraphQL */ ` query { - movies(where: { title_EQ: "Forrest Gump" }) { + movies(where: { title: { eq: "Forrest Gump" } }) { title - actorsConnection(where: { node: { name_EQ: "Tom Hanks" } }) { + actorsConnection(where: { node: { name: { eq: "Tom Hanks" } } }) { edges { properties { screenTime } node { name - movies(where: { NOT: { title_EQ: "Forrest Gump" } }) { + movies(where: { NOT: { title: { eq: "Forrest Gump" } } }) { title } } @@ -109,20 +109,20 @@ describe("Mixed nesting", () => { test("Connection -> Connection -> Relationship", async () => { const query = /* GraphQL */ ` query { - movies(where: { title_EQ: "Forrest Gump" }) { + movies(where: { title: { eq: "Forrest Gump" } }) { title - actorsConnection(where: { node: { name_EQ: "Tom Hanks" } }) { + actorsConnection(where: { node: { name: { eq: "Tom Hanks" } } }) { edges { properties { screenTime } node { name - moviesConnection(where: { node: { NOT: { title_EQ: "Forrest Gump" } } }) { + moviesConnection(where: { node: { NOT: { title: { eq: "Forrest Gump" } } } }) { edges { node { title - actors(where: { NOT: { name_EQ: "Tom Hanks" } }) { + actors(where: { NOT: { name: { eq: "Tom Hanks" } } }) { name } } @@ -191,11 +191,11 @@ describe("Mixed nesting", () => { test("Relationship -> Connection", async () => { const query = /* GraphQL */ ` query { - movies(where: { title_EQ: "Forrest Gump" }) { + movies(where: { title: { eq: "Forrest Gump" } }) { title - actors(where: { name_EQ: "Tom Hanks" }) { + actors(where: { name: { eq: "Tom Hanks" } }) { name - moviesConnection(where: { node: { NOT: { title_EQ: "Forrest Gump" } } }) { + moviesConnection(where: { node: { NOT: { title: { eq: "Forrest Gump" } } } }) { edges { properties { screenTime diff --git a/packages/graphql/tests/tck/connections/projections/create.test.ts b/packages/graphql/tests/tck/connections/projections/create.test.ts index 2e36df8179..0c974b93e1 100644 --- a/packages/graphql/tests/tck/connections/projections/create.test.ts +++ b/packages/graphql/tests/tck/connections/projections/create.test.ts @@ -173,7 +173,7 @@ describe("Cypher -> Connections -> Projections -> Create", () => { createMovies(input: [{ title: "Forrest Gump" }, { title: "Toy Story" }]) { movies { title - actorsConnection(where: { node: { name_EQ: "Tom Hanks" } }) { + actorsConnection(where: { node: { name: { eq: "Tom Hanks" } } }) { edges { properties { screenTime diff --git a/packages/graphql/tests/tck/connections/projections/projections.test.ts b/packages/graphql/tests/tck/connections/projections/projections.test.ts index 0fb7d99c75..ccf23bdb94 100644 --- a/packages/graphql/tests/tck/connections/projections/projections.test.ts +++ b/packages/graphql/tests/tck/connections/projections/projections.test.ts @@ -52,7 +52,7 @@ describe("Relay Cursor Connection projections", () => { test("edges not returned if not asked for", async () => { const query = /* GraphQL */ ` query { - movies(where: { title_EQ: "Forrest Gump" }) { + movies(where: { title: { eq: "Forrest Gump" } }) { title actorsConnection { totalCount @@ -92,7 +92,7 @@ describe("Relay Cursor Connection projections", () => { test("edges and totalCount returned if pageInfo asked for", async () => { const query = /* GraphQL */ ` query { - movies(where: { title_EQ: "Forrest Gump" }) { + movies(where: { title: { eq: "Forrest Gump" } }) { title actorsConnection { pageInfo { @@ -137,7 +137,7 @@ describe("Relay Cursor Connection projections", () => { test("Minimal edges returned if not asked for with pagination arguments", async () => { const query = /* GraphQL */ ` query { - movies(where: { title_EQ: "Forrest Gump" }) { + movies(where: { title: { eq: "Forrest Gump" } }) { title actorsConnection(first: 5) { totalCount @@ -183,7 +183,7 @@ describe("Relay Cursor Connection projections", () => { test("edges not returned if not asked for on a union", async () => { const query = /* GraphQL */ ` query { - actors(where: { name_EQ: "Tom Hanks" }) { + actors(where: { name: { eq: "Tom Hanks" } }) { name productionsConnection { totalCount @@ -227,7 +227,7 @@ describe("Relay Cursor Connection projections", () => { test("edges and totalCount returned if pageInfo asked for on a union", async () => { const query = /* GraphQL */ ` query { - actors(where: { name_EQ: "Tom Hanks" }) { + actors(where: { name: { eq: "Tom Hanks" } }) { name productionsConnection { pageInfo { @@ -276,7 +276,7 @@ describe("Relay Cursor Connection projections", () => { test("totalCount is calculated and returned if asked for with edges", async () => { const query = /* GraphQL */ ` query { - movies(where: { title_EQ: "Forrest Gump" }) { + movies(where: { title: { eq: "Forrest Gump" } }) { title actorsConnection { totalCount @@ -321,7 +321,7 @@ describe("Relay Cursor Connection projections", () => { test("totalCount is calculated and returned if asked for with edges with pagination arguments", async () => { const query = /* GraphQL */ ` query { - movies(where: { title_EQ: "Forrest Gump" }) { + movies(where: { title: { eq: "Forrest Gump" } }) { title actorsConnection(first: 5) { totalCount diff --git a/packages/graphql/tests/tck/connections/projections/update.test.ts b/packages/graphql/tests/tck/connections/projections/update.test.ts index 3ec79c6dd9..55e69550fe 100644 --- a/packages/graphql/tests/tck/connections/projections/update.test.ts +++ b/packages/graphql/tests/tck/connections/projections/update.test.ts @@ -49,7 +49,7 @@ describe("Cypher -> Connections -> Projections -> Update", () => { test("Connection can be selected following update Mutation", async () => { const query = /* GraphQL */ ` mutation { - updateMovies(where: { title_EQ: "Forrest Gump" }) { + updateMovies(where: { title: { eq: "Forrest Gump" } }) { movies { title actorsConnection { diff --git a/packages/graphql/tests/tck/connections/relationship-properties.test.ts b/packages/graphql/tests/tck/connections/relationship-properties.test.ts index a807ffb9d4..91a71740a2 100644 --- a/packages/graphql/tests/tck/connections/relationship-properties.test.ts +++ b/packages/graphql/tests/tck/connections/relationship-properties.test.ts @@ -50,7 +50,7 @@ describe("Relationship Properties Cypher", () => { test("Projecting node and relationship properties with no arguments", async () => { const query = /* GraphQL */ ` query { - movies(where: { title_EQ: "Forrest Gump" }) { + movies(where: { title: { eq: "Forrest Gump" } }) { title actorsConnection { edges { @@ -97,9 +97,9 @@ describe("Relationship Properties Cypher", () => { test("Projecting node and relationship properties with where argument", async () => { const query = /* GraphQL */ ` query { - movies(where: { title_EQ: "Forrest Gump" }) { + movies(where: { title: { eq: "Forrest Gump" } }) { title - actorsConnection(where: { node: { name_EQ: "Tom Hanks" } }) { + actorsConnection(where: { node: { name: { eq: "Tom Hanks" } } }) { edges { properties { screenTime @@ -146,7 +146,7 @@ describe("Relationship Properties Cypher", () => { test("Projecting node and relationship properties with sort argument", async () => { const query = /* GraphQL */ ` query { - movies(where: { title_EQ: "Forrest Gump" }) { + movies(where: { title: { eq: "Forrest Gump" } }) { title actorsConnection(sort: { edge: { screenTime: DESC } }) { edges { @@ -280,7 +280,7 @@ describe("Relationship Properties Cypher", () => { test("Projecting twice nested node and relationship properties with no arguments", async () => { const query = /* GraphQL */ ` query { - movies(where: { title_EQ: "Forrest Gump" }) { + movies(where: { title: { eq: "Forrest Gump" } }) { title actorsConnection { edges { @@ -350,7 +350,7 @@ describe("Relationship Properties Cypher", () => { test("Projecting thrice nested node and relationship properties with no arguments", async () => { const query = /* GraphQL */ ` query { - movies(where: { title_EQ: "Forrest Gump" }) { + movies(where: { title: { eq: "Forrest Gump" } }) { title actorsConnection { edges { diff --git a/packages/graphql/tests/tck/connections/relationship_properties/connect.test.ts b/packages/graphql/tests/tck/connections/relationship_properties/connect.test.ts index 778aba2020..96e3f5e2e3 100644 --- a/packages/graphql/tests/tck/connections/relationship_properties/connect.test.ts +++ b/packages/graphql/tests/tck/connections/relationship_properties/connect.test.ts @@ -133,7 +133,7 @@ describe("Relationship Properties Connect Cypher", () => { { title: "Forrest Gump" actors: { - connect: [{ where: { node: { name_EQ: "Tom Hanks" } }, edge: { screenTime: 60 } }] + connect: [{ where: { node: { name: { eq: "Tom Hanks" } } }, edge: { screenTime: 60 } }] } } ] @@ -219,7 +219,7 @@ describe("Relationship Properties Connect Cypher", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { title_EQ: "Forrest Gump" } + where: { title: { eq: "Forrest Gump" } } update: { actors: { connect: { edge: { screenTime: 60 } } } } ) { movies { @@ -295,9 +295,11 @@ describe("Relationship Properties Connect Cypher", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { title_EQ: "Forrest Gump" } + where: { title: { eq: "Forrest Gump" } } update: { - actors: { connect: { where: { node: { name_EQ: "Tom Hanks" } }, edge: { screenTime: 60 } } } + actors: { + connect: { where: { node: { name: { eq: "Tom Hanks" } } }, edge: { screenTime: 60 } } + } } ) { movies { diff --git a/packages/graphql/tests/tck/connections/relationship_properties/update.test.ts b/packages/graphql/tests/tck/connections/relationship_properties/update.test.ts index e9bc59d722..3e968ad62a 100644 --- a/packages/graphql/tests/tck/connections/relationship_properties/update.test.ts +++ b/packages/graphql/tests/tck/connections/relationship_properties/update.test.ts @@ -50,10 +50,10 @@ describe("Cypher -> Connections -> Relationship Properties -> Update", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { title_EQ: "Forrest Gump" } + where: { title: { eq: "Forrest Gump" } } update: { actors: [ - { where: { node: { name_EQ: "Tom Hanks" } }, update: { edge: { screenTime_SET: 60 } } } + { where: { node: { name: { eq: "Tom Hanks" } } }, update: { edge: { screenTime_SET: 60 } } } ] } ) { @@ -91,7 +91,9 @@ describe("Cypher -> Connections -> Relationship Properties -> Update", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Tom Hanks\\" + \\"name\\": { + \\"eq\\": \\"Tom Hanks\\" + } } }, \\"update\\": { @@ -116,11 +118,11 @@ describe("Cypher -> Connections -> Relationship Properties -> Update", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { title_EQ: "Forrest Gump" } + where: { title: { eq: "Forrest Gump" } } update: { actors: [ { - where: { node: { name_EQ: "Tom Hanks" } } + where: { node: { name: { eq: "Tom Hanks" } } } update: { edge: { screenTime_SET: 60 }, node: { name_SET: "Tom Hanks" } } } ] @@ -162,7 +164,9 @@ describe("Cypher -> Connections -> Relationship Properties -> Update", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Tom Hanks\\" + \\"name\\": { + \\"eq\\": \\"Tom Hanks\\" + } } }, \\"update\\": { diff --git a/packages/graphql/tests/tck/connections/top-level-interfaces.test.ts b/packages/graphql/tests/tck/connections/top-level-interfaces.test.ts index 2942b73679..d7df8b0854 100644 --- a/packages/graphql/tests/tck/connections/top-level-interfaces.test.ts +++ b/packages/graphql/tests/tck/connections/top-level-interfaces.test.ts @@ -62,7 +62,7 @@ describe("Top level interface connections", () => { test("Top level connection", async () => { const query = /* GraphQL */ ` query { - showsConnection(where: { title_EQ: "The Matrix" }) { + showsConnection(where: { title: { eq: "The Matrix" } }) { edges { node { title @@ -104,7 +104,7 @@ describe("Top level interface connections", () => { test("Top level connection with limit", async () => { const query = /* GraphQL */ ` query { - showsConnection(where: { title_EQ: "The Matrix" }, first: 2) { + showsConnection(where: { title: { eq: "The Matrix" } }, first: 2) { edges { node { title diff --git a/packages/graphql/tests/tck/connections/unions.test.ts b/packages/graphql/tests/tck/connections/unions.test.ts index c80ad33554..df311957e4 100644 --- a/packages/graphql/tests/tck/connections/unions.test.ts +++ b/packages/graphql/tests/tck/connections/unions.test.ts @@ -111,8 +111,8 @@ describe("Cypher -> Connections -> Unions", () => { name publicationsConnection( where: { - Book: { node: { title_EQ: "Book Title" } } - Journal: { node: { subject_EQ: "Journal Subject" } } + Book: { node: { title: { eq: "Book Title" } } } + Journal: { node: { subject: { eq: "Journal Subject" } } } } ) { edges { @@ -173,7 +173,7 @@ describe("Cypher -> Connections -> Unions", () => { authors { name publicationsConnection( - where: { Book: { edge: { words_EQ: 1000 } }, Journal: { edge: { words_EQ: 2000 } } } + where: { Book: { edge: { words: { eq: 1000 } } }, Journal: { edge: { words: { eq: 2000 } } } } ) { edges { properties { @@ -240,8 +240,8 @@ describe("Cypher -> Connections -> Unions", () => { name publicationsConnection( where: { - Book: { edge: { words_EQ: 1000 }, node: { title_EQ: "Book Title" } } - Journal: { edge: { words_EQ: 2000 }, node: { subject_EQ: "Journal Subject" } } + Book: { edge: { words: { eq: 1000 } }, node: { title: { eq: "Book Title" } } } + Journal: { edge: { words: { eq: 2000 } }, node: { subject: { eq: "Journal Subject" } } } } ) { edges { 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 new file mode 100644 index 0000000000..2b760ecfe6 --- /dev/null +++ b/packages/graphql/tests/tck/deprecated/generic-filtering/advanced-filtering-deprecated.test.ts @@ -0,0 +1,830 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Neo4jGraphQL } from "../../../../src"; +import { formatCypher, formatParams, translateQuery } from "../../utils/tck-test-utils"; + +describe("Cypher Advanced Filtering - deprecated", () => { + let typeDefs: string; + let neoSchema: Neo4jGraphQL; + + beforeAll(() => { + typeDefs = /* GraphQL */ ` + type Movie @node { + _id: ID + id: ID + title: String + actorCount: Int + budget: BigInt + genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT) + } + + type Genre @node { + name: String + movies: [Movie!]! @relationship(type: "IN_GENRE", direction: IN) + } + `; + + neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + filters: { + String: { + LT: true, + GT: true, + LTE: true, + GTE: true, + MATCHES: true, + }, + ID: { + MATCHES: true, + }, + }, + }, + }); + }); + + test("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("IN", async () => { + const query = /* GraphQL */ ` + { + movies(where: { _id_IN: ["123"] }) { + _id + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this._id IN $param0 + RETURN this { ._id } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": [ + \\"123\\" + ] + }" + `); + }); + + test("REGEX", async () => { + const query = /* GraphQL */ ` + { + movies(where: { id_MATCHES: "(?i)123.*" }) { + id + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.id =~ $param0 + RETURN this { .id } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"(?i)123.*\\" + }" + `); + }); + + test("NOT", async () => { + const query = /* GraphQL */ ` + { + movies(where: { NOT: { id_EQ: "123" } }) { + id + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE NOT (this.id = $param0) + RETURN this { .id } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"123\\" + }" + `); + }); + + test("CONTAINS", async () => { + const query = /* GraphQL */ ` + { + movies(where: { id_CONTAINS: "123" }) { + id + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.id CONTAINS $param0 + RETURN this { .id } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"123\\" + }" + `); + }); + + test("STARTS_WITH", async () => { + const query = /* GraphQL */ ` + { + movies(where: { id_STARTS_WITH: "123" }) { + id + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.id STARTS WITH $param0 + RETURN this { .id } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"123\\" + }" + `); + }); + + test("ENDS_WITH", async () => { + const query = /* GraphQL */ ` + { + movies(where: { id_ENDS_WITH: "123" }) { + id + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.id ENDS WITH $param0 + RETURN this { .id } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"123\\" + }" + `); + }); + + test("LT", async () => { + const query = /* GraphQL */ ` + { + movies(where: { actorCount_LT: 123 }) { + actorCount + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.actorCount < $param0 + RETURN this { .actorCount } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": { + \\"low\\": 123, + \\"high\\": 0 + } + }" + `); + }); + + test("LT BigInt", async () => { + const query = /* GraphQL */ ` + { + movies(where: { budget_LT: 9223372036854775807 }) { + budget + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.budget < $param0 + RETURN this { .budget } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": { + \\"low\\": -1, + \\"high\\": 2147483647 + } + }" + `); + }); + + test("LT String", async () => { + const query = /* GraphQL */ ` + { + movies(where: { title_LT: "The Matrix Revolutions" }) { + 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 Revolutions\\" + }" + `); + }); + + test("LTE", async () => { + const query = /* GraphQL */ ` + { + movies(where: { actorCount_LTE: 123 }) { + actorCount + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.actorCount <= $param0 + RETURN this { .actorCount } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": { + \\"low\\": 123, + \\"high\\": 0 + } + }" + `); + }); + + test("LTE BigInt", async () => { + const query = /* GraphQL */ ` + { + movies(where: { budget_LTE: 9223372036854775807 }) { + budget + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.budget <= $param0 + RETURN this { .budget } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": { + \\"low\\": -1, + \\"high\\": 2147483647 + } + }" + `); + }); + + test("LTE String", async () => { + const query = /* GraphQL */ ` + { + movies(where: { title_LTE: "The Matrix Revolutions" }) { + 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 Revolutions\\" + }" + `); + }); + + test("GT", async () => { + const query = /* GraphQL */ ` + { + movies(where: { actorCount_GT: 123 }) { + actorCount + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.actorCount > $param0 + RETURN this { .actorCount } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": { + \\"low\\": 123, + \\"high\\": 0 + } + }" + `); + }); + + test("GT BigInt", async () => { + const query = /* GraphQL */ ` + { + movies(where: { budget_GT: 9223372036854775000 }) { + budget + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.budget > $param0 + RETURN this { .budget } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": { + \\"low\\": -808, + \\"high\\": 2147483647 + } + }" + `); + }); + + test("GT String", async () => { + const query = /* GraphQL */ ` + { + movies(where: { title_GT: "The Matrix Revolutions" }) { + 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 Revolutions\\" + }" + `); + }); + + test("GTE", async () => { + const query = /* GraphQL */ ` + { + movies(where: { actorCount_GTE: 123 }) { + actorCount + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.actorCount >= $param0 + RETURN this { .actorCount } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": { + \\"low\\": 123, + \\"high\\": 0 + } + }" + `); + }); + + test("GTE BigInt", async () => { + const query = /* GraphQL */ ` + { + movies(where: { budget_GTE: 9223372036854775000 }) { + budget + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.budget >= $param0 + RETURN this { .budget } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": { + \\"low\\": -808, + \\"high\\": 2147483647 + } + }" + `); + }); + + test("GTE String", async () => { + const query = /* GraphQL */ ` + { + movies(where: { title_GTE: "The Matrix Revolutions" }) { + 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 Revolutions\\" + }" + `); + }); + + describe("Relationships", () => { + test("equality", async () => { + const query = /* GraphQL */ ` + { + movies(where: { genres_SOME: { name_EQ: "some genre" } }) { + actorCount + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE EXISTS { + MATCH (this)-[:IN_GENRE]->(this0:Genre) + WHERE this0.name = $param0 + } + RETURN this { .actorCount } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"some genre\\" + }" + `); + }); + + test("NONE", async () => { + const query = /* GraphQL */ ` + { + movies(where: { genres_NONE: { name_EQ: "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 query = /* GraphQL */ ` + { + movies(where: { genres_${operator}: { name_EQ: "some genre" } }) { + actorCount + } + } + `; + return query; + }; + test("ALL", async () => { + const query = generateQuery("ALL"); + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE (EXISTS { + MATCH (this)-[:IN_GENRE]->(this0:Genre) + WHERE this0.name = $param0 + } AND NOT (EXISTS { + MATCH (this)-[:IN_GENRE]->(this0:Genre) + WHERE NOT (this0.name = $param0) + })) + RETURN this { .actorCount } AS this" + `); + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"some genre\\" + }" + `); + }); + test("NONE", async () => { + const query = generateQuery("NONE"); + + 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\\" + }" + `); + }); + test("SINGLE", async () => { + const query = generateQuery("SINGLE"); + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE single(this0 IN [(this)-[:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 | 1] WHERE true) + RETURN this { .actorCount } AS this" + `); + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"some genre\\" + }" + `); + }); + test("SOME", async () => { + const query = generateQuery("SOME"); + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE 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("Connections", () => { + test("Node and relationship properties equality", async () => { + const query = /* GraphQL */ ` + { + movies(where: { genresConnection_SOME: { node: { name_EQ: "some genre" } } }) { + actorCount + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE EXISTS { + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) + WHERE this1.name = $param0 + } + RETURN this { .actorCount } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"some genre\\" + }" + `); + }); + + test("Node and relationship properties NONE", async () => { + const query = /* GraphQL */ ` + { + movies(where: { genresConnection_NONE: { node: { name_EQ: "some genre" } } }) { + actorCount + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE NOT (EXISTS { + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) + WHERE this1.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 query = /* GraphQL */ ` + { + movies(where: { genresConnection_${operator}: { node: { name_EQ: "some genre" } } }) { + actorCount + } + } + `; + return query; + }; + test("ALL", async () => { + const query = generateQuery("ALL"); + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE (EXISTS { + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) + WHERE this1.name = $param0 + } AND NOT (EXISTS { + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) + WHERE NOT (this1.name = $param0) + })) + RETURN this { .actorCount } AS this" + `); + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"some genre\\" + }" + `); + }); + test("NONE", async () => { + const query = generateQuery("NONE"); + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE NOT (EXISTS { + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) + WHERE this1.name = $param0 + }) + RETURN this { .actorCount } AS this" + `); + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"some genre\\" + }" + `); + }); + test("SINGLE", async () => { + const query = generateQuery("SINGLE"); + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE single(this0 IN [(this)-[this1:IN_GENRE]->(this0:Genre) WHERE this0.name = $param0 | 1] WHERE true) + RETURN this { .actorCount } AS this" + `); + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"some genre\\" + }" + `); + }); + test("SOME", async () => { + const query = generateQuery("SOME"); + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE EXISTS { + MATCH (this)-[this0:IN_GENRE]->(this1:Genre) + WHERE this1.name = $param0 + } + RETURN this { .actorCount } AS this" + `); + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"some genre\\" + }" + `); + }); + }); + }); +}); diff --git a/packages/graphql/tests/tck/deprecated/generic-filtering/cypher-filtering-list-deprecated.test.ts b/packages/graphql/tests/tck/deprecated/generic-filtering/cypher-filtering-list-deprecated.test.ts new file mode 100644 index 0000000000..101276eb74 --- /dev/null +++ b/packages/graphql/tests/tck/deprecated/generic-filtering/cypher-filtering-list-deprecated.test.ts @@ -0,0 +1,76 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Neo4jGraphQL } from "../../../../src"; +import { formatCypher, formatParams, translateQuery } from "../../utils/tck-test-utils"; + +describe("cypher directive filtering - Lists - deprecated", () => { + test("Int cypher field AND String title field", async () => { + const typeDefs = /* GraphQL */ ` + type Movie @node { + title: String + custom_cypher_list: [String] + @cypher( + statement: """ + RETURN ['a', 'b', 'c'] as list + """ + columnName: "list" + ) + } + `; + + const query = /* GraphQL */ ` + query { + movies(where: { custom_cypher_list_INCLUDES: "a" }) { + title + } + } + `; + + const neoSchema: Neo4jGraphQL = new Neo4jGraphQL({ + typeDefs, + }); + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + CALL { + WITH this + CALL { + WITH this + WITH this AS this + RETURN ['a', 'b', 'c'] as list + } + UNWIND list AS var0 + WITH var0 AS this1 + RETURN collect(this1) AS var2 + } + WITH * + WHERE $param0 IN var2 + RETURN this { .title } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"a\\" + }" + `); + }); +}); diff --git a/packages/graphql/tests/tck/deprecated/generic-filtering/cypher-filtering-one-to-one-relationship-deprecated.test.ts b/packages/graphql/tests/tck/deprecated/generic-filtering/cypher-filtering-one-to-one-relationship-deprecated.test.ts new file mode 100644 index 0000000000..3e8f5dc8ca --- /dev/null +++ b/packages/graphql/tests/tck/deprecated/generic-filtering/cypher-filtering-one-to-one-relationship-deprecated.test.ts @@ -0,0 +1,1591 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Neo4jGraphQL } from "../../../../src"; +import { createBearerToken } from "../../../utils/create-bearer-token"; +import { formatCypher, formatParams, translateQuery } from "../../utils/tck-test-utils"; + +describe("cypher directive filtering - One To One Relationship - deprecated", () => { + test("1 to 1 relationship", async () => { + const typeDefs = /* GraphQL */ ` + type Movie @node { + title: String + released: Int + actor: Actor! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(actor:Actor) + RETURN actor + """ + columnName: "actor" + ) + } + + type Actor @node { + name: String + movie: Movie! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:Movie) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const query = /* GraphQL */ ` + query { + movies(where: { actor: { name_EQ: "Keanu Reeves" } }) { + title + } + } + `; + + const neoSchema: Neo4jGraphQL = new Neo4jGraphQL({ + typeDefs, + }); + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)-[:ACTED_IN]->(actor:Actor) + RETURN actor + } + WITH actor AS this0 + RETURN head(collect(this0)) AS this1 + } + WITH * + WHERE this1.name = $param0 + RETURN this { .title } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"Keanu Reeves\\" + }" + `); + }); + + test("1 to 1 relationship with multiple filters", async () => { + const typeDefs = /* GraphQL */ ` + type Movie @node { + title: String + released: Int + actor: Actor! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(actor:Actor) + RETURN actor + """ + columnName: "actor" + ) + } + + type Actor @node { + name: String + age: Int + movie: Movie! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:Movie) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const query = /* GraphQL */ ` + query { + movies(where: { released_EQ: 2003, actor: { name_EQ: "Keanu Reeves", age_GT: 30 } }) { + title + } + } + `; + + const neoSchema: Neo4jGraphQL = new Neo4jGraphQL({ + typeDefs, + }); + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)-[:ACTED_IN]->(actor:Actor) + RETURN actor + } + WITH actor AS this0 + RETURN head(collect(this0)) AS this1 + } + WITH * + WHERE (this.released = $param0 AND (this1.name = $param1 AND this1.age > $param2)) + RETURN this { .title } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": { + \\"low\\": 2003, + \\"high\\": 0 + }, + \\"param1\\": \\"Keanu Reeves\\", + \\"param2\\": { + \\"low\\": 30, + \\"high\\": 0 + } + }" + `); + }); + + test("1 to 1 relationship with single property filter", async () => { + const typeDefs = /* GraphQL */ ` + type Movie @node { + title: String + actor: Actor! + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:Actor) + RETURN actor + """ + columnName: "actor" + ) + } + + type Actor @node { + name: String + movie: Movie! + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:Movie) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const neoSchema: Neo4jGraphQL = new Neo4jGraphQL({ + typeDefs, + }); + + const query = /* GraphQL */ ` + query { + movies(where: { actor: { name_EQ: "Keanu Reeves" } }) { + title + actor { + name + } + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)<-[:ACTED_IN]-(actor:Actor) + RETURN actor + } + WITH actor AS this0 + RETURN head(collect(this0)) AS this1 + } + WITH * + WHERE this1.name = $param0 + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)<-[:ACTED_IN]-(actor:Actor) + RETURN actor + } + WITH actor AS this2 + WITH this2 { .name } AS this2 + RETURN head(collect(this2)) AS var3 + } + RETURN this { .title, actor: var3 } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"Keanu Reeves\\" + }" + `); + }); + + test("1 to 1 relationship with null filter", async () => { + const typeDefs = /* GraphQL */ ` + type Movie @node { + title: String + released: Int + actor: Actor + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:Actor) + RETURN actor + """ + columnName: "actor" + ) + } + + type Actor @node { + name: String + movie: Movie + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:Movie) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const neoSchema: Neo4jGraphQL = new Neo4jGraphQL({ + typeDefs, + }); + + const query = /* GraphQL */ ` + query { + movies(where: { released_EQ: 2003, actor: null }) { + title + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)<-[:ACTED_IN]-(actor:Actor) + RETURN actor + } + WITH actor AS this0 + RETURN head(collect(this0)) AS this1 + } + WITH * + WHERE (this.released = $param0 AND this1 IS NULL) + RETURN this { .title } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": { + \\"low\\": 2003, + \\"high\\": 0 + } + }" + `); + }); + + test("1 to 1 relationship with NOT null filter", async () => { + const typeDefs = /* GraphQL */ ` + type Movie @node { + title: String + released: Int + actor: Actor + @cypher( + statement: """ + MATCH (this)<-[:ACTED_IN]-(actor:Actor) + RETURN actor + """ + columnName: "actor" + ) + } + + type Actor @node { + name: String + movie: Movie + @cypher( + statement: """ + MATCH (this)-[:ACTED_IN]->(movie:Movie) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const neoSchema: Neo4jGraphQL = new Neo4jGraphQL({ + typeDefs, + }); + + const query = /* GraphQL */ ` + query { + movies(where: { AND: [{ released_IN: [2003], NOT: { actor: null } }] }) { + title + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)<-[:ACTED_IN]-(actor:Actor) + RETURN actor + } + WITH actor AS this0 + RETURN head(collect(this0)) AS this1 + } + WITH * + WHERE (this.released IN $param0 AND NOT (this1 IS NULL)) + RETURN this { .title } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": [ + { + \\"low\\": 2003, + \\"high\\": 0 + } + ] + }" + `); + }); + + test("1 to 1 relationship with auth filter on type PASS", async () => { + const typeDefs = /* GraphQL */ ` + type Movie + @node + @authorization(filter: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) { + title: String + released: Int + directed_by: Person! + @cypher( + statement: """ + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + """ + columnName: "director" + ) + } + + type Person @node { + name: String + directed: Movie! + @cypher( + statement: """ + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const token = createBearerToken("secret", { custom_value: "Lilly Wachowski" }); + + const neoSchema: Neo4jGraphQL = new Neo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const query = /* GraphQL */ ` + query { + people(where: { directed: { title_EQ: "The Matrix" } }) { + directed { + title + directed_by { + name + } + } + } + } + `; + + const result = await translateQuery(neoSchema, query, { token }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Person) + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + } + WITH movie AS this0 + RETURN head(collect(this0)) AS this1 + } + WITH * + WHERE this1.title = $param0 + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + } + WITH movie AS this2 + CALL { + WITH this2 + CALL { + WITH this2 + WITH this2 AS this + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + } + WITH director AS this3 + WITH this3 { .name } AS this3 + RETURN head(collect(this3)) AS var4 + } + CALL { + WITH this2 + CALL { + WITH this2 + WITH this2 AS this + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + } + WITH director AS this5 + RETURN head(collect(this5)) AS this6 + } + WITH * + WHERE ($isAuthenticated = true AND ($jwt.custom_value IS NOT NULL AND this6.name = $jwt.custom_value)) + WITH this2 { .title, directed_by: var4 } AS this2 + RETURN head(collect(this2)) AS var7 + } + RETURN this { directed: var7 } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"The Matrix\\", + \\"isAuthenticated\\": true, + \\"jwt\\": { + \\"roles\\": [], + \\"custom_value\\": \\"Lilly Wachowski\\" + } + }" + `); + }); + + test("1 to 1 relationship with auth filter on type FAIL", async () => { + const typeDefs = /* GraphQL */ ` + type Movie + @node + @authorization(filter: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) { + title: String + released: Int + directed_by: Person! + @cypher( + statement: """ + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + """ + columnName: "director" + ) + } + + type Person @node { + name: String + directed: Movie! + @cypher( + statement: """ + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const token = createBearerToken("secret", { custom_value: "Something Incorrect" }); + + const neoSchema: Neo4jGraphQL = new Neo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const query = /* GraphQL */ ` + query { + people(where: { directed: { title_EQ: "The Matrix" } }) { + directed { + title + directed_by { + name + } + } + } + } + `; + + const result = await translateQuery(neoSchema, query, { token }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Person) + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + } + WITH movie AS this0 + RETURN head(collect(this0)) AS this1 + } + WITH * + WHERE this1.title = $param0 + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + } + WITH movie AS this2 + CALL { + WITH this2 + CALL { + WITH this2 + WITH this2 AS this + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + } + WITH director AS this3 + WITH this3 { .name } AS this3 + RETURN head(collect(this3)) AS var4 + } + CALL { + WITH this2 + CALL { + WITH this2 + WITH this2 AS this + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + } + WITH director AS this5 + RETURN head(collect(this5)) AS this6 + } + WITH * + WHERE ($isAuthenticated = true AND ($jwt.custom_value IS NOT NULL AND this6.name = $jwt.custom_value)) + WITH this2 { .title, directed_by: var4 } AS this2 + RETURN head(collect(this2)) AS var7 + } + RETURN this { directed: var7 } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"The Matrix\\", + \\"isAuthenticated\\": true, + \\"jwt\\": { + \\"roles\\": [], + \\"custom_value\\": \\"Something Incorrect\\" + } + }" + `); + }); + + test("1 to 1 relationship with auth filter on field PASS", async () => { + const typeDefs = /* GraphQL */ ` + type Movie @node { + title: String + released: Int + directed_by: Person! + @authorization(filter: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) + @cypher( + statement: """ + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + """ + columnName: "director" + ) + } + + type Person @node { + name: String + directed: Movie! + @cypher( + statement: """ + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const token = createBearerToken("secret", { custom_value: "Lilly Wachowski" }); + + const neoSchema: Neo4jGraphQL = new Neo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const query = /* GraphQL */ ` + query { + people(where: { directed: { title_EQ: "The Matrix" } }) { + directed { + title + directed_by { + name + } + } + } + } + `; + + const result = await translateQuery(neoSchema, query, { token }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Person) + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + } + WITH movie AS this0 + RETURN head(collect(this0)) AS this1 + } + WITH * + WHERE this1.title = $param0 + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + } + WITH movie AS this2 + CALL { + WITH this2 + CALL { + WITH this2 + WITH this2 AS this + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + } + WITH director AS this3 + WITH this3 { .name } AS this3 + RETURN head(collect(this3)) AS var4 + } + CALL { + WITH this2 + CALL { + WITH this2 + WITH this2 AS this + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + } + WITH director AS this5 + RETURN head(collect(this5)) AS this6 + } + WITH * + WHERE ($isAuthenticated = true AND ($jwt.custom_value IS NOT NULL AND this6.name = $jwt.custom_value)) + WITH this2 { .title, directed_by: var4 } AS this2 + RETURN head(collect(this2)) AS var7 + } + RETURN this { directed: var7 } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"The Matrix\\", + \\"isAuthenticated\\": true, + \\"jwt\\": { + \\"roles\\": [], + \\"custom_value\\": \\"Lilly Wachowski\\" + } + }" + `); + }); + + test("1 to 1 relationship with auth filter on field FAIL", async () => { + const typeDefs = /* GraphQL */ ` + type Movie @node { + title: String + released: Int + directed_by: Person! + @authorization(filter: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) + @cypher( + statement: """ + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + """ + columnName: "director" + ) + } + + type Person @node { + name: String + directed: Movie! + @cypher( + statement: """ + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const token = createBearerToken("secret", { custom_value: "Something Incorrect" }); + + const neoSchema: Neo4jGraphQL = new Neo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const query = /* GraphQL */ ` + query { + people(where: { directed: { title_EQ: "The Matrix" } }) { + directed { + title + directed_by { + name + } + } + } + } + `; + + const result = await translateQuery(neoSchema, query, { token }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Person) + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + } + WITH movie AS this0 + RETURN head(collect(this0)) AS this1 + } + WITH * + WHERE this1.title = $param0 + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + } + WITH movie AS this2 + CALL { + WITH this2 + CALL { + WITH this2 + WITH this2 AS this + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + } + WITH director AS this3 + WITH this3 { .name } AS this3 + RETURN head(collect(this3)) AS var4 + } + CALL { + WITH this2 + CALL { + WITH this2 + WITH this2 AS this + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + } + WITH director AS this5 + RETURN head(collect(this5)) AS this6 + } + WITH * + WHERE ($isAuthenticated = true AND ($jwt.custom_value IS NOT NULL AND this6.name = $jwt.custom_value)) + WITH this2 { .title, directed_by: var4 } AS this2 + RETURN head(collect(this2)) AS var7 + } + RETURN this { directed: var7 } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"The Matrix\\", + \\"isAuthenticated\\": true, + \\"jwt\\": { + \\"roles\\": [], + \\"custom_value\\": \\"Something Incorrect\\" + } + }" + `); + }); + + test("1 to 1 relationship with auth validate type PASS", async () => { + const typeDefs = /* GraphQL */ ` + type Movie + @node + @authorization(validate: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) { + title: String + released: Int + directed_by: Person! + @cypher( + statement: """ + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + """ + columnName: "director" + ) + } + + type Person @node { + name: String + directed: Movie! + @cypher( + statement: """ + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const token = createBearerToken("secret", { custom_value: "Lilly Wachowski" }); + + const neoSchema: Neo4jGraphQL = new Neo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const query = /* GraphQL */ ` + query { + people(where: { directed: { title_EQ: "The Matrix" } }) { + directed { + title + directed_by { + name + } + } + } + } + `; + + const result = await translateQuery(neoSchema, query, { token }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Person) + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + } + WITH movie AS this0 + RETURN head(collect(this0)) AS this1 + } + WITH * + WHERE this1.title = $param0 + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + } + WITH movie AS this2 + CALL { + WITH this2 + CALL { + WITH this2 + WITH this2 AS this + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + } + WITH director AS this3 + WITH this3 { .name } AS this3 + RETURN head(collect(this3)) AS var4 + } + CALL { + WITH this2 + CALL { + WITH this2 + WITH this2 AS this + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + } + WITH director AS this5 + RETURN head(collect(this5)) AS this6 + } + WITH * + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.custom_value IS NOT NULL AND this6.name = $jwt.custom_value)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WITH this2 { .title, directed_by: var4 } AS this2 + RETURN head(collect(this2)) AS var7 + } + RETURN this { directed: var7 } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"The Matrix\\", + \\"isAuthenticated\\": true, + \\"jwt\\": { + \\"roles\\": [], + \\"custom_value\\": \\"Lilly Wachowski\\" + } + }" + `); + }); + + test("1 to 1 relationship with auth validate type FAIL", async () => { + const typeDefs = /* GraphQL */ ` + type Movie + @node + @authorization(validate: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) { + title: String + released: Int + directed_by: Person! + @cypher( + statement: """ + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + """ + columnName: "director" + ) + } + + type Person @node { + name: String + directed: Movie! + @cypher( + statement: """ + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const token = createBearerToken("secret", { custom_value: "Something Wrong" }); + + const neoSchema: Neo4jGraphQL = new Neo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const query = /* GraphQL */ ` + query { + people(where: { directed: { title_EQ: "The Matrix" } }) { + directed { + title + directed_by { + name + } + } + } + } + `; + + const result = await translateQuery(neoSchema, query, { token }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Person) + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + } + WITH movie AS this0 + RETURN head(collect(this0)) AS this1 + } + WITH * + WHERE this1.title = $param0 + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + } + WITH movie AS this2 + CALL { + WITH this2 + CALL { + WITH this2 + WITH this2 AS this + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + } + WITH director AS this3 + WITH this3 { .name } AS this3 + RETURN head(collect(this3)) AS var4 + } + CALL { + WITH this2 + CALL { + WITH this2 + WITH this2 AS this + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + } + WITH director AS this5 + RETURN head(collect(this5)) AS this6 + } + WITH * + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.custom_value IS NOT NULL AND this6.name = $jwt.custom_value)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WITH this2 { .title, directed_by: var4 } AS this2 + RETURN head(collect(this2)) AS var7 + } + RETURN this { directed: var7 } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"The Matrix\\", + \\"isAuthenticated\\": true, + \\"jwt\\": { + \\"roles\\": [], + \\"custom_value\\": \\"Something Wrong\\" + } + }" + `); + }); + + test("1 to 1 relationship with auth validate field PASS", async () => { + const typeDefs = /* GraphQL */ ` + type Movie @node { + title: String + released: Int + directed_by: Person! + @authorization(validate: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) + @cypher( + statement: """ + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + """ + columnName: "director" + ) + } + + type Person @node { + name: String + directed: Movie! + @cypher( + statement: """ + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const token = createBearerToken("secret", { custom_value: "Lilly Wachowski" }); + + const neoSchema: Neo4jGraphQL = new Neo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const query = /* GraphQL */ ` + query { + people(where: { directed: { title_EQ: "The Matrix" } }) { + directed { + title + directed_by { + name + } + } + } + } + `; + + const result = await translateQuery(neoSchema, query, { token }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Person) + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + } + WITH movie AS this0 + RETURN head(collect(this0)) AS this1 + } + WITH * + WHERE this1.title = $param0 + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + } + WITH movie AS this2 + CALL { + WITH this2 + CALL { + WITH this2 + WITH this2 AS this + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + } + WITH director AS this3 + WITH this3 { .name } AS this3 + RETURN head(collect(this3)) AS var4 + } + CALL { + WITH this2 + CALL { + WITH this2 + WITH this2 AS this + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + } + WITH director AS this5 + RETURN head(collect(this5)) AS this6 + } + WITH * + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.custom_value IS NOT NULL AND this6.name = $jwt.custom_value)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WITH this2 { .title, directed_by: var4 } AS this2 + RETURN head(collect(this2)) AS var7 + } + RETURN this { directed: var7 } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"The Matrix\\", + \\"isAuthenticated\\": true, + \\"jwt\\": { + \\"roles\\": [], + \\"custom_value\\": \\"Lilly Wachowski\\" + } + }" + `); + }); + + test("1 to 1 relationship with auth validate field FAIL", async () => { + const typeDefs = /* GraphQL */ ` + type Movie @node { + title: String + released: Int + directed_by: Person! + @authorization(validate: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) + @cypher( + statement: """ + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + """ + columnName: "director" + ) + } + + type Person @node { + name: String + directed: Movie! + @cypher( + statement: """ + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const token = createBearerToken("secret", { custom_value: "Something Wrong" }); + + const neoSchema: Neo4jGraphQL = new Neo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: "secret", + }, + }, + }); + + const query = /* GraphQL */ ` + query { + people(where: { directed: { title_EQ: "The Matrix" } }) { + directed { + title + directed_by { + name + } + } + } + } + `; + + const result = await translateQuery(neoSchema, query, { token }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Person) + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + } + WITH movie AS this0 + RETURN head(collect(this0)) AS this1 + } + WITH * + WHERE this1.title = $param0 + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + } + WITH movie AS this2 + CALL { + WITH this2 + CALL { + WITH this2 + WITH this2 AS this + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + } + WITH director AS this3 + WITH this3 { .name } AS this3 + RETURN head(collect(this3)) AS var4 + } + CALL { + WITH this2 + CALL { + WITH this2 + WITH this2 AS this + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + } + WITH director AS this5 + RETURN head(collect(this5)) AS this6 + } + WITH * + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.custom_value IS NOT NULL AND this6.name = $jwt.custom_value)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WITH this2 { .title, directed_by: var4 } AS this2 + RETURN head(collect(this2)) AS var7 + } + RETURN this { directed: var7 } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"The Matrix\\", + \\"isAuthenticated\\": true, + \\"jwt\\": { + \\"roles\\": [], + \\"custom_value\\": \\"Something Wrong\\" + } + }" + `); + }); + + test("1 to 1 relationship with nested selection", async () => { + const typeDefs = /* GraphQL */ ` + type Movie @node { + title: String + released: Int + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) + directed_by: Person! + @cypher( + statement: """ + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + """ + columnName: "director" + ) + } + + type Person @node { + name: String + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + directed: Movie! + @cypher( + statement: """ + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const neoSchema: Neo4jGraphQL = new Neo4jGraphQL({ + typeDefs, + }); + + const query = /* GraphQL */ ` + query { + people(where: { directed: { title_EQ: "The Matrix" } }) { + directed { + title + directed_by { + name + } + actors { + name + movies { + directed_by { + name + } + title + } + } + } + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Person) + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + } + WITH movie AS this0 + RETURN head(collect(this0)) AS this1 + } + WITH * + WHERE this1.title = $param0 + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + } + WITH movie AS this2 + CALL { + WITH this2 + MATCH (this2)<-[this3:ACTED_IN]-(this4:Person) + CALL { + WITH this4 + MATCH (this4)-[this5:ACTED_IN]->(this6:Movie) + CALL { + WITH this6 + CALL { + WITH this6 + WITH this6 AS this + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + } + WITH director AS this7 + WITH this7 { .name } AS this7 + RETURN head(collect(this7)) AS var8 + } + WITH this6 { .title, directed_by: var8 } AS this6 + RETURN collect(this6) AS var9 + } + WITH this4 { .name, movies: var9 } AS this4 + RETURN collect(this4) AS var10 + } + CALL { + WITH this2 + CALL { + WITH this2 + WITH this2 AS this + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + } + WITH director AS this11 + WITH this11 { .name } AS this11 + RETURN head(collect(this11)) AS var12 + } + WITH this2 { .title, directed_by: var12, actors: var10 } AS this2 + RETURN head(collect(this2)) AS var13 + } + RETURN this { directed: var13 } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"The Matrix\\" + }" + `); + }); + + test("1 to 1 relationship with connection", async () => { + const typeDefs = /* GraphQL */ ` + type Movie @node { + title: String + released: Int + actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN) + directed_by: Person! + @cypher( + statement: """ + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + """ + columnName: "director" + ) + } + + type Person @node { + name: String + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + directed: Movie! + @cypher( + statement: """ + MATCH (this)-[:DIRECTED]->(movie:Movie) + RETURN movie + """ + columnName: "movie" + ) + } + `; + + const neoSchema: Neo4jGraphQL = new Neo4jGraphQL({ + typeDefs, + }); + + const query = /* GraphQL */ ` + query { + movies(where: { directed_by: { name_EQ: "Lilly Wachowski" }, title_ENDS_WITH: "Matrix" }) { + actorsConnection { + totalCount + edges { + node { + name + } + } + } + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)<-[:DIRECTED]-(director:Person) + RETURN director + } + WITH director AS this0 + RETURN head(collect(this0)) AS this1 + } + WITH * + WHERE (this.title ENDS WITH $param0 AND this1.name = $param1) + CALL { + WITH this + MATCH (this)<-[this2:ACTED_IN]-(this3:Person) + WITH collect({ node: this3, relationship: this2 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this3, edge.relationship AS this2 + RETURN collect({ node: { name: this3.name, __resolveType: \\"Person\\" } }) AS var4 + } + RETURN { edges: var4, totalCount: totalCount } AS var5 + } + RETURN this { actorsConnection: var5 } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"Matrix\\", + \\"param1\\": \\"Lilly Wachowski\\" + }" + `); + }); +}); diff --git a/packages/graphql/tests/tck/deprecated/generic-filtering/cypher-filtering-scalar-deprecated.test.ts b/packages/graphql/tests/tck/deprecated/generic-filtering/cypher-filtering-scalar-deprecated.test.ts new file mode 100644 index 0000000000..4eb379b1ba --- /dev/null +++ b/packages/graphql/tests/tck/deprecated/generic-filtering/cypher-filtering-scalar-deprecated.test.ts @@ -0,0 +1,218 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Neo4jGraphQL } from "../../../../src"; +import { formatCypher, formatParams, translateQuery } from "../../utils/tck-test-utils"; + +describe("cypher directive filtering - deprecated", () => { + test("Int cypher field AND String title field", async () => { + const typeDefs = /* GraphQL */ ` + type Movie @node { + title: String + special_count: Int + @cypher( + statement: """ + MATCH (m:Movie) + RETURN count(m) as c + """ + columnName: "c" + ) + } + `; + + const query = /* GraphQL */ ` + query { + movies(where: { special_count_GTE: 1, title_EQ: "CustomType One" }) { + special_count + } + } + `; + + const neoSchema: Neo4jGraphQL = new Neo4jGraphQL({ + typeDefs, + }); + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (m:Movie) + RETURN count(m) as c + } + WITH c AS this0 + RETURN this0 AS var1 + } + WITH * + WHERE (this.title = $param0 AND var1 >= $param1) + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (m:Movie) + RETURN count(m) as c + } + WITH c AS this2 + RETURN this2 AS var3 + } + RETURN this { special_count: var3 } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"CustomType One\\", + \\"param1\\": { + \\"low\\": 1, + \\"high\\": 0 + } + }" + `); + }); + + test("unmatched Int cypher field AND String title field", async () => { + const typeDefs = /* GraphQL */ ` + type Movie @node { + title: String + special_count: Int + @cypher( + statement: """ + MATCH (m:Movie) + RETURN count(m) as c + """ + columnName: "c" + ) + } + `; + + const query = /* GraphQL */ ` + query { + movies(where: { special_count_GTE: 1, title_EQ: "CustomType Unknown" }) { + special_count + } + } + `; + + const neoSchema: Neo4jGraphQL = new Neo4jGraphQL({ + typeDefs, + }); + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (m:Movie) + RETURN count(m) as c + } + WITH c AS this0 + RETURN this0 AS var1 + } + WITH * + WHERE (this.title = $param0 AND var1 >= $param1) + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (m:Movie) + RETURN count(m) as c + } + WITH c AS this2 + RETURN this2 AS var3 + } + RETURN this { special_count: var3 } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"CustomType Unknown\\", + \\"param1\\": { + \\"low\\": 1, + \\"high\\": 0 + } + }" + `); + }); + + test("Int cypher field, selecting String title field", async () => { + const typeDefs = /* GraphQL */ ` + type Movie @node { + title: String + special_count: Int + @cypher( + statement: """ + MATCH (m:Movie) + RETURN count(m) as c + """ + columnName: "c" + ) + } + `; + + const query = /* GraphQL */ ` + query { + movies(where: { special_count_GTE: 1 }) { + title + } + } + `; + + const neoSchema: Neo4jGraphQL = new Neo4jGraphQL({ + typeDefs, + }); + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (m:Movie) + RETURN count(m) as c + } + WITH c AS this0 + RETURN this0 AS var1 + } + WITH * + WHERE var1 >= $param0 + RETURN this { .title } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": { + \\"low\\": 1, + \\"high\\": 0 + } + }" + `); + }); +}); diff --git a/packages/graphql/tests/tck/deprecated/generic-filtering/delete-deprecated.test.ts b/packages/graphql/tests/tck/deprecated/generic-filtering/delete-deprecated.test.ts new file mode 100644 index 0000000000..16d87dc5ca --- /dev/null +++ b/packages/graphql/tests/tck/deprecated/generic-filtering/delete-deprecated.test.ts @@ -0,0 +1,304 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Neo4jGraphQL } from "../../../../src"; +import { formatCypher, formatParams, translateQuery } from "../../utils/tck-test-utils"; + +describe("Cypher Delete - Deprecated", () => { + let typeDefs: string; + let neoSchema: Neo4jGraphQL; + + beforeAll(() => { + typeDefs = /* GraphQL */ ` + type Actor @node { + name: String + movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) + } + + type Movie @node { + id: ID + title: String + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) + } + `; + + neoSchema = new Neo4jGraphQL({ + typeDefs, + }); + }); + + test("Simple Delete", async () => { + const query = /* GraphQL */ ` + mutation { + deleteMovies(where: { id_EQ: "123" }) { + nodesDeleted + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.id = $param0 + DETACH DELETE this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"123\\" + }" + `); + }); + + test("Single Nested Delete", async () => { + const query = /* GraphQL */ ` + mutation { + deleteMovies( + where: { id_EQ: 123 } + delete: { actors: { where: { node: { name_EQ: "Actor to delete" } } } } + ) { + nodesDeleted + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.id = $param0 + WITH * + CALL { + WITH * + OPTIONAL MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) + WHERE this1.name = $param1 + WITH this0, collect(DISTINCT this1) AS var2 + CALL { + WITH var2 + UNWIND var2 AS var3 + DETACH DELETE var3 + } + } + WITH * + DETACH DELETE this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"123\\", + \\"param1\\": \\"Actor to delete\\" + }" + `); + }); + + test("Single Nested Delete deleting multiple", async () => { + const query = /* GraphQL */ ` + mutation { + deleteMovies( + where: { id_EQ: 123 } + delete: { + actors: [ + { where: { node: { name_EQ: "Actor to delete" } } } + { where: { node: { name_EQ: "Another actor to delete" } } } + ] + } + ) { + nodesDeleted + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.id = $param0 + WITH * + CALL { + WITH * + OPTIONAL MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) + WHERE this1.name = $param1 + WITH this0, collect(DISTINCT this1) AS var2 + CALL { + WITH var2 + UNWIND var2 AS var3 + DETACH DELETE var3 + } + } + CALL { + WITH * + OPTIONAL MATCH (this)<-[this4:ACTED_IN]-(this5:Actor) + WHERE this5.name = $param2 + WITH this4, collect(DISTINCT this5) AS var6 + CALL { + WITH var6 + UNWIND var6 AS var7 + DETACH DELETE var7 + } + } + WITH * + DETACH DELETE this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"123\\", + \\"param1\\": \\"Actor to delete\\", + \\"param2\\": \\"Another actor to delete\\" + }" + `); + }); + + test("Double Nested Delete", async () => { + const query = /* GraphQL */ ` + mutation { + deleteMovies( + where: { id_EQ: 123 } + delete: { + actors: { + where: { node: { name_EQ: "Actor to delete" } } + delete: { movies: { where: { node: { id_EQ: 321 } } } } + } + } + ) { + nodesDeleted + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.id = $param0 + WITH * + CALL { + WITH * + OPTIONAL MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) + WHERE this1.name = $param1 + WITH * + CALL { + WITH * + OPTIONAL MATCH (this1)-[this2:ACTED_IN]->(this3:Movie) + WHERE this3.id = $param2 + WITH this2, collect(DISTINCT this3) AS var4 + CALL { + WITH var4 + UNWIND var4 AS var5 + DETACH DELETE var5 + } + } + WITH this0, collect(DISTINCT this1) AS var6 + CALL { + WITH var6 + UNWIND var6 AS var7 + DETACH DELETE var7 + } + } + WITH * + DETACH DELETE this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"123\\", + \\"param1\\": \\"Actor to delete\\", + \\"param2\\": \\"321\\" + }" + `); + }); + + test("Triple Nested Delete", async () => { + const query = /* GraphQL */ ` + mutation { + deleteMovies( + where: { id_EQ: 123 } + delete: { + actors: { + where: { node: { name_EQ: "Actor to delete" } } + delete: { + movies: { + where: { node: { id_EQ: 321 } } + delete: { actors: { where: { node: { name_EQ: "Another actor to delete" } } } } + } + } + } + } + ) { + nodesDeleted + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Movie) + WHERE this.id = $param0 + WITH * + CALL { + WITH * + OPTIONAL MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) + WHERE this1.name = $param1 + WITH * + CALL { + WITH * + OPTIONAL MATCH (this1)-[this2:ACTED_IN]->(this3:Movie) + WHERE this3.id = $param2 + WITH * + CALL { + WITH * + OPTIONAL MATCH (this3)<-[this4:ACTED_IN]-(this5:Actor) + WHERE this5.name = $param3 + WITH this4, collect(DISTINCT this5) AS var6 + CALL { + WITH var6 + UNWIND var6 AS var7 + DETACH DELETE var7 + } + } + WITH this2, collect(DISTINCT this3) AS var8 + CALL { + WITH var8 + UNWIND var8 AS var9 + DETACH DELETE var9 + } + } + WITH this0, collect(DISTINCT this1) AS var10 + CALL { + WITH var10 + UNWIND var10 AS var11 + DETACH DELETE var11 + } + } + WITH * + DETACH DELETE this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"123\\", + \\"param1\\": \\"Actor to delete\\", + \\"param2\\": \\"321\\", + \\"param3\\": \\"Another actor to delete\\" + }" + `); + }); +}); diff --git a/packages/graphql/tests/tck/deprecated/generic-filtering/delete-interface-deprecated.test.ts b/packages/graphql/tests/tck/deprecated/generic-filtering/delete-interface-deprecated.test.ts new file mode 100644 index 0000000000..ddb73dc3f0 --- /dev/null +++ b/packages/graphql/tests/tck/deprecated/generic-filtering/delete-interface-deprecated.test.ts @@ -0,0 +1,350 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Neo4jGraphQL } from "../../../../src"; +import { formatCypher, formatParams, translateQuery } from "../../utils/tck-test-utils"; + +describe("Cypher Delete - interface - deprecated", () => { + let typeDefs: string; + let neoSchema: Neo4jGraphQL; + + beforeAll(() => { + typeDefs = /* GraphQL */ ` + type Episode @node { + runtime: Int! + series: [Series!]! @relationship(type: "HAS_EPISODE", direction: IN) + } + + interface Production { + title: String! + actors: [Actor!]! @declareRelationship + } + + interface Worker { + name: String + } + + type ScreenWriter implements Worker @node { + name: String + } + + type StuntPerformer implements Worker @node { + name: String! + workedOn: [Production!]! @relationship(type: "WORKED_ON", direction: OUT) + } + + type Movie implements Production @node { + title: String! + runtime: Int! + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") + workers: [Worker!]! @relationship(type: "WORKED_ON", direction: IN) + } + + type Series implements Production @node { + title: String! + episodes: [Episode!]! @relationship(type: "HAS_EPISODE", direction: OUT) + actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") + } + + type Actor @node { + name: String! + actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") + } + + type ActedIn @relationshipProperties { + screenTime: Int! + } + `; + + neoSchema = new Neo4jGraphQL({ + typeDefs, + }); + }); + + test("Simple Delete", async () => { + const query = /* GraphQL */ ` + mutation { + deleteActors(where: { name_EQ: "Keanu" }) { + nodesDeleted + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Actor) + WHERE this.name = $param0 + DETACH DELETE this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"Keanu\\" + }" + `); + }); + + test("Single Nested Delete", async () => { + const query = /* GraphQL */ ` + mutation { + deleteActors( + where: { name_EQ: "Keanu" } + delete: { actedIn: { where: { node: { title_EQ: "Matrix" } } } } + ) { + nodesDeleted + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Actor) + WHERE this.name = $param0 + WITH * + CALL { + WITH * + OPTIONAL MATCH (this)-[this0:ACTED_IN]->(this1:Movie) + WHERE this1.title = $param1 + WITH this0, collect(DISTINCT this1) AS var2 + CALL { + WITH var2 + UNWIND var2 AS var3 + DETACH DELETE var3 + } + } + CALL { + WITH * + OPTIONAL MATCH (this)-[this4:ACTED_IN]->(this5:Series) + WHERE this5.title = $param2 + WITH this4, collect(DISTINCT this5) AS var6 + CALL { + WITH var6 + UNWIND var6 AS var7 + DETACH DELETE var7 + } + } + WITH * + DETACH DELETE this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"Keanu\\", + \\"param1\\": \\"Matrix\\", + \\"param2\\": \\"Matrix\\" + }" + `); + }); + + test("Single Nested Delete, + typename filter", async () => { + const query = /* GraphQL */ ` + mutation { + deleteActors( + where: { name_EQ: "Keanu" } + delete: { actedIn: { where: { node: { typename: [Movie], title_EQ: "Matrix" } } } } + ) { + nodesDeleted + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Actor) + WHERE this.name = $param0 + WITH * + CALL { + WITH * + OPTIONAL MATCH (this)-[this0:ACTED_IN]->(this1:Movie) + WHERE (this1.title = $param1 AND this1:Movie) + WITH this0, collect(DISTINCT this1) AS var2 + CALL { + WITH var2 + UNWIND var2 AS var3 + DETACH DELETE var3 + } + } + CALL { + WITH * + OPTIONAL MATCH (this)-[this4:ACTED_IN]->(this5:Series) + WHERE (this5.title = $param2 AND this5:Movie) + WITH this4, collect(DISTINCT this5) AS var6 + CALL { + WITH var6 + UNWIND var6 AS var7 + DETACH DELETE var7 + } + } + WITH * + DETACH DELETE this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"Keanu\\", + \\"param1\\": \\"Matrix\\", + \\"param2\\": \\"Matrix\\" + }" + `); + }); + + test("Single Nested Delete, deleting multiple", async () => { + const query = /* GraphQL */ ` + mutation { + deleteActors( + where: { name_EQ: "Keanu" } + delete: { + actedIn: { where: { node: { OR: [{ title_EQ: "Matrix" }, { title_EQ: "Matrix Reloaded" }] } } } + } + ) { + nodesDeleted + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Actor) + WHERE this.name = $param0 + WITH * + CALL { + WITH * + OPTIONAL MATCH (this)-[this0:ACTED_IN]->(this1:Movie) + WHERE (this1.title = $param1 OR this1.title = $param2) + WITH this0, collect(DISTINCT this1) AS var2 + CALL { + WITH var2 + UNWIND var2 AS var3 + DETACH DELETE var3 + } + } + CALL { + WITH * + OPTIONAL MATCH (this)-[this4:ACTED_IN]->(this5:Series) + WHERE (this5.title = $param3 OR this5.title = $param4) + WITH this4, collect(DISTINCT this5) AS var6 + CALL { + WITH var6 + UNWIND var6 AS var7 + DETACH DELETE var7 + } + } + WITH * + DETACH DELETE this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"Keanu\\", + \\"param1\\": \\"Matrix\\", + \\"param2\\": \\"Matrix Reloaded\\", + \\"param3\\": \\"Matrix\\", + \\"param4\\": \\"Matrix Reloaded\\" + }" + `); + }); + + test("Double Nested Delete", async () => { + const query = /* GraphQL */ ` + mutation { + deleteActors( + where: { name_EQ: "Keanu" } + delete: { + actedIn: { + where: { node: { title_EQ: "Matrix" } } + delete: { actors: { where: { node: { name_EQ: "Gloria Foster" } } } } + } + } + ) { + nodesDeleted + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Actor) + WHERE this.name = $param0 + WITH * + CALL { + WITH * + OPTIONAL MATCH (this)-[this0:ACTED_IN]->(this1:Movie) + WHERE this1.title = $param1 + WITH * + CALL { + WITH * + OPTIONAL MATCH (this1)<-[this2:ACTED_IN]-(this3:Actor) + WHERE this3.name = $param2 + WITH this2, collect(DISTINCT this3) AS var4 + CALL { + WITH var4 + UNWIND var4 AS var5 + DETACH DELETE var5 + } + } + WITH this0, collect(DISTINCT this1) AS var6 + CALL { + WITH var6 + UNWIND var6 AS var7 + DETACH DELETE var7 + } + } + CALL { + WITH * + OPTIONAL MATCH (this)-[this8:ACTED_IN]->(this9:Series) + WHERE this9.title = $param3 + WITH * + CALL { + WITH * + OPTIONAL MATCH (this9)<-[this10:ACTED_IN]-(this11:Actor) + WHERE this11.name = $param4 + WITH this10, collect(DISTINCT this11) AS var12 + CALL { + WITH var12 + UNWIND var12 AS var13 + DETACH DELETE var13 + } + } + WITH this8, collect(DISTINCT this9) AS var14 + CALL { + WITH var14 + UNWIND var14 AS var15 + DETACH DELETE var15 + } + } + WITH * + DETACH DELETE this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"Keanu\\", + \\"param1\\": \\"Matrix\\", + \\"param2\\": \\"Gloria Foster\\", + \\"param3\\": \\"Matrix\\", + \\"param4\\": \\"Gloria Foster\\" + }" + `); + }); +}); diff --git a/packages/graphql/tests/tck/deprecated/generic-filtering/node-label-interface-deprecated.test.ts b/packages/graphql/tests/tck/deprecated/generic-filtering/node-label-interface-deprecated.test.ts new file mode 100644 index 0000000000..47feeea58e --- /dev/null +++ b/packages/graphql/tests/tck/deprecated/generic-filtering/node-label-interface-deprecated.test.ts @@ -0,0 +1,109 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Neo4jGraphQL } from "../../../../src"; +import { formatCypher, formatParams, translateQuery } from "../../utils/tck-test-utils"; + +describe("Node directive with interface - deprecated", () => { + let typeDefs: string; + let neoSchema: Neo4jGraphQL; + + beforeAll(() => { + typeDefs = /* GraphQL */ ` + interface Search { + name: String + } + + type Genre implements Search @node(labels: ["Category", "ExtraLabel1", "ExtraLabel2"]) { + name: String + } + + type Movie implements Search @node(labels: ["Film"]) { + name: String + title: String + search: [Search!]! @relationship(type: "SEARCH", direction: OUT) + } + `; + + neoSchema = new Neo4jGraphQL({ + typeDefs, + }); + }); + + test("Read Interface", async () => { + const query = /* GraphQL */ ` + { + movies(where: { title_EQ: "some title" }) { + search(where: { name_EQ: "Horror" }, offset: 1, limit: 10) { + ... on Movie { + title + } + ... on Genre { + name + } + } + } + } + `; + + const result = await translateQuery(neoSchema, query); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Film) + WHERE this.title = $param0 + CALL { + WITH this + CALL { + WITH * + MATCH (this)-[this0:SEARCH]->(this1:Category:ExtraLabel1:ExtraLabel2) + WHERE this1.name = $param1 + WITH this1 { .name, __resolveType: \\"Genre\\", __id: id(this1) } AS this1 + RETURN this1 AS var2 + UNION + WITH * + MATCH (this)-[this3:SEARCH]->(this4:Film) + WHERE this4.name = $param2 + WITH this4 { .title, __resolveType: \\"Movie\\", __id: id(this4) } AS this4 + RETURN this4 AS var2 + } + WITH var2 + SKIP $param3 + LIMIT $param4 + RETURN collect(var2) AS var2 + } + RETURN this { search: var2 } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"param0\\": \\"some title\\", + \\"param1\\": \\"Horror\\", + \\"param2\\": \\"Horror\\", + \\"param3\\": { + \\"low\\": 1, + \\"high\\": 0 + }, + \\"param4\\": { + \\"low\\": 10, + \\"high\\": 0 + } + }" + `); + }); +}); diff --git a/packages/graphql/tests/tck/deprecated/generic-filtering/projection-deprecated.test.ts b/packages/graphql/tests/tck/deprecated/generic-filtering/projection-deprecated.test.ts new file mode 100644 index 0000000000..ea59d35126 --- /dev/null +++ b/packages/graphql/tests/tck/deprecated/generic-filtering/projection-deprecated.test.ts @@ -0,0 +1,133 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Neo4jGraphQL } from "../../../../src"; +import { createBearerToken } from "../../../utils/create-bearer-token"; +import { formatCypher, formatParams, translateQuery } from "../../utils/tck-test-utils"; + +describe("Cypher Auth Projection - deprecated", () => { + const secret = "secret"; + let typeDefs: string; + let neoSchema: Neo4jGraphQL; + + beforeAll(() => { + typeDefs = /* GraphQL */ ` + type User @node { + id: ID + name: String + } + + extend type User { + id: ID @authorization(validate: [{ when: BEFORE, where: { node: { id_EQ: "$jwt.sub" } } }]) + } + `; + + neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + }); + + test("Update Node", async () => { + const query = /* GraphQL */ ` + mutation { + updateUsers(update: { id_SET: "new-id" }) { + users { + id + } + } + } + `; + + const token = createBearerToken("secret", { sub: "super_admin", roles: ["admin"] }); + const result = await translateQuery(neoSchema, query, { + token, + }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:User) + WITH this + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + SET this.id = $this_update_id_SET + WITH * + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + RETURN collect(DISTINCT this { .id }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"isAuthenticated\\": true, + \\"jwt\\": { + \\"roles\\": [ + \\"admin\\" + ], + \\"sub\\": \\"super_admin\\" + }, + \\"this_update_id_SET\\": \\"new-id\\", + \\"resolvedCallbacks\\": {} + }" + `); + }); + + test("Create Node", async () => { + const query = /* GraphQL */ ` + mutation { + createUsers(input: [{ id: "id-1" }, { id: "id-2" }]) { + users { + id + } + } + } + `; + + const token = createBearerToken("secret", { sub: "super_admin", roles: ["admin"] }); + const result = await translateQuery(neoSchema, query, { + token, + }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "UNWIND $create_param0 AS create_var0 + CALL { + WITH create_var0 + CREATE (create_this1:User) + SET + create_this1.id = create_var0.id + RETURN create_this1 + } + RETURN collect(create_this1 { .id }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"create_param0\\": [ + { + \\"id\\": \\"id-1\\" + }, + { + \\"id\\": \\"id-2\\" + } + ] + }" + `); + }); +}); diff --git a/packages/graphql/tests/tck/deprecated/generic-filtering/roles-deprecated.test.ts b/packages/graphql/tests/tck/deprecated/generic-filtering/roles-deprecated.test.ts new file mode 100644 index 0000000000..8d3867ea82 --- /dev/null +++ b/packages/graphql/tests/tck/deprecated/generic-filtering/roles-deprecated.test.ts @@ -0,0 +1,797 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Neo4jGraphQL } from "../../../../src"; +import { createBearerToken } from "../../../utils/create-bearer-token"; +import { formatCypher, formatParams, translateQuery } from "../../utils/tck-test-utils"; + +describe("Cypher Auth Roles - deprecated", () => { + const secret = "secret"; + let typeDefs: string; + let neoSchema: Neo4jGraphQL; + + beforeAll(() => { + typeDefs = /* GraphQL */ ` + type JWTPayload @jwt { + roles: [String!]! + } + + type History @node { + url: String + @authorization( + validate: [{ operations: [READ], where: { jwt: { roles_INCLUDES: "super-admin" } } }] + ) + } + + type Comment @node { + id: String + content: String + post: [Post!]! @relationship(type: "HAS_COMMENT", direction: IN) + } + + type Post @node { + id: String + content: String + creator: [User!]! @relationship(type: "HAS_POST", direction: OUT) + comments: [Comment!]! @relationship(type: "HAS_COMMENT", direction: OUT) + } + + type User @node { + id: ID + name: String + password: String + posts: [Post!]! @relationship(type: "HAS_POST", direction: OUT) + } + + extend type User @authorization(validate: [{ where: { jwt: { roles_INCLUDES: "admin" } } }]) + + extend type Post + @authorization( + validate: [ + { + operations: [CREATE_RELATIONSHIP, DELETE_RELATIONSHIP, DELETE] + where: { jwt: { roles_INCLUDES: "super-admin" } } + } + ] + ) + + extend type User { + password: String + @authorization( + validate: [ + { operations: [READ, CREATE, UPDATE], where: { jwt: { roles_INCLUDES: "super-admin" } } } + ] + ) + } + + extend type User { + history: [History] + @cypher(statement: "MATCH (this)-[:HAS_HISTORY]->(h:History) RETURN h", columnName: "h") + @authorization( + validate: [{ operations: [READ], where: { jwt: { roles_INCLUDES: "super-admin" } } }] + ) + } + `; + + neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { authorization: { key: secret } }, + }); + }); + + test("Read Node", async () => { + const query = /* GraphQL */ ` + { + users { + id + name + } + } + `; + + const token = createBearerToken("secret", { sub: "super_admin", roles: ["admin"] }); + const result = await translateQuery(neoSchema, query, { + token, + }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:User) + WITH * + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + RETURN this { .id, .name } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"isAuthenticated\\": true, + \\"jwt\\": { + \\"roles\\": [ + \\"admin\\" + ], + \\"sub\\": \\"super_admin\\" + }, + \\"param2\\": \\"admin\\" + }" + `); + }); + + test("Read Node & Field", async () => { + const query = /* GraphQL */ ` + { + users { + id + name + password + } + } + `; + + const token = createBearerToken("secret", { sub: "super_admin", roles: ["admin"] }); + const result = await translateQuery(neoSchema, query, { + token, + }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:User) + WITH * + WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + RETURN this { .id, .name, .password } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"isAuthenticated\\": true, + \\"jwt\\": { + \\"roles\\": [ + \\"admin\\" + ], + \\"sub\\": \\"super_admin\\" + }, + \\"param2\\": \\"admin\\", + \\"param3\\": \\"super-admin\\" + }" + `); + }); + + test("Read Node & Cypher Field", async () => { + const query = /* GraphQL */ ` + { + users { + history { + url + } + } + } + `; + + const token = createBearerToken("secret", { sub: "super_admin", roles: ["admin"] }); + const result = await translateQuery(neoSchema, query, { + token, + }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:User) + WITH * + WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + CALL { + WITH this + CALL { + WITH this + WITH this AS this + MATCH (this)-[:HAS_HISTORY]->(h:History) RETURN h + } + WITH h AS this0 + WITH * + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param4 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WITH this0 { .url } AS this0 + RETURN collect(this0) AS var1 + } + RETURN this { history: var1 } AS this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"isAuthenticated\\": true, + \\"jwt\\": { + \\"roles\\": [ + \\"admin\\" + ], + \\"sub\\": \\"super_admin\\" + }, + \\"param2\\": \\"admin\\", + \\"param3\\": \\"super-admin\\", + \\"param4\\": \\"super-admin\\" + }" + `); + }); + + test("Create Node", async () => { + const query = /* GraphQL */ ` + mutation { + createUsers(input: [{ id: "1" }]) { + users { + id + } + } + } + `; + + const token = createBearerToken("secret", { sub: "super_admin", roles: ["admin"] }); + const result = await translateQuery(neoSchema, query, { + token, + }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "UNWIND $create_param0 AS create_var0 + CALL { + WITH create_var0 + CREATE (create_this1:User) + SET + create_this1.id = create_var0.id + WITH * + WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $create_param3 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate((create_var0.password IS NOT NULL AND NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $create_param4 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + RETURN create_this1 + } + RETURN collect(create_this1 { .id }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"create_param0\\": [ + { + \\"id\\": \\"1\\" + } + ], + \\"isAuthenticated\\": true, + \\"jwt\\": { + \\"roles\\": [ + \\"admin\\" + ], + \\"sub\\": \\"super_admin\\" + }, + \\"create_param3\\": \\"admin\\", + \\"create_param4\\": \\"super-admin\\" + }" + `); + }); + + test("Create Node & Field", async () => { + const query = /* GraphQL */ ` + mutation { + createUsers(input: [{ id: "1", password: "super-password" }]) { + users { + id + } + } + } + `; + + const token = createBearerToken("secret", { sub: "super_admin", roles: ["admin"] }); + const result = await translateQuery(neoSchema, query, { + token, + }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "UNWIND $create_param0 AS create_var0 + CALL { + WITH create_var0 + CREATE (create_this1:User) + SET + create_this1.id = create_var0.id, + create_this1.password = create_var0.password + WITH * + WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $create_param3 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate((create_var0.password IS NOT NULL AND NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $create_param4 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + RETURN create_this1 + } + RETURN collect(create_this1 { .id }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"create_param0\\": [ + { + \\"id\\": \\"1\\", + \\"password\\": \\"super-password\\" + } + ], + \\"isAuthenticated\\": true, + \\"jwt\\": { + \\"roles\\": [ + \\"admin\\" + ], + \\"sub\\": \\"super_admin\\" + }, + \\"create_param3\\": \\"admin\\", + \\"create_param4\\": \\"super-admin\\" + }" + `); + }); + + test("Update Node", async () => { + const query = /* GraphQL */ ` + mutation { + updateUsers(where: { id_EQ: "1" }, update: { id_SET: "id-1" }) { + users { + id + } + } + } + `; + + const token = createBearerToken("secret", { sub: "super_admin", roles: ["admin"] }); + const result = await translateQuery(neoSchema, query, { + token, + }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:User) + WITH * + WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + SET this.id = $this_update_id_SET + WITH this + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WITH * + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $update_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + RETURN collect(DISTINCT this { .id }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"isAuthenticated\\": true, + \\"jwt\\": { + \\"roles\\": [ + \\"admin\\" + ], + \\"sub\\": \\"super_admin\\" + }, + \\"update_param2\\": \\"admin\\", + \\"param0\\": \\"1\\", + \\"param3\\": \\"admin\\", + \\"this_update_id_SET\\": \\"id-1\\", + \\"authorization__after_param2\\": \\"admin\\", + \\"resolvedCallbacks\\": {} + }" + `); + }); + + test("Update Node & Field", async () => { + const query = /* GraphQL */ ` + mutation { + updateUsers(where: { id_EQ: "1" }, update: { password_SET: "password" }) { + users { + id + } + } + } + `; + + const token = createBearerToken("secret", { sub: "super_admin", roles: ["admin"] }); + const result = await translateQuery(neoSchema, query, { + token, + }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:User) + WITH * + WHERE (this.id = $param0 AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + WITH this + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + SET this.password = $this_update_password_SET + WITH this + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WITH * + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $update_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + RETURN collect(DISTINCT this { .id }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"isAuthenticated\\": true, + \\"jwt\\": { + \\"roles\\": [ + \\"admin\\" + ], + \\"sub\\": \\"super_admin\\" + }, + \\"update_param2\\": \\"admin\\", + \\"param0\\": \\"1\\", + \\"param3\\": \\"admin\\", + \\"this_update_password_SET\\": \\"password\\", + \\"authorization__before_param2\\": \\"super-admin\\", + \\"authorization__after_param2\\": \\"admin\\", + \\"resolvedCallbacks\\": {} + }" + `); + }); + + test("Connect", async () => { + const query = /* GraphQL */ ` + mutation { + updateUsers(update: { posts: { connect: {} } }) { + users { + id + } + } + } + `; + + const token = createBearerToken("secret", { sub: "super_admin", roles: ["admin"] }); + const result = await translateQuery(neoSchema, query, { + token, + }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:User) + WITH * + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WITH * + CALL { + WITH this + OPTIONAL MATCH (this_posts0_connect0_node:Post) + WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param3 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + CALL { + WITH * + WITH collect(this_posts0_connect0_node) as connectedNodes, collect(this) as parentNodes + CALL { + WITH connectedNodes, parentNodes + UNWIND parentNodes as this + UNWIND connectedNodes as this_posts0_connect0_node + MERGE (this)-[:HAS_POST]->(this_posts0_connect0_node) + } + } + WITH this, this_posts0_connect0_node + WITH this, this_posts0_connect0_node + WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param3 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + RETURN count(*) AS connect_this_posts0_connect_Post0 + } + WITH this + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WITH * + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $update_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + RETURN collect(DISTINCT this { .id }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"isAuthenticated\\": true, + \\"jwt\\": { + \\"roles\\": [ + \\"admin\\" + ], + \\"sub\\": \\"super_admin\\" + }, + \\"update_param2\\": \\"admin\\", + \\"param2\\": \\"admin\\", + \\"authorization__before_param2\\": \\"super-admin\\", + \\"authorization__before_param3\\": \\"admin\\", + \\"authorization__after_param2\\": \\"admin\\", + \\"authorization__after_param3\\": \\"super-admin\\", + \\"resolvedCallbacks\\": {} + }" + `); + }); + + test("Nested Connect", async () => { + const query = /* GraphQL */ ` + mutation { + updateComments( + update: { + post: { update: { node: { creator: { connect: { where: { node: { id_EQ: "user-id" } } } } } } } + } + ) { + comments { + content + } + } + } + `; + + const token = createBearerToken("secret", { sub: "super_admin", roles: ["admin"] }); + const result = await translateQuery(neoSchema, query, { + token, + }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Comment) + WITH this + CALL { + WITH this + MATCH (this)<-[this_has_comment0_relationship:HAS_COMMENT]-(this_post0:Post) + WITH * + CALL { + WITH this, this_post0 + OPTIONAL MATCH (this_post0_creator0_connect0_node:User) + WHERE this_post0_creator0_connect0_node.id = $this_post0_creator0_connect0_node_param0 AND (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param3 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + CALL { + WITH * + WITH this, collect(this_post0_creator0_connect0_node) as connectedNodes, collect(this_post0) as parentNodes + CALL { + WITH connectedNodes, parentNodes + UNWIND parentNodes as this_post0 + UNWIND connectedNodes as this_post0_creator0_connect0_node + MERGE (this_post0)-[:HAS_POST]->(this_post0_creator0_connect0_node) + } + } + WITH this, this_post0, this_post0_creator0_connect0_node + WITH this, this_post0, this_post0_creator0_connect0_node + WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param3 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + RETURN count(*) AS connect_this_post0_creator0_connect_User0 + } + RETURN count(*) AS update_this_post0 + } + RETURN collect(DISTINCT this { .content }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"this_post0_creator0_connect0_node_param0\\": \\"user-id\\", + \\"isAuthenticated\\": true, + \\"jwt\\": { + \\"roles\\": [ + \\"admin\\" + ], + \\"sub\\": \\"super_admin\\" + }, + \\"authorization__before_param2\\": \\"admin\\", + \\"authorization__before_param3\\": \\"super-admin\\", + \\"authorization__after_param2\\": \\"super-admin\\", + \\"authorization__after_param3\\": \\"admin\\", + \\"resolvedCallbacks\\": {} + }" + `); + }); + + test("Disconnect", async () => { + const query = /* GraphQL */ ` + mutation { + updateUsers(update: { posts: { disconnect: {} } }) { + users { + id + } + } + } + `; + + const token = createBearerToken("secret", { sub: "super_admin", roles: ["admin"] }); + const result = await translateQuery(neoSchema, query, { + token, + }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:User) + WITH * + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WITH this + 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.roles IS NOT NULL AND $authorization__before_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param3 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 + UNWIND this_posts0_disconnect0 as x + DELETE this_posts0_disconnect0_rel + } + WITH this, this_posts0_disconnect0 + WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param3 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + RETURN count(*) AS disconnect_this_posts0_disconnect_Post + } + WITH this + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WITH * + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $update_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + RETURN collect(DISTINCT this { .id }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"isAuthenticated\\": true, + \\"jwt\\": { + \\"roles\\": [ + \\"admin\\" + ], + \\"sub\\": \\"super_admin\\" + }, + \\"update_param2\\": \\"admin\\", + \\"param2\\": \\"admin\\", + \\"authorization__before_param2\\": \\"admin\\", + \\"authorization__before_param3\\": \\"super-admin\\", + \\"authorization__after_param2\\": \\"admin\\", + \\"authorization__after_param3\\": \\"super-admin\\", + \\"resolvedCallbacks\\": {} + }" + `); + }); + + test("Nested Disconnect", async () => { + const query = /* GraphQL */ ` + mutation { + updateComments( + update: { + post: { + update: { node: { creator: { disconnect: { where: { node: { id_EQ: "user-id" } } } } } } + } + } + ) { + comments { + content + } + } + } + `; + + const token = createBearerToken("secret", { sub: "super_admin", roles: ["admin"] }); + const result = await translateQuery(neoSchema, query, { + token, + }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:Comment) + WITH this + CALL { + WITH this + MATCH (this)<-[this_has_comment0_relationship:HAS_COMMENT]-(this_post0:Post) + WITH this, this_post0 + CALL { + WITH this, this_post0 + OPTIONAL MATCH (this_post0)-[this_post0_creator0_disconnect0_rel:HAS_POST]->(this_post0_creator0_disconnect0:User) + WHERE this_post0_creator0_disconnect0.id = $updateComments_args_update_post0_update_node_creator0_disconnect0_where_User_this_post0_creator0_disconnect0param0 AND (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__before_param3 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + CALL { + WITH this_post0_creator0_disconnect0, this_post0_creator0_disconnect0_rel, this_post0 + WITH collect(this_post0_creator0_disconnect0) as this_post0_creator0_disconnect0, this_post0_creator0_disconnect0_rel, this_post0 + UNWIND this_post0_creator0_disconnect0 as x + DELETE this_post0_creator0_disconnect0_rel + } + WITH this, this_post0, this_post0_creator0_disconnect0 + WHERE (apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization__after_param3 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) + RETURN count(*) AS disconnect_this_post0_creator0_disconnect_User + } + RETURN count(*) AS update_this_post0 + } + RETURN collect(DISTINCT this { .content }) AS data" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"updateComments_args_update_post0_update_node_creator0_disconnect0_where_User_this_post0_creator0_disconnect0param0\\": \\"user-id\\", + \\"isAuthenticated\\": true, + \\"jwt\\": { + \\"roles\\": [ + \\"admin\\" + ], + \\"sub\\": \\"super_admin\\" + }, + \\"authorization__before_param2\\": \\"super-admin\\", + \\"authorization__before_param3\\": \\"admin\\", + \\"authorization__after_param2\\": \\"super-admin\\", + \\"authorization__after_param3\\": \\"admin\\", + \\"updateComments\\": { + \\"args\\": { + \\"update\\": { + \\"post\\": [ + { + \\"update\\": { + \\"node\\": { + \\"creator\\": [ + { + \\"disconnect\\": [ + { + \\"where\\": { + \\"node\\": { + \\"id_EQ\\": \\"user-id\\" + } + } + } + ] + } + ] + } + } + } + ] + } + } + }, + \\"resolvedCallbacks\\": {} + }" + `); + }); + + test("Delete", async () => { + const query = /* GraphQL */ ` + mutation { + deleteUsers { + nodesDeleted + } + } + `; + + const token = createBearerToken("secret", { sub: "super_admin", roles: ["admin"] }); + const result = await translateQuery(neoSchema, query, { + token, + }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:User) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + DETACH DELETE this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"isAuthenticated\\": true, + \\"jwt\\": { + \\"roles\\": [ + \\"admin\\" + ], + \\"sub\\": \\"super_admin\\" + }, + \\"param2\\": \\"admin\\" + }" + `); + }); + + test("Nested Delete", async () => { + const query = /* GraphQL */ ` + mutation { + deleteUsers(delete: { posts: { where: {} } }) { + nodesDeleted + } + } + `; + + const token = createBearerToken("secret", { sub: "super_admin", roles: ["admin"] }); + const result = await translateQuery(neoSchema, query, { + token, + }); + + expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` + "MATCH (this:User) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param2 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WITH * + CALL { + WITH * + OPTIONAL MATCH (this)-[this0:HAS_POST]->(this1:Post) + WHERE apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $param3 IN $jwt.roles)), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WITH this0, collect(DISTINCT this1) AS var2 + CALL { + WITH var2 + UNWIND var2 AS var3 + DETACH DELETE var3 + } + } + WITH * + DETACH DELETE this" + `); + + expect(formatParams(result.params)).toMatchInlineSnapshot(` + "{ + \\"isAuthenticated\\": true, + \\"jwt\\": { + \\"roles\\": [ + \\"admin\\" + ], + \\"sub\\": \\"super_admin\\" + }, + \\"param2\\": \\"admin\\", + \\"param3\\": \\"super-admin\\" + }" + `); + }); +}); 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..29a4600287 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 @@ -54,7 +54,7 @@ describe("Cypher Auth Allow", () => { { operations: [READ, UPDATE, DELETE, DELETE_RELATIONSHIP, CREATE_RELATIONSHIP] when: BEFORE - where: { node: { id_EQ: "$jwt.sub" } } + where: { node: { id: { eq: "$jwt.sub" } } } } ] ) @@ -63,7 +63,11 @@ describe("Cypher Auth Allow", () => { password: String! @authorization( validate: [ - { operations: [READ, UPDATE, DELETE], when: BEFORE, where: { node: { id_EQ: "$jwt.sub" } } } + { + operations: [READ, UPDATE, DELETE] + when: BEFORE + where: { node: { id: { eq: "$jwt.sub" } } } + } ] ) } @@ -74,7 +78,7 @@ describe("Cypher Auth Allow", () => { { operations: [READ, UPDATE, DELETE, DELETE_RELATIONSHIP, CREATE_RELATIONSHIP] when: BEFORE - where: { node: { creator_SOME: { id_EQ: "$jwt.sub" } } } + where: { node: { creator: { some: { id: { eq: "$jwt.sub" } } } } } } ] ) @@ -85,7 +89,7 @@ describe("Cypher Auth Allow", () => { { operations: [READ, UPDATE, DELETE, DELETE_RELATIONSHIP, CREATE_RELATIONSHIP] when: BEFORE - where: { node: { creator_SOME: { id_EQ: "$jwt.sub" } } } + where: { node: { creator: { some: { id: { eq: "$jwt.sub" } } } } } } ] ) @@ -194,7 +198,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 +240,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) @@ -261,10 +271,10 @@ describe("Cypher Auth Allow", () => { test("Read Two Relationships", async () => { const query = /* GraphQL */ ` { - users(where: { id_EQ: "1" }) { + users(where: { id: { eq: "1" } }) { id - posts(where: { id_EQ: "1" }) { - comments(where: { id_EQ: "1" }) { + posts(where: { id: { eq: "1" } }) { + comments(where: { id: { eq: "1" } }) { content } } @@ -285,12 +295,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 } @@ -319,7 +335,7 @@ describe("Cypher Auth Allow", () => { test("Update Node", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(where: { id_EQ: "old-id" }, update: { id_SET: "new-id" }) { + updateUsers(where: { id: { eq: "old-id" } }, update: { id_SET: "new-id" }) { users { id } @@ -361,7 +377,7 @@ describe("Cypher Auth Allow", () => { test("Update Node Property", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(where: { id_EQ: "id-01" }, update: { password_SET: "new-password" }) { + updateUsers(where: { id: { eq: "id-01" } }, update: { password_SET: "new-password" }) { users { id } @@ -406,7 +422,7 @@ describe("Cypher Auth Allow", () => { const query = /* GraphQL */ ` mutation { updatePosts( - where: { id_EQ: "post-id" } + where: { id: { eq: "post-id" } } update: { creator: { update: { node: { id_SET: "new-id" } } } } ) { posts { @@ -424,7 +440,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 +453,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" `); @@ -458,7 +480,7 @@ describe("Cypher Auth Allow", () => { const query = /* GraphQL */ ` mutation { updatePosts( - where: { id_EQ: "post-id" } + where: { id: { eq: "post-id" } } update: { creator: { update: { node: { password_SET: "new-password" } } } } ) { posts { @@ -476,7 +498,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 +513,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" `); @@ -511,7 +539,7 @@ describe("Cypher Auth Allow", () => { test("Delete Node", async () => { const query = /* GraphQL */ ` mutation { - deleteUsers(where: { id_EQ: "user-id" }) { + deleteUsers(where: { id: { eq: "user-id" } }) { nodesDeleted } } @@ -545,7 +573,10 @@ describe("Cypher Auth Allow", () => { test("Nested Delete Node", async () => { const query = /* GraphQL */ ` mutation { - deleteUsers(where: { id_EQ: "user-id" }, delete: { posts: { where: { node: { id_EQ: "post-id" } } } }) { + deleteUsers( + where: { id: { eq: "user-id" } } + delete: { posts: { where: { node: { id: { eq: "post-id" } } } } } + ) { nodesDeleted } } @@ -563,7 +594,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 @@ -594,8 +628,8 @@ describe("Cypher Auth Allow", () => { const query = /* GraphQL */ ` mutation { updateUsers( - where: { id_EQ: "user-id" } - update: { posts: { disconnect: { where: { node: { id_EQ: "post-id" } } } } } + where: { id: { eq: "user-id" } } + update: { posts: { disconnect: { where: { node: { id: { eq: "post-id" } } } } } } ) { users { id @@ -617,7 +651,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 @@ -651,7 +688,9 @@ describe("Cypher Auth Allow", () => { { \\"where\\": { \\"node\\": { - \\"id_EQ\\": \\"post-id\\" + \\"id\\": { + \\"eq\\": \\"post-id\\" + } } } } @@ -670,9 +709,11 @@ describe("Cypher Auth Allow", () => { const query = /* GraphQL */ ` mutation { updateComments( - where: { id_EQ: "comment-id" } + where: { id: { eq: "comment-id" } } update: { - post: { disconnect: { disconnect: { creator: { where: { node: { id_EQ: "user-id" } } } } } } + post: { + disconnect: { disconnect: { creator: { where: { node: { id: { eq: "user-id" } } } } } } + } } ) { comments { @@ -690,12 +731,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 +755,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 +770,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" `); @@ -744,7 +800,9 @@ describe("Cypher Auth Allow", () => { { \\"where\\": { \\"node\\": { - \\"id_EQ\\": \\"user-id\\" + \\"id\\": { + \\"eq\\": \\"user-id\\" + } } } } @@ -766,8 +824,8 @@ describe("Cypher Auth Allow", () => { const query = /* GraphQL */ ` mutation { updateUsers( - where: { id_EQ: "user-id" } - update: { posts: { connect: { where: { node: { id_EQ: "post-id" } } } } } + where: { id: { eq: "user-id" } } + update: { posts: { connect: { where: { node: { id: { eq: "post-id" } } } } } } ) { users { id @@ -789,7 +847,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 20af4a34a5..20d5533faf 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 @@ -48,7 +48,7 @@ describe("@auth allow on specific interface implementation", () => { { when: BEFORE operations: [READ, UPDATE, DELETE, DELETE_RELATIONSHIP, CREATE_RELATIONSHIP] - where: { node: { creator_SOME: { id_EQ: "$jwt.sub" } } } + where: { node: { creator: { some: { id: { eq: "$jwt.sub" } } } } } } ] ) { @@ -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 } @@ -131,11 +134,11 @@ describe("@auth allow on specific interface implementation", () => { test("Read Two Relationships", async () => { const query = /* GraphQL */ ` { - users(where: { id_EQ: "1" }) { + users(where: { id: { eq: "1" } }) { id - content(where: { id_EQ: "1" }) { + content(where: { id: { eq: "1" } }) { ... on Post { - comments(where: { id_EQ: "1" }) { + comments(where: { id: { eq: "1" } }) { content } } @@ -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) @@ -201,7 +207,7 @@ describe("@auth allow on specific interface implementation", () => { const query = /* GraphQL */ ` mutation { updateUsers( - where: { id_EQ: "user-id" } + where: { id: { eq: "user-id" } } update: { content: { update: { node: { id_SET: "new-id" } } } } ) { users { @@ -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_updatebefore_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization_updatebefore_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_updatebefore_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization_updatebefore_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 } @@ -287,8 +299,8 @@ describe("@auth allow on specific interface implementation", () => { const query = /* GraphQL */ ` mutation { deleteUsers( - where: { id_EQ: "user-id" } - delete: { content: { where: { node: { id_EQ: "post-id" } } } } + where: { id: { eq: "user-id" } } + delete: { content: { where: { node: { id: { eq: "post-id" } } } } } ) { nodesDeleted } @@ -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/is-authenticated/interface-relationships/implementation-is-authenticated.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/is-authenticated/interface-relationships/implementation-is-authenticated.test.ts index 025df07d9a..ee70396ab3 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/is-authenticated/interface-relationships/implementation-is-authenticated.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/is-authenticated/interface-relationships/implementation-is-authenticated.test.ts @@ -146,7 +146,7 @@ describe("Cypher Auth isAuthenticated", () => { test("Update Node with bind", async () => { const query = /* GraphQL */ ` mutation { - updatePosts(where: { id_EQ: "1" }, update: { id_SET: "id-1" }) { + updatePosts(where: { id: { eq: "1" } }, update: { id_SET: "id-1" }) { posts { id } @@ -178,7 +178,7 @@ describe("Cypher Auth isAuthenticated", () => { test("Update Node without bind", async () => { const query = /* GraphQL */ ` mutation { - updateComments(where: { id_EQ: "1" }, update: { id_SET: "id-1" }) { + updateComments(where: { id: { eq: "1" } }, update: { id_SET: "id-1" }) { comments { id } diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/is-authenticated/is-authenticated.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/is-authenticated/is-authenticated.test.ts index 75b6470a59..f259c41405 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/is-authenticated/is-authenticated.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/is-authenticated/is-authenticated.test.ts @@ -230,7 +230,7 @@ describe("Cypher Auth isAuthenticated", () => { test("Update Node", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(where: { id_EQ: "1" }, update: { id_SET: "id-1" }) { + updateUsers(where: { id: { eq: "1" } }, update: { id_SET: "id-1" }) { users { id } @@ -262,7 +262,7 @@ describe("Cypher Auth isAuthenticated", () => { test("Update Node & Field", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(where: { id_EQ: "1" }, update: { password_SET: "password" }) { + updateUsers(where: { id: { eq: "1" } }, update: { password_SET: "password" }) { users { id } 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 922816728b..73d7645661 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 @@ -50,28 +50,35 @@ describe("Cypher Auth Where with Roles", () => { extend type User @authorization( validate: [ - { where: { node: { id_EQ: "$jwt.sub" }, jwt: { roles_INCLUDES: "user" } } } - { where: { jwt: { roles_INCLUDES: "admin" } } } + { where: { node: { id: { eq: "$jwt.sub" } }, jwt: { roles: { includes: "user" } } } } + { where: { jwt: { roles: { includes: "admin" } } } } ] ) extend type User { password: String! - @authorization(filter: [{ operations: [READ], where: { node: { id_EQ: "$jwt.sub" } } }]) + @authorization(filter: [{ operations: [READ], where: { node: { id: { eq: "$jwt.sub" } } } }]) } extend type Post { secretKey: String! @authorization( - filter: [{ operations: [READ], where: { node: { creator_SOME: { id_EQ: "$jwt.sub" } } } }] + filter: [ + { operations: [READ], where: { node: { creator: { some: { id: { eq: "$jwt.sub" } } } } } } + ] ) } extend type Post @authorization( validate: [ - { where: { node: { creator_SOME: { id_EQ: "$jwt.sub" } }, jwt: { roles_INCLUDES: "user" } } } - { where: { jwt: { roles_INCLUDES: "admin" } } } + { + where: { + node: { creator: { some: { id: { eq: "$jwt.sub" } } } } + jwt: { roles: { includes: "user" } } + } + } + { where: { jwt: { roles: { includes: "admin" } } } } ] ) `; @@ -121,7 +128,7 @@ describe("Cypher Auth Where with Roles", () => { test("Read Node + User Defined Where", async () => { const query = /* GraphQL */ ` { - users(where: { name_EQ: "bob" }) { + users(where: { name: { eq: "bob" } }) { id } } @@ -180,7 +187,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 +242,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 { @@ -268,7 +281,7 @@ describe("Cypher Auth Where with Roles", () => { { users { id - postsConnection(where: { node: { id_EQ: "some-id" } }) { + postsConnection(where: { node: { id: { eq: "some-id" } } }) { edges { node { content @@ -291,7 +304,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 { @@ -328,7 +344,7 @@ describe("Cypher Auth Where with Roles", () => { { users { id - posts(where: { content_EQ: "cool" }) { + posts(where: { content: { eq: "cool" } }) { content } } @@ -348,7 +364,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 +420,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 +482,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 } @@ -493,7 +518,7 @@ describe("Cypher Auth Where with Roles", () => { { users { id - contentConnection(where: { Post: { node: { id_EQ: "some-id" } } }) { + contentConnection(where: { Post: { node: { id: { eq: "some-id" } } } }) { edges { node { ... on Post { @@ -520,7 +545,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 } @@ -601,7 +629,7 @@ describe("Cypher Auth Where with Roles", () => { test("Update Node + User Defined Where", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(where: { name_EQ: "bob" }, update: { name_SET: "Bob" }) { + updateUsers(where: { name: { eq: "bob" } }, update: { name_SET: "Bob" }) { users { id } @@ -675,10 +703,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_updatebefore_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization_updatebefore_this0.id = $jwt.sub) | 1]) > 0 AND ($jwt.roles IS NOT NULL AND $authorization_updatebefore_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization_updatebefore_param3 IN $jwt.roles))), \\"@neo4j/graphql/FORBIDDEN\\", [0]) + WHERE apoc.util.validatePredicate(NOT (($isAuthenticated = true AND EXISTS { + MATCH (this_posts0)<-[:HAS_POST]-(authorization_updatebefore_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization_updatebefore_this0.id = $jwt.sub) + } AND ($jwt.roles IS NOT NULL AND $authorization_updatebefore_param2 IN $jwt.roles)) OR ($isAuthenticated = true AND ($jwt.roles IS NOT NULL AND $authorization_updatebefore_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 +723,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 +814,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 +876,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 +892,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 * @@ -895,7 +941,7 @@ describe("Cypher Auth Where with Roles", () => { id: "123" name: "Bob" password: "password" - posts: { connect: { where: { node: { id_EQ: "post-id" } } } } + posts: { connect: { where: { node: { id: { eq: "post-id" } } } } } } ] ) { @@ -921,7 +967,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 +983,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 +1048,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 +1064,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 @@ -1048,7 +1106,7 @@ describe("Cypher Auth Where with Roles", () => { test("Connect Node + User Defined Where (from update update)", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(update: { posts: { connect: { where: { node: { id_EQ: "new-id" } } } } }) { + updateUsers(update: { posts: { connect: { where: { node: { id: { eq: "new-id" } } } } } }) { users { id } @@ -1069,7 +1127,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 +1143,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 +1207,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 +1218,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 @@ -1190,7 +1260,7 @@ describe("Cypher Auth Where with Roles", () => { test("Disconnect Node + User Defined Where (from update update)", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(update: { posts: [{ disconnect: { where: { node: { id_EQ: "new-id" } } } }] }) { + updateUsers(update: { posts: [{ disconnect: { where: { node: { id: { eq: "new-id" } } } } }] }) { users { id } @@ -1211,7 +1281,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 +1292,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 @@ -1260,7 +1336,9 @@ describe("Cypher Auth Where with Roles", () => { { \\"where\\": { \\"node\\": { - \\"id_EQ\\": \\"new-id\\" + \\"id\\": { + \\"eq\\": \\"new-id\\" + } } } } diff --git a/packages/graphql/tests/tck/directives/authorization/arguments/roles/roles.test.ts b/packages/graphql/tests/tck/directives/authorization/arguments/roles/roles.test.ts index a86985b7a9..9a7adfcc66 100644 --- a/packages/graphql/tests/tck/directives/authorization/arguments/roles/roles.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/arguments/roles/roles.test.ts @@ -35,7 +35,7 @@ describe("Cypher Auth Roles", () => { type History @node { url: String @authorization( - validate: [{ operations: [READ], where: { jwt: { roles_INCLUDES: "super-admin" } } }] + validate: [{ operations: [READ], where: { jwt: { roles: { includes: "super-admin" } } } }] ) } @@ -59,14 +59,14 @@ describe("Cypher Auth Roles", () => { posts: [Post!]! @relationship(type: "HAS_POST", direction: OUT) } - extend type User @authorization(validate: [{ where: { jwt: { roles_INCLUDES: "admin" } } }]) + extend type User @authorization(validate: [{ where: { jwt: { roles: { includes: "admin" } } } }]) extend type Post @authorization( validate: [ { operations: [CREATE_RELATIONSHIP, DELETE_RELATIONSHIP, DELETE] - where: { jwt: { roles_INCLUDES: "super-admin" } } + where: { jwt: { roles: { includes: "super-admin" } } } } ] ) @@ -75,7 +75,10 @@ describe("Cypher Auth Roles", () => { password: String @authorization( validate: [ - { operations: [READ, CREATE, UPDATE], where: { jwt: { roles_INCLUDES: "super-admin" } } } + { + operations: [READ, CREATE, UPDATE] + where: { jwt: { roles: { includes: "super-admin" } } } + } ] ) } @@ -84,7 +87,7 @@ describe("Cypher Auth Roles", () => { history: [History] @cypher(statement: "MATCH (this)-[:HAS_HISTORY]->(h:History) RETURN h", columnName: "h") @authorization( - validate: [{ operations: [READ], where: { jwt: { roles_INCLUDES: "super-admin" } } }] + validate: [{ operations: [READ], where: { jwt: { roles: { includes: "super-admin" } } } }] ) } `; @@ -326,7 +329,7 @@ describe("Cypher Auth Roles", () => { test("Update Node", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(where: { id_EQ: "1" }, update: { id_SET: "id-1" }) { + updateUsers(where: { id: { eq: "1" } }, update: { id_SET: "id-1" }) { users { id } @@ -373,7 +376,7 @@ describe("Cypher Auth Roles", () => { test("Update Node & Field", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(where: { id_EQ: "1" }, update: { password_SET: "password" }) { + updateUsers(where: { id: { eq: "1" } }, update: { password_SET: "password" }) { users { id } @@ -492,7 +495,9 @@ describe("Cypher Auth Roles", () => { mutation { updateComments( update: { - post: { update: { node: { creator: { connect: { where: { node: { id_EQ: "user-id" } } } } } } } + post: { + update: { node: { creator: { connect: { where: { node: { id: { eq: "user-id" } } } } } } } + } } ) { comments { @@ -625,7 +630,9 @@ describe("Cypher Auth Roles", () => { updateComments( update: { post: { - update: { node: { creator: { disconnect: { where: { node: { id_EQ: "user-id" } } } } } } + update: { + node: { creator: { disconnect: { where: { node: { id: { eq: "user-id" } } } } } } + } } } ) { @@ -694,7 +701,9 @@ describe("Cypher Auth Roles", () => { { \\"where\\": { \\"node\\": { - \\"id_EQ\\": \\"user-id\\" + \\"id\\": { + \\"eq\\": \\"user-id\\" + } } } } 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..e84c212fef 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 @@ -45,7 +45,7 @@ describe("Cypher Auth Allow", () => { { when: AFTER operations: [CREATE, UPDATE, CREATE_RELATIONSHIP, DELETE_RELATIONSHIP] - where: { node: { creator_SOME: { id_EQ: "$jwt.sub" } } } + where: { node: { creator: { some: { id: { eq: "$jwt.sub" } } } } } } ] ) { @@ -65,7 +65,7 @@ describe("Cypher Auth Allow", () => { { when: AFTER operations: [CREATE, UPDATE, CREATE_RELATIONSHIP, DELETE_RELATIONSHIP] - where: { node: { id_EQ: "$jwt.sub" } } + where: { node: { id: { eq: "$jwt.sub" } } } } ] ) @@ -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 { @@ -239,10 +242,10 @@ describe("Cypher Auth Allow", () => { const query = /* GraphQL */ ` mutation { updateUsers( - where: { id_EQ: "id-01" } + where: { id: { eq: "id-01" } } update: { content: { - where: { node: { id_EQ: "post-id" } } + where: { node: { id: { eq: "post-id" } } } update: { node: { creator: { update: { node: { id_SET: "not bound" } } } } } } } @@ -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 @@ -329,7 +335,9 @@ describe("Cypher Auth Allow", () => { { \\"where\\": { \\"node\\": { - \\"id_EQ\\": \\"post-id\\" + \\"id\\": { + \\"eq\\": \\"post-id\\" + } } }, \\"update\\": { 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..8681069759 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 @@ -44,7 +44,7 @@ describe("Cypher Auth Allow", () => { validate: { when: AFTER operations: [CREATE, UPDATE, CREATE_RELATIONSHIP, DELETE_RELATIONSHIP] - where: { node: { id_EQ: "$jwt.sub" } } + where: { node: { id: { eq: "$jwt.sub" } } } } ) @@ -54,7 +54,7 @@ describe("Cypher Auth Allow", () => { { when: AFTER operations: [CREATE, CREATE_RELATIONSHIP, DELETE_RELATIONSHIP] - where: { node: { creator_SOME: { id_EQ: "$jwt.sub" } } } + where: { node: { creator: { some: { id: { eq: "$jwt.sub" } } } } } } ] ) @@ -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 * @@ -227,7 +230,7 @@ describe("Cypher Auth Allow", () => { test("Update Node", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(where: { id_EQ: "id-01" }, update: { id_SET: "not bound" }) { + updateUsers(where: { id: { eq: "id-01" } }, update: { id_SET: "not bound" }) { users { id } @@ -269,10 +272,10 @@ describe("Cypher Auth Allow", () => { const query = /* GraphQL */ ` mutation { updateUsers( - where: { id_EQ: "id-01" } + where: { id: { eq: "id-01" } } update: { posts: { - where: { node: { id_EQ: "post-id" } } + where: { node: { id: { eq: "post-id" } } } update: { node: { creator: { update: { node: { id_SET: "not bound" } } } } } } } @@ -332,7 +335,9 @@ describe("Cypher Auth Allow", () => { { \\"where\\": { \\"node\\": { - \\"id_EQ\\": \\"post-id\\" + \\"id\\": { + \\"eq\\": \\"post-id\\" + } } }, \\"update\\": { @@ -362,8 +367,8 @@ describe("Cypher Auth Allow", () => { const query = /* GraphQL */ ` mutation { updatePosts( - where: { id_EQ: "post-id" } - update: { creator: { connect: { where: { node: { id_EQ: "user-id" } } } } } + where: { id: { eq: "post-id" } } + update: { creator: { connect: { where: { node: { id: { eq: "user-id" } } } } } } ) { posts { id @@ -397,7 +402,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" @@ -423,8 +431,8 @@ describe("Cypher Auth Allow", () => { const query = /* GraphQL */ ` mutation { updatePosts( - where: { id_EQ: "post-id" } - update: { creator: { disconnect: { where: { node: { id_EQ: "user-id" } } } } } + where: { id: { eq: "post-id" } } + update: { creator: { disconnect: { where: { node: { id: { eq: "user-id" } } } } } } ) { posts { id @@ -453,7 +461,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" @@ -479,7 +490,9 @@ describe("Cypher Auth Allow", () => { { \\"where\\": { \\"node\\": { - \\"id_EQ\\": \\"user-id\\" + \\"id\\": { + \\"eq\\": \\"user-id\\" + } } } } 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..896b578a94 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 @@ -47,20 +47,23 @@ describe("Connection auth filter", () => { creator: [User!]! @relationship(type: "HAS_POST", direction: IN) } - extend type User @authorization(filter: [{ where: { node: { id_EQ: "$jwt.sub" } } }]) + extend type User @authorization(filter: [{ where: { node: { id: { eq: "$jwt.sub" } } } }]) extend type User { password: String! - @authorization(filter: [{ operations: [READ], where: { node: { id_EQ: "$jwt.sub" } } }]) + @authorization(filter: [{ operations: [READ], where: { node: { id: { eq: "$jwt.sub" } } } }]) } extend type Post { secretKey: String! @authorization( - filter: [{ operations: [READ], where: { node: { creator_SOME: { id_EQ: "$jwt.sub" } } } }] + filter: [ + { operations: [READ], where: { node: { creator: { some: { id: { eq: "$jwt.sub" } } } } } } + ] ) } - extend type Post @authorization(filter: [{ where: { node: { creator_SOME: { id_EQ: "$jwt.sub" } } } }]) + extend type Post + @authorization(filter: [{ where: { node: { creator: { some: { id: { eq: "$jwt.sub" } } } } } }]) `; neoSchema = new Neo4jGraphQL({ @@ -121,7 +124,7 @@ describe("Connection auth filter", () => { test("Read Node + User Defined Where", async () => { const query = /* GraphQL */ ` { - usersConnection(where: { name_EQ: "bob" }) { + usersConnection(where: { name: { eq: "bob" } }) { edges { node { id @@ -198,7 +201,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 +263,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 { @@ -293,7 +302,7 @@ describe("Connection auth filter", () => { edges { node { id - postsConnection(where: { node: { id_EQ: "some-id" } }) { + postsConnection(where: { node: { id: { eq: "some-id" } } }) { edges { node { content @@ -323,7 +332,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 { @@ -360,7 +372,7 @@ describe("Connection auth filter", () => { edges { node { id - posts(where: { content_EQ: "cool" }) { + posts(where: { content: { eq: "cool" } }) { content } } @@ -387,7 +399,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 +462,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 +531,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 } @@ -546,7 +567,7 @@ describe("Connection auth filter", () => { edges { node { id - contentConnection(where: { Post: { node: { id_EQ: "some-id" } } }) { + contentConnection(where: { Post: { node: { id: { eq: "some-id" } } } }) { edges { node { ... on Post { @@ -580,7 +601,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 a334de7810..288e9bb235 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 @@ -52,7 +52,7 @@ describe("Cypher Auth Where", () => { filter: [ { operations: [READ, UPDATE, DELETE, CREATE_RELATIONSHIP, DELETE_RELATIONSHIP] - where: { node: { creator_SOME: { id_EQ: "$jwt.sub" } } } + where: { node: { creator: { some: { id: { eq: "$jwt.sub" } } } } } } ] ) { @@ -66,20 +66,22 @@ describe("Cypher Auth Where", () => { filter: [ { operations: [READ, UPDATE, DELETE, CREATE_RELATIONSHIP, DELETE_RELATIONSHIP] - where: { node: { id_EQ: "$jwt.sub" } } + where: { node: { id: { eq: "$jwt.sub" } } } } ] ) extend type User { password: String! - @authorization(filter: [{ operations: [READ], where: { node: { id_EQ: "$jwt.sub" } } }]) + @authorization(filter: [{ operations: [READ], where: { node: { id: { eq: "$jwt.sub" } } } }]) } extend type Post { secretKey: String! @authorization( - filter: [{ operations: [READ], where: { node: { creator_SOME: { id_EQ: "$jwt.sub" } } } }] + filter: [ + { operations: [READ], where: { node: { creator: { some: { id: { eq: "$jwt.sub" } } } } } } + ] ) } `; @@ -109,7 +111,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" `); @@ -129,7 +134,7 @@ describe("Cypher Auth Where", () => { test("Read Node + User Defined Where", async () => { const query = /* GraphQL */ ` { - posts(where: { content_EQ: "bob" }) { + posts(where: { content: { eq: "bob" } }) { id } } @@ -141,7 +146,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 +198,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 +259,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 } @@ -277,7 +291,7 @@ describe("Cypher Auth Where", () => { { users { id - contentConnection(where: { node: { id_EQ: "some-id" } }) { + contentConnection(where: { node: { id: { eq: "some-id" } } }) { edges { node { ... on Post { @@ -308,7 +322,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 +368,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" `); @@ -376,7 +399,7 @@ describe("Cypher Auth Where", () => { test("Update Node + User Defined Where", async () => { const query = /* GraphQL */ ` mutation { - updatePosts(where: { content_EQ: "bob" }, update: { content_SET: "Bob" }) { + updatePosts(where: { content: { eq: "bob" } }, update: { content_SET: "Bob" }) { posts { id } @@ -390,10 +413,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 +478,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_updatebefore_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization_updatebefore_this0.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this_content0)<-[:HAS_CONTENT]-(authorization_updatebefore_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization_updatebefore_this0.id = $jwt.sub) + }) SET this_content0.id = $this_update_content0_id_SET RETURN count(*) AS update_this_content0 } @@ -489,7 +521,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" `); @@ -509,7 +544,7 @@ describe("Cypher Auth Where", () => { test("Delete Node + User Defined Where", async () => { const query = /* GraphQL */ ` mutation { - deletePosts(where: { content_EQ: "Bob" }) { + deletePosts(where: { content: { eq: "Bob" } }) { nodesDeleted } } @@ -520,7 +555,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 +605,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 +677,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 @@ -685,7 +729,7 @@ describe("Cypher Auth Where", () => { id: "123" name: "Bob" password: "password" - content: { connect: { where: { node: { id_EQ: "post-id" } } } } + content: { connect: { where: { node: { id: { eq: "post-id" } } } } } } ] ) { @@ -726,7 +770,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 +862,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 @@ -853,7 +903,7 @@ describe("Cypher Auth Where", () => { test("Connect Node + User Defined Where (from update update)", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(update: { content: { connect: { where: { node: { id_EQ: "new-id" } } } } }) { + updateUsers(update: { content: { connect: { where: { node: { id: { eq: "new-id" } } } } } }) { users { id } @@ -897,7 +947,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 +1028,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 @@ -1008,7 +1064,7 @@ describe("Cypher Auth Where", () => { test("Disconnect Node + User Defined Where (from update update)", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(update: { content: [{ disconnect: { where: { node: { id_EQ: "new-id" } } } }] }) { + updateUsers(update: { content: [{ disconnect: { where: { node: { id: { eq: "new-id" } } } } }] }) { users { id } @@ -1047,7 +1103,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 @@ -1083,7 +1142,9 @@ describe("Cypher Auth Where", () => { { \\"where\\": { \\"node\\": { - \\"id_EQ\\": \\"new-id\\" + \\"id\\": { + \\"eq\\": \\"new-id\\" + } } } } 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 24a5c02794..9c815a2d15 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 @@ -47,20 +47,23 @@ describe("Cypher Auth Where", () => { creator: [User!]! @relationship(type: "HAS_POST", direction: IN) } - extend type User @authorization(filter: [{ where: { node: { id_EQ: "$jwt.sub" } } }]) + extend type User @authorization(filter: [{ where: { node: { id: { eq: "$jwt.sub" } } } }]) extend type User { password: String! - @authorization(filter: [{ operations: [READ], where: { node: { id_EQ: "$jwt.sub" } } }]) + @authorization(filter: [{ operations: [READ], where: { node: { id: { eq: "$jwt.sub" } } } }]) } extend type Post { secretKey: String! @authorization( - filter: [{ operations: [READ], where: { node: { creator_SOME: { id_EQ: "$jwt.sub" } } } }] + filter: [ + { operations: [READ], where: { node: { creator: { some: { id: { eq: "$jwt.sub" } } } } } } + ] ) } - extend type Post @authorization(filter: [{ where: { node: { creator_SOME: { id_EQ: "$jwt.sub" } } } }]) + extend type Post + @authorization(filter: [{ where: { node: { creator: { some: { id: { eq: "$jwt.sub" } } } } } }]) `; neoSchema = new Neo4jGraphQL({ @@ -110,7 +113,7 @@ describe("Cypher Auth Where", () => { test("Read Node + User Defined Where", async () => { const query = /* GraphQL */ ` { - users(where: { name_EQ: "bob" }) { + users(where: { name: { eq: "bob" } }) { id } } @@ -167,7 +170,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 +221,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 { @@ -247,7 +256,7 @@ describe("Cypher Auth Where", () => { { users { id - postsConnection(where: { node: { id_EQ: "some-id" } }) { + postsConnection(where: { node: { id: { eq: "some-id" } } }) { edges { node { content @@ -270,7 +279,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 { @@ -303,7 +315,7 @@ describe("Cypher Auth Where", () => { { users { id - posts(where: { content_EQ: "cool" }) { + posts(where: { content: { eq: "cool" } }) { content } } @@ -323,7 +335,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 +387,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 +445,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 } @@ -456,7 +477,7 @@ describe("Cypher Auth Where", () => { { users { id - contentConnection(where: { Post: { node: { id_EQ: "some-id" } } }) { + contentConnection(where: { Post: { node: { id: { eq: "some-id" } } } }) { edges { node { ... on Post { @@ -483,7 +504,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 } @@ -552,7 +576,7 @@ describe("Cypher Auth Where", () => { test("Update Node + User Defined Where", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(where: { name_EQ: "bob" }, update: { name_SET: "Bob" }) { + updateUsers(where: { name: { eq: "bob" } }, update: { name_SET: "Bob" }) { users { id } @@ -618,7 +642,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_updatebefore_this0:User) WHERE ($jwt.sub IS NOT NULL AND authorization_updatebefore_this0.id = $jwt.sub) | 1]) > 0) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this_posts0)<-[:HAS_POST]-(authorization_updatebefore_this0:User) + WHERE ($jwt.sub IS NOT NULL AND authorization_updatebefore_this0.id = $jwt.sub) + }) SET this_posts0.id = $this_update_posts0_id_SET RETURN count(*) AS update_this_posts0 } @@ -628,7 +655,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 } @@ -686,7 +716,7 @@ describe("Cypher Auth Where", () => { test("Delete Node + User Defined Where", async () => { const query = /* GraphQL */ ` mutation { - deleteUsers(where: { name_EQ: "Bob" }) { + deleteUsers(where: { name: { eq: "Bob" } }) { nodesDeleted } } @@ -738,7 +768,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 +826,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 @@ -842,7 +878,7 @@ describe("Cypher Auth Where", () => { id: "123" name: "Bob" password: "password" - posts: { connect: { where: { node: { id_EQ: "post-id" } } } } + posts: { connect: { where: { node: { id: { eq: "post-id" } } } } } } ] ) { @@ -868,7 +904,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 +972,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 @@ -969,7 +1011,7 @@ describe("Cypher Auth Where", () => { test("Connect Node + User Defined Where (from update update)", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(update: { posts: { connect: { where: { node: { id_EQ: "new-id" } } } } }) { + updateUsers(update: { posts: { connect: { where: { node: { id: { eq: "new-id" } } } } } }) { users { id } @@ -990,7 +1032,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 +1093,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 @@ -1079,7 +1127,7 @@ describe("Cypher Auth Where", () => { test("Disconnect Node + User Defined Where (from update update)", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(update: { posts: [{ disconnect: { where: { node: { id_EQ: "new-id" } } } }] }) { + updateUsers(update: { posts: [{ disconnect: { where: { node: { id: { eq: "new-id" } } } } }] }) { users { id } @@ -1100,7 +1148,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 @@ -1133,7 +1184,9 @@ describe("Cypher Auth Where", () => { { \\"where\\": { \\"node\\": { - \\"id_EQ\\": \\"new-id\\" + \\"id\\": { + \\"eq\\": \\"new-id\\" + } } } } 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..fdd363bd4b 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 @@ -41,9 +41,11 @@ describe("Cypher Auth Projection On Connections On Unions", () => { union Content = Post - extend type User @authorization(validate: [{ when: BEFORE, where: { node: { id_EQ: "$jwt.sub" } } }]) + extend type User @authorization(validate: [{ when: BEFORE, where: { node: { id: { eq: "$jwt.sub" } } } }]) extend type Post - @authorization(validate: [{ when: BEFORE, where: { node: { creator_SOME: { id_EQ: "$jwt.sub" } } } }]) + @authorization( + validate: [{ when: BEFORE, where: { node: { creator: { some: { id: { eq: "$jwt.sub" } } } } } }] + ) `; neoSchema = new Neo4jGraphQL({ @@ -94,7 +96,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..405c39eaec 100644 --- a/packages/graphql/tests/tck/directives/authorization/projection-connection.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/projection-connection.test.ts @@ -39,9 +39,11 @@ describe("Cypher Auth Projection On Connections", () => { posts: [Post!]! @relationship(type: "HAS_POST", direction: OUT) } - extend type User @authorization(validate: [{ when: BEFORE, where: { node: { id_EQ: "$jwt.sub" } } }]) + extend type User @authorization(validate: [{ when: BEFORE, where: { node: { id: { eq: "$jwt.sub" } } } }]) extend type Post - @authorization(validate: [{ when: BEFORE, where: { node: { creator_SOME: { id_EQ: "$jwt.sub" } } } }]) + @authorization( + validate: [{ when: BEFORE, where: { node: { creator: { some: { id: { eq: "$jwt.sub" } } } } } }] + ) `; neoSchema = new Neo4jGraphQL({ @@ -82,7 +84,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 +147,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 { @@ -200,9 +208,11 @@ describe("Cypher Auth Projection On top-level connections", () => { posts: [Post!]! @relationship(type: "HAS_POST", direction: OUT) } - extend type User @authorization(validate: [{ when: BEFORE, where: { node: { id_EQ: "$jwt.sub" } } }]) + extend type User @authorization(validate: [{ when: BEFORE, where: { node: { id: { eq: "$jwt.sub" } } } }]) extend type Post - @authorization(validate: [{ when: BEFORE, where: { node: { creator_SOME: { id_EQ: "$jwt.sub" } } } }]) + @authorization( + validate: [{ when: BEFORE, where: { node: { creator: { some: { id: { eq: "$jwt.sub" } } } } } }] + ) `; neoSchema = new Neo4jGraphQL({ @@ -252,7 +262,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 +336,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/authorization/projection-interface-relationships.test.ts b/packages/graphql/tests/tck/directives/authorization/projection-interface-relationships.test.ts index 395d889d91..3fc73b0444 100644 --- a/packages/graphql/tests/tck/directives/authorization/projection-interface-relationships.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/projection-interface-relationships.test.ts @@ -42,7 +42,8 @@ describe("Auth projections for interface relationship fields", () => { episodes: String! } - extend type Series @authorization(validate: [{ when: BEFORE, where: { node: { episodes_EQ: "$jwt.sub" } } }]) + extend type Series + @authorization(validate: [{ when: BEFORE, where: { node: { episodes: { eq: "$jwt.sub" } } } }]) type ActedIn @relationshipProperties { screenTime: Int! diff --git a/packages/graphql/tests/tck/directives/authorization/projection.test.ts b/packages/graphql/tests/tck/directives/authorization/projection.test.ts index 8e63813949..657c69cf5d 100644 --- a/packages/graphql/tests/tck/directives/authorization/projection.test.ts +++ b/packages/graphql/tests/tck/directives/authorization/projection.test.ts @@ -34,7 +34,7 @@ describe("Cypher Auth Projection", () => { } extend type User { - id: ID @authorization(validate: [{ when: BEFORE, where: { node: { id_EQ: "$jwt.sub" } } }]) + id: ID @authorization(validate: [{ when: BEFORE, where: { node: { id: { eq: "$jwt.sub" } } } }]) } `; diff --git a/packages/graphql/tests/tck/directives/coalesce.test.ts b/packages/graphql/tests/tck/directives/coalesce.test.ts index 86ad4e871d..0975e5fc6b 100644 --- a/packages/graphql/tests/tck/directives/coalesce.test.ts +++ b/packages/graphql/tests/tck/directives/coalesce.test.ts @@ -62,13 +62,13 @@ describe("Cypher coalesce()", () => { ) { users( where: { - id_EQ: $id - name_MATCHES: $name - NOT: { verified_EQ: $verified } - numberOfFriends_GT: $numberOfFriends - rating_LT: $rating - fromInterface_EQ: $fromInterface - toBeOverridden_EQ: $toBeOverridden + id: { eq: $id } + name: { matches: $name } + NOT: { verified: { eq: $verified } } + numberOfFriends: { gt: $numberOfFriends } + rating: { lt: $rating } + fromInterface: { eq: $fromInterface } + toBeOverridden: { eq: $toBeOverridden } } ) { name @@ -135,7 +135,7 @@ describe("Cypher coalesce()", () => { const query = /* GraphQL */ ` query { - movies(where: { status_EQ: ACTIVE }) { + movies(where: { status: { eq: ACTIVE } }) { id status } @@ -187,7 +187,7 @@ describe("Cypher coalesce()", () => { const query = /* GraphQL */ ` query Actors { actors { - moviesConnection(where: { node: { status_EQ: ACTIVE } }) { + moviesConnection(where: { node: { status: { eq: ACTIVE } } }) { edges { node { id @@ -250,7 +250,7 @@ describe("Cypher coalesce()", () => { const query = /* GraphQL */ ` query Actors { actors { - moviesConnection(where: { node: { statuses_EQ: [ACTIVE, INACTIVE] } }) { + moviesConnection(where: { node: { statuses: { eq: [ACTIVE, INACTIVE] } } }) { edges { node { id diff --git a/packages/graphql/tests/tck/directives/cypher/cypher-interface.test.ts b/packages/graphql/tests/tck/directives/cypher/cypher-interface.test.ts index 0cf0f1232e..e9eab72e7c 100644 --- a/packages/graphql/tests/tck/directives/cypher/cypher-interface.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/cypher-interface.test.ts @@ -223,7 +223,7 @@ describe("Cypher directive on interface", () => { moviesOrTVShows(title: "The Matrix") { title ... on Movie { - actors(where: { name_EQ: "Keanu Reeves" }) { + actors(where: { name: { eq: "Keanu Reeves" } }) { name } } @@ -406,7 +406,7 @@ describe("Cypher directive on interface", () => { moviesOrTVShows(title: "The Matrix") { title ... on Movie { - actors(where: { name_EQ: "Keanu Reeves" }) { + actors(where: { name: { eq: "Keanu Reeves" } }) { name } } @@ -498,7 +498,7 @@ describe("Cypher directive on interface", () => { moviesOrTVShows(title: "The Matrix") { title ... on Movie { - actors(where: { name_EQ: "Keanu Reeves" }) { + actors(where: { name: { eq: "Keanu Reeves" } }) { name } } diff --git a/packages/graphql/tests/tck/directives/cypher/cypher-union.test.ts b/packages/graphql/tests/tck/directives/cypher/cypher-union.test.ts index aed5a7da10..bbd6a56806 100644 --- a/packages/graphql/tests/tck/directives/cypher/cypher-union.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/cypher-union.test.ts @@ -226,7 +226,7 @@ describe("Cypher directive on union", () => { moviesOrTVShows(title: "The Matrix") { ... on Movie { title - actors(where: { name_EQ: "Keanu Reeves" }) { + actors(where: { name: { eq: "Keanu Reeves" } }) { name } } @@ -415,7 +415,7 @@ describe("Cypher directive on union", () => { moviesOrTVShows(title: "The Matrix") { ... on Movie { title - actors(where: { name_EQ: "Keanu Reeves" }) { + actors(where: { name: { eq: "Keanu Reeves" } }) { name } } @@ -508,7 +508,7 @@ describe("Cypher directive on union", () => { moviesOrTVShows(title: "The Matrix") { ... on Movie { title - actors(where: { name_EQ: "Keanu Reeves" }) { + actors(where: { name: { eq: "Keanu Reeves" } }) { name } } diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-aggregation.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-aggregation.test.ts index 6dbc51e67a..2616f8179c 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-aggregation.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-aggregation.test.ts @@ -39,7 +39,7 @@ describe("cypher directive filtering - Aggregation", () => { const query = /* GraphQL */ ` query { - moviesAggregate(where: { custom_field_STARTS_WITH: "he" }) { + moviesAggregate(where: { custom_field: { startsWith: "he" } }) { title { shortest } @@ -102,7 +102,7 @@ describe("cypher directive filtering - Aggregation", () => { const query = /* GraphQL */ ` query { - moviesAggregate(where: { custom_field_GT: 0 }) { + moviesAggregate(where: { custom_field: { gt: 0 } }) { released { min } @@ -165,7 +165,7 @@ describe("cypher directive filtering - Aggregation", () => { const query = /* GraphQL */ ` query { - moviesAggregate(where: { custom_field_INCLUDES: "test" }) { + moviesAggregate(where: { custom_field: { includes: "test" } }) { title { longest } @@ -229,7 +229,7 @@ describe("cypher directive filtering - Aggregation", () => { const query = /* GraphQL */ ` query { - moviesAggregate(where: { custom_field_INCLUDES: 2 }) { + moviesAggregate(where: { custom_field: { includes: 2 } }) { title { longest } diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-auth.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-auth.test.ts index bb2c39f3f7..a9978323b7 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-auth.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-auth.test.ts @@ -24,7 +24,9 @@ import { formatCypher, formatParams, translateQuery } from "../../../utils/tck-t describe("cypher directive filtering - Auth", () => { test("With authorization on type using @cypher return value", async () => { const typeDefs = /* GraphQL */ ` - type Movie @node @authorization(filter: [{ where: { node: { custom_field_EQ: "$jwt.custom_value" } } }]) { + type Movie + @node + @authorization(filter: [{ where: { node: { custom_field: { eq: "$jwt.custom_value" } } } }]) { title: String custom_field: String @cypher( @@ -102,7 +104,7 @@ describe("cypher directive filtering - Auth", () => { """ columnName: "s" ) - @authorization(filter: [{ where: { node: { custom_field_EQ: "$jwt.custom_value" } } }]) + @authorization(filter: [{ where: { node: { custom_field: { eq: "$jwt.custom_value" } } } }]) actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } @@ -182,7 +184,7 @@ describe("cypher directive filtering - Auth", () => { """ columnName: "s" ) - @authorization(filter: [{ where: { node: { title_EQ: "$jwt.custom_value" } } }]) + @authorization(filter: [{ where: { node: { title: { eq: "$jwt.custom_value" } } } }]) actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } @@ -237,7 +239,9 @@ describe("cypher directive filtering - Auth", () => { type Actor @node - @authorization(filter: [{ where: { node: { movies_SOME: { custom_field_EQ: "$jwt.custom_value" } } } }]) { + @authorization( + filter: [{ where: { node: { movies: { some: { custom_field: { eq: "$jwt.custom_value" } } } } } }] + ) { name: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -302,7 +306,8 @@ describe("cypher directive filtering - Auth", () => { test("With authorization on a different field than the @cypher field", async () => { const typeDefs = /* GraphQL */ ` type Movie @node { - title: String @authorization(filter: [{ where: { node: { custom_field_EQ: "$jwt.custom_value" } } }]) + title: String + @authorization(filter: [{ where: { node: { custom_field: { eq: "$jwt.custom_value" } } } }]) custom_field: String @cypher( statement: """ @@ -370,7 +375,9 @@ describe("cypher directive filtering - Auth", () => { test("With authorization on type using @cypher return value, with validate", async () => { const typeDefs = /* GraphQL */ ` - type Movie @node @authorization(validate: [{ where: { node: { custom_field_EQ: "$jwt.custom_value" } } }]) { + type Movie + @node + @authorization(validate: [{ where: { node: { custom_field: { eq: "$jwt.custom_value" } } } }]) { title: String custom_field: String @cypher( diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-connect.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-connect.test.ts index 34d4e800a4..1238ba9e7d 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-connect.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-connect.test.ts @@ -51,20 +51,11 @@ describe("cypher directive filtering", () => { connect: [ { where: { - node: { - name_EQ: "Keanu Reeves", - custom_field_EQ: "hello world!" - } - } - } - ] - create: [ - { - node: { - name: "Jada Pinkett Smith" + node: { name: { eq: "Keanu Reeves" }, custom_field: { eq: "hello world!" } } } } ] + create: [{ node: { name: "Jada Pinkett Smith" } }] } } ] diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-list-auth.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-list-auth.test.ts index 87919b9877..eac3d1bb37 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-list-auth.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-list-auth.test.ts @@ -26,7 +26,7 @@ describe("cypher directive filtering - List Auth", () => { const typeDefs = /* GraphQL */ ` type Movie @node - @authorization(filter: [{ where: { node: { custom_list_INCLUDES: "$jwt.custom_value" } } }]) { + @authorization(filter: [{ where: { node: { custom_list: { includes: "$jwt.custom_value" } } } }]) { title: String custom_list: [String] @cypher( @@ -112,7 +112,7 @@ describe("cypher directive filtering - List Auth", () => { const typeDefs = /* GraphQL */ ` type Movie @node - @authorization(filter: [{ where: { node: { custom_list_INCLUDES: "$jwt.custom_value" } } }]) { + @authorization(filter: [{ where: { node: { custom_list: { includes: "$jwt.custom_value" } } } }]) { title: String custom_list: [String] @cypher( @@ -194,7 +194,7 @@ describe("cypher directive filtering - List Auth", () => { """ columnName: "list" ) - @authorization(filter: [{ where: { node: { custom_list_INCLUDES: "$jwt.custom_value" } } }]) + @authorization(filter: [{ where: { node: { custom_list: { includes: "$jwt.custom_value" } } } }]) actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } @@ -279,7 +279,7 @@ describe("cypher directive filtering - List Auth", () => { """ columnName: "list" ) - @authorization(filter: [{ where: { node: { custom_list_EQ: "$jwt.custom_value" } } }]) + @authorization(filter: [{ where: { node: { custom_list: { eq: "$jwt.custom_value" } } } }]) actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } @@ -335,7 +335,9 @@ describe("cypher directive filtering - List Auth", () => { type Actor @node - @authorization(filter: [{ where: { node: { movies_SOME: { custom_list_EQ: "$jwt.custom_value" } } } }]) { + @authorization( + filter: [{ where: { node: { movies: { some: { custom_list: { eq: "$jwt.custom_value" } } } } } }] + ) { name: String movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } @@ -403,7 +405,7 @@ describe("cypher directive filtering - List Auth", () => { const typeDefs = /* GraphQL */ ` type Movie @node { title: String - @authorization(filter: [{ where: { node: { custom_list_INCLUDES: "$jwt.custom_value" } } }]) + @authorization(filter: [{ where: { node: { custom_list: { includes: "$jwt.custom_value" } } } }]) custom_list: [String] @cypher( statement: """ @@ -476,7 +478,7 @@ describe("cypher directive filtering - List Auth", () => { const typeDefs = /* GraphQL */ ` type Movie @node - @authorization(validate: [{ where: { node: { custom_list_INCLUDES: "$jwt.custom_value" } } }]) { + @authorization(validate: [{ where: { node: { custom_list: { includes: "$jwt.custom_value" } } } }]) { title: String custom_list: [String] @cypher( diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-list.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-list.test.ts index fc33c4b64b..22563b11aa 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-list.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-list.test.ts @@ -37,7 +37,7 @@ describe("cypher directive filtering - Lists", () => { const query = /* GraphQL */ ` query { - movies(where: { custom_cypher_list_INCLUDES: "a" }) { + movies(where: { custom_cypher_list: { includes: "a" } }) { title } } diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-misc.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-misc.test.ts index 526cfca49f..d8f84df1e1 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-misc.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-misc.test.ts @@ -43,7 +43,9 @@ describe("cypher directive filtering - Auth", () => { const query = /* GraphQL */ ` query { - movies(where: { custom_field_EQ: "hello world!", actors_SOME: { name_EQ: "Keanu Reeves" } }) { + movies( + where: { custom_field: { eq: "hello world!" }, actors: { some: { name: { eq: "Keanu Reeves" } } } } + ) { custom_field title actors { @@ -127,7 +129,7 @@ describe("cypher directive filtering - Auth", () => { query { actors { name - movies(where: { custom_field_EQ: "hello world!"}) { + movies(where: { custom_field: { eq: "hello world!" } }) { title } } @@ -192,9 +194,9 @@ describe("cypher directive filtering - Auth", () => { const query = /* GraphQL */ ` query { - movies(where: { custom_field_EQ: "hello world!" }) { + movies(where: { custom_field: { eq: "hello world!" } }) { title - actors(where: { name_EQ: "Keanu Reeves" }) { + actors(where: { name: { eq: "Keanu Reeves" } }) { name } } @@ -275,7 +277,7 @@ describe("cypher directive filtering - Auth", () => { const query = /* GraphQL */ ` query { - movies(where: { custom_field_EQ: "hello world!", another_custom_field_GT: 50 }) { + movies(where: { custom_field: { eq: "hello world!" }, another_custom_field: { gt: 50 } }) { title actors { name @@ -363,9 +365,9 @@ describe("cypher directive filtering - Auth", () => { const query = /* GraphQL */ ` query { - movies(where: { custom_field_EQ: "hello world!" }) { + movies(where: { custom_field: { eq: "hello world!" } }) { title - actors(where: { another_custom_field_EQ: "goodbye!", name_EQ: "Keanu Reeves" }) { + actors(where: { another_custom_field: { eq: "goodbye!" }, name: { eq: "Keanu Reeves" } }) { name } } diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-one-to-one-relationship.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-one-to-one-relationship.test.ts index 43fe5ffd11..bfe3a32575 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-one-to-one-relationship.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-one-to-one-relationship.test.ts @@ -52,7 +52,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - movies(where: { actor: { name_EQ: "Keanu Reeves" } }) { + movies(where: { actor: { name: { eq: "Keanu Reeves" } } }) { title } } @@ -120,7 +120,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - movies(where: { released_EQ: 2003, actor: { name_EQ: "Keanu Reeves", age_GT: 30 } }) { + movies(where: { released: { eq: 2003 }, actor: { name: { eq: "Keanu Reeves" }, age: { gt: 30 } } }) { title } } @@ -198,7 +198,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - movies(where: { actor: { name_EQ: "Keanu Reeves" } }) { + movies(where: { actor: { name: { eq: "Keanu Reeves" } } }) { title actor { name @@ -245,7 +245,7 @@ describe("cypher directive filtering - One To One Relationship", () => { }" `); }); - + // TODO: {actor: null} was not migrated to {actors: {eq: null}}. Check if this is correct test("1 to 1 relationship with null filter", async () => { const typeDefs = /* GraphQL */ ` type Movie @node { @@ -280,7 +280,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - movies(where: { released_EQ: 2003, actor: null }) { + movies(where: { released: { eq: 2003 }, actor: null }) { title } } @@ -315,7 +315,7 @@ describe("cypher directive filtering - One To One Relationship", () => { }" `); }); - + // TODO: {actor: null} was not migrated to {actors: {eq: null}}. Check if this is correct test("1 to 1 relationship with NOT null filter", async () => { const typeDefs = /* GraphQL */ ` type Movie @node { @@ -350,7 +350,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - movies(where: { AND: [{ released_IN: [2003], NOT: { actor: null } }] }) { + movies(where: { AND: [{ released: { in: [2003] }, NOT: { actor: null } }] }) { title } } @@ -392,7 +392,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const typeDefs = /* GraphQL */ ` type Movie @node - @authorization(filter: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) { + @authorization(filter: [{ where: { node: { directed_by: { name: { eq: "$jwt.custom_value" } } } } }]) { title: String released: Int directed_by: Person! @@ -431,7 +431,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - people(where: { directed: { title_EQ: "The Matrix" } }) { + people(where: { directed: { title: { eq: "The Matrix" } } }) { directed { title directed_by { @@ -515,7 +515,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const typeDefs = /* GraphQL */ ` type Movie @node - @authorization(filter: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) { + @authorization(filter: [{ where: { node: { directed_by: { name: { eq: "$jwt.custom_value" } } } } }]) { title: String released: Int directed_by: Person! @@ -554,7 +554,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - people(where: { directed: { title_EQ: "The Matrix" } }) { + people(where: { directed: { title: { eq: "The Matrix" } } }) { directed { title directed_by { @@ -640,7 +640,9 @@ describe("cypher directive filtering - One To One Relationship", () => { title: String released: Int directed_by: Person! - @authorization(filter: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) + @authorization( + filter: [{ where: { node: { directed_by: { name: { eq: "$jwt.custom_value" } } } } }] + ) @cypher( statement: """ MATCH (this)<-[:DIRECTED]-(director:Person) @@ -676,7 +678,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - people(where: { directed: { title_EQ: "The Matrix" } }) { + people(where: { directed: { title: { eq: "The Matrix" } } }) { directed { title directed_by { @@ -762,7 +764,9 @@ describe("cypher directive filtering - One To One Relationship", () => { title: String released: Int directed_by: Person! - @authorization(filter: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) + @authorization( + filter: [{ where: { node: { directed_by: { name: { eq: "$jwt.custom_value" } } } } }] + ) @cypher( statement: """ MATCH (this)<-[:DIRECTED]-(director:Person) @@ -798,7 +802,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - people(where: { directed: { title_EQ: "The Matrix" } }) { + people(where: { directed: { title: { eq: "The Matrix" } } }) { directed { title directed_by { @@ -882,7 +886,9 @@ describe("cypher directive filtering - One To One Relationship", () => { const typeDefs = /* GraphQL */ ` type Movie @node - @authorization(validate: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) { + @authorization( + validate: [{ where: { node: { directed_by: { name: { eq: "$jwt.custom_value" } } } } }] + ) { title: String released: Int directed_by: Person! @@ -921,7 +927,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - people(where: { directed: { title_EQ: "The Matrix" } }) { + people(where: { directed: { title: { eq: "The Matrix" } } }) { directed { title directed_by { @@ -1005,7 +1011,9 @@ describe("cypher directive filtering - One To One Relationship", () => { const typeDefs = /* GraphQL */ ` type Movie @node - @authorization(validate: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) { + @authorization( + validate: [{ where: { node: { directed_by: { name: { eq: "$jwt.custom_value" } } } } }] + ) { title: String released: Int directed_by: Person! @@ -1044,7 +1052,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - people(where: { directed: { title_EQ: "The Matrix" } }) { + people(where: { directed: { title: { eq: "The Matrix" } } }) { directed { title directed_by { @@ -1130,7 +1138,9 @@ describe("cypher directive filtering - One To One Relationship", () => { title: String released: Int directed_by: Person! - @authorization(validate: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) + @authorization( + validate: [{ where: { node: { directed_by: { name: { eq: "$jwt.custom_value" } } } } }] + ) @cypher( statement: """ MATCH (this)<-[:DIRECTED]-(director:Person) @@ -1166,7 +1176,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - people(where: { directed: { title_EQ: "The Matrix" } }) { + people(where: { directed: { title: { eq: "The Matrix" } } }) { directed { title directed_by { @@ -1252,7 +1262,9 @@ describe("cypher directive filtering - One To One Relationship", () => { title: String released: Int directed_by: Person! - @authorization(validate: [{ where: { node: { directed_by: { name_EQ: "$jwt.custom_value" } } } }]) + @authorization( + validate: [{ where: { node: { directed_by: { name: { eq: "$jwt.custom_value" } } } } }] + ) @cypher( statement: """ MATCH (this)<-[:DIRECTED]-(director:Person) @@ -1288,7 +1300,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - people(where: { directed: { title_EQ: "The Matrix" } }) { + people(where: { directed: { title: { eq: "The Matrix" } } }) { directed { title directed_by { @@ -1404,7 +1416,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - people(where: { directed: { title_EQ: "The Matrix" } }) { + people(where: { directed: { title: { eq: "The Matrix" } } }) { directed { title directed_by { @@ -1535,7 +1547,7 @@ describe("cypher directive filtering - One To One Relationship", () => { const query = /* GraphQL */ ` query { - movies(where: { directed_by: { name_EQ: "Lilly Wachowski" }, title_ENDS_WITH: "Matrix" }) { + movies(where: { directed_by: { name: { eq: "Lilly Wachowski" } }, title: { endsWith: "Matrix" } }) { actorsConnection { totalCount edges { diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-scalar.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-scalar.test.ts index 4b13911289..853ffd7b82 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-scalar.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-scalar.test.ts @@ -20,7 +20,7 @@ import { Neo4jGraphQL } from "../../../../../src"; import { formatCypher, formatParams, translateQuery } from "../../../utils/tck-test-utils"; -describe("cypher directive filtering - Auth", () => { +describe("cypher directive filtering", () => { test("Int cypher field AND String title field", async () => { const typeDefs = /* GraphQL */ ` type Movie @node { @@ -38,7 +38,7 @@ describe("cypher directive filtering - Auth", () => { const query = /* GraphQL */ ` query { - movies(where: { special_count_GTE: 1, title_EQ: "CustomType One" }) { + movies(where: { special_count: { gte: 1 }, title: { eq: "CustomType One" } }) { special_count } } @@ -107,7 +107,7 @@ describe("cypher directive filtering - Auth", () => { const query = /* GraphQL */ ` query { - movies(where: { special_count_GTE: 1, title_EQ: "CustomType Unknown" }) { + movies(where: { special_count: { gte: 1 }, title: { eq: "CustomType Unknown" } }) { special_count } } @@ -176,7 +176,7 @@ describe("cypher directive filtering - Auth", () => { const query = /* GraphQL */ ` query { - movies(where: { special_count_GTE: 1 }) { + movies(where: { special_count: { gte: 1 } }) { title } } diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-sorting.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-sorting.test.ts index 8af0f93149..c9d2fbfdaf 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-sorting.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-sorting.test.ts @@ -44,7 +44,7 @@ describe("cypher directive filtering", () => { const query = /* GraphQL */ ` query { - movies(where: { custom_field_STARTS_WITH: "The Matrix" }, sort: [{ custom_field: DESC }]) { + movies(where: { custom_field: { startsWith: "The Matrix" } }, sort: [{ custom_field: DESC }]) { title actors { name @@ -125,7 +125,7 @@ describe("cypher directive filtering", () => { const query = /* GraphQL */ ` query { - movies(where: { custom_field_EQ: "hello world!" }, sort: [{ title: DESC }]) { + movies(where: { custom_field: { eq: "hello world!" } }, sort: [{ title: DESC }]) { title actors { name diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-temporal.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-temporal.test.ts index bdcccba31f..765c62fc98 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-temporal.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-temporal.test.ts @@ -37,7 +37,7 @@ describe("cypher directive filtering - Auth", () => { const query = /* GraphQL */ ` query { - movies(where: { special_time_GT: "2024-09-02T00:00:00Z" }) { + movies(where: { special_time: { gt: "2024-09-02T00:00:00Z" } }) { special_time title } @@ -108,7 +108,7 @@ describe("cypher directive filtering - Auth", () => { `; const query = /* GraphQL */ ` query { - movies(where: { special_duration_EQ: "P14DT16H12M" }) { + movies(where: { special_duration: { eq: "P14DT16H12M" } }) { title } } diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship-auth.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship-auth.test.ts index af15457e57..4f95df31a5 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship-auth.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship-auth.test.ts @@ -26,7 +26,9 @@ describe("cypher directive filtering - relationship auth filter", () => { const typeDefs = /* GraphQL */ ` type Movie @node - @authorization(filter: [{ where: { node: { actors_SOME: { name_EQ: "$jwt.custom_value" } } } }]) { + @authorization( + filter: [{ where: { node: { actors: { some: { name: { eq: "$jwt.custom_value" } } } } } }] + ) { title: String rating: Float actors: [Actor!]! @@ -65,7 +67,7 @@ describe("cypher directive filtering - relationship auth filter", () => { const query = /* GraphQL */ ` query { - moviesConnection(where: { rating_LT: 7.0 }) { + moviesConnection(where: { rating: { lt: 7.0 } }) { edges { node { title @@ -118,7 +120,9 @@ describe("cypher directive filtering - relationship auth filter", () => { const typeDefs = /* GraphQL */ ` type Movie @node - @authorization(filter: [{ where: { node: { actors_SOME: { name_EQ: "$jwt.custom_value" } } } }]) { + @authorization( + filter: [{ where: { node: { actors: { some: { name: { eq: "$jwt.custom_value" } } } } } }] + ) { title: String rating: Float actors: [Actor!]! @@ -157,7 +161,7 @@ describe("cypher directive filtering - relationship auth filter", () => { const query = /* GraphQL */ ` query { - moviesConnection(where: { rating_LT: 7.0 }) { + moviesConnection(where: { rating: { lt: 7.0 } }) { edges { node { title @@ -210,7 +214,9 @@ describe("cypher directive filtering - relationship auth filter", () => { const typeDefs = /* GraphQL */ ` type Movie @node - @authorization(validate: [{ where: { node: { actors_SOME: { name_EQ: "$jwt.custom_value" } } } }]) { + @authorization( + validate: [{ where: { node: { actors: { some: { name: { eq: "$jwt.custom_value" } } } } } }] + ) { title: String rating: Float actors: [Actor!]! @@ -249,7 +255,7 @@ describe("cypher directive filtering - relationship auth filter", () => { const query = /* GraphQL */ ` query { - moviesConnection(where: { rating_LT: 7.0 }) { + moviesConnection(where: { rating: { lt: 7.0 } }) { edges { node { title @@ -302,7 +308,9 @@ describe("cypher directive filtering - relationship auth filter", () => { const typeDefs = /* GraphQL */ ` type Movie @node - @authorization(validate: [{ where: { node: { actors_SOME: { name_EQ: "$jwt.custom_value" } } } }]) { + @authorization( + validate: [{ where: { node: { actors: { some: { name: { eq: "$jwt.custom_value" } } } } } }] + ) { title: String rating: Float actors: [Actor!]! @@ -341,7 +349,7 @@ describe("cypher directive filtering - relationship auth filter", () => { const query = /* GraphQL */ ` query { - moviesConnection(where: { rating_GT: 7.0 }) { + moviesConnection(where: { rating: { gt: 7.0 } }) { edges { node { title diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship-connection.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship-connection.test.ts index 4792405991..0f8327a93a 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship-connection.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship-connection.test.ts @@ -54,7 +54,7 @@ describe("Connection API - cypher directive filtering - Relationship", () => { const query = /* GraphQL */ ` query { - moviesConnection(where: { NOT: { actors_SOME: { name_EQ: "Jada Pinkett Smith" } } }) { + moviesConnection(where: { NOT: { actors: { some: { name: { eq: "Jada Pinkett Smith" } } } } }) { edges { node { title @@ -131,7 +131,7 @@ describe("Connection API - cypher directive filtering - Relationship", () => { const query = /* GraphQL */ ` query { - moviesConnection(where: { actors_ALL: { name_EQ: "Keanu Reeves" } }) { + moviesConnection(where: { actors: { all: { name: { eq: "Keanu Reeves" } } } }) { edges { node { title @@ -208,7 +208,7 @@ describe("Connection API - cypher directive filtering - Relationship", () => { const query = /* GraphQL */ ` query { - moviesConnection(where: { actors_SINGLE: { name_EQ: "Carrie-Anne Moss" } }) { + moviesConnection(where: { actors: { single: { name: { eq: "Carrie-Anne Moss" } } } }) { edges { node { title @@ -285,7 +285,7 @@ describe("Connection API - cypher directive filtering - Relationship", () => { const query = /* GraphQL */ ` query { - moviesConnection(where: { actors_SOME: { name_EQ: "Keanu Reeves" } }) { + moviesConnection(where: { actors: { some: { name: { eq: "Keanu Reeves" } } } }) { edges { node { title @@ -362,7 +362,7 @@ describe("Connection API - cypher directive filtering - Relationship", () => { const query = /* GraphQL */ ` query { - moviesConnection(where: { actors_SOME: { name_EQ: "Keanu Reeves" } }, sort: { title: DESC }) { + moviesConnection(where: { actors: { some: { name: { eq: "Keanu Reeves" } } } }, sort: { title: DESC }) { edges { node { title @@ -441,7 +441,7 @@ describe("Connection API - cypher directive filtering - Relationship", () => { const query = /* GraphQL */ ` query { - moviesConnection(where: { actors_NONE: { name_EQ: "Keanu Reeves" } }) { + moviesConnection(where: { actors: { none: { name: { eq: "Keanu Reeves" } } } }) { edges { node { title @@ -541,8 +541,8 @@ describe("Connection API - cypher directive filtering - Relationship", () => { moviesConnection( where: { OR: [ - { actors_SOME: { name_EQ: "Jada Pinkett Smith" } } - { genres_SOME: { name_EQ: "Romance" } } + { actors: { some: { name: { eq: "Jada Pinkett Smith" } } } } + { genres: { some: { name: { eq: "Romance" } } } } ] } ) { diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship.test.ts index 5dfc575479..511a43c9bd 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/relationships/cypher-filtering-relationship.test.ts @@ -54,7 +54,7 @@ describe("cypher directive filtering - Relationship", () => { const query = /* GraphQL */ ` query { - movies(where: { NOT: { actors_SOME: { name_EQ: "Jada Pinkett Smith" } } }) { + movies(where: { NOT: { actors: { some: { name: { eq: "Jada Pinkett Smith" } } } } }) { title } } @@ -119,7 +119,7 @@ describe("cypher directive filtering - Relationship", () => { const query = /* GraphQL */ ` query { - movies(where: { actors_ALL: { name_EQ: "Keanu Reeves" } }) { + movies(where: { actors: { all: { name: { eq: "Keanu Reeves" } } } }) { title } } @@ -184,7 +184,7 @@ describe("cypher directive filtering - Relationship", () => { const query = /* GraphQL */ ` query { - movies(where: { actors_SINGLE: { name_EQ: "Carrie-Anne Moss" } }) { + movies(where: { actors: { single: { name: { eq: "Carrie-Anne Moss" } } } }) { title } } @@ -249,7 +249,7 @@ describe("cypher directive filtering - Relationship", () => { const query = /* GraphQL */ ` query { - movies(where: { actors_SOME: { name_EQ: "Keanu Reeves" } }) { + movies(where: { actors: { some: { name: { eq: "Keanu Reeves" } } } }) { title } } @@ -313,7 +313,7 @@ describe("cypher directive filtering - Relationship", () => { }); const query = /* GraphQL */ ` query { - movies(where: { actors_NONE: { name_EQ: "Keanu Reeves" } }) { + movies(where: { actors: { none: { name: { eq: "Keanu Reeves" } } } }) { title } } @@ -401,8 +401,8 @@ describe("cypher directive filtering - Relationship", () => { movies( where: { OR: [ - { actors_SOME: { name_EQ: "Jada Pinkett Smith" } } - { genres_SOME: { name_EQ: "Romance" } } + { actors: { some: { name: { eq: "Jada Pinkett Smith" } } } } + { genres: { some: { name: { eq: "Romance" } } } } ] } ) { diff --git a/packages/graphql/tests/tck/directives/interface-relationships/create/connect.test.ts b/packages/graphql/tests/tck/directives/interface-relationships/create/connect.test.ts index b8352c8913..cffd5660d9 100644 --- a/packages/graphql/tests/tck/directives/interface-relationships/create/connect.test.ts +++ b/packages/graphql/tests/tck/directives/interface-relationships/create/connect.test.ts @@ -63,7 +63,10 @@ describe("Interface Relationships - Create connect", () => { { name: "Actor Name" actedIn: { - connect: { edge: { screenTime: 90 }, where: { node: { title_STARTS_WITH: "The " } } } + connect: { + edge: { screenTime: 90 } + where: { node: { title: { startsWith: "The " } } } + } } } ] diff --git a/packages/graphql/tests/tck/directives/interface-relationships/delete/delete.test.ts b/packages/graphql/tests/tck/directives/interface-relationships/delete/delete.test.ts index 7165d5039e..584f775bc0 100644 --- a/packages/graphql/tests/tck/directives/interface-relationships/delete/delete.test.ts +++ b/packages/graphql/tests/tck/directives/interface-relationships/delete/delete.test.ts @@ -61,7 +61,7 @@ describe("Interface Relationships - Delete delete", () => { test("Delete delete an interface relationship", async () => { const query = /* GraphQL */ ` mutation { - deleteActors(delete: { actedIn: { where: { node: { title_STARTS_WITH: "The " } } } }) { + deleteActors(delete: { actedIn: { where: { node: { title: { startsWith: "The " } } } } }) { nodesDeleted relationshipsDeleted } @@ -113,8 +113,8 @@ describe("Interface Relationships - Delete delete", () => { deleteActors( delete: { actedIn: { - where: { node: { title_STARTS_WITH: "The " } } - delete: { actors: { where: { node: { name_EQ: "Actor" } } } } + where: { node: { title: { startsWith: "The " } } } + delete: { actors: { where: { node: { name: { eq: "Actor" } } } } } } } ) { diff --git a/packages/graphql/tests/tck/directives/interface-relationships/read.test.ts b/packages/graphql/tests/tck/directives/interface-relationships/read.test.ts index 1b90e91218..1d44d0b351 100644 --- a/packages/graphql/tests/tck/directives/interface-relationships/read.test.ts +++ b/packages/graphql/tests/tck/directives/interface-relationships/read.test.ts @@ -210,7 +210,9 @@ describe("Interface Relationships", () => { const query = /* GraphQL */ ` query { actors { - actedInConnection(where: { node: { title_STARTS_WITH: "The " }, edge: { screenTime_GT: 60 } }) { + actedInConnection( + where: { node: { title: { startsWith: "The " } }, edge: { screenTime: { gt: 60 } } } + ) { edges { properties { screenTime diff --git a/packages/graphql/tests/tck/directives/interface-relationships/update/connect.test.ts b/packages/graphql/tests/tck/directives/interface-relationships/update/connect.test.ts index 2f5bcf11ce..38d64f3fd5 100644 --- a/packages/graphql/tests/tck/directives/interface-relationships/update/connect.test.ts +++ b/packages/graphql/tests/tck/directives/interface-relationships/update/connect.test.ts @@ -64,7 +64,7 @@ describe("Interface Relationships - Update connect", () => { updateActors( update: { actedIn: { - connect: { edge: { screenTime: 90 }, where: { node: { title_STARTS_WITH: "The " } } } + connect: { edge: { screenTime: 90 }, where: { node: { title: { startsWith: "The " } } } } } } ) { @@ -149,11 +149,11 @@ describe("Interface Relationships - Update connect", () => { actedIn: { connect: { edge: { screenTime: 90 } - where: { node: { title_STARTS_WITH: "The " } } + where: { node: { title: { startsWith: "The " } } } connect: { actors: { edge: { ActedIn: { screenTime: 90 } } - where: { node: { name_EQ: "Actor" } } + where: { node: { name: { eq: "Actor" } } } } } } diff --git a/packages/graphql/tests/tck/directives/interface-relationships/update/delete.test.ts b/packages/graphql/tests/tck/directives/interface-relationships/update/delete.test.ts index b4905b4434..84d124518b 100644 --- a/packages/graphql/tests/tck/directives/interface-relationships/update/delete.test.ts +++ b/packages/graphql/tests/tck/directives/interface-relationships/update/delete.test.ts @@ -61,7 +61,7 @@ describe("Interface Relationships - Update delete", () => { test("Update delete an interface relationship", async () => { const query = /* GraphQL */ ` mutation { - updateActors(update: { actedIn: { delete: { where: { node: { title_STARTS_WITH: "The " } } } } }) { + updateActors(update: { actedIn: { delete: { where: { node: { title: { startsWith: "The " } } } } } }) { actors { name } @@ -145,7 +145,9 @@ describe("Interface Relationships - Update delete", () => { { \\"where\\": { \\"node\\": { - \\"title_STARTS_WITH\\": \\"The \\" + \\"title\\": { + \\"startsWith\\": \\"The \\" + } } } } @@ -167,8 +169,8 @@ describe("Interface Relationships - Update delete", () => { update: { actedIn: { delete: { - where: { node: { title_STARTS_WITH: "The " } } - delete: { actors: { where: { node: { name_EQ: "Actor" } } } } + where: { node: { title: { startsWith: "The " } } } + delete: { actors: { where: { node: { name: { eq: "Actor" } } } } } } } } @@ -305,7 +307,9 @@ describe("Interface Relationships - Update delete", () => { { \\"where\\": { \\"node\\": { - \\"title_STARTS_WITH\\": \\"The \\" + \\"title\\": { + \\"startsWith\\": \\"The \\" + } } }, \\"delete\\": { @@ -313,7 +317,9 @@ describe("Interface Relationships - Update delete", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Actor\\" + \\"name\\": { + \\"eq\\": \\"Actor\\" + } } } } diff --git a/packages/graphql/tests/tck/directives/interface-relationships/update/disconnect.test.ts b/packages/graphql/tests/tck/directives/interface-relationships/update/disconnect.test.ts index 850a40bd96..a865cbdcef 100644 --- a/packages/graphql/tests/tck/directives/interface-relationships/update/disconnect.test.ts +++ b/packages/graphql/tests/tck/directives/interface-relationships/update/disconnect.test.ts @@ -61,7 +61,9 @@ describe("Interface Relationships - Update disconnect", () => { test("Update disconnect from an interface relationship", async () => { const query = /* GraphQL */ ` mutation { - updateActors(update: { actedIn: { disconnect: { where: { node: { title_STARTS_WITH: "The " } } } } }) { + updateActors( + update: { actedIn: { disconnect: { where: { node: { title: { startsWith: "The " } } } } } } + ) { actors { name } @@ -124,7 +126,9 @@ describe("Interface Relationships - Update disconnect", () => { { \\"where\\": { \\"node\\": { - \\"title_STARTS_WITH\\": \\"The \\" + \\"title\\": { + \\"startsWith\\": \\"The \\" + } } } } @@ -146,8 +150,8 @@ describe("Interface Relationships - Update disconnect", () => { update: { actedIn: { disconnect: { - where: { node: { title_STARTS_WITH: "The " } } - disconnect: { actors: { where: { node: { name_EQ: "Actor" } } } } + where: { node: { title: { startsWith: "The " } } } + disconnect: { actors: { where: { node: { name: { eq: "Actor" } } } } } } } } @@ -239,7 +243,9 @@ describe("Interface Relationships - Update disconnect", () => { { \\"where\\": { \\"node\\": { - \\"title_STARTS_WITH\\": \\"The \\" + \\"title\\": { + \\"startsWith\\": \\"The \\" + } } }, \\"disconnect\\": { @@ -247,7 +253,9 @@ describe("Interface Relationships - Update disconnect", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Actor\\" + \\"name\\": { + \\"eq\\": \\"Actor\\" + } } } } diff --git a/packages/graphql/tests/tck/directives/interface-relationships/update/update.test.ts b/packages/graphql/tests/tck/directives/interface-relationships/update/update.test.ts index 5b63b35204..b1c97549df 100644 --- a/packages/graphql/tests/tck/directives/interface-relationships/update/update.test.ts +++ b/packages/graphql/tests/tck/directives/interface-relationships/update/update.test.ts @@ -64,7 +64,7 @@ describe("Interface Relationships - Update update", () => { updateActors( update: { actedIn: { - where: { node: { title_EQ: "Old Title" } } + where: { node: { title: { eq: "Old Title" } } } update: { node: { title_SET: "New Title" } } } } @@ -119,7 +119,9 @@ describe("Interface Relationships - Update update", () => { { \\"where\\": { \\"node\\": { - \\"title_EQ\\": \\"Old Title\\" + \\"title\\": { + \\"eq\\": \\"Old Title\\" + } } }, \\"update\\": { @@ -143,7 +145,7 @@ describe("Interface Relationships - Update update", () => { updateActors( update: { actedIn: { - where: { node: { title_EQ: "Old Title" } } + where: { node: { title: { eq: "Old Title" } } } update: { node: { actors: { update: { node: { name_SET: "New Actor Name" } } } } } } } @@ -210,7 +212,9 @@ describe("Interface Relationships - Update update", () => { { \\"where\\": { \\"node\\": { - \\"title_EQ\\": \\"Old Title\\" + \\"title\\": { + \\"eq\\": \\"Old Title\\" + } } }, \\"update\\": { diff --git a/packages/graphql/tests/tck/directives/node/node-additional-labels.test.ts b/packages/graphql/tests/tck/directives/node/node-additional-labels.test.ts index d8dff96281..b0c891a2f5 100644 --- a/packages/graphql/tests/tck/directives/node/node-additional-labels.test.ts +++ b/packages/graphql/tests/tck/directives/node/node-additional-labels.test.ts @@ -165,7 +165,7 @@ describe("Node directive with additionalLabels", () => { test("Delete Movie with additional additionalLabels", async () => { const query = /* GraphQL */ ` mutation { - deleteMovies(where: { id_EQ: "123" }) { + deleteMovies(where: { id: { eq: "123" } }) { nodesDeleted } } @@ -189,7 +189,7 @@ describe("Node directive with additionalLabels", () => { test("Update Movie with additional labels", async () => { const query = /* GraphQL */ ` mutation { - updateMovies(where: { id_EQ: "1" }, update: { id_SET: "2" }) { + updateMovies(where: { id: { eq: "1" } }, update: { id_SET: "2" }) { movies { id } diff --git a/packages/graphql/tests/tck/directives/node/node-label-interface.test.ts b/packages/graphql/tests/tck/directives/node/node-label-interface.test.ts index 040f6b97ae..410ed25c4c 100644 --- a/packages/graphql/tests/tck/directives/node/node-label-interface.test.ts +++ b/packages/graphql/tests/tck/directives/node/node-label-interface.test.ts @@ -49,8 +49,8 @@ describe("Node directive with interface", () => { test("Read Interface", async () => { const query = /* GraphQL */ ` { - movies(where: { title_EQ: "some title" }) { - search(where: { name_EQ: "Horror" }, offset: 1, limit: 10) { + movies(where: { title: { eq: "some title" } }) { + search(where: { name: { eq: "Horror" } }, offset: 1, limit: 10) { ... on Movie { title } diff --git a/packages/graphql/tests/tck/directives/node/node-label-jwt.test.ts b/packages/graphql/tests/tck/directives/node/node-label-jwt.test.ts index a405043082..9bfdbd2ea9 100644 --- a/packages/graphql/tests/tck/directives/node/node-label-jwt.test.ts +++ b/packages/graphql/tests/tck/directives/node/node-label-jwt.test.ts @@ -70,9 +70,9 @@ describe("Label in Node directive", () => { test("Select Movie with label Film from Actors with additionalLabels", async () => { const query = /* GraphQL */ ` query { - actors(where: { age_GT: 10 }) { + actors(where: { age: { gt: 10 } }) { name - movies(where: { title_EQ: "terminator" }) { + movies(where: { title: { eq: "terminator" } }) { title } } @@ -117,7 +117,7 @@ describe("Label in Node directive", () => { } `; - const token = createBearerToken("secret", { movielabel: "Film", personlabel: "Person" }); + const token = createBearerToken("secret", { movielabel: "Film", personlabel: "Person" }); const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` diff --git a/packages/graphql/tests/tck/directives/node/node-label-union.test.ts b/packages/graphql/tests/tck/directives/node/node-label-union.test.ts index 59053d86e9..972a1263aa 100644 --- a/packages/graphql/tests/tck/directives/node/node-label-union.test.ts +++ b/packages/graphql/tests/tck/directives/node/node-label-union.test.ts @@ -46,9 +46,9 @@ describe("Node directive with unions", () => { test("Read Unions", async () => { const query = /* GraphQL */ ` { - movies(where: { title_EQ: "some title" }) { + movies(where: { title: { eq: "some title" } }) { search( - where: { Movie: { title_EQ: "The Matrix" }, Genre: { name_EQ: "Horror" } } + where: { Movie: { title: { eq: "The Matrix" } }, Genre: { name: { eq: "Horror" } } } offset: 1 limit: 10 ) { diff --git a/packages/graphql/tests/tck/directives/node/node-label.test.ts b/packages/graphql/tests/tck/directives/node/node-label.test.ts index 18501a87b0..86d9fa8e48 100644 --- a/packages/graphql/tests/tck/directives/node/node-label.test.ts +++ b/packages/graphql/tests/tck/directives/node/node-label.test.ts @@ -240,7 +240,7 @@ describe("Label in Node directive", () => { test("Update Movie with label film", async () => { const query = /* GraphQL */ ` mutation { - updateMovies(where: { id_EQ: "1" }, update: { id_SET: "2" }) { + updateMovies(where: { id: { eq: "1" } }, update: { id_SET: "2" }) { movies { id } @@ -270,10 +270,13 @@ describe("Label in Node directive", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { id_EQ: "1" } + where: { id: { eq: "1" } } update: { actors: [ - { where: { node: { name_EQ: "old name" } }, update: { node: { name_SET: "new name" } } } + { + where: { node: { name: { eq: "old name" } } } + update: { node: { name_SET: "new name" } } + } ] } ) { @@ -312,7 +315,9 @@ describe("Label in Node directive", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"old name\\" + \\"name\\": { + \\"eq\\": \\"old name\\" + } } }, \\"update\\": { @@ -334,8 +339,8 @@ describe("Label in Node directive", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { id_EQ: "1" } - update: { actors: { connect: [{ where: { node: { name_EQ: "Daniel" } } }] } } + where: { id: { eq: "1" } } + update: { actors: { connect: [{ where: { node: { name: { eq: "Daniel" } } } }] } } ) { movies { id @@ -383,8 +388,8 @@ describe("Label in Node directive", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { id_EQ: "1" } - update: { actors: { disconnect: [{ where: { node: { name_EQ: "Daniel" } } }] } } + where: { id: { eq: "1" } } + update: { actors: { disconnect: [{ where: { node: { name: { eq: "Daniel" } } } }] } } ) { movies { id @@ -427,7 +432,9 @@ describe("Label in Node directive", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Daniel\\" + \\"name\\": { + \\"eq\\": \\"Daniel\\" + } } } } @@ -445,7 +452,7 @@ describe("Label in Node directive", () => { test("Delete Movie with custom label", async () => { const query = /* GraphQL */ ` mutation { - deleteMovies(where: { id_EQ: "123" }) { + deleteMovies(where: { id: { eq: "123" } }) { nodesDeleted } } @@ -470,8 +477,8 @@ describe("Label in Node directive", () => { const query = /* GraphQL */ ` mutation { deleteMovies( - where: { id_EQ: 123 } - delete: { actors: { where: { node: { name_EQ: "Actor to delete" } } } } + where: { id: { eq: 123 } } + delete: { actors: { where: { node: { name: { eq: "Actor to delete" } } } } } ) { nodesDeleted } @@ -510,7 +517,7 @@ describe("Label in Node directive", () => { test("Admin Deletes Post", async () => { const query = /* GraphQL */ ` mutation { - deleteMovies(where: { actors_SOME: { name_EQ: "tom" } }) { + deleteMovies(where: { actors: { some: { name: { eq: "tom" } } } }) { nodesDeleted } } 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..b9c415d48b 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 @@ -39,9 +39,11 @@ describe("Cypher Auth Projection On Connections", () => { posts: [Post!]! @relationship(type: "HAS_POST", direction: OUT) } - extend type User @authorization(validate: [{ when: [BEFORE], where: { node: { id_EQ: "$jwt.sub" } } }]) + extend type User @authorization(validate: [{ when: [BEFORE], where: { node: { id: { eq: "$jwt.sub" } } } }]) extend type Post - @authorization(validate: [{ when: [BEFORE], where: { node: { creator_SOME: { id_EQ: "$jwt.sub" } } } }]) + @authorization( + validate: [{ when: [BEFORE], where: { node: { creator: { some: { id: { eq: "$jwt.sub" } } } } } }] + ) `; neoSchema = new Neo4jGraphQL({ @@ -78,7 +80,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/directives/node/node-with-auth.test.ts b/packages/graphql/tests/tck/directives/node/node-with-auth.test.ts index 0f5f2c3e88..7c3d45060f 100644 --- a/packages/graphql/tests/tck/directives/node/node-with-auth.test.ts +++ b/packages/graphql/tests/tck/directives/node/node-with-auth.test.ts @@ -39,7 +39,7 @@ describe("Node Directive", () => { } extend type Post - @authorization(validate: [{ operations: [DELETE], where: { jwt: { roles_INCLUDES: "admin" } } }]) + @authorization(validate: [{ operations: [DELETE], where: { jwt: { roles: { includes: "admin" } } } }]) type User @node(labels: ["Person"]) { id: ID @@ -53,7 +53,7 @@ describe("Node Directive", () => { { operations: [READ, UPDATE, DELETE, DELETE_RELATIONSHIP, CREATE_RELATIONSHIP] when: [BEFORE] - where: { node: { id_EQ: "$jwt.sub" } } + where: { node: { id: { eq: "$jwt.sub" } } } } ] ) @@ -102,7 +102,7 @@ describe("Node Directive", () => { test("Admin Deletes Post", async () => { const query = /* GraphQL */ ` mutation { - deletePosts(where: { creator_SOME: { id_EQ: "123" } }) { + deletePosts(where: { creator: { some: { id: { eq: "123" } } } }) { nodesDeleted } } diff --git a/packages/graphql/tests/tck/directives/plural.test.ts b/packages/graphql/tests/tck/directives/plural.test.ts index f65f1de0a7..5ef15b1308 100644 --- a/packages/graphql/tests/tck/directives/plural.test.ts +++ b/packages/graphql/tests/tck/directives/plural.test.ts @@ -143,7 +143,7 @@ describe("Plural directive", () => { test("Delete Tech with plural techs using aggregation", async () => { const query = /* GraphQL */ ` mutation { - deleteTechs(where: { name_EQ: "Matrix" }) { + deleteTechs(where: { name: { eq: "Matrix" } }) { nodesDeleted } } diff --git a/packages/graphql/tests/tck/directives/vector/auth.test.ts b/packages/graphql/tests/tck/directives/vector/auth.test.ts index bcf38c8a69..ab53c6ecae 100644 --- a/packages/graphql/tests/tck/directives/vector/auth.test.ts +++ b/packages/graphql/tests/tck/directives/vector/auth.test.ts @@ -49,7 +49,7 @@ describe("Cypher -> vector -> Auth", () => { type Movie @node @vector(indexes: [{ indexName: "movie_index", embeddingProperty: "movieVector", queryName: "${queryName}" }]) - @authorization(filter: [{ where: { node: { director_SOME: { id_EQ: "$jwt.sub" } } } }]) { + @authorization(filter: [{ where: { node: { director: { some: { id: { eq: "$jwt.sub" } } } } } }]) { title: String director: [Person!]! @relationship(type: "DIRECTED", direction: IN) } @@ -248,7 +248,7 @@ describe("Cypher -> vector -> Auth", () => { type Movie @node @vector(indexes: [{ indexName: "movie_index", embeddingProperty: "movieVector", queryName: "${queryName}" }]) - @authorization(validate: [{ when: [BEFORE], where: { node: { director_SOME: { id_EQ: "$jwt.sub" } } } }]) { + @authorization(validate: [{ when: [BEFORE], where: { node: { director: { some: { id: { eq: "$jwt.sub" } } } } } }]) { title: String director: [Person!]! @relationship(type: "DIRECTED", direction: IN) } @@ -448,7 +448,7 @@ describe("Cypher -> vector -> Auth", () => { @node @vector(indexes: [{ indexName: "movie_index", embeddingProperty: "movieVector", queryName: "${queryName}" }]) @authorization( - validate: [{ when: [BEFORE], where: { node: { director_ALL: { id_EQ: "$jwt.sub" } } } }] + validate: [{ when: [BEFORE], where: { node: { director: { all: { id: { eq: "$jwt.sub" } } } } } }] ) { title: String director: [Person!]! @relationship(type: "DIRECTED", direction: IN) @@ -653,7 +653,7 @@ describe("Cypher -> vector -> Auth", () => { @vector(indexes: [{ indexName: "movie_index", embeddingProperty: "movieVector", queryName: "${queryName}" }]) @authorization( validate: [ - { when: [BEFORE], where: { node: { directorConnection_SOME: { node: { id_EQ: "$jwt.sub" } } } } } + { when: [BEFORE], where: { node: { directorConnection: { some: { node: { id: { eq: "$jwt.sub" } } } } } } } ] ) { title: String @@ -858,7 +858,7 @@ describe("Cypher -> vector -> Auth", () => { validate: [ { when: [BEFORE] - where: { node: { directorConnection_ALL: { node: { id_EQ: "$jwt.sub" } } } } + where: { node: { directorConnection: { all: { node: { id: { eq: "$jwt.sub" } } } } } } } ] ) { @@ -1065,7 +1065,7 @@ describe("Cypher -> vector -> Auth", () => { @vector(indexes: [{ indexName: "movie_index", embeddingProperty: "movieVector", queryName: "${queryName}" }]) @authorization( validate: [ - { when: [BEFORE], where: { node: { directorConnection_SOME: { edge: { year_EQ: 2020 } } } } } + { when: [BEFORE], where: { node: { directorConnection: { some: { edge: { year: { eq: 2020 } } } } } } } ] ) { title: String @@ -1269,7 +1269,7 @@ describe("Cypher -> vector -> Auth", () => { @vector(indexes: [{ indexName: "movie_index", embeddingProperty: "movieVector", queryName: "${queryName}" }]) @authorization( validate: [ - { when: [BEFORE], where: { node: { directorConnection_ALL: { edge: { year_EQ: 2020 } } } } } + { when: [BEFORE], where: { node: { directorConnection: { all: { edge: { year: { eq: 2020 } } } } } } } ] ) { title: String diff --git a/packages/graphql/tests/tck/directives/vector/match.test.ts b/packages/graphql/tests/tck/directives/vector/match.test.ts index 4654146f37..3bef8ee799 100644 --- a/packages/graphql/tests/tck/directives/vector/match.test.ts +++ b/packages/graphql/tests/tck/directives/vector/match.test.ts @@ -228,7 +228,7 @@ describe("Vector index match", () => { test("simple match with single property and score and filter", async () => { const query = /* GraphQL */ ` query MovieVectorQuery($vector: [Float!]!) { - ${queryName}(vector: $vector, where: { node: { released_GT: 2000 } }) { + ${queryName}(vector: $vector, where: { node: { released: { gt: 2000 } } }) { edges { cursor score diff --git a/packages/graphql/tests/tck/federation/authorization.test.ts b/packages/graphql/tests/tck/federation/authorization.test.ts index d16fd4d8dd..653d08aeff 100644 --- a/packages/graphql/tests/tck/federation/authorization.test.ts +++ b/packages/graphql/tests/tck/federation/authorization.test.ts @@ -32,7 +32,10 @@ describe("Federation and authorization", () => { const typeDefs = /* GraphQL */ ` extend schema @link(url: "https://specs.apollo.dev/federation/v2.3", import: ["@key"]) - type User @authorization(filter: [{ where: { node: { id_EQ: "$jwt.sub" } } }]) @key(fields: "id") @node { + type User + @authorization(filter: [{ where: { node: { id: { eq: "$jwt.sub" } } } }]) + @key(fields: "id") + @node { id: ID! name: String! } @@ -95,7 +98,7 @@ describe("Federation and authorization", () => { type User @key(fields: "id") @node { id: ID! name: String! - password: String! @authorization(filter: [{ where: { node: { id_EQ: "$jwt.sub" } } }]) + password: String! @authorization(filter: [{ where: { node: { id: { eq: "$jwt.sub" } } } }]) } `; @@ -161,7 +164,7 @@ describe("Federation and authorization", () => { type Post @node - @authorization(filter: [{ where: { node: { authorsAggregate: { count_GT: 2 } } } }]) + @authorization(filter: [{ where: { node: { authorsAggregate: { count: { gt: 2 } } } } }]) @key(fields: "id") { id: ID! content: String! diff --git a/packages/graphql/tests/tck/fragments.test.ts b/packages/graphql/tests/tck/fragments.test.ts index 7977152e59..c0f99a3873 100644 --- a/packages/graphql/tests/tck/fragments.test.ts +++ b/packages/graphql/tests/tck/fragments.test.ts @@ -186,7 +186,7 @@ describe("Cypher Fragment", () => { const query = /* GraphQL */ ` query { - actors(where: { name_EQ: "Keanu" }) { + actors(where: { name: { eq: "Keanu" } }) { name actedIn { ...FragmentA diff --git a/packages/graphql/tests/tck/fulltext/auth.test.ts b/packages/graphql/tests/tck/fulltext/auth.test.ts index 7763d824ad..65e05e0666 100644 --- a/packages/graphql/tests/tck/fulltext/auth.test.ts +++ b/packages/graphql/tests/tck/fulltext/auth.test.ts @@ -42,7 +42,7 @@ describe("Cypher -> fulltext -> Auth", () => { type Movie @node @fulltext(indexes: [{ indexName: "MovieTitle", queryName: "moviesByTitle", fields: ["title"] }]) - @authorization(filter: [{ where: { node: { director_SOME: { id_EQ: "$jwt.sub" } } } }]) { + @authorization(filter: [{ where: { node: { director: { some: { id: { eq: "$jwt.sub" } } } } } }]) { title: String director: [Person!]! @relationship(type: "DIRECTED", direction: IN) } @@ -113,7 +113,7 @@ describe("Cypher -> fulltext -> Auth", () => { @node @fulltext(indexes: [{ indexName: "MovieTitle", queryName: "moviesByTitle", fields: ["title"] }]) @authorization( - validate: [{ when: [BEFORE], where: { node: { director_SOME: { id_EQ: "$jwt.sub" } } } }] + validate: [{ when: [BEFORE], where: { node: { director: { some: { id: { eq: "$jwt.sub" } } } } } }] ) { title: String director: [Person!]! @relationship(type: "DIRECTED", direction: IN) @@ -185,7 +185,7 @@ describe("Cypher -> fulltext -> Auth", () => { @node @fulltext(indexes: [{ indexName: "MovieTitle", queryName: "moviesByTitle", fields: ["title"] }]) @authorization( - validate: [{ when: [BEFORE], where: { node: { director_ALL: { id_EQ: "$jwt.sub" } } } }] + validate: [{ when: [BEFORE], where: { node: { director: { all: { id: { eq: "$jwt.sub" } } } } } }] ) { title: String director: [Person!]! @relationship(type: "DIRECTED", direction: IN) @@ -263,7 +263,7 @@ describe("Cypher -> fulltext -> Auth", () => { validate: [ { when: [BEFORE] - where: { node: { directorConnection_SOME: { node: { id_EQ: "$jwt.sub" } } } } + where: { node: { directorConnection: { some: { node: { id: { eq: "$jwt.sub" } } } } } } } ] ) { @@ -338,7 +338,10 @@ describe("Cypher -> fulltext -> Auth", () => { @fulltext(indexes: [{ indexName: "MovieTitle", queryName: "moviesByTitle", fields: ["title"] }]) @authorization( validate: [ - { when: [BEFORE], where: { node: { directorConnection_ALL: { node: { id_EQ: "$jwt.sub" } } } } } + { + when: [BEFORE] + where: { node: { directorConnection: { all: { node: { id: { eq: "$jwt.sub" } } } } } } + } ] ) { title: String @@ -415,7 +418,10 @@ describe("Cypher -> fulltext -> Auth", () => { @fulltext(indexes: [{ indexName: "MovieTitle", queryName: "moviesByTitle", fields: ["title"] }]) @authorization( validate: [ - { when: [BEFORE], where: { node: { directorConnection_SOME: { edge: { year_EQ: 2020 } } } } } + { + when: [BEFORE] + where: { node: { directorConnection: { some: { edge: { year: { eq: 2020 } } } } } } + } ] ) { title: String @@ -490,7 +496,10 @@ describe("Cypher -> fulltext -> Auth", () => { @fulltext(indexes: [{ indexName: "MovieTitle", queryName: "moviesByTitle", fields: ["title"] }]) @authorization( validate: [ - { when: [BEFORE], where: { node: { directorConnection_ALL: { edge: { year_EQ: 2020 } } } } } + { + when: [BEFORE] + where: { node: { directorConnection: { all: { edge: { year: { eq: 2020 } } } } } } + } ] ) { title: String diff --git a/packages/graphql/tests/tck/fulltext/match.test.ts b/packages/graphql/tests/tck/fulltext/match.test.ts index 47560b7feb..987deb8c80 100644 --- a/packages/graphql/tests/tck/fulltext/match.test.ts +++ b/packages/graphql/tests/tck/fulltext/match.test.ts @@ -78,7 +78,7 @@ describe("Cypher -> fulltext -> Match", () => { test("match with where and single fulltext property", async () => { const query = /* GraphQL */ ` query { - moviesByTitle(phrase: "something AND something", where: { node: { title_EQ: "some-title" } }) { + moviesByTitle(phrase: "something AND something", where: { node: { title: { eq: "some-title" } } }) { edges { node { title diff --git a/packages/graphql/tests/tck/fulltext/score.test.ts b/packages/graphql/tests/tck/fulltext/score.test.ts index 1d7c1b3275..bafed19dc6 100644 --- a/packages/graphql/tests/tck/fulltext/score.test.ts +++ b/packages/graphql/tests/tck/fulltext/score.test.ts @@ -81,7 +81,7 @@ describe("Cypher -> fulltext -> Score", () => { test("simple match with single property and score and filter", async () => { const query = /* GraphQL */ ` query { - moviesByTitle(phrase: "a different name", where: { node: { released_GT: 2000 } }) { + moviesByTitle(phrase: "a different name", where: { node: { released: { gt: 2000 } } }) { edges { score node { diff --git a/packages/graphql/tests/tck/issues/1132.test.ts b/packages/graphql/tests/tck/issues/1132.test.ts index d2a2743aca..1aea95bb7b 100644 --- a/packages/graphql/tests/tck/issues/1132.test.ts +++ b/packages/graphql/tests/tck/issues/1132.test.ts @@ -28,7 +28,11 @@ describe("https://github.com/neo4j/graphql/issues/1132", () => { @node @authorization( validate: [ - { when: [BEFORE], operations: [CREATE_RELATIONSHIP], where: { node: { id_EQ: "$jwt.sub" } } } + { + when: [BEFORE] + operations: [CREATE_RELATIONSHIP] + where: { node: { id: { eq: "$jwt.sub" } } } + } ] ) { id: ID! @@ -47,7 +51,7 @@ describe("https://github.com/neo4j/graphql/issues/1132", () => { const query = /* GraphQL */ ` mutation { - updateSources(update: { targets: { connect: { where: { node: { id_EQ: 1 } } } } }) { + updateSources(update: { targets: { connect: { where: { node: { id: { eq: 1 } } } } } }) { sources { id } @@ -102,7 +106,11 @@ describe("https://github.com/neo4j/graphql/issues/1132", () => { @node @authorization( validate: [ - { when: [BEFORE], operations: [DELETE_RELATIONSHIP], where: { node: { id_EQ: "$jwt.sub" } } } + { + when: [BEFORE] + operations: [DELETE_RELATIONSHIP] + where: { node: { id: { eq: "$jwt.sub" } } } + } ] ) { id: ID! @@ -121,7 +129,7 @@ describe("https://github.com/neo4j/graphql/issues/1132", () => { const query = /* GraphQL */ ` mutation { - updateSources(update: { targets: { disconnect: { where: { node: { id_EQ: 1 } } } } }) { + updateSources(update: { targets: { disconnect: { where: { node: { id: { eq: 1 } } } } } }) { sources { id } @@ -169,7 +177,9 @@ describe("https://github.com/neo4j/graphql/issues/1132", () => { { \\"where\\": { \\"node\\": { - \\"id_EQ\\": \\"1\\" + \\"id\\": { + \\"eq\\": \\"1\\" + } } } } diff --git a/packages/graphql/tests/tck/issues/1150.test.ts b/packages/graphql/tests/tck/issues/1150.test.ts index c3fcf615a3..b91f7f0cf3 100644 --- a/packages/graphql/tests/tck/issues/1150.test.ts +++ b/packages/graphql/tests/tck/issues/1150.test.ts @@ -35,7 +35,7 @@ describe("https://github.com/neo4j/graphql/issues/1150", () => { current: Boolean! } - extend type Battery @authorization(validate: [{ where: { jwt: { roles_INCLUDES: "admin" } } }]) + extend type Battery @authorization(validate: [{ where: { jwt: { roles: { includes: "admin" } } } }]) type CombustionEngine @node { id: ID! @@ -70,15 +70,15 @@ describe("https://github.com/neo4j/graphql/issues/1150", () => { const query = /* GraphQL */ ` query getDrivesWithFilteredUnionType { - drives(where: { current_EQ: true }) { + drives(where: { current: { eq: true } }) { current - driveCompositionsConnection(where: { edge: { current_EQ: true } }) { + driveCompositionsConnection(where: { edge: { current: { eq: true } } }) { edges { node { driveComponentConnection( where: { - Battery: { edge: { current_EQ: true } } - CombustionEngine: { edge: { current_EQ: true } } + Battery: { edge: { current: { eq: true } } } + CombustionEngine: { edge: { current: { eq: true } } } } ) { edges { diff --git a/packages/graphql/tests/tck/issues/1320.test.ts b/packages/graphql/tests/tck/issues/1320.test.ts index ba4a69315d..05fa1072bc 100644 --- a/packages/graphql/tests/tck/issues/1320.test.ts +++ b/packages/graphql/tests/tck/issues/1320.test.ts @@ -54,10 +54,10 @@ describe("https://github.com/neo4j/graphql/issues/1320", () => { const query = /* GraphQL */ ` query getAggreationOnTeams { stats: teams { - accepted: ownsRisksAggregate(where: { mitigationState_INCLUDES: Accepted }) { + accepted: ownsRisksAggregate(where: { mitigationState: { includes: Accepted } }) { count } - identified: ownsRisksAggregate(where: { mitigationState_INCLUDES: Identified }) { + identified: ownsRisksAggregate(where: { mitigationState: { includes: Identified } }) { count } } diff --git a/packages/graphql/tests/tck/issues/1566.test.ts b/packages/graphql/tests/tck/issues/1566.test.ts index d257793b85..573b95b388 100644 --- a/packages/graphql/tests/tck/issues/1566.test.ts +++ b/packages/graphql/tests/tck/issues/1566.test.ts @@ -61,7 +61,7 @@ describe("https://github.com/neo4j/graphql/issues/1566", () => { test("collect unions returned by cypher directive", async () => { const query = /* GraphQL */ ` query { - communities(where: { id_EQ: 4656564 }) { + communities(where: { id: { eq: 4656564 } }) { id hasFeedItems { __typename diff --git a/packages/graphql/tests/tck/issues/1628.test.ts b/packages/graphql/tests/tck/issues/1628.test.ts index 72b5be637b..c245c53591 100644 --- a/packages/graphql/tests/tck/issues/1628.test.ts +++ b/packages/graphql/tests/tck/issues/1628.test.ts @@ -47,7 +47,7 @@ describe("https://github.com/neo4j/graphql/issues/1628", () => { test("Filter generated by query doesn't utilise index", async () => { const query = /* GraphQL */ ` { - frbrWorks(limit: 10000, where: { dcterms__title_SOME: { value_CONTAINS: "0777" } }) { + frbrWorks(limit: 10000, where: { dcterms__title: { some: { value_CONTAINS: "0777" } } }) { iri dcterms__title(where: { value_CONTAINS: "0777" }) { value diff --git a/packages/graphql/tests/tck/issues/1687.test.ts b/packages/graphql/tests/tck/issues/1687.test.ts index f27f7d1f90..172a174067 100644 --- a/packages/graphql/tests/tck/issues/1687.test.ts +++ b/packages/graphql/tests/tck/issues/1687.test.ts @@ -52,7 +52,7 @@ describe("https://github.com/neo4j/graphql/issues/1687", () => { test("should be able to return all the genres related to the Matrix movie using connection fields", async () => { const query = /* GraphQL */ ` query Genres { - genres(where: { moviesConnection_ALL: { node: { title_EQ: "Matrix" } } }) { + genres(where: { moviesConnection: { all: { node: { title: { eq: "Matrix" } } } } }) { name } } diff --git a/packages/graphql/tests/tck/issues/1751.test.ts b/packages/graphql/tests/tck/issues/1751.test.ts index 56fb14559d..2541b2819a 100644 --- a/packages/graphql/tests/tck/issues/1751.test.ts +++ b/packages/graphql/tests/tck/issues/1751.test.ts @@ -58,7 +58,7 @@ describe("https://github.com/neo4j/graphql/issues/1751", () => { const variableValues = { where: { - title_EQ: "Google", + title: { eq: "Google" }, }, delete: { admins: [ @@ -66,7 +66,7 @@ describe("https://github.com/neo4j/graphql/issues/1751", () => { where: { node: { organizationsAggregate: { - count_EQ: 1, + count: { eq: 1 }, }, }, }, diff --git a/packages/graphql/tests/tck/issues/1779.test.ts b/packages/graphql/tests/tck/issues/1779.test.ts index cadf72fd0b..bee880b256 100644 --- a/packages/graphql/tests/tck/issues/1779.test.ts +++ b/packages/graphql/tests/tck/issues/1779.test.ts @@ -48,7 +48,7 @@ describe("https://github.com/neo4j/graphql/issues/1779", () => { { people { name - attends(where: { students_ALL: { age_GT: 23 } }) { + attends(where: { students: { all: { age: { gt: 23 } } } }) { name } } diff --git a/packages/graphql/tests/tck/issues/1783.test.ts b/packages/graphql/tests/tck/issues/1783.test.ts index 9a7f532ebc..6f7132db24 100644 --- a/packages/graphql/tests/tck/issues/1783.test.ts +++ b/packages/graphql/tests/tck/issues/1783.test.ts @@ -87,33 +87,39 @@ describe("https://github.com/neo4j/graphql/issues/1783", () => { const variableValues = { where: { - current_EQ: true, - nameDetailsConnection_SOME: { - edge: { - current_EQ: true, - }, - node: { - fullName_CONTAINS: "1", + current: { eq: true }, + nameDetailsConnection: { + some: { + edge: { + current: { eq: true }, + }, + node: { + fullName_CONTAINS: "1", + }, }, }, - architectureConnection_SINGLE: { - edge: { - current_EQ: true, - }, - node: { - nameDetailsConnection_SOME: { - edge: { - current_EQ: true, - }, - node: { - fullName_EQ: "MHA", + architectureConnection: { + single: { + edge: { + current: { eq: true }, + }, + node: { + nameDetailsConnection: { + some: { + edge: { + current: { eq: true }, + }, + node: { + fullName: { eq: "MHA" }, + }, + }, }, }, }, }, }, connectionWhere: { - current_EQ: true, + current: { eq: true }, }, }; diff --git a/packages/graphql/tests/tck/issues/190.test.ts b/packages/graphql/tests/tck/issues/190.test.ts index ea1b10d370..a18b48fb6f 100644 --- a/packages/graphql/tests/tck/issues/190.test.ts +++ b/packages/graphql/tests/tck/issues/190.test.ts @@ -48,7 +48,7 @@ describe("#190", () => { test("Example 1", async () => { const query = /* GraphQL */ ` query { - users(where: { demographics_SOME: { type_EQ: "Gender", value_EQ: "Female" } }) { + users(where: { demographics: { some: { type: { eq: "Gender" }, value: { eq: "Female" } } } }) { uid demographics { type @@ -88,8 +88,14 @@ describe("#190", () => { query { users( where: { - demographics_SOME: { - OR: [{ type_EQ: "Gender", value_EQ: "Female" }, { type_EQ: "State" }, { type_EQ: "Age" }] + demographics: { + some: { + OR: [ + { type: { eq: "Gender" }, value: { eq: "Female" } } + { type: { eq: "State" } } + { type: { eq: "Age" } } + ] + } } } ) { diff --git a/packages/graphql/tests/tck/issues/1933.test.ts b/packages/graphql/tests/tck/issues/1933.test.ts index 3e15ca970d..002c2c640c 100644 --- a/packages/graphql/tests/tck/issues/1933.test.ts +++ b/packages/graphql/tests/tck/issues/1933.test.ts @@ -55,7 +55,7 @@ describe("https://github.com/neo4j/graphql/issues/1933", () => { test("should compare for SUM_LTE allocation in return statement rather than the WITH clause", async () => { const query = /* GraphQL */ ` { - employees(where: { projectsAggregate: { edge: { allocation_SUM_LTE: 25 } } }) { + employees(where: { projectsAggregate: { edge: { allocation: { sum: { lte: 25 } } } } }) { employeeId firstName lastName diff --git a/packages/graphql/tests/tck/issues/2100.test.ts b/packages/graphql/tests/tck/issues/2100.test.ts index 3a1a3e8ddb..cfa285a3f4 100644 --- a/packages/graphql/tests/tck/issues/2100.test.ts +++ b/packages/graphql/tests/tck/issues/2100.test.ts @@ -85,7 +85,7 @@ describe("https://github.com/neo4j/graphql/issues/2100", () => { test("query nested relations under a root connection field", async () => { const query = /* GraphQL */ ` query { - bacentas(where: { id_EQ: 1 }) { + bacentas(where: { id: { eq: 1 } }) { id name bussing(limit: 10) { diff --git a/packages/graphql/tests/tck/issues/2249.test.ts b/packages/graphql/tests/tck/issues/2249.test.ts index 10a9ad751d..b4dc5b69f6 100644 --- a/packages/graphql/tests/tck/issues/2249.test.ts +++ b/packages/graphql/tests/tck/issues/2249.test.ts @@ -63,7 +63,7 @@ describe("https://github.com/neo4j/graphql/issues/2249", () => { const query = /* GraphQL */ ` mutation UpdateMovies { updateMovies( - where: { title_EQ: "John Wick" } + where: { title: { eq: "John Wick" } } update: { reviewers: [ { create: [{ edge: { score: 10 }, node: { Person: { reputation: 100, name: "Ana" } } }] } diff --git a/packages/graphql/tests/tck/issues/2262.test.ts b/packages/graphql/tests/tck/issues/2262.test.ts index 5a604b62e4..420446b732 100644 --- a/packages/graphql/tests/tck/issues/2262.test.ts +++ b/packages/graphql/tests/tck/issues/2262.test.ts @@ -47,7 +47,7 @@ describe("https://github.com/neo4j/graphql/issues/2262", () => { test("query nested relations under a root connection field", async () => { const query = /* GraphQL */ ` query ComponentsProcesses { - components(where: { uuid_EQ: "c1" }) { + components(where: { uuid: { eq: "c1" } }) { uuid upstreamProcessConnection { edges { diff --git a/packages/graphql/tests/tck/issues/2396.test.ts b/packages/graphql/tests/tck/issues/2396.test.ts index 0723325580..a14cc9acdc 100644 --- a/packages/graphql/tests/tck/issues/2396.test.ts +++ b/packages/graphql/tests/tck/issues/2396.test.ts @@ -34,7 +34,7 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { address: [Address!]! @relationship(type: "HAS_POSTAL_CODE", direction: IN) } - extend type PostalCode @authorization(filter: [{ where: { node: { archivedAt_EQ: null } } }]) + extend type PostalCode @authorization(filter: [{ where: { node: { archivedAt: { eq: null } } } }]) union AddressNode = Estate @@ -57,7 +57,7 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { node: [AddressNode!]! @relationship(type: "HAS_ADDRESS", direction: IN) } - extend type Address @authorization(filter: [{ where: { node: { archivedAt_EQ: null } } }]) + extend type Address @authorization(filter: [{ where: { node: { archivedAt: { eq: null } } } }]) type Mandate @mutation(operations: [CREATE, UPDATE]) @node { archivedAt: DateTime @@ -70,7 +70,7 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { valuation: [Valuation!]! @relationship(type: "HAS_VALUATION", direction: OUT) } - extend type Mandate @authorization(filter: [{ where: { node: { archivedAt_EQ: null } } }]) + extend type Mandate @authorization(filter: [{ where: { node: { archivedAt: { eq: null } } } }]) type Valuation @mutation(operations: [CREATE, UPDATE]) @node { archivedAt: DateTime @@ -81,7 +81,7 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { estate: [Estate!]! @relationship(type: "VALUATION_FOR", direction: OUT) } - extend type Valuation @authorization(filter: [{ where: { node: { archivedAt_EQ: null } } }]) + extend type Valuation @authorization(filter: [{ where: { node: { archivedAt: { eq: null } } } }]) enum EstateType { APARTMENT @@ -111,7 +111,7 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { address: [Address!]! @relationship(type: "HAS_ADDRESS", direction: OUT) } - extend type Estate @authorization(filter: [{ where: { node: { archivedAt_EQ: null } } }]) + extend type Estate @authorization(filter: [{ where: { node: { archivedAt: { eq: null } } } }]) `; neoSchema = new Neo4jGraphQL({ @@ -138,9 +138,13 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { limit: null, offset: null, where: { - valuation_SOME: { - estate_SOME: { - floor_GTE: 0, + valuation: { + some: { + estate: { + some: { + floor: { gte: 0 }, + }, + }, }, }, }, @@ -209,10 +213,14 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { limit: null, offset: null, where: { - price_GTE: 0, - valuation_SOME: { - estate_SOME: { - floor_GTE: 0, + price: { gte: 0 }, + valuation: { + some: { + estate: { + some: { + floor: { gte: 0 }, + }, + }, }, }, }, @@ -282,17 +290,25 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { limit: null, offset: null, where: { - price_GTE: 0, - valuation_SOME: { - estate_SOME: { - address_SOME: { - postalCode_SOME: { - number_IN: ["13001"], + price: { gte: 0 }, + valuation: { + some: { + estate: { + some: { + address: { + some: { + postalCode: { + some: { + number: { in: ["13001"] }, + }, + }, + }, + }, + area: { gte: 0 }, + estateType: { in: ["APARTMENT"] }, + floor: { gte: 0 }, }, }, - area_GTE: 0, - estateType_IN: ["APARTMENT"], - floor_GTE: 0, }, }, }, @@ -375,17 +391,25 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { limit: 20, sort: null, where: { - price_GTE: 0, - valuation_SOME: { - estate_SOME: { - address_SOME: { - postalCode_SOME: { - number_IN: ["13001"], + price: { gte: 0 }, + valuation: { + some: { + estate: { + some: { + address: { + some: { + postalCode: { + some: { + number: { in: ["13001"] }, + }, + }, + }, + }, + area: { gte: 0 }, + estateType: { in: ["APARTMENT"] }, + floor: { gte: 0 }, }, }, - area_GTE: 0, - estateType_IN: ["APARTMENT"], - floor_GTE: 0, }, }, }, @@ -479,17 +503,25 @@ describe("https://github.com/neo4j/graphql/issues/2396", () => { limit: 40, sort: null, where: { - price_GTE: 0, - valuation_SOME: { - estate_SOME: { - address_SOME: { - postalCode_SOME: { - number_IN: ["13001"], + price: { gte: 0 }, + valuation: { + some: { + estate: { + some: { + address: { + some: { + postalCode: { + some: { + number: { in: ["13001"] }, + }, + }, + }, + }, + area: { gte: 0 }, + estateType: { in: ["APARTMENT"] }, + floor: { gte: 0 }, }, }, - area_GTE: 0, - estateType_IN: ["APARTMENT"], - floor_GTE: 0, }, }, }, diff --git a/packages/graphql/tests/tck/issues/2437.test.ts b/packages/graphql/tests/tck/issues/2437.test.ts index f327fc9eb8..aec21c59d8 100644 --- a/packages/graphql/tests/tck/issues/2437.test.ts +++ b/packages/graphql/tests/tck/issues/2437.test.ts @@ -39,8 +39,8 @@ describe("https://github.com/neo4j/graphql/issues/2437", () => { } extend type Agent @authorization( - validate: [{ operations: [CREATE], where: { jwt: { roles_INCLUDES: "Admin" } } }] - filter: [{ where: { node: { archivedAt_EQ: null } } }] + validate: [{ operations: [CREATE], where: { jwt: { roles: { includes: "Admin" } } } }] + filter: [{ where: { node: { archivedAt: { eq: null } } } }] ) type Valuation @mutation(operations: [CREATE, UPDATE]) @node { @@ -49,7 +49,7 @@ describe("https://github.com/neo4j/graphql/issues/2437", () => { agent: [Agent!]! @relationship(type: "IS_VALUATION_AGENT", direction: IN) } - extend type Valuation @authorization(filter: [{ where: { node: { archivedAt_EQ: null } } }]) + extend type Valuation @authorization(filter: [{ where: { node: { archivedAt: { eq: null } } } }]) `; neoSchema = new Neo4jGraphQL({ @@ -61,7 +61,7 @@ describe("https://github.com/neo4j/graphql/issues/2437", () => { test("query and limits nested connections", async () => { const query = /* GraphQL */ ` query Agents { - agents(where: { uuid_EQ: "a1" }) { + agents(where: { uuid: { eq: "a1" } }) { uuid valuationsConnection(first: 10) { edges { diff --git a/packages/graphql/tests/tck/issues/2614.test.ts b/packages/graphql/tests/tck/issues/2614.test.ts index 8e07f1da92..6c86299f17 100644 --- a/packages/graphql/tests/tck/issues/2614.test.ts +++ b/packages/graphql/tests/tck/issues/2614.test.ts @@ -62,7 +62,7 @@ describe("https://github.com/neo4j/graphql/issues/2614", () => { const query = /* GraphQL */ ` query GetProductionsMovie { actors { - actedIn(where: { title_EQ: "Test Movie" }) { + actedIn(where: { title: { eq: "Test Movie" } }) { title } } diff --git a/packages/graphql/tests/tck/issues/2670.test.ts b/packages/graphql/tests/tck/issues/2670.test.ts index 633557cd95..8a6b9b3ac9 100644 --- a/packages/graphql/tests/tck/issues/2670.test.ts +++ b/packages/graphql/tests/tck/issues/2670.test.ts @@ -54,7 +54,7 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { test("should find where moviesAggregate count equal", async () => { const query = /* GraphQL */ ` { - movies(where: { genresConnection_SOME: { node: { moviesAggregate: { count_EQ: 2 } } } }) { + movies(where: { genresConnection: { some: { node: { moviesAggregate: { count: { eq: 2 } } } } } }) { title } } @@ -94,7 +94,7 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { test("should find where moviesAggregate count_LT", async () => { const query = /* GraphQL */ ` { - movies(where: { genresConnection_SOME: { node: { moviesAggregate: { count_LT: 3 } } } }) { + movies(where: { genresConnection: { some: { node: { moviesAggregate: { count: { lt: 3 } } } } } }) { title } } @@ -134,7 +134,7 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { test("should find where moviesAggregate count_GT", async () => { const query = /* GraphQL */ ` { - movies(where: { genresConnection_SOME: { node: { moviesAggregate: { count_GT: 2 } } } }) { + movies(where: { genresConnection: { some: { node: { moviesAggregate: { count: { gt: 2 } } } } } }) { title } } @@ -176,8 +176,8 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { { movies( where: { - genresConnection_SOME: { - node: { moviesAggregate: { node: { title_SHORTEST_LENGTH_EQUAL: 5 } } } + genresConnection: { + some: { node: { moviesAggregate: { node: { title: { shortestLength: { eq: 5 } } } } } } } } ) { @@ -222,8 +222,8 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { { movies( where: { - genresConnection_SOME: { - node: { moviesAggregate: { node: { title_AVERAGE_LENGTH_EQUAL: 1 } } } + genresConnection: { + some: { node: { moviesAggregate: { node: { title: { averageLength: { eq: 1 } } } } } } } } ) { @@ -264,7 +264,11 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const query = /* GraphQL */ ` { movies( - where: { genresConnection_SOME: { node: { moviesAggregate: { edge: { intValue_MAX_LT: 983 } } } } } + where: { + genresConnection: { + some: { node: { moviesAggregate: { edge: { intValue: { max: { lt: 983 } } } } } } + } + } ) { title } @@ -306,7 +310,11 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { const query = /* GraphQL */ ` { movies( - where: { genresConnection_SOME: { node: { moviesAggregate: { edge: { intValue_MIN_EQUAL: 1 } } } } } + where: { + genresConnection: { + some: { node: { moviesAggregate: { edge: { intValue: { min: { eq: 1 } } } } } } + } + } ) { title } @@ -347,7 +355,7 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { test("should find where genresConnection_SOME", async () => { const query = /* GraphQL */ ` { - movies(where: { genresConnection_SOME: { node: { moviesAggregate: { count_EQ: 2 } } } }) { + movies(where: { genresConnection: { some: { node: { moviesAggregate: { count: { eq: 2 } } } } } }) { title } } @@ -387,7 +395,7 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { test("should find where genresConnection_NONE", async () => { const query = /* GraphQL */ ` { - movies(where: { genresConnection_NONE: { node: { moviesAggregate: { count_EQ: 2 } } } }) { + movies(where: { genresConnection: { none: { node: { moviesAggregate: { count: { eq: 2 } } } } } }) { title } } @@ -427,7 +435,7 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { test("should find where genresConnection_ALL", async () => { const query = /* GraphQL */ ` { - movies(where: { genresConnection_ALL: { node: { moviesAggregate: { count_EQ: 2 } } } }) { + movies(where: { genresConnection: { all: { node: { moviesAggregate: { count: { eq: 2 } } } } } }) { title } } @@ -483,7 +491,7 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { test("should find where genresConnection_SINGLE", async () => { const query = /* GraphQL */ ` { - movies(where: { genresConnection_SINGLE: { node: { moviesAggregate: { count_EQ: 2 } } } }) { + movies(where: { genresConnection: { single: { node: { moviesAggregate: { count: { eq: 2 } } } } } }) { title } } @@ -525,11 +533,13 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { { movies( where: { - genresConnection_SOME: { - AND: [ - { node: { moviesAggregate: { count_EQ: 2 } } } - { node: { seriesAggregate: { node: { name_SHORTEST_LENGTH_EQUAL: 1 } } } } - ] + genresConnection: { + some: { + AND: [ + { node: { moviesAggregate: { count: { eq: 2 } } } } + { node: { seriesAggregate: { node: { name: { shortestLength: { eq: 1 } } } } } } + ] + } } } ) { @@ -583,11 +593,13 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { { movies( where: { - genresConnection_SOME: { - OR: [ - { node: { moviesAggregate: { count_EQ: 3 } } } - { node: { seriesAggregate: { node: { name_SHORTEST_LENGTH_EQUAL: 983 } } } } - ] + genresConnection: { + some: { + OR: [ + { node: { moviesAggregate: { count: { eq: 3 } } } } + { node: { seriesAggregate: { node: { name: { shortestLength: { eq: 983 } } } } } } + ] + } } } ) { @@ -641,10 +653,12 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { { movies( where: { - genresConnection_SOME: { - node: { - moviesAggregate: { count_EQ: 2 } - seriesAggregate: { node: { name_SHORTEST_LENGTH_EQUAL: 983 } } + genresConnection: { + some: { + node: { + moviesAggregate: { count: { eq: 2 } } + seriesAggregate: { node: { name: { shortestLength: { eq: 983 } } } } + } } } } @@ -699,8 +713,8 @@ describe("https://github.com/neo4j/graphql/issues/2670", () => { { movies( where: { - genresConnection_SOME: { node: { moviesAggregate: { count_EQ: 3 } } } - genresAggregate: { count_EQ: 1 } + genresConnection: { some: { node: { moviesAggregate: { count: { eq: 3 } } } } } + genresAggregate: { count: { eq: 1 } } } ) { title diff --git a/packages/graphql/tests/tck/issues/2708.test.ts b/packages/graphql/tests/tck/issues/2708.test.ts index 48cc22f3d0..a6fddb775f 100644 --- a/packages/graphql/tests/tck/issues/2708.test.ts +++ b/packages/graphql/tests/tck/issues/2708.test.ts @@ -54,7 +54,7 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { test("should find where moviesAggregate count equal", async () => { const query = /* GraphQL */ ` { - movies(where: { genres_SOME: { moviesAggregate: { count_EQ: 2 } } }) { + movies(where: { genres: { some: { moviesAggregate: { count: { eq: 2 } } } } }) { title } } @@ -94,7 +94,7 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { test("should find where moviesAggregate count_LT", async () => { const query = /* GraphQL */ ` { - movies(where: { genres_SOME: { moviesAggregate: { count_LT: 3 } } }) { + movies(where: { genres: { some: { moviesAggregate: { count: { lt: 3 } } } } }) { title } } @@ -134,7 +134,7 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { test("should find where moviesAggregate count_GT", async () => { const query = /* GraphQL */ ` { - movies(where: { genres_SOME: { moviesAggregate: { count_GT: 2 } } }) { + movies(where: { genres: { some: { moviesAggregate: { count: { gt: 2 } } } } }) { title } } @@ -174,7 +174,9 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { test("should find where moviesAggregate node property SHORTEST", async () => { const query = /* GraphQL */ ` { - movies(where: { genres_SOME: { moviesAggregate: { node: { title_SHORTEST_LENGTH_EQUAL: 1 } } } }) { + movies( + where: { genres: { some: { moviesAggregate: { node: { title: { shortestLength: { eq: 1 } } } } } } } + ) { title } } @@ -214,7 +216,9 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { test("should find where moviesAggregate node property AVERAGE", async () => { const query = /* GraphQL */ ` { - movies(where: { genres_SOME: { moviesAggregate: { node: { title_AVERAGE_LENGTH_EQUAL: 1 } } } }) { + movies( + where: { genres: { some: { moviesAggregate: { node: { title: { averageLength: { eq: 1 } } } } } } } + ) { title } } @@ -251,7 +255,7 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { test("should find where moviesAggregate edge property MAX_LT", async () => { const query = /* GraphQL */ ` { - movies(where: { genres_SOME: { moviesAggregate: { edge: { intValue_MAX_LT: 1 } } } }) { + movies(where: { genres: { some: { moviesAggregate: { edge: { intValue: { max: { lt: 1 } } } } } } }) { title } } @@ -291,7 +295,7 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { test("should find where moviesAggregate edge property MIN_EQUAL", async () => { const query = /* GraphQL */ ` { - movies(where: { genres_SOME: { moviesAggregate: { edge: { intValue_MIN_EQUAL: 1 } } } }) { + movies(where: { genres: { some: { moviesAggregate: { edge: { intValue: { min: { eq: 1 } } } } } } }) { title } } @@ -331,7 +335,7 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { test("should find where genres_SOME", async () => { const query = /* GraphQL */ ` { - movies(where: { genres_SOME: { moviesAggregate: { count_EQ: 2 } } }) { + movies(where: { genres: { some: { moviesAggregate: { count: { eq: 2 } } } } }) { title } } @@ -371,7 +375,7 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { test("should find where genres_NONE", async () => { const query = /* GraphQL */ ` { - movies(where: { genres_NONE: { moviesAggregate: { count_EQ: 2 } } }) { + movies(where: { genres: { none: { moviesAggregate: { count: { eq: 2 } } } } }) { title } } @@ -411,7 +415,7 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { test("should find where genres_ALL", async () => { const query = /* GraphQL */ ` { - movies(where: { genres_ALL: { moviesAggregate: { count_EQ: 2 } } }) { + movies(where: { genres: { all: { moviesAggregate: { count: { eq: 2 } } } } }) { title } } @@ -467,7 +471,7 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { test("should find where genres_SINGLE", async () => { const query = /* GraphQL */ ` { - movies(where: { genres_SINGLE: { moviesAggregate: { count_EQ: 2 } } }) { + movies(where: { genres: { single: { moviesAggregate: { count: { eq: 2 } } } } }) { title } } @@ -507,7 +511,7 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { test("should not find genres_ALL where NONE true", async () => { const query = /* GraphQL */ ` { - movies(where: { genres_ALL: { moviesAggregate: { count_EQ: 0 } } }) { + movies(where: { genres: { all: { moviesAggregate: { count: { eq: 0 } } } } }) { title } } @@ -565,11 +569,13 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { { movies( where: { - genres_SOME: { - AND: [ - { moviesAggregate: { count_EQ: 2 } } - { seriesAggregate: { node: { name_SHORTEST_LENGTH_EQUAL: 1 } } } - ] + genres: { + some: { + AND: [ + { moviesAggregate: { count: { eq: 2 } } } + { seriesAggregate: { node: { name: { shortestLength: { eq: 1 } } } } } + ] + } } } ) { @@ -623,11 +629,13 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { { movies( where: { - genres_SOME: { - OR: [ - { moviesAggregate: { count_EQ: 3 } } - { seriesAggregate: { node: { name_SHORTEST_LENGTH_EQUAL: 1 } } } - ] + genres: { + some: { + OR: [ + { moviesAggregate: { count: { eq: 3 } } } + { seriesAggregate: { node: { name: { shortestLength: { eq: 1 } } } } } + ] + } } } ) { @@ -681,9 +689,11 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { { movies( where: { - genres_SOME: { - moviesAggregate: { count_EQ: 2 } - seriesAggregate: { node: { name_SHORTEST_LENGTH_EQUAL: 1 } } + genres: { + some: { + moviesAggregate: { count: { eq: 2 } } + seriesAggregate: { node: { name: { shortestLength: { eq: 1 } } } } + } } } ) { @@ -735,7 +745,12 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { test("should find genres with aggregation at the same level", async () => { const query = /* GraphQL */ ` { - movies(where: { genres_SOME: { moviesAggregate: { count_EQ: 3 } }, genresAggregate: { count_EQ: 1 } }) { + movies( + where: { + genres: { some: { moviesAggregate: { count: { eq: 3 } } } } + genresAggregate: { count: { eq: 1 } } + } + ) { title } } @@ -786,7 +801,14 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { { movies( where: { - genres_ALL: { OR: [{ moviesAggregate: { count_EQ: 0 } }, { seriesAggregate: { count_EQ: 1 } }] } + genres: { + all: { + OR: [ + { moviesAggregate: { count: { eq: 0 } } } + { seriesAggregate: { count: { eq: 1 } } } + ] + } + } } ) { title @@ -864,9 +886,11 @@ describe("https://github.com/neo4j/graphql/issues/2708", () => { { movies( where: { - genres_ALL: { - OR: [{ moviesAggregate: { count_EQ: 0 } }, { name_EQ: "Thriller" }] - seriesAggregate: { count_EQ: 1 } + genres: { + all: { + OR: [{ moviesAggregate: { count: { eq: 0 } } }, { name: { eq: "Thriller" } }] + seriesAggregate: { count: { eq: 1 } } + } } } ) { diff --git a/packages/graphql/tests/tck/issues/2709.test.ts b/packages/graphql/tests/tck/issues/2709.test.ts index 3d74d69476..d956766a10 100644 --- a/packages/graphql/tests/tck/issues/2709.test.ts +++ b/packages/graphql/tests/tck/issues/2709.test.ts @@ -94,7 +94,7 @@ describe("https://github.com/neo4j/graphql/issues/2709", () => { test("should not use a node label so it covers all nodes implementing the interface for connection rel", async () => { const query = /* GraphQL */ ` query { - movies(where: { distributionConnection_SOME: { node: { name_EQ: "test4" } } }) { + movies(where: { distributionConnection: { some: { node: { name: { eq: "test4" } } } } }) { title } } @@ -121,7 +121,11 @@ describe("https://github.com/neo4j/graphql/issues/2709", () => { const query = /* GraphQL */ ` query { movies( - where: { distributionConnection_SOME: { node: { OR: [{ name_EQ: "test4" }, { name_EQ: "test1" }] } } } + where: { + distributionConnection: { + some: { node: { OR: [{ name: { eq: "test4" } }, { name: { eq: "test1" } }] } } + } + } ) { title } @@ -216,7 +220,11 @@ describe("https://github.com/neo4j/graphql/issues/2709 union parity", () => { test("should use the correct node label for connection rel when defined in node _on - Netflix label", async () => { const query = /* GraphQL */ ` query { - movies(where: { OR: [{ distributionConnection_SOME: { Netflix: { node: { name_EQ: "test" } } } }] }) { + movies( + where: { + OR: [{ distributionConnection: { some: { Netflix: { node: { name: { eq: "test" } } } } } }] + } + ) { title } } @@ -242,7 +250,11 @@ describe("https://github.com/neo4j/graphql/issues/2709 union parity", () => { test("should use the correct node label for connection rel when defined in node _on - Dishney label", async () => { const query = /* GraphQL */ ` query { - movies(where: { OR: [{ distributionConnection_SOME: { Dishney: { node: { name_EQ: "test2" } } } }] }) { + movies( + where: { + OR: [{ distributionConnection: { some: { Dishney: { node: { name: { eq: "test2" } } } } } }] + } + ) { title } } @@ -268,7 +280,7 @@ describe("https://github.com/neo4j/graphql/issues/2709 union parity", () => { test("should use the correct node label for connection rel when defined in node _on - without OR operator", async () => { const query = /* GraphQL */ ` query { - movies(where: { distributionConnection_SOME: { Dishney: { node: { name_EQ: "test3" } } } }) { + movies(where: { distributionConnection: { some: { Dishney: { node: { name: { eq: "test3" } } } } } }) { title } } diff --git a/packages/graphql/tests/tck/issues/2713.test.ts b/packages/graphql/tests/tck/issues/2713.test.ts index 2e82b8cbd0..e3521e18d8 100644 --- a/packages/graphql/tests/tck/issues/2713.test.ts +++ b/packages/graphql/tests/tck/issues/2713.test.ts @@ -54,7 +54,7 @@ describe("https://github.com/neo4j/graphql/issues/2713", () => { test("should not find genresConnection_ALL where NONE true", async () => { const query = /* GraphQL */ ` { - movies(where: { genresConnection_ALL: { node: { moviesAggregate: { count_EQ: 0 } } } }) { + movies(where: { genresConnection: { all: { node: { moviesAggregate: { count: { eq: 0 } } } } } }) { title } } @@ -111,7 +111,11 @@ describe("https://github.com/neo4j/graphql/issues/2713", () => { const query = /* GraphQL */ ` { movies( - where: { genresConnection_ALL: { node: { moviesAggregate: { count_EQ: 0 }, name_EQ: "Thriller" } } } + where: { + genresConnection: { + all: { node: { moviesAggregate: { count: { eq: 0 } }, name: { eq: "Thriller" } } } + } + } ) { title } @@ -170,7 +174,7 @@ describe("https://github.com/neo4j/graphql/issues/2713", () => { test("should not find genresConnection_ALL by genre title", async () => { const query = /* GraphQL */ ` { - movies(where: { genresConnection_ALL: { node: { name_EQ: "Thriller" } } }) { + movies(where: { genresConnection: { all: { node: { name: { eq: "Thriller" } } } } }) { title } } diff --git a/packages/graphql/tests/tck/issues/2782.test.ts b/packages/graphql/tests/tck/issues/2782.test.ts index fc69d5a64e..b259221dcd 100644 --- a/packages/graphql/tests/tck/issues/2782.test.ts +++ b/packages/graphql/tests/tck/issues/2782.test.ts @@ -59,12 +59,12 @@ describe("https://github.com/neo4j/graphql/issues/2782", () => { colors: { disconnect: [ { - where: { node: { name_EQ: "Red" } } + where: { node: { name: { eq: "Red" } } } disconnect: { photos: [ { - where: { node: { id_EQ: "123" } } - disconnect: { color: { where: { node: { id_EQ: "134" } } } } + where: { node: { id: { eq: "123" } } } + disconnect: { color: { where: { node: { id: { eq: "134" } } } } } } ] } @@ -74,12 +74,12 @@ describe("https://github.com/neo4j/graphql/issues/2782", () => { photos: { disconnect: [ { - where: { node: { id_EQ: "321" } } - disconnect: { color: { where: { node: { name_EQ: "Green" } } } } + where: { node: { id: { eq: "321" } } } + disconnect: { color: { where: { node: { name: { eq: "Green" } } } } } } { - where: { node: { id_EQ: "33211" } } - disconnect: { color: { where: { node: { name_EQ: "Red" } } } } + where: { node: { id: { eq: "33211" } } } + disconnect: { color: { where: { node: { name: { eq: "Red" } } } } } } ] } @@ -210,7 +210,9 @@ describe("https://github.com/neo4j/graphql/issues/2782", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Red\\" + \\"name\\": { + \\"eq\\": \\"Red\\" + } } }, \\"disconnect\\": { @@ -218,7 +220,9 @@ describe("https://github.com/neo4j/graphql/issues/2782", () => { { \\"where\\": { \\"node\\": { - \\"id_EQ\\": \\"123\\" + \\"id\\": { + \\"eq\\": \\"123\\" + } } }, \\"disconnect\\": { @@ -226,7 +230,9 @@ describe("https://github.com/neo4j/graphql/issues/2782", () => { { \\"where\\": { \\"node\\": { - \\"id_EQ\\": \\"134\\" + \\"id\\": { + \\"eq\\": \\"134\\" + } } } } @@ -245,7 +251,9 @@ describe("https://github.com/neo4j/graphql/issues/2782", () => { { \\"where\\": { \\"node\\": { - \\"id_EQ\\": \\"321\\" + \\"id\\": { + \\"eq\\": \\"321\\" + } } }, \\"disconnect\\": { @@ -253,7 +261,9 @@ describe("https://github.com/neo4j/graphql/issues/2782", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Green\\" + \\"name\\": { + \\"eq\\": \\"Green\\" + } } } } @@ -263,7 +273,9 @@ describe("https://github.com/neo4j/graphql/issues/2782", () => { { \\"where\\": { \\"node\\": { - \\"id_EQ\\": \\"33211\\" + \\"id\\": { + \\"eq\\": \\"33211\\" + } } }, \\"disconnect\\": { @@ -271,7 +283,9 @@ describe("https://github.com/neo4j/graphql/issues/2782", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Red\\" + \\"name\\": { + \\"eq\\": \\"Red\\" + } } } } diff --git a/packages/graphql/tests/tck/issues/2789.test.ts b/packages/graphql/tests/tck/issues/2789.test.ts index cb11e62a37..6adbc31e70 100644 --- a/packages/graphql/tests/tck/issues/2789.test.ts +++ b/packages/graphql/tests/tck/issues/2789.test.ts @@ -23,9 +23,9 @@ import { formatCypher, formatParams, translateQuery } from "../utils/tck-test-ut describe("https://github.com/neo4j/graphql/issues/2789", () => { let neoSchema: Neo4jGraphQL; const typeDefs = /* GraphQL */ ` - type User @authorization(validate: [{ where: { node: { id_EQ: "Foo" } } }]) @node { + type User @authorization(validate: [{ where: { node: { id: { eq: "Foo" } } } }]) @node { id: ID - password: String! @authorization(validate: [{ where: { node: { id_EQ: "Bar" } } }]) + password: String! @authorization(validate: [{ where: { node: { id: { eq: "Bar" } } } }]) } `; diff --git a/packages/graphql/tests/tck/issues/2803.test.ts b/packages/graphql/tests/tck/issues/2803.test.ts index 404443fb47..d7f3c1ae70 100644 --- a/packages/graphql/tests/tck/issues/2803.test.ts +++ b/packages/graphql/tests/tck/issues/2803.test.ts @@ -49,7 +49,7 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { test("should find movies aggregate within double nested relationships", async () => { const query = /* GraphQL */ ` { - actors(where: { movies_SOME: { actors_ALL: { moviesAggregate: { count_GT: 1 } } } }) { + actors(where: { movies: { some: { actors: { all: { moviesAggregate: { count: { gt: 1 } } } } } } }) { name } } @@ -114,9 +114,11 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { { actors( where: { - movies_SOME: { - actors_ALL: { moviesAggregate: { count_GT: 1 } } - actorsAggregate: { count_EQ: 1 } + movies: { + some: { + actors: { all: { moviesAggregate: { count: { gt: 1 } } } } + actorsAggregate: { count: { eq: 1 } } + } } } ) { @@ -191,7 +193,13 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { test("should find movies aggregate within triple nested relationships", async () => { const query = /* GraphQL */ ` { - movies(where: { actors_SOME: { movies_SOME: { actors_ALL: { moviesAggregate: { count_GT: 2 } } } } }) { + movies( + where: { + actors: { + some: { movies: { some: { actors: { all: { moviesAggregate: { count: { gt: 2 } } } } } } } + } + } + ) { released } } @@ -263,14 +271,18 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { { movies( where: { - actors_SINGLE: { - movies_SOME: { - actors_ALL: { moviesAggregate: { count_GT: 1 } } - actorsAggregate: { node: { name_AVERAGE_LENGTH_LT: 10 } } + actors: { + single: { + movies: { + some: { + actors: { all: { moviesAggregate: { count: { gt: 1 } } } } + actorsAggregate: { node: { name: { averageLength: { lt: 10 } } } } + } + } + moviesAggregate: { node: { released: { average: { eq: 25 } } } } } - moviesAggregate: { node: { released_AVERAGE_EQUAL: 25 } } } - actorsAggregate: { node: { name_AVERAGE_LENGTH_GTE: 3 } } + actorsAggregate: { node: { name: { averageLength: { gte: 3 } } } } } ) { released @@ -362,8 +374,10 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { { actors( where: { - moviesConnection_SOME: { - node: { actorsConnection_ALL: { node: { moviesAggregate: { count_GT: 1 } } } } + moviesConnection: { + some: { + node: { actorsConnection: { all: { node: { moviesAggregate: { count: { gt: 1 } } } } } } + } } } ) { @@ -431,9 +445,11 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { { actors( where: { - movies_SOME: { - actorsConnection_ALL: { node: { moviesAggregate: { count_GT: 1 } } } - actorsAggregate: { count_EQ: 1 } + movies: { + some: { + actorsConnection: { all: { node: { moviesAggregate: { count: { gt: 1 } } } } } + actorsAggregate: { count: { eq: 1 } } + } } } ) { @@ -510,10 +526,18 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { { movies( where: { - actorsConnection_SOME: { - node: { - moviesConnection_SOME: { - node: { actorsConnection_ALL: { node: { moviesAggregate: { count_GT: 2 } } } } + actorsConnection: { + some: { + node: { + moviesConnection: { + some: { + node: { + actorsConnection: { + all: { node: { moviesAggregate: { count: { gt: 2 } } } } + } + } + } + } } } } @@ -590,18 +614,24 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { { movies( where: { - actorsConnection_SOME: { - node: { - moviesConnection_SOME: { - node: { - actorsConnection_ALL: { node: { moviesAggregate: { count_GT: 1 } } } - actorsAggregate: { node: { name_AVERAGE_LENGTH_LT: 10 } } + actorsConnection: { + some: { + node: { + moviesConnection: { + some: { + node: { + actorsConnection: { + all: { node: { moviesAggregate: { count: { gt: 1 } } } } + } + actorsAggregate: { node: { name: { averageLength: { lt: 10 } } } } + } + } } + moviesAggregate: { node: { released: { average: { eq: 25 } } } } } - moviesAggregate: { node: { released_AVERAGE_EQUAL: 25 } } } } - actorsAggregate: { node: { name_AVERAGE_LENGTH_GTE: 3 } } + actorsAggregate: { node: { name: { averageLength: { gte: 3 } } } } } ) { released @@ -692,7 +722,11 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const query = /* GraphQL */ ` { actors( - where: { movies_SOME: { actorsConnection_ALL: { node: { moviesAggregate: { count_GT: 1 } } } } } + where: { + movies: { + some: { actorsConnection: { all: { node: { moviesAggregate: { count: { gt: 1 } } } } } } + } + } ) { name } @@ -757,7 +791,11 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const query = /* GraphQL */ ` { actors( - where: { moviesConnection_SOME: { node: { actors_ALL: { moviesAggregate: { count_GT: 1 } } } } } + where: { + moviesConnection: { + some: { node: { actors: { all: { moviesAggregate: { count: { gt: 1 } } } } } } + } + } ) { name } @@ -823,9 +861,17 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { { movies( where: { - actorsConnection_SOME: { - node: { - movies_SINGLE: { actorsConnection_NONE: { node: { moviesAggregate: { count_GT: 2 } } } } + actorsConnection: { + some: { + node: { + movies: { + single: { + actorsConnection: { + none: { node: { moviesAggregate: { count: { gt: 2 } } } } + } + } + } + } } } } @@ -885,9 +931,13 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { { actors( where: { - movies_SINGLE: { - actors_NONE: { moviesAggregate: { edge: { screenTime_AVERAGE_LTE: 1000 } } } - actorsAggregate: { edge: { screenTime_AVERAGE_LTE: 1000 } } + movies: { + single: { + actors: { + none: { moviesAggregate: { edge: { screenTime: { average: { lte: 1000 } } } } } + } + actorsAggregate: { edge: { screenTime: { average: { lte: 1000 } } } } + } } } ) { @@ -942,14 +992,18 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { { actors( where: { - moviesConnection_SINGLE: { - node: { - actorsConnection_NONE: { - node: { moviesAggregate: { count_GT: 1 } } - edge: { roles_INCLUDES: "a role" } + moviesConnection: { + single: { + node: { + actorsConnection: { + none: { + node: { moviesAggregate: { count: { gt: 1 } } } + edge: { roles: { includes: "a role" } } + } + } } + edge: { roles: { includes: "another role" } } } - edge: { roles_INCLUDES: "another role" } } } ) { @@ -1003,11 +1057,15 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { { actors( where: { - moviesConnection_SINGLE: { - node: { - actorsConnection_SOME: { - node: { name_EQ: "actor name", moviesAggregate: { count_GT: 1 } } - edge: { roles_INCLUDES: "actor role" } + moviesConnection: { + single: { + node: { + actorsConnection: { + some: { + node: { name: { eq: "actor name" }, moviesAggregate: { count: { gt: 1 } } } + edge: { roles: { includes: "actor role" } } + } + } } } } @@ -1062,7 +1120,11 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { const query = /* GraphQL */ ` { actors( - where: { movies_ALL: { actors_SOME: { name_EQ: "a name", moviesAggregate: { count_GT: 1 } } } } + where: { + movies: { + all: { actors: { some: { name: { eq: "a name" }, moviesAggregate: { count: { gt: 1 } } } } } + } + } ) { name } @@ -1137,8 +1199,14 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { { actors( where: { - movies_ALL: { - actors_SOME: { OR: [{ name_EQ: "some name" }, { moviesAggregate: { count_GT: 1 } }] } + movies: { + all: { + actors: { + some: { + OR: [{ name: { eq: "some name" } }, { moviesAggregate: { count: { gt: 1 } } }] + } + } + } } } ) { @@ -1215,8 +1283,14 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { { actors( where: { - movies_ALL: { - actors_SOME: { AND: [{ name_EQ: "some name" }, { moviesAggregate: { count_GT: 1 } }] } + movies: { + all: { + actors: { + some: { + AND: [{ name: { eq: "some name" } }, { moviesAggregate: { count: { gt: 1 } } }] + } + } + } } } ) { @@ -1293,14 +1367,18 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { mutation { updateActors( where: { - moviesConnection_SINGLE: { - node: { - actorsConnection_NONE: { - node: { moviesAggregate: { count_GT: 1 } } - edge: { roles_INCLUDES: "some role" } + moviesConnection: { + single: { + node: { + actorsConnection: { + none: { + node: { moviesAggregate: { count: { gt: 1 } } } + edge: { roles: { includes: "some role" } } + } + } } + edge: { roles: { includes: "another role" } } } - edge: { roles_INCLUDES: "another role" } } } update: { name_SET: "Exciting new name!" } @@ -1360,11 +1438,15 @@ describe("https://github.com/neo4j/graphql/issues/2803", () => { mutation { deleteActors( where: { - moviesConnection_SINGLE: { - node: { - actorsConnection_SOME: { - node: { name_EQ: "a name", moviesAggregate: { count_GT: 1 } } - edge: { roles_INCLUDES: "some-role" } + moviesConnection: { + single: { + node: { + actorsConnection: { + some: { + node: { name: { eq: "a name" }, moviesAggregate: { count: { gt: 1 } } } + edge: { roles: { includes: "some-role" } } + } + } } } } diff --git a/packages/graphql/tests/tck/issues/2812.test.ts b/packages/graphql/tests/tck/issues/2812.test.ts index f5a09ca9c3..ffcac79f7e 100644 --- a/packages/graphql/tests/tck/issues/2812.test.ts +++ b/packages/graphql/tests/tck/issues/2812.test.ts @@ -29,24 +29,26 @@ describe("https://github.com/neo4j/graphql/issues/2812", () => { } type Actor - @authorization(validate: [{ when: [BEFORE], where: { node: { nodeCreatedBy_EQ: "$jwt.sub" } } }]) + @authorization(validate: [{ when: [BEFORE], where: { node: { nodeCreatedBy: { eq: "$jwt.sub" } } } }]) @node { id: ID! @id name: String nodeCreatedBy: String fieldA: String @authorization( - validate: [{ operations: [CREATE, UPDATE], where: { jwt: { roles_INCLUDES: "role-A" } } }] + validate: [{ operations: [CREATE, UPDATE], where: { jwt: { roles: { includes: "role-A" } } } }] ) fieldB: String @authorization( - validate: [{ operations: [CREATE, UPDATE], where: { jwt: { roles_INCLUDES: "role-B" } } }] + validate: [{ operations: [CREATE, UPDATE], where: { jwt: { roles: { includes: "role-B" } } } }] ) movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) } type Movie @node - @authorization(validate: [{ operations: [CREATE, UPDATE], where: { jwt: { roles_INCLUDES: "admin" } } }]) { + @authorization( + validate: [{ operations: [CREATE, UPDATE], where: { jwt: { roles: { includes: "admin" } } } }] + ) { id: ID actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } diff --git a/packages/graphql/tests/tck/issues/288.test.ts b/packages/graphql/tests/tck/issues/288.test.ts index 5db4fb3178..9d2bb0e542 100644 --- a/packages/graphql/tests/tck/issues/288.test.ts +++ b/packages/graphql/tests/tck/issues/288.test.ts @@ -84,7 +84,7 @@ describe("#288", () => { test("Can update a USER and COMPANYID is populated", async () => { const query = /* GraphQL */ ` mutation { - updateUsers(where: { USERID_EQ: "userid" }, update: { COMPANYID_SET: "companyid2" }) { + updateUsers(where: { USERID: { eq: "userid" } }, update: { COMPANYID_SET: "companyid2" }) { users { USERID COMPANYID diff --git a/packages/graphql/tests/tck/issues/2925.test.ts b/packages/graphql/tests/tck/issues/2925.test.ts index cc075f0875..177e508fa9 100644 --- a/packages/graphql/tests/tck/issues/2925.test.ts +++ b/packages/graphql/tests/tck/issues/2925.test.ts @@ -46,7 +46,7 @@ describe("https://github.com/neo4j/graphql/issues/2925", () => { test("should query relationship", async () => { const query = /* GraphQL */ ` query Query { - users(where: { hasGroup_SOME: { name_IN: ["Group A"] } }) { + users(where: { hasGroup: { some: { name: { in: ["Group A"] } } } }) { name } } @@ -75,7 +75,7 @@ describe("https://github.com/neo4j/graphql/issues/2925", () => { test("should query nested relationship", async () => { const query = /* GraphQL */ ` query Query { - groups(where: { hasGroupUser_SOME: { hasGroup_SOME: { name_IN: ["Group A"] } } }) { + groups(where: { hasGroupUser: { some: { hasGroup: { some: { name: { in: ["Group A"] } } } } } }) { name } } diff --git a/packages/graphql/tests/tck/issues/3215.test.ts b/packages/graphql/tests/tck/issues/3215.test.ts index 5f72f45640..bdbf671a94 100644 --- a/packages/graphql/tests/tck/issues/3215.test.ts +++ b/packages/graphql/tests/tck/issues/3215.test.ts @@ -40,7 +40,7 @@ describe("https://github.com/neo4j/graphql/issues/3215", () => { test("should ignore undefined parameters on NOT fields", async () => { const query = /* GraphQL */ ` query MyQuery($name: String) { - actors(where: { age_GT: 25, NOT: { name_EQ: $name } }) { + actors(where: { age: { gt: 25 }, NOT: { name: { eq: $name } } }) { name age } @@ -68,7 +68,7 @@ describe("https://github.com/neo4j/graphql/issues/3215", () => { test("should ignore undefined parameters on boolean NOT", async () => { const query = /* GraphQL */ ` query MyQuery($name: String) { - actors(where: { age_GT: 25, NOT: { name_EQ: $name } }) { + actors(where: { age: { gt: 25 }, NOT: { name: { eq: $name } } }) { name age } diff --git a/packages/graphql/tests/tck/issues/360.test.ts b/packages/graphql/tests/tck/issues/360.test.ts index 223db53082..a9dc2009af 100644 --- a/packages/graphql/tests/tck/issues/360.test.ts +++ b/packages/graphql/tests/tck/issues/360.test.ts @@ -44,7 +44,13 @@ describe("#360", () => { const query = /* GraphQL */ ` query ($rangeStart: DateTime, $rangeEnd: DateTime, $activity: String) { events( - where: { AND: [{ start_GTE: $rangeStart }, { start_LTE: $rangeEnd }, { activity_EQ: $activity }] } + where: { + AND: [ + { start: { gte: $rangeStart } } + { start: { lte: $rangeEnd } } + { activity: { eq: $activity } } + ] + } ) { start activity @@ -91,7 +97,15 @@ describe("#360", () => { test("Should exclude undefined members in OR", async () => { const query = /* GraphQL */ ` query ($rangeStart: DateTime, $rangeEnd: DateTime, $activity: String) { - events(where: { OR: [{ start_GTE: $rangeStart }, { start_LTE: $rangeEnd }, { activity_EQ: $activity }] }) { + events( + where: { + OR: [ + { start: { gte: $rangeStart } } + { start: { lte: $rangeEnd } } + { activity: { eq: $activity } } + ] + } + ) { start activity } diff --git a/packages/graphql/tests/tck/issues/3765.test.ts b/packages/graphql/tests/tck/issues/3765.test.ts index ba2e2dd335..df97a39835 100644 --- a/packages/graphql/tests/tck/issues/3765.test.ts +++ b/packages/graphql/tests/tck/issues/3765.test.ts @@ -50,7 +50,14 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { test("filter + explicit AND", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { count_GT: 10, AND: [{ count_GT: 25 }, { count_LT: 33 }] } }) { + posts( + where: { + likesAggregate: { + count: { gt: 10 } + AND: [{ count: { gt: 25 } }, { count: { lt: 33 } }] + } + } + ) { content } } @@ -91,7 +98,7 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { test("filter + implicit AND", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { count_GT: 10, AND: [{ count_GT: 25, count_LT: 33 }] } }) { + posts(where: { likesAggregate: { count: { gt: 10 }, AND: [{ count: { gt: 25, lt: 33 } }] } }) { content } } @@ -100,39 +107,46 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) - CALL { - WITH this - MATCH (this)<-[this0:LIKES]-(this1:User) - RETURN (count(this1) > $param0 AND (count(this1) < $param1 AND count(this1) > $param2)) AS var2 - } - WITH * - WHERE var2 = true - RETURN this { .content } AS this" - `); + "MATCH (this:Post) + CALL { + WITH this + MATCH (this)<-[this0:LIKES]-(this1:User) + RETURN (count(this1) > $param0 AND (count(this1) > $param1 AND count(this1) < $param2)) AS var2 + } + WITH * + WHERE var2 = true + RETURN this { .content } AS this" + `); expect(formatParams(result.params)).toMatchInlineSnapshot(` - "{ - \\"param0\\": { - \\"low\\": 10, - \\"high\\": 0 - }, - \\"param1\\": { - \\"low\\": 33, - \\"high\\": 0 - }, - \\"param2\\": { - \\"low\\": 25, - \\"high\\": 0 - } - }" - `); + "{ + \\"param0\\": { + \\"low\\": 10, + \\"high\\": 0 + }, + \\"param1\\": { + \\"low\\": 25, + \\"high\\": 0 + }, + \\"param2\\": { + \\"low\\": 33, + \\"high\\": 0 + } + }" + `); }); test("filter + explicit OR", async () => { const query = /* GraphQL */ ` { - posts(where: { likesAggregate: { count_GT: 10, OR: [{ count_GT: 25 }, { count_LT: 33 }] } }) { + posts( + where: { + likesAggregate: { + count: { gt: 10 } + OR: [{ count: { gt: 25 } }, { count: { lt: 33 } }] + } + } + ) { content } } @@ -176,8 +190,8 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { posts( where: { likesAggregate: { - count_GT: 10 - OR: [{ count_GT: 25, count_LTE: 99 }, { count_LT: 33 }] + count: { gt: 10 } + OR: [{ count: { gt: 25, lte: 99 } }, { count: { lt: 33 } }] } } ) { @@ -189,37 +203,37 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { const result = await translateQuery(neoSchema, query); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` - "MATCH (this:Post) - CALL { - WITH this - MATCH (this)<-[this0:LIKES]-(this1:User) - RETURN (count(this1) > $param0 AND ((count(this1) <= $param1 AND count(this1) > $param2) OR count(this1) < $param3)) AS var2 - } - WITH * - WHERE var2 = true - RETURN this { .content } AS this" - `); + "MATCH (this:Post) + CALL { + WITH this + MATCH (this)<-[this0:LIKES]-(this1:User) + RETURN (count(this1) > $param0 AND ((count(this1) > $param1 AND count(this1) <= $param2) OR count(this1) < $param3)) AS var2 + } + WITH * + WHERE var2 = true + RETURN this { .content } AS this" + `); expect(formatParams(result.params)).toMatchInlineSnapshot(` - "{ - \\"param0\\": { - \\"low\\": 10, - \\"high\\": 0 - }, - \\"param1\\": { - \\"low\\": 99, - \\"high\\": 0 - }, - \\"param2\\": { - \\"low\\": 25, - \\"high\\": 0 - }, - \\"param3\\": { - \\"low\\": 33, - \\"high\\": 0 - } - }" - `); + "{ + \\"param0\\": { + \\"low\\": 10, + \\"high\\": 0 + }, + \\"param1\\": { + \\"low\\": 25, + \\"high\\": 0 + }, + \\"param2\\": { + \\"low\\": 99, + \\"high\\": 0 + }, + \\"param3\\": { + \\"low\\": 33, + \\"high\\": 0 + } + }" + `); }); test("filter + explicit OR which contains an explicit AND", async () => { @@ -228,8 +242,11 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { posts( where: { likesAggregate: { - count_GT: 10 - OR: [{ AND: [{ count_GT: 25 }, { count_LTE: 99 }] }, { count_LT: 33 }] + count: {gt: 10} + OR: [ + { AND: [{ count: { gt: 25 } }, { count: { lte: 99 } }] } + { count: { lt: 33 } } + ] } } ) { @@ -282,8 +299,13 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { posts( where: { likesAggregate: { - count_GT: 10 - node: { AND: [{ name_SHORTEST_LENGTH_GT: 25 }, { name_SHORTEST_LENGTH_LT: 80 }] } + count: { gt: 10 } + node: { + AND: [ + { name: { shortestLength: { gt: 25 } } } + { name: { shortestLength: { lt: 80 } } } + ] + } } } ) { @@ -330,8 +352,8 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { posts( where: { likesAggregate: { - count_GT: 10 - node: { AND: [{ name_SHORTEST_LENGTH_GT: 25, name_SHORTEST_LENGTH_LT: 80 }] } + count: { gt: 10 } + node: { AND: [{ name: { shortestLength: { gt: 25, lt: 80 } } }] } } } ) { @@ -378,8 +400,13 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { posts( where: { likesAggregate: { - count_GT: 10 - node: { OR: [{ name_SHORTEST_LENGTH_GT: 25 }, { name_SHORTEST_LENGTH_LT: 80 }] } + count: { gt: 10 } + node: { + OR: [ + { name: { shortestLength: { gt: 25 } } } + { name: { shortestLength: { lt: 80 } } } + ] + } } } ) { @@ -426,11 +453,11 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { posts( where: { likesAggregate: { - count_GT: 10 + count: { gt: 10 } node: { OR: [ - { name_SHORTEST_LENGTH_GT: 25, name_SHORTEST_LENGTH_LT: 40 } - { name_SHORTEST_LENGTH_GTE: 1233 } + { name: { shortestLength: { gt: 25, lt: 40 } } } + { name: { shortestLength: { gte: 1233 } } } ] } } @@ -483,15 +510,15 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { posts( where: { likesAggregate: { - count_GT: 10 + count: { gt: 10 } OR: [ { - edge: { someProp_LONGEST_LENGTH_GT: 4, someProp_SHORTEST_LENGTH_LT: 10 } - node: { name_AVERAGE_LENGTH_GT: 3782 } + edge: { someProp: { shortestLength: { lt: 10 }, longestLength: { gt: 4 } } } + node: { name: { averageLength: { gt: 3782 } } } } - { node: { name_SHORTEST_LENGTH_GT: 25 } } + { node: { name: { shortestLength: { gt: 25 } } } } ] - edge: { someProp_LONGEST_LENGTH_LT: 12, someProp_SHORTEST_LENGTH_GT: 20 } + edge: { someProp: { longestLength: { lt: 12 }, shortestLength: { gt: 20 } } } } } ) { @@ -507,7 +534,7 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { CALL { WITH this MATCH (this)<-[this0:LIKES]-(this1:User) - RETURN (count(this1) > $param0 AND ((avg(size(this1.name)) > $param1 AND (max(size(this0.someProp)) > $param2 AND min(size(this0.someProp)) < $param3)) OR min(size(this1.name)) > $param4) AND (min(size(this0.someProp)) > $param5 AND max(size(this0.someProp)) < $param6)) AS var2 + RETURN (count(this1) > $param0 AND ((avg(size(this1.name)) > $param1 AND (min(size(this0.someProp)) < $param2 AND max(size(this0.someProp)) > $param3)) OR min(size(this1.name)) > $param4) AND (min(size(this0.someProp)) > $param5 AND max(size(this0.someProp)) < $param6)) AS var2 } WITH * WHERE var2 = true @@ -522,11 +549,11 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { }, \\"param1\\": 3782, \\"param2\\": { - \\"low\\": 4, + \\"low\\": 10, \\"high\\": 0 }, \\"param3\\": { - \\"low\\": 10, + \\"low\\": 4, \\"high\\": 0 }, \\"param4\\": { @@ -551,7 +578,7 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { test("implicit AND", async () => { const query = /* GraphQL */ ` { - posts(where: { content_EQ: "stuff", alternateContent_EQ: "stuff2" }) { + posts(where: { content: { eq: "stuff" }, alternateContent: { eq: "stuff2" } }) { content } } @@ -578,7 +605,10 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { { posts( where: { - OR: [{ content_EQ: "stuff", alternateContent_EQ: "stuff2" }, { content_EQ: "stuff3" }] + OR: [ + { content: { eq: "stuff" }, alternateContent: { eq: "stuff2" } } + { content: { eq: "stuff3" } } + ] } ) { content @@ -606,7 +636,7 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { test("explicit NOT with an implicit AND", async () => { const query = /* GraphQL */ ` { - posts(where: { NOT: { content_EQ: "stuff", alternateContent_EQ: "stuff2" } }) { + posts(where: { NOT: { content: { eq: "stuff" }, alternateContent: { eq: "stuff2" } } }) { content } } @@ -633,7 +663,7 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { test("implicit AND inside relationship filter", async () => { const query = /* GraphQL */ ` { - posts(where: { likes_SOME: { name_EQ: "stuff", otherName_EQ: "stuff2" } }) { + posts(where: { likes: { some: { name: { eq: "stuff" }, otherName: { eq: "stuff2" } } } }) { content } } @@ -661,7 +691,7 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { test("implicit AND outside relationship filters", async () => { const query = /* GraphQL */ ` { - posts(where: { likes_SOME: { name_EQ: "stuff" }, likes_ALL: { otherName_EQ: "stuff2" } }) { + posts(where: { likes: { some: { name: { eq: "stuff" } }, all: { otherName: { eq: "stuff2" } } } }) { content } } @@ -698,9 +728,9 @@ describe("https://github.com/neo4j/graphql/issues/3765", () => { posts( where: { OR: [ - { likes_SOME: { name_EQ: "stuff" } } - { likes_ALL: { otherName_EQ: "stuff2" } } - { likes_SOME: { otherName_EQ: "stuff3" } } + { likes: { some: { name: { eq: "stuff" } } } } + { likes: { all: { otherName: { eq: "stuff2" } } } } + { likes: { some: { otherName: { eq: "stuff3" } } } } ] } ) { diff --git a/packages/graphql/tests/tck/issues/4095.test.ts b/packages/graphql/tests/tck/issues/4095.test.ts index 9645d3dfa6..7018aaa1e4 100644 --- a/packages/graphql/tests/tck/issues/4095.test.ts +++ b/packages/graphql/tests/tck/issues/4095.test.ts @@ -38,7 +38,9 @@ describe("https://github.com/neo4j/graphql/issues/4095", () => { creator: [User!]! @relationship(type: "CREATOR_OF", direction: IN) } - type Person @authorization(filter: [{ where: { node: { creator_SOME: { id_EQ: "$jwt.uid" } } } }]) @node { + type Person + @authorization(filter: [{ where: { node: { creator: { some: { id: { eq: "$jwt.uid" } } } } } }]) + @node { id: ID! @id creator: [User!]! @relationship(type: "CREATOR_OF", direction: IN, nestedOperations: [CONNECT]) family: [Family!]! @relationship(type: "MEMBER_OF", direction: OUT) @@ -75,7 +77,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..e814d5d94e 100644 --- a/packages/graphql/tests/tck/issues/4115.test.ts +++ b/packages/graphql/tests/tck/issues/4115.test.ts @@ -46,8 +46,14 @@ describe("https://github.com/neo4j/graphql/issues/4115", () => { { where: { AND: [ - { node: { creator_SOME: { id_EQ: "$jwt.uid" } } } - { node: { family_SOME: { creator_SOME: { roles_INCLUDES: "plan:paid" } } } } + { node: { creator: { some: { id: { eq: "$jwt.uid" } } } } } + { + node: { + family: { + some: { creator: { some: { roles: { includes: "plan:paid" } } } } + } + } + } ] } } @@ -94,7 +100,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..f3d819a4e8 100644 --- a/packages/graphql/tests/tck/issues/4116.test.ts +++ b/packages/graphql/tests/tck/issues/4116.test.ts @@ -42,7 +42,13 @@ describe("https://github.com/neo4j/graphql/issues/4116", () => { type Person @node @authorization( - filter: [{ where: { node: { family_SOME: { creator_SOME: { roles_INCLUDES: "plan:paid" } } } } }] + filter: [ + { + where: { + node: { family: { some: { creator: { some: { roles: { includes: "plan:paid" } } } } } } + } + } + ] ) { id: ID! @id creator: [User!]! @relationship(type: "CREATOR_OF", direction: IN, nestedOperations: [CONNECT]) @@ -85,7 +91,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..efbb89860c 100644 --- a/packages/graphql/tests/tck/issues/4170.test.ts +++ b/packages/graphql/tests/tck/issues/4170.test.ts @@ -28,19 +28,27 @@ describe("https://github.com/neo4j/graphql/issues/4170", () => { id: String roles: [String] } - type User @authorization(validate: [{ where: { node: { userId_EQ: "$jwt.id" } }, operations: [READ] }]) @node { + type User + @authorization(validate: [{ where: { node: { userId: { eq: "$jwt.id" } } }, operations: [READ] }]) + @node { userId: String! adminAccess: [Tenant!]! @relationship(type: "ADMIN_IN", direction: OUT) } - type Tenant @authorization(validate: [{ where: { node: { admins_SOME: { userId_EQ: "$jwt.id" } } } }]) @node { + type Tenant + @authorization(validate: [{ where: { node: { admins: { some: { userId: { eq: "$jwt.id" } } } } } }]) + @node { id: ID! @id settings: [Settings!]! @relationship(type: "HAS_SETTINGS", direction: OUT) admins: [User!]! @relationship(type: "ADMIN_IN", direction: IN) } type Settings - @authorization(validate: [{ where: { node: { tenant_SOME: { admins_SOME: { userId_EQ: "$jwt.id" } } } } }]) + @authorization( + validate: [ + { where: { node: { tenant: { some: { admins: { some: { userId: { eq: "$jwt.id" } } } } } } } } + ] + ) @node { id: ID! @id tenant: [Tenant!]! @relationship(type: "HAS_SETTINGS", direction: IN) @@ -52,7 +60,15 @@ describe("https://github.com/neo4j/graphql/issues/4170", () => { @node @authorization( validate: [ - { where: { node: { settings_SOME: { tenant_SOME: { admins_SOME: { userId_EQ: "$jwt.id" } } } } } } + { + where: { + node: { + settings: { + some: { tenant: { some: { admins: { some: { userId: { eq: "$jwt.id" } } } } } } + } + } + } + } ] ) { id: ID! @id @@ -67,8 +83,14 @@ describe("https://github.com/neo4j/graphql/issues/4170", () => { { where: { node: { - openingDay_SOME: { - settings_SOME: { tenant_SOME: { admins_SOME: { userId_EQ: "$jwt.id" } } } + openingDay: { + some: { + settings: { + some: { + tenant: { some: { admins: { some: { userId: { eq: "$jwt.id" } } } } } + } + } + } } } } @@ -161,7 +183,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..d69dc12b88 100644 --- a/packages/graphql/tests/tck/issues/4214.test.ts +++ b/packages/graphql/tests/tck/issues/4214.test.ts @@ -70,8 +70,11 @@ describe("https://github.com/neo4j/graphql/issues/4214", () => { { operations: [CREATE, CREATE_RELATIONSHIP] where: { - OR: [{ jwt: { roles_INCLUDES: "store-owner" } }, { jwt: { roles_INCLUDES: "employee" } }] - node: { store_SOME: { id_EQ: "$jwt.store" } } + OR: [ + { jwt: { roles: { includes: "store-owner" } } } + { jwt: { roles: { includes: "employee" } } } + ] + node: { store: { some: { id: { eq: "$jwt.store" } } } } } } ] @@ -79,11 +82,14 @@ describe("https://github.com/neo4j/graphql/issues/4214", () => { extend type Transaction @authorization( filter: [ - { where: { jwt: { roles_INCLUDES: "admin" } } } + { where: { jwt: { roles: { includes: "admin" } } } } { where: { - OR: [{ jwt: { roles_INCLUDES: "store-owner" } }, { jwt: { roles_INCLUDES: "employee" } }] - node: { store_SOME: { id_EQ: "$jwt.store" } } + OR: [ + { jwt: { roles: { includes: "store-owner" } } } + { jwt: { roles: { includes: "employee" } } } + ] + node: { store: { some: { id: { eq: "$jwt.store" } } } } } } ] @@ -97,8 +103,11 @@ describe("https://github.com/neo4j/graphql/issues/4214", () => { { operations: [CREATE, CREATE_RELATIONSHIP] where: { - OR: [{ jwt: { roles_INCLUDES: "store-owner" } }, { jwt: { roles_INCLUDES: "employee" } }] - node: { transaction_SOME: { store_SOME: { id_EQ: "$jwt.store" } } } + OR: [ + { jwt: { roles: { includes: "store-owner" } } } + { jwt: { roles: { includes: "employee" } } } + ] + node: { transaction: { some: { store: { some: { id: { eq: "$jwt.store" } } } } } } } } ] @@ -106,11 +115,14 @@ describe("https://github.com/neo4j/graphql/issues/4214", () => { extend type TransactionItem @authorization( filter: [ - { where: { jwt: { roles_INCLUDES: "admin" } } } + { where: { jwt: { roles: { includes: "admin" } } } } { where: { - OR: [{ jwt: { roles_INCLUDES: "store-owner" } }, { jwt: { roles_INCLUDES: "employee" } }] - node: { transaction_SOME: { store_SOME: { id_EQ: "$jwt.store" } } } + OR: [ + { jwt: { roles: { includes: "store-owner" } } } + { jwt: { roles: { includes: "employee" } } } + ] + node: { transaction: { some: { store: { some: { id: { eq: "$jwt.store" } } } } } } } } ] @@ -136,7 +148,7 @@ describe("https://github.com/neo4j/graphql/issues/4214", () => { name: "Milk" price: 5 quantity: 1 - transaction: { connect: { where: { node: { id_EQ: "transactionid" } } } } + transaction: { connect: { where: { node: { id: { eq: "transactionid" } } } } } } ) { transactionItems { @@ -167,7 +179,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 +198,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 +225,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..4473b1eddc 100644 --- a/packages/graphql/tests/tck/issues/4223.test.ts +++ b/packages/graphql/tests/tck/issues/4223.test.ts @@ -28,19 +28,27 @@ describe("https://github.com/neo4j/graphql/issues/4223", () => { id: String roles: [String] } - type User @authorization(validate: [{ where: { node: { userId_EQ: "$jwt.id" } }, operations: [READ] }]) @node { + type User + @authorization(validate: [{ where: { node: { userId: { eq: "$jwt.id" } } }, operations: [READ] }]) + @node { userId: String! adminAccess: [Tenant!]! @relationship(type: "ADMIN_IN", direction: OUT) } - type Tenant @authorization(validate: [{ where: { node: { admins_SOME: { userId_EQ: "$jwt.id" } } } }]) @node { + type Tenant + @authorization(validate: [{ where: { node: { admins: { some: { userId: { eq: "$jwt.id" } } } } } }]) + @node { id: ID! @id settings: [Settings!]! @relationship(type: "VEHICLECARD_OWNER", direction: IN) admins: [User!]! @relationship(type: "ADMIN_IN", direction: IN) } type Settings - @authorization(validate: [{ where: { node: { tenant_SOME: { admins_SOME: { userId_EQ: "$jwt.id" } } } } }]) + @authorization( + validate: [ + { where: { node: { tenant: { some: { admins: { some: { userId: { eq: "$jwt.id" } } } } } } } } + ] + ) @node { id: ID! @id tenant: [Tenant!]! @relationship(type: "HAS_SETTINGS", direction: IN) @@ -53,7 +61,15 @@ describe("https://github.com/neo4j/graphql/issues/4223", () => { @node @authorization( validate: [ - { where: { node: { settings_SOME: { tenant_SOME: { admins_SOME: { userId_EQ: "$jwt.id" } } } } } } + { + where: { + node: { + settings: { + some: { tenant: { some: { admins: { some: { userId: { eq: "$jwt.id" } } } } } } + } + } + } + } ] ) { id: ID! @id @@ -68,8 +84,14 @@ describe("https://github.com/neo4j/graphql/issues/4223", () => { { where: { node: { - openingDay_SOME: { - settings_SOME: { tenant_SOME: { admins_SOME: { userId_EQ: "$jwt.id" } } } + openingDay: { + some: { + settings: { + some: { + tenant: { some: { admins: { some: { userId: { eq: "$jwt.id" } } } } } + } + } + } } } } @@ -85,7 +107,15 @@ describe("https://github.com/neo4j/graphql/issues/4223", () => { @node @authorization( validate: [ - { where: { node: { settings_SOME: { tenant_SOME: { admins_SOME: { userId_EQ: "$jwt.id" } } } } } } + { + where: { + node: { + settings: { + some: { tenant: { some: { admins: { some: { userId: { eq: "$jwt.id" } } } } } } + } + } + } + } ] ) { settings: [Settings!]! @relationship(type: "HAS_WORKSPACE_SETTINGS", direction: IN) @@ -186,7 +216,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..83b13baf5d 100644 --- a/packages/graphql/tests/tck/issues/4239.test.ts +++ b/packages/graphql/tests/tck/issues/4239.test.ts @@ -45,7 +45,7 @@ describe("https://github.com/neo4j/graphql/issues/4239", () => { validate: [ { when: [BEFORE] - where: { node: { directorConnection_SOME: { node: { id_EQ: "$jwt.sub" } } } } + where: { node: { directorConnection: { some: { node: { id: { eq: "$jwt.sub" } } } } } } } ] ) { @@ -102,7 +102,7 @@ describe("https://github.com/neo4j/graphql/issues/4239", () => { type Movie @node @authorization( - validate: [{ when: [BEFORE], where: { node: { director_SOME: { id_EQ: "$jwt.sub" } } } }] + validate: [{ when: [BEFORE], where: { node: { director: { some: { id: { eq: "$jwt.sub" } } } } } }] ) { title: String director: [Person!]! @relationship(type: "DIRECTED", direction: IN) @@ -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" `); @@ -160,7 +163,7 @@ describe("https://github.com/neo4j/graphql/issues/4239", () => { validate: [ { when: [BEFORE] - where: { node: { directorConnection_SOME: { node: { id_EQ: "$jwt.sub" } } } } + where: { node: { directorConnection: { some: { node: { id: { eq: "$jwt.sub" } } } } } } } ] ) { diff --git a/packages/graphql/tests/tck/issues/4268.test.ts b/packages/graphql/tests/tck/issues/4268.test.ts index 45d3314cf4..4c4914022f 100644 --- a/packages/graphql/tests/tck/issues/4268.test.ts +++ b/packages/graphql/tests/tck/issues/4268.test.ts @@ -34,7 +34,10 @@ describe("https://github.com/neo4j/graphql/issues/4268", () => { @node @authorization( validate: [ - { when: [BEFORE], where: { jwt: { OR: [{ roles_EQ: "admin" }, { roles_EQ: "super-admin" }] } } } + { + when: [BEFORE] + where: { jwt: { OR: [{ roles: { eq: "admin" } }, { roles: { eq: "super-admin" } }] } } + } ] ) { title: String @@ -51,7 +54,7 @@ describe("https://github.com/neo4j/graphql/issues/4268", () => { } `; - const token = createBearerToken("secret", { roles_EQ: ["admin"], id: "something", email: "something" }); + const token = createBearerToken("secret", { roles: ["admin"], id: "something", email: "something" }); const result = await translateQuery(neoSchema, query, { token }); expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` @@ -65,8 +68,7 @@ describe("https://github.com/neo4j/graphql/issues/4268", () => { "{ \\"isAuthenticated\\": true, \\"jwt\\": { - \\"roles\\": [], - \\"roles_EQ\\": [ + \\"roles\\": [ \\"admin\\" ], \\"id\\": \\"something\\", @@ -95,8 +97,8 @@ describe("https://github.com/neo4j/graphql/issues/4268", () => { where: { jwt: { OR: [ - { OR: [{ roles_EQ: "admin" }, { roles_EQ: "super-admin" }] } - { OR: [{ roles_EQ: "user" }, { roles_EQ: "super-user" }] } + { OR: [{ roles: { eq: "admin" } }, { roles: { eq: "super-admin" } }] } + { OR: [{ roles: { eq: "user" } }, { roles: { eq: "super-user" } }] } ] } } @@ -164,7 +166,7 @@ describe("https://github.com/neo4j/graphql/issues/4268", () => { validate: [ { when: [BEFORE] - where: { jwt: { AND: [{ roles_EQ: "admin" }, { roles_EQ: "super-admin" }] } } + where: { jwt: { AND: [{ roles: { eq: "admin" } }, { roles: { eq: "super-admin" } }] } } } ] ) { @@ -230,8 +232,8 @@ describe("https://github.com/neo4j/graphql/issues/4268", () => { where: { jwt: { AND: [ - { AND: [{ roles_EQ: "admin" }, { roles_EQ: "super-admin" }] } - { AND: [{ roles_EQ: "user" }, { roles_EQ: "super-user" }] } + { AND: [{ roles: { eq: "admin" } }, { roles: { eq: "super-admin" } }] } + { AND: [{ roles: { eq: "user" } }, { roles: { eq: "super-user" } }] } ] } } @@ -294,7 +296,7 @@ describe("https://github.com/neo4j/graphql/issues/4268", () => { } type Movie - @authorization(validate: [{ when: [BEFORE], where: { jwt: { NOT: { roles_EQ: "admin" } } } }]) + @authorization(validate: [{ when: [BEFORE], where: { jwt: { NOT: { roles: { eq: "admin" } } } } }]) @node { title: String director: [Person!]! @relationship(type: "DIRECTED", direction: IN) @@ -351,7 +353,7 @@ describe("https://github.com/neo4j/graphql/issues/4268", () => { type Movie @node @authorization( - validate: [{ when: [BEFORE], where: { jwt: { NOT: { NOT: { roles_EQ: "admin" } } } } }] + validate: [{ when: [BEFORE], where: { jwt: { NOT: { NOT: { roles: { eq: "admin" } } } } } }] ) { title: String director: [Person!]! @relationship(type: "DIRECTED", direction: IN) diff --git a/packages/graphql/tests/tck/issues/4287.test.ts b/packages/graphql/tests/tck/issues/4287.test.ts index be53d2d27f..ff7e935c99 100644 --- a/packages/graphql/tests/tck/issues/4287.test.ts +++ b/packages/graphql/tests/tck/issues/4287.test.ts @@ -49,7 +49,9 @@ describe("https://github.com/neo4j/graphql/issues/4287", () => { query { actors { actedInConnection( - where: { OR: [{ node: { title_EQ: "something" } }, { node: { title_EQ: "whatever" } }] } + where: { + OR: [{ node: { title: { eq: "something" } } }, { node: { title: { eq: "whatever" } } }] + } ) { edges { node { diff --git a/packages/graphql/tests/tck/issues/4292.test.ts b/packages/graphql/tests/tck/issues/4292.test.ts index b265033cff..480b75d06f 100644 --- a/packages/graphql/tests/tck/issues/4292.test.ts +++ b/packages/graphql/tests/tck/issues/4292.test.ts @@ -53,15 +53,25 @@ describe("https://github.com/neo4j/graphql/issues/4292", () => { validate: [ { operations: [CREATE] - where: { node: { group_SOME: { creator_SOME: { roles_INCLUDES: "plan:paid" } } } } + where: { + node: { group: { some: { creator: { some: { roles: { includes: "plan:paid" } } } } } } + } } { operations: [DELETE] where: { OR: [ - { node: { creator_SOME: { id_EQ: "$jwt.uid" } } } - { node: { group_SOME: { admins_SOME: { user_SOME: { id_EQ: "$jwt.uid" } } } } } - { node: { group_SOME: { creator_SOME: { id_EQ: "$jwt.uid" } } } } + { node: { creator: { some: { id: { eq: "$jwt.uid" } } } } } + { + node: { + group: { + some: { + admins: { some: { user: { some: { id: { eq: "$jwt.uid" } } } } } + } + } + } + } + { node: { group: { some: { creator: { some: { id: { eq: "$jwt.uid" } } } } } } } ] } } @@ -69,14 +79,28 @@ describe("https://github.com/neo4j/graphql/issues/4292", () => { operations: [READ, UPDATE] where: { OR: [ - { node: { creator_SOME: { id_EQ: "$jwt.uid" } } } - { node: { group_SOME: { admins_SOME: { user_SOME: { id_EQ: "$jwt.uid" } } } } } + { node: { creator: { some: { id: { eq: "$jwt.uid" } } } } } + { + node: { + group: { + some: { + admins: { some: { user: { some: { id: { eq: "$jwt.uid" } } } } } + } + } + } + } { node: { - group_SOME: { contributors_SOME: { user_SOME: { id_EQ: "$jwt.uid" } } } + group: { + some: { + contributors: { + some: { user: { some: { id: { eq: "$jwt.uid" } } } } + } + } + } } } - { node: { group_SOME: { creator_SOME: { id_EQ: "$jwt.uid" } } } } + { node: { group: { some: { creator: { some: { id: { eq: "$jwt.uid" } } } } } } } ] } } @@ -162,7 +186,7 @@ describe("https://github.com/neo4j/graphql/issues/4292", () => { const query = /* GraphQL */ ` query Groups { - groups(where: { id_EQ: "family_id_1" }) { + groups(where: { id: { eq: "family_id_1" } }) { id name members { @@ -192,11 +216,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/4405.test.ts b/packages/graphql/tests/tck/issues/4405.test.ts index 8d63dea1ab..5fbea74487 100644 --- a/packages/graphql/tests/tck/issues/4405.test.ts +++ b/packages/graphql/tests/tck/issues/4405.test.ts @@ -35,7 +35,7 @@ describe("https://github.com/neo4j/graphql/issues/4405", () => { { when: [BEFORE] operations: [READ] - where: { node: { actedInConnection_SOME: { node: { title_IN: ["Matrix"] } } } } + where: { node: { actedInConnection: { some: { node: { title: { in: ["Matrix"] } } } } } } } ] ) { @@ -89,9 +89,14 @@ describe("https://github.com/neo4j/graphql/issues/4405", () => { operations: [READ] where: { node: { - actedInConnection_SOME: { - node: { - OR: [{ title_IN: ["Matrix"] }, { title_IN: ["Forrest Gump", "Top Gun"] }] + actedInConnection: { + some: { + node: { + OR: [ + { title: { in: ["Matrix"] } } + { title: { in: ["Forrest Gump", "Top Gun"] } } + ] + } } } } diff --git a/packages/graphql/tests/tck/issues/4583.test.ts b/packages/graphql/tests/tck/issues/4583.test.ts index 1ec53fa663..b063adb4ef 100644 --- a/packages/graphql/tests/tck/issues/4583.test.ts +++ b/packages/graphql/tests/tck/issues/4583.test.ts @@ -73,7 +73,7 @@ describe("https://github.com/neo4j/graphql/issues/4583", () => { actedIn: { connect: { edge: { screenTime: 10 } - where: { node: { title_EQ: "movieTitle", typename_IN: [Movie] } } + where: { node: { title: { eq: "movieTitle" }, typename: [Movie] } } } } } @@ -166,7 +166,7 @@ describe("https://github.com/neo4j/graphql/issues/4583", () => { actedIn: { connect: { edge: { screenTime: 10 } - where: { node: { OR: [{ title_EQ: "movieTitle" }, { typename_IN: [Movie] }] } } + where: { node: { OR: [{ title: { eq: "movieTitle" } }, { typename: [Movie] }] } } } } } @@ -259,11 +259,11 @@ describe("https://github.com/neo4j/graphql/issues/4583", () => { actedIn: { connect: { edge: { screenTime: 10 } - where: { node: { title_EQ: "movieTitle", typename_IN: [Movie] } } + where: { node: { title: { eq: "movieTitle" }, typename: [Movie] } } connect: { actors: { edge: { StarredIn: { episodeNr: 10 }, ActedIn: { screenTime: 25 } } - where: { node: { name_EQ: "Second Actor" } } + where: { node: { name: { eq: "Second Actor" } } } } } } diff --git a/packages/graphql/tests/tck/issues/4704.test.ts b/packages/graphql/tests/tck/issues/4704.test.ts index a7c4375097..522e7c6b53 100644 --- a/packages/graphql/tests/tck/issues/4704.test.ts +++ b/packages/graphql/tests/tck/issues/4704.test.ts @@ -69,7 +69,9 @@ describe("https://github.com/neo4j/graphql/issues/4704", () => { { actors( where: { - actedInConnection_ALL: { node: { actorsConnection_ALL: { node: { name_EQ: "Keanu Reeves" } } } } + actedInConnection: { + all: { node: { actorsConnection: { all: { node: { name: { eq: "Keanu Reeves" } } } } } } + } } ) { actedIn { @@ -152,8 +154,10 @@ describe("https://github.com/neo4j/graphql/issues/4704", () => { { actors( where: { - actedInConnection_SINGLE: { - node: { actorsConnection_SINGLE: { node: { name_EQ: "Keanu Reeves" } } } + actedInConnection: { + single: { + node: { actorsConnection: { single: { node: { name: { eq: "Keanu Reeves" } } } } } + } } } ) { @@ -201,7 +205,9 @@ describe("https://github.com/neo4j/graphql/issues/4704", () => { { actors( where: { - actedInConnection_NONE: { node: { actorsConnection_NONE: { node: { name_EQ: "Keanu Reeves" } } } } + actedInConnection: { + none: { node: { actorsConnection: { none: { node: { name: { eq: "Keanu Reeves" } } } } } } + } } ) { actedIn { diff --git a/packages/graphql/tests/tck/issues/4741.test.ts b/packages/graphql/tests/tck/issues/4741.test.ts index 2bf44fe070..dac04401cf 100644 --- a/packages/graphql/tests/tck/issues/4741.test.ts +++ b/packages/graphql/tests/tck/issues/4741.test.ts @@ -45,7 +45,7 @@ describe("https://github.com/neo4j/graphql/issues/4741", () => { test("Filters by relationship aggregation", async () => { const query = /* GraphQL */ ` query { - opportunitiesConnection(first: 10, where: { listsOlisAggregate: { count_GT: 1 } }) { + opportunitiesConnection(first: 10, where: { listsOlisAggregate: { count: { gt: 1 } } }) { edges { node { country diff --git a/packages/graphql/tests/tck/issues/4814.test.ts b/packages/graphql/tests/tck/issues/4814.test.ts index c728180342..e0e55c2e6a 100644 --- a/packages/graphql/tests/tck/issues/4814.test.ts +++ b/packages/graphql/tests/tck/issues/4814.test.ts @@ -54,7 +54,7 @@ describe("https://github.com/neo4j/graphql/issues/4814", () => { test("should use the direction specified in the typeDefs (direction: OUT, connection fields)", async () => { const query = /* GraphQL */ ` query GetNextStep { - steps(where: { id_EQ: "2" }) { + steps(where: { id: { eq: "2" } }) { __typename nextsConnection { edges { @@ -131,7 +131,7 @@ describe("https://github.com/neo4j/graphql/issues/4814", () => { test("should use the direction specified in the typeDefs (direction: IN, connection fields)", async () => { const query = /* GraphQL */ ` query GetNextStep { - steps(where: { id_EQ: "2" }) { + steps(where: { id: { eq: "2" } }) { __typename prevsConnection { edges { @@ -208,7 +208,7 @@ describe("https://github.com/neo4j/graphql/issues/4814", () => { test("should use the direction specified in the typeDefs (direction: OUT, relationship fields)", async () => { const query = /* GraphQL */ ` query GetNextStep { - steps(where: { id_EQ: "2" }) { + steps(where: { id: { eq: "2" } }) { __typename nexts { id @@ -279,7 +279,7 @@ describe("https://github.com/neo4j/graphql/issues/4814", () => { test("should use the direction specified in the typeDefs (direction: IN, relationship fields)", async () => { const query = /* GraphQL */ ` query GetNextStep { - steps(where: { id_EQ: "2" }) { + steps(where: { id: { eq: "2" } }) { __typename prevs { id diff --git a/packages/graphql/tests/tck/issues/488.test.ts b/packages/graphql/tests/tck/issues/488.test.ts index d503f027c9..0b511a8fb1 100644 --- a/packages/graphql/tests/tck/issues/488.test.ts +++ b/packages/graphql/tests/tck/issues/488.test.ts @@ -57,7 +57,7 @@ describe("https://github.com/neo4j/graphql/issues/488", () => { test("Should replicate issue and return correct cypher", async () => { const query = /* GraphQL */ ` query { - journalists(where: { keywordsConnection_SOME: { Emoji: { node: { type_EQ: "Smile" } } } }) { + journalists(where: { keywordsConnection: { some: { Emoji: { node: { type: { eq: "Smile" } } } } } }) { name keywords { ... on Emoji { @@ -111,7 +111,7 @@ describe("https://github.com/neo4j/graphql/issues/488", () => { test("Should replicate issue and return correct cypher (using NONE)", async () => { const query = /* GraphQL */ ` query { - journalists(where: { keywordsConnection_NONE: { Emoji: { node: { type_EQ: "Smile" } } } }) { + journalists(where: { keywordsConnection: { none: { Emoji: { node: { type: { eq: "Smile" } } } } } }) { name keywords { ... on Emoji { diff --git a/packages/graphql/tests/tck/issues/5023.test.ts b/packages/graphql/tests/tck/issues/5023.test.ts index 3bb4a5563b..8041e527cc 100644 --- a/packages/graphql/tests/tck/issues/5023.test.ts +++ b/packages/graphql/tests/tck/issues/5023.test.ts @@ -30,13 +30,13 @@ describe("https://github.com/neo4j/graphql/issues/5023", () => { type JWT @jwt { id: String } - type User @authorization(filter: [{ where: { node: { userId_EQ: "$jwt.id" } } }]) @node { + type User @authorization(filter: [{ where: { node: { userId: { eq: "$jwt.id" } } } }]) @node { userId: String! adminAccess: [Tenant!]! @relationship(type: "ADMIN_IN", direction: OUT, aggregate: false) } type Tenant - @authorization(validate: [{ where: { node: { admins_SOME: { userId_EQ: "$jwt.id" } } } }]) + @authorization(validate: [{ where: { node: { admins: { some: { userId: { eq: "$jwt.id" } } } } } }]) @node { id: ID! @id admins: [User!]! @relationship(type: "ADMIN_IN", direction: IN, aggregate: false) @@ -46,7 +46,9 @@ describe("https://github.com/neo4j/graphql/issues/5023", () => { type Settings @node @authorization( - validate: [{ where: { node: { tenant_SOME: { admins_SOME: { userId_EQ: "$jwt.id" } } } } }] + validate: [ + { where: { node: { tenant: { some: { admins: { some: { userId: { eq: "$jwt.id" } } } } } } } } + ] ) { tenant: [Tenant!]! @relationship(type: "HAS_SETTINGS", direction: IN, aggregate: false) extendedOpeningHours: [OpeningDay!]! @@ -59,7 +61,11 @@ describe("https://github.com/neo4j/graphql/issues/5023", () => { validate: [ { where: { - node: { settings_SOME: { tenant_SOME: { admins_SOME: { userId_EQ: "$jwt.id" } } } } + node: { + settings: { + some: { tenant: { some: { admins: { some: { userId: { eq: "$jwt.id" } } } } } } + } + } } } ] @@ -77,8 +83,16 @@ describe("https://github.com/neo4j/graphql/issues/5023", () => { { where: { node: { - openingDay_SOME: { - settings_SOME: { tenant_SOME: { admins_SOME: { userId_EQ: "$jwt.id" } } } + openingDay: { + some: { + settings: { + some: { + tenant: { + some: { admins: { some: { userId: { eq: "$jwt.id" } } } } + } + } + } + } } } } @@ -127,17 +141,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_updatebefore_this1:Tenant) WHERE size([(authorization_updatebefore_this1)<-[:ADMIN_IN]-(authorization_updatebefore_this0:User) WHERE ($jwt.id IS NOT NULL AND authorization_updatebefore_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_updatebefore_this0:Tenant) + WHERE EXISTS { + MATCH (authorization_updatebefore_this0)<-[:ADMIN_IN]-(authorization_updatebefore_this1:User) + WHERE ($jwt.id IS NOT NULL AND authorization_updatebefore_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_deletebefore_this2:Settings) WHERE size([(authorization_deletebefore_this2)<-[:HAS_SETTINGS]-(authorization_deletebefore_this1:Tenant) WHERE size([(authorization_deletebefore_this1)<-[:ADMIN_IN]-(authorization_deletebefore_this0:User) WHERE ($jwt.id IS NOT NULL AND authorization_deletebefore_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_deletebefore_this0:Settings) + WHERE EXISTS { + MATCH (authorization_deletebefore_this0)<-[:HAS_SETTINGS]-(authorization_deletebefore_this1:Tenant) + WHERE EXISTS { + MATCH (authorization_deletebefore_this1)<-[:ADMIN_IN]-(authorization_deletebefore_this2:User) + WHERE ($jwt.id IS NOT NULL AND authorization_deletebefore_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 +178,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..4d5bffecaa 100644 --- a/packages/graphql/tests/tck/issues/505.test.ts +++ b/packages/graphql/tests/tck/issues/505.test.ts @@ -42,8 +42,8 @@ describe("https://github.com/neo4j/graphql/issues/505", () => { operations: [READ] where: { OR: [ - { node: { members_SOME: { authId_EQ: "$jwt.sub" } } } - { node: { admins_SOME: { authId_EQ: "$jwt.sub" } } } + { node: { members: { some: { authId: { eq: "$jwt.sub" } } } } } + { node: { admins: { some: { authId: { eq: "$jwt.sub" } } } } } ] } } @@ -66,16 +66,18 @@ describe("https://github.com/neo4j/graphql/issues/505", () => { where: { node: { OR: [ - { owner_SOME: { authId_EQ: "$jwt.sub" } } + { owner: { some: { authId: { eq: "$jwt.sub" } } } } { AND: [ - { shared_EQ: true } + { shared: { eq: true } } { - workspace_ALL: { - OR: [ - { members_SOME: { authId_EQ: "$jwt.sub" } } - { admins_SOME: { authId_EQ: "$jwt.sub" } } - ] + workspace: { + all: { + OR: [ + { members: { some: { authId: { eq: "$jwt.sub" } } } } + { admins: { some: { authId: { eq: "$jwt.sub" } } } } + ] + } } } ] @@ -105,7 +107,7 @@ describe("https://github.com/neo4j/graphql/issues/505", () => { test("Users query", async () => { const query = /* GraphQL */ ` query Users { - users(where: { id_EQ: "my-user-id" }) { + users(where: { id: { eq: "my-user-id" } }) { id authId createdPages { @@ -124,7 +126,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 } @@ -144,7 +167,7 @@ describe("https://github.com/neo4j/graphql/issues/505", () => { test("Workspaces query", async () => { const query = /* GraphQL */ ` query Workspaces { - workspaces(where: { id_EQ: "my-workspace-id" }) { + workspaces(where: { id: { eq: "my-workspace-id" } }) { id pages { id @@ -158,12 +181,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 } @@ -183,7 +233,7 @@ describe("https://github.com/neo4j/graphql/issues/505", () => { test("Pages query", async () => { const query = /* GraphQL */ ` query Pages { - pages(where: { workspace_ALL: { id_EQ: "my-workspace-id" } }) { + pages(where: { workspace: { all: { id: { eq: "my-workspace-id" } } } }) { id } } @@ -200,7 +250,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 +299,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/5080.test.ts b/packages/graphql/tests/tck/issues/5080.test.ts index babb4a2315..e53b94e2d0 100644 --- a/packages/graphql/tests/tck/issues/5080.test.ts +++ b/packages/graphql/tests/tck/issues/5080.test.ts @@ -31,13 +31,13 @@ describe("https://github.com/neo4j/graphql/issues/5080", () => { type JWT @jwt { id: String } - type User @authorization(filter: [{ where: { node: { userId_EQ: "$jwt.id" } } }]) @node { + type User @authorization(filter: [{ where: { node: { userId: { eq: "$jwt.id" } } } }]) @node { userId: String! adminAccess: [Tenant!]! @relationship(type: "ADMIN_IN", direction: OUT, aggregate: false) } type Tenant - @authorization(validate: [{ where: { node: { admins_SOME: { userId_EQ: "$jwt.id" } } } }]) + @authorization(validate: [{ where: { node: { admins: { some: { userId: { eq: "$jwt.id" } } } } } }]) @node { id: ID! @id admins: [User!]! @relationship(type: "ADMIN_IN", direction: IN, aggregate: false) @@ -68,7 +68,9 @@ describe("https://github.com/neo4j/graphql/issues/5080", () => { @node @mutation(operations: [UPDATE]) @authorization( - validate: [{ where: { node: { owner_SOME: { admins_SOME: { userId_EQ: "$jwt.id" } } } } }] + validate: [ + { where: { node: { owner: { some: { admins: { some: { userId: { eq: "$jwt.id" } } } } } } } } + ] ) { id: ID! @id owner: [Tenant!]! @relationship(type: "OWNED_BY", direction: OUT, aggregate: false) @@ -81,7 +83,9 @@ describe("https://github.com/neo4j/graphql/issues/5080", () => { @node @mutation(operations: [UPDATE]) @authorization( - validate: [{ where: { node: { owner_SOME: { admins_SOME: { userId_EQ: "$jwt.id" } } } } }] + validate: [ + { where: { node: { owner: { some: { admins: { some: { userId: { eq: "$jwt.id" } } } } } } } } + ] ) { id: ID! @id owner: [Tenant!]! @relationship(type: "OWNED_BY", direction: OUT, aggregate: false) @@ -131,7 +135,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..0f24d179ec 100644 --- a/packages/graphql/tests/tck/issues/5143.test.ts +++ b/packages/graphql/tests/tck/issues/5143.test.ts @@ -36,7 +36,8 @@ describe("https://github.com/neo4j/graphql/issues/5143", () => { id: ID! @id publisher: [User!]! @relationship(type: "PUBLISHER", direction: IN) } - extend type Video @authorization(filter: [{ where: { node: { publisher_ALL: { id_EQ: "$jwt.sub" } } } }]) + extend type Video + @authorization(filter: [{ where: { node: { publisher: { all: { id: { eq: "$jwt.sub" } } } } } }]) type Query { getAllVids: [Video]! @@ -85,7 +86,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..eca30db530 100644 --- a/packages/graphql/tests/tck/issues/5270.test.ts +++ b/packages/graphql/tests/tck/issues/5270.test.ts @@ -31,7 +31,13 @@ describe("https://github.com/neo4j/graphql/issues/5270", () => { type User @node(labels: ["User"]) @authorization( - filter: [{ where: { node: { NOT: { blockedUsers_SOME: { to_SOME: { id_EQ: "$jwt.sub" } } } } } }] + filter: [ + { + where: { + node: { NOT: { blockedUsers: { some: { to: { some: { id: { eq: "$jwt.sub" } } } } } } } + } + } + ] ) { id: ID! @id blockedUsers: [UserBlockedUser!]! @relationship(type: "HAS_BLOCKED", direction: OUT) @@ -39,7 +45,7 @@ describe("https://github.com/neo4j/graphql/issues/5270", () => { type UserBlockedUser @node(labels: ["UserBlockedUser"]) - @authorization(filter: [{ where: { node: { from_SOME: { id_EQ: "$jwt.sub" } } } }]) { + @authorization(filter: [{ where: { node: { from: { some: { id: { eq: "$jwt.sub" } } } } } }]) { id: ID! @id from: [User!]! @relationship(type: "HAS_BLOCKED", direction: IN) @@ -94,7 +100,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..6f6c9c00c3 100644 --- a/packages/graphql/tests/tck/issues/5515.test.ts +++ b/packages/graphql/tests/tck/issues/5515.test.ts @@ -34,23 +34,27 @@ describe("https://github.com/neo4j/graphql/issues/5515", () => { @node @authorization( validate: [ - { operations: [CREATE, DELETE], where: { jwt: { roles_INCLUDES: "admin" } } } - { operations: [READ, UPDATE], where: { node: { id_EQ: "$jwt.sub" } } } + { operations: [CREATE, DELETE], where: { jwt: { roles: { includes: "admin" } } } } + { operations: [READ, UPDATE], where: { node: { id: { eq: "$jwt.sub" } } } } ] - filter: [{ where: { node: { id_EQ: "$jwt.sub" } } }] + filter: [{ where: { node: { id: { eq: "$jwt.sub" } } } }] ) { id: ID! cabinets: [Cabinet!]! @relationship(type: "HAS_CABINET", direction: OUT) } - type Cabinet @authorization(filter: [{ where: { node: { user_SOME: { id_EQ: "$jwt.sub" } } } }]) @node { + type Cabinet + @authorization(filter: [{ where: { node: { user: { some: { id: { eq: "$jwt.sub" } } } } } }]) + @node { id: ID! @id categories: [Category!]! @relationship(type: "HAS_CATEGORY", direction: OUT) user: [User!]! @relationship(type: "HAS_CABINET", direction: IN) } type Category - @authorization(filter: [{ where: { node: { cabinet_SOME: { user_SOME: { id_EQ: "$jwt.sub" } } } } }]) + @authorization( + filter: [{ where: { node: { cabinet: { some: { user: { some: { id: { eq: "$jwt.sub" } } } } } } } }] + ) @node { id: ID! @id files: [File!]! @relationship(type: "HAS_FILE", direction: OUT) @@ -71,7 +75,7 @@ describe("https://github.com/neo4j/graphql/issues/5515", () => { test("should delete categories with auth filters", async () => { const query = /* GraphQL */ ` mutation { - deleteCategories(where: { id_EQ: "category-video" }) { + deleteCategories(where: { id: { eq: "category-video" } }) { __typename nodesDeleted relationshipsDeleted @@ -83,7 +87,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" `); diff --git a/packages/graphql/tests/tck/issues/5599.test.ts b/packages/graphql/tests/tck/issues/5599.test.ts index 31eb06146d..2fb1ba48de 100644 --- a/packages/graphql/tests/tck/issues/5599.test.ts +++ b/packages/graphql/tests/tck/issues/5599.test.ts @@ -53,7 +53,7 @@ describe("https://github.com/neo4j/graphql/issues/5599", () => { const query = /* GraphQL */ ` mutation { updateMovies( - update: { actors: { LeadActor: [{ delete: [{ where: { node: { name_EQ: "Actor1" } } }] }] } } + update: { actors: { LeadActor: [{ delete: [{ where: { node: { name: { eq: "Actor1" } } } }] }] } } ) { movies { title @@ -94,7 +94,9 @@ describe("https://github.com/neo4j/graphql/issues/5599", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Actor1\\" + \\"name\\": { + \\"eq\\": \\"Actor1\\" + } } } } @@ -116,8 +118,8 @@ describe("https://github.com/neo4j/graphql/issues/5599", () => { updateMovies( update: { actors: { - LeadActor: [{ delete: [{ where: { node: { name_EQ: "Actor1" } } }] }] - Extra: [{ delete: [{ where: { node: { name_EQ: "Actor2" } } }] }] + LeadActor: [{ delete: [{ where: { node: { name: { eq: "Actor1" } } } }] }] + Extra: [{ delete: [{ where: { node: { name: { eq: "Actor2" } } } }] }] } } ) { @@ -173,7 +175,9 @@ describe("https://github.com/neo4j/graphql/issues/5599", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Actor1\\" + \\"name\\": { + \\"eq\\": \\"Actor1\\" + } } } } @@ -186,7 +190,9 @@ describe("https://github.com/neo4j/graphql/issues/5599", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Actor2\\" + \\"name\\": { + \\"eq\\": \\"Actor2\\" + } } } } diff --git a/packages/graphql/tests/tck/issues/582.test.ts b/packages/graphql/tests/tck/issues/582.test.ts index bc867b4801..0a04661384 100644 --- a/packages/graphql/tests/tck/issues/582.test.ts +++ b/packages/graphql/tests/tck/issues/582.test.ts @@ -54,13 +54,17 @@ describe("#582", () => { const result = await translateQuery(neoSchema, query, { variableValues: { where: { - type_EQ: "Cat", - childrenConnection_SOME: { - node: { - type_EQ: "Dog", - parentsConnection_SOME: { - node: { - type_EQ: "Bird", + type: { eq: "Cat" }, + childrenConnection: { + some: { + node: { + type: { eq: "Dog" }, + parentsConnection: { + some: { + node: { + type: { eq: "Bird" }, + }, + }, }, }, }, @@ -102,16 +106,22 @@ describe("#582", () => { const result = await translateQuery(neoSchema, query, { variableValues: { where: { - type_EQ: "Cat", - childrenConnection_SOME: { - node: { - type_EQ: "Dog", - parentsConnection_SOME: { - node: { - type_EQ: "Bird", - childrenConnection_SOME: { + type: { eq: "Cat" }, + childrenConnection: { + some: { + node: { + type: { eq: "Dog" }, + parentsConnection: { + some: { node: { - type_EQ: "Fish", + type: { eq: "Bird" }, + childrenConnection: { + some: { + node: { + type: { eq: "Fish" }, + }, + }, + }, }, }, }, diff --git a/packages/graphql/tests/tck/issues/832.test.ts b/packages/graphql/tests/tck/issues/832.test.ts index 841485e2ec..5a3c57c3d1 100644 --- a/packages/graphql/tests/tck/issues/832.test.ts +++ b/packages/graphql/tests/tck/issues/832.test.ts @@ -59,14 +59,14 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { createInteractions( input: [ { - subjects: { connect: { where: { node: { id_IN: ["adam", "eve"] } } } } + subjects: { connect: { where: { node: { id: { in: ["adam", "eve"] } } } } } kind: "PARENT_OF" - objects: { connect: { where: { node: { id_IN: ["cain"] } } } } + objects: { connect: { where: { node: { id: { in: ["cain"] } } } } } } { - subjects: { connect: { where: { node: { id_IN: ["adam", "eve"] } } } } + subjects: { connect: { where: { node: { id: { in: ["adam", "eve"] } } } } } kind: "PARENT_OF" - objects: { connect: { where: { node: { id_IN: ["abel"] } } } } + objects: { connect: { where: { node: { id: { in: ["abel"] } } } } } } ] ) { @@ -289,9 +289,9 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { createInteractions( input: [ { - subjects: { connect: { where: { node: { id_IN: ["adam", "eve"] } } } } + subjects: { connect: { where: { node: { id: { in: ["adam", "eve"] } } } } } kind: "PARENT_OF" - objects: { connect: { where: { node: { id_IN: ["cain"] } } } } + objects: { connect: { where: { node: { id: { in: ["cain"] } } } } } } ] ) { @@ -419,9 +419,9 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { createInteractions( input: [ { - subjects: { connect: { where: { node: { id_IN: ["adam", "eve"] } } } } + subjects: { connect: { where: { node: { id: { in: ["adam", "eve"] } } } } } kind: "PARENT_OF" - objects: { connect: { where: { node: { id_IN: ["abel"] } } } } + objects: { connect: { where: { node: { id: { in: ["abel"] } } } } } } ] ) { @@ -549,14 +549,14 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { createInteractions( input: [ { - subjects: { connect: { where: { node: { id_IN: ["adam", "eve"] } } } } + subjects: { connect: { where: { node: { id: { in: ["adam", "eve"] } } } } } kind: "PARENT_OF" - objects: { connect: { where: { node: { id_IN: ["cain"] } } } } + objects: { connect: { where: { node: { id: { in: ["cain"] } } } } } } { - subjects: { connect: { where: { node: { id_IN: ["adam", "eve"] } } } } + subjects: { connect: { where: { node: { id: { in: ["adam", "eve"] } } } } } kind: "PARENT_OF" - objects: { connect: { where: { node: { id_IN: ["abel"] } } } } + objects: { connect: { where: { node: { id: { in: ["abel"] } } } } } } ] ) { @@ -848,7 +848,10 @@ describe("https://github.com/neo4j/graphql/issues/832", () => { mutation { createInteractions( input: [ - { subjects: { connect: { where: { node: { id_IN: ["adam", "eve"] } } } }, kind: "PARENT_OF" } + { + subjects: { connect: { where: { node: { id: { in: ["adam", "eve"] } } } } } + kind: "PARENT_OF" + } { kind: "PARENT_OF" } ] ) { diff --git a/packages/graphql/tests/tck/issues/894.test.ts b/packages/graphql/tests/tck/issues/894.test.ts index b0664ca968..3253a530ea 100644 --- a/packages/graphql/tests/tck/issues/894.test.ts +++ b/packages/graphql/tests/tck/issues/894.test.ts @@ -47,11 +47,11 @@ describe("https://github.com/neo4j/graphql/issues/894", () => { const query = /* GraphQL */ ` mutation SwapSides { updateUsers( - where: { name_EQ: "Luke Skywalker" } + where: { name: { eq: "Luke Skywalker" } } update: { activeOrganization: { - connect: { where: { node: { id_EQ: "test-id" } } } - disconnect: { where: { node: { NOT: { id_EQ: "test-id" } } } } + connect: { where: { node: { id: { eq: "test-id" } } } } + disconnect: { where: { node: { NOT: { id: { eq: "test-id" } } } } } } } ) { @@ -115,7 +115,9 @@ describe("https://github.com/neo4j/graphql/issues/894", () => { { \\"where\\": { \\"node\\": { - \\"id_EQ\\": \\"test-id\\" + \\"id\\": { + \\"eq\\": \\"test-id\\" + } } } } @@ -125,7 +127,9 @@ describe("https://github.com/neo4j/graphql/issues/894", () => { \\"where\\": { \\"node\\": { \\"NOT\\": { - \\"id_EQ\\": \\"test-id\\" + \\"id\\": { + \\"eq\\": \\"test-id\\" + } } } } diff --git a/packages/graphql/tests/tck/issues/901.test.ts b/packages/graphql/tests/tck/issues/901.test.ts index a913f9474c..cb40e4fcb0 100644 --- a/packages/graphql/tests/tck/issues/901.test.ts +++ b/packages/graphql/tests/tck/issues/901.test.ts @@ -64,22 +64,26 @@ describe("https://github.com/neo4j/graphql/issues/901", () => { where: { OR: [ { - manufacturerConnection_SOME: { - edge: { - current_EQ: true, - }, - node: { - name_EQ: "abc", + manufacturerConnection: { + some: { + edge: { + current: { eq: true }, + }, + node: { + name: { eq: "abc" }, + }, }, }, }, { - brandConnection_SOME: { - edge: { - current_EQ: true, - }, - node: { - name_EQ: "smart", + brandConnection: { + some: { + edge: { + current: { eq: true }, + }, + node: { + name: { eq: "smart" }, + }, }, }, }, diff --git a/packages/graphql/tests/tck/issues/988.test.ts b/packages/graphql/tests/tck/issues/988.test.ts index bad4459dd9..0ff5432036 100644 --- a/packages/graphql/tests/tck/issues/988.test.ts +++ b/packages/graphql/tests/tck/issues/988.test.ts @@ -56,7 +56,7 @@ describe("https://github.com/neo4j/graphql/issues/988", () => { test("where with multiple filters and params", async () => { const query = /* GraphQL */ ` - query getSeriesWithRelationFilters($where: SeriesWhere = { current_EQ: true }) { + query getSeriesWithRelationFilters($where: SeriesWhere = { current: { eq: true } }) { series(where: $where) { name current @@ -87,27 +87,31 @@ describe("https://github.com/neo4j/graphql/issues/988", () => { const result = await translateQuery(neoSchema, query, { variableValues: { where: { - current_EQ: true, + current: { eq: true }, AND: [ { OR: [ { - manufacturerConnection_SOME: { - edge: { - current_EQ: true, - }, - node: { - name_EQ: "C", + manufacturerConnection: { + some: { + edge: { + current: { eq: true }, + }, + node: { + name: { eq: "C" }, + }, }, }, }, { - manufacturerConnection_SOME: { - edge: { - current_EQ: false, - }, - node: { - name_EQ: "AM", + manufacturerConnection: { + some: { + edge: { + current: { eq: false }, + }, + node: { + name: { eq: "AM" }, + }, }, }, }, @@ -116,12 +120,14 @@ describe("https://github.com/neo4j/graphql/issues/988", () => { { OR: [ { - brandConnection_SOME: { - edge: { - current_EQ: true, - }, - node: { - name_EQ: "smart", + brandConnection: { + some: { + edge: { + current: { eq: true }, + }, + node: { + name: { eq: "smart" }, + }, }, }, }, diff --git a/packages/graphql/tests/tck/issues/context-variable-not-always-resolved-on-cypher-queries.test.ts b/packages/graphql/tests/tck/issues/context-variable-not-always-resolved-on-cypher-queries.test.ts index 5c551e246a..e009cb61bc 100644 --- a/packages/graphql/tests/tck/issues/context-variable-not-always-resolved-on-cypher-queries.test.ts +++ b/packages/graphql/tests/tck/issues/context-variable-not-always-resolved-on-cypher-queries.test.ts @@ -72,8 +72,10 @@ describe("context-variable-not-always-resolved-on-cypher-queries", () => { query { exprs( where: { - realizationOf_SOME: { - hasResourceType_SOME: { iri_EQ: "http://data.somesite.com/crown/test-id" } + realizationOf: { + some: { + hasResourceType: { some: { iri: { eq: "http://data.somesite.com/crown/test-id" } } } + } } } limit: 1 @@ -122,8 +124,10 @@ describe("context-variable-not-always-resolved-on-cypher-queries", () => { query { exprs( where: { - realizationOf_SOME: { - hasResourceType_SOME: { iri_EQ: "http://data.somesite.com/crown/test-id" } + realizationOf: { + some: { + hasResourceType: { some: { iri: { eq: "http://data.somesite.com/crown/test-id" } } } + } } } limit: 1 @@ -193,8 +197,10 @@ describe("context-variable-not-always-resolved-on-cypher-queries", () => { query { exprs( where: { - realizationOf_SOME: { - hasResourceType_SOME: { iri_EQ: "http://data.somesite.com/crown/test-id" } + realizationOf: { + some: { + hasResourceType: { some: { iri: { eq: "http://data.somesite.com/crown/test-id" } } } + } } } limit: 1 diff --git a/packages/graphql/tests/tck/issues/missing-custom-cypher-on-unions.test.ts b/packages/graphql/tests/tck/issues/missing-custom-cypher-on-unions.test.ts index e1d7163d6f..a19edac239 100644 --- a/packages/graphql/tests/tck/issues/missing-custom-cypher-on-unions.test.ts +++ b/packages/graphql/tests/tck/issues/missing-custom-cypher-on-unions.test.ts @@ -124,7 +124,7 @@ describe("Missing custom Cypher on unions", () => { const query = /* GraphQL */ ` query browseHierarchicalComponents($hierarchicalRootId: ID!, $choNodeIris: [ID!]!) { hierarchicalComponents( - where: { isContained_SOME: { iri_EQ: $hierarchicalRootId }, iri_IN: $choNodeIris } + where: { isContained: { some: { iri: { eq: $hierarchicalRootId } } }, iri: { in: $choNodeIris } } ) { #...hierarchicalComponentFields relatesToChild { diff --git a/packages/graphql/tests/tck/nested-unions.test.ts b/packages/graphql/tests/tck/nested-unions.test.ts index 576ee4d1e1..215115fb8d 100644 --- a/packages/graphql/tests/tck/nested-unions.test.ts +++ b/packages/graphql/tests/tck/nested-unions.test.ts @@ -60,13 +60,13 @@ describe("Nested Unions", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { title_EQ: "Movie" } + where: { title: { eq: "Movie" } } update: { actors: { LeadActor: { connect: { - where: { node: { name_EQ: "Actor" } } - connect: { actedIn: { Series: { where: { node: { name_EQ: "Series" } } } } } + where: { node: { name: { eq: "Actor" } } } + connect: { actedIn: { Series: { where: { node: { name: { eq: "Series" } } } } } } } } } @@ -179,13 +179,13 @@ describe("Nested Unions", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { title_EQ: "Movie" } + where: { title: { eq: "Movie" } } update: { actors: { LeadActor: { disconnect: { - where: { node: { name_EQ: "Actor" } } - disconnect: { actedIn: { Series: { where: { node: { name_EQ: "Series" } } } } } + where: { node: { name: { eq: "Actor" } } } + disconnect: { actedIn: { Series: { where: { node: { name: { eq: "Series" } } } } } } } } } @@ -289,7 +289,9 @@ describe("Nested Unions", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Actor\\" + \\"name\\": { + \\"eq\\": \\"Actor\\" + } } }, \\"disconnect\\": { @@ -298,7 +300,9 @@ describe("Nested Unions", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Series\\" + \\"name\\": { + \\"eq\\": \\"Series\\" + } } } } diff --git a/packages/graphql/tests/tck/null.test.ts b/packages/graphql/tests/tck/null.test.ts index 2747bacb07..db26927426 100644 --- a/packages/graphql/tests/tck/null.test.ts +++ b/packages/graphql/tests/tck/null.test.ts @@ -47,7 +47,7 @@ describe("Cypher NULL", () => { test("Simple IS NULL", async () => { const query = /* GraphQL */ ` query { - movies(where: { title_EQ: null }) { + movies(where: { title: { eq: null } }) { title } } @@ -67,7 +67,7 @@ describe("Cypher NULL", () => { test("Simple IS NOT NULL", async () => { const query = /* GraphQL */ ` query { - movies(where: { NOT: { title_EQ: null } }) { + movies(where: { NOT: { title: { eq: null } } }) { title } } @@ -83,48 +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 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(`"{}"`); - }); }); diff --git a/packages/graphql/tests/tck/operations/batch/batch-create-auth.test.ts b/packages/graphql/tests/tck/operations/batch/batch-create-auth.test.ts index a6f535bcfb..05f27d8ca2 100644 --- a/packages/graphql/tests/tck/operations/batch/batch-create-auth.test.ts +++ b/packages/graphql/tests/tck/operations/batch/batch-create-auth.test.ts @@ -31,7 +31,9 @@ describe("Batch Create, Auth", () => { roles: [String!]! } - type Actor @authorization(validate: [{ when: [BEFORE], where: { node: { id_EQ: "$jwt.sub" } } }]) @node { + type Actor + @authorization(validate: [{ when: [BEFORE], where: { node: { id: { eq: "$jwt.sub" } } } }]) + @node { id: ID! @id name: String website: [Website!]! @relationship(type: "HAS_WEBSITE", direction: OUT) @@ -41,7 +43,7 @@ describe("Batch Create, Auth", () => { type Movie @node @authorization( - validate: [{ operations: [CREATE, UPDATE], where: { jwt: { roles_INCLUDES: "admin" } } }] + validate: [{ operations: [CREATE, UPDATE], where: { jwt: { roles: { includes: "admin" } } } }] ) { id: ID website: [Website!]! @relationship(type: "HAS_WEBSITE", direction: OUT) diff --git a/packages/graphql/tests/tck/operations/batch/batch-create-interface.test.ts b/packages/graphql/tests/tck/operations/batch/batch-create-interface.test.ts index ffb715e710..2ba63f4b2c 100644 --- a/packages/graphql/tests/tck/operations/batch/batch-create-interface.test.ts +++ b/packages/graphql/tests/tck/operations/batch/batch-create-interface.test.ts @@ -240,7 +240,7 @@ describe("Batch Create, Interface", () => { } } { id: "3", website: { create: { node: { address: "mywebsite.com" } } } } - { id: "4", workers: { connect: { where: { node: { id_EQ: "2" } } } } } + { id: "4", workers: { connect: { where: { node: { id: { eq: "2" } } } } } } ] ) { movies { diff --git a/packages/graphql/tests/tck/operations/batch/batch-create.test.ts b/packages/graphql/tests/tck/operations/batch/batch-create.test.ts index 49d1f138ff..f12d964b32 100644 --- a/packages/graphql/tests/tck/operations/batch/batch-create.test.ts +++ b/packages/graphql/tests/tck/operations/batch/batch-create.test.ts @@ -316,8 +316,8 @@ describe("Batch Create", () => { mutation { createMovies( input: [ - { id: "1", actors: { connect: { where: { node: { id_EQ: "3" } } } } } - { id: "2", actors: { connect: { where: { node: { id_EQ: "4" } } } } } + { id: "1", actors: { connect: { where: { node: { id: { eq: "3" } } } } } } + { id: "2", actors: { connect: { where: { node: { id: { eq: "4" } } } } } } ] ) { movies { diff --git a/packages/graphql/tests/tck/operations/connect.test.ts b/packages/graphql/tests/tck/operations/connect.test.ts index 8c701c1400..34af2f891c 100644 --- a/packages/graphql/tests/tck/operations/connect.test.ts +++ b/packages/graphql/tests/tck/operations/connect.test.ts @@ -69,12 +69,12 @@ describe("Cypher Connect", () => { colors: { connect: [ { - where: { node: { name_EQ: "Red" } } + where: { node: { name: { eq: "Red" } } } connect: { photos: [ { - where: { node: { id_EQ: "123" } } - connect: { color: { where: { node: { id_EQ: "134" } } } } + where: { node: { id: { eq: "123" } } } + connect: { color: { where: { node: { id: { eq: "134" } } } } } } ] } @@ -84,12 +84,12 @@ describe("Cypher Connect", () => { photos: { connect: [ { - where: { node: { id_EQ: "321" } } - connect: { color: { where: { node: { name_EQ: "Green" } } } } + where: { node: { id: { eq: "321" } } } + connect: { color: { where: { node: { name: { eq: "Green" } } } } } } { - where: { node: { id_EQ: "33211" } } - connect: { color: { where: { node: { name_EQ: "Red" } } } } + where: { node: { id: { eq: "33211" } } } + connect: { color: { where: { node: { name: { eq: "Red" } } } } } } ] } diff --git a/packages/graphql/tests/tck/operations/create.test.ts b/packages/graphql/tests/tck/operations/create.test.ts index 118243b809..f655935fea 100644 --- a/packages/graphql/tests/tck/operations/create.test.ts +++ b/packages/graphql/tests/tck/operations/create.test.ts @@ -302,7 +302,7 @@ describe("Cypher Create", () => { test("Simple create and connect", async () => { const query = /* GraphQL */ ` mutation { - createMovies(input: [{ id: 1, actors: { connect: [{ where: { node: { name_EQ: "Dan" } } }] } }]) { + createMovies(input: [{ id: 1, actors: { connect: [{ where: { node: { name: { eq: "Dan" } } } }] } }]) { movies { id } @@ -355,11 +355,11 @@ describe("Cypher Create", () => { test("Simple create -> relationship field -> connection(where)", async () => { const query = /* GraphQL */ ` mutation { - createActors(input: { name: "Dan", movies: { connect: { where: { node: { id_EQ: 1 } } } } }) { + createActors(input: { name: "Dan", movies: { connect: { where: { node: { id: { eq: 1 } } } } } }) { actors { name movies { - actorsConnection(where: { node: { name_EQ: "Dan" } }) { + actorsConnection(where: { node: { name: { eq: "Dan" } } }) { totalCount edges { node { diff --git a/packages/graphql/tests/tck/operations/delete-interface.test.ts b/packages/graphql/tests/tck/operations/delete-interface.test.ts index f835c3743e..4ede68572b 100644 --- a/packages/graphql/tests/tck/operations/delete-interface.test.ts +++ b/packages/graphql/tests/tck/operations/delete-interface.test.ts @@ -80,7 +80,7 @@ describe("Cypher Delete - interface", () => { test("Simple Delete", async () => { const query = /* GraphQL */ ` mutation { - deleteActors(where: { name_EQ: "Keanu" }) { + deleteActors(where: { name: { eq: "Keanu" } }) { nodesDeleted } } @@ -105,8 +105,8 @@ describe("Cypher Delete - interface", () => { const query = /* GraphQL */ ` mutation { deleteActors( - where: { name_EQ: "Keanu" } - delete: { actedIn: { where: { node: { title_EQ: "Matrix" } } } } + where: { name: { eq: "Keanu" } } + delete: { actedIn: { where: { node: { title: { eq: "Matrix" } } } } } ) { nodesDeleted } @@ -158,8 +158,8 @@ describe("Cypher Delete - interface", () => { const query = /* GraphQL */ ` mutation { deleteActors( - where: { name_EQ: "Keanu" } - delete: { actedIn: { where: { node: { typename_IN: [Movie], title_EQ: "Matrix" } } } } + where: { name: { eq: "Keanu" } } + delete: { actedIn: { where: { node: { typename: [Movie], title: { eq: "Matrix" } } } } } ) { nodesDeleted } @@ -211,9 +211,11 @@ describe("Cypher Delete - interface", () => { const query = /* GraphQL */ ` mutation { deleteActors( - where: { name_EQ: "Keanu" } + where: { name: { eq: "Keanu" } } delete: { - actedIn: { where: { node: { OR: [{ title_EQ: "Matrix" }, { title_EQ: "Matrix Reloaded" }] } } } + actedIn: { + where: { node: { OR: [{ title: { eq: "Matrix" } }, { title: { eq: "Matrix Reloaded" } }] } } + } } ) { nodesDeleted @@ -268,11 +270,11 @@ describe("Cypher Delete - interface", () => { const query = /* GraphQL */ ` mutation { deleteActors( - where: { name_EQ: "Keanu" } + where: { name: { eq: "Keanu" } } delete: { actedIn: { - where: { node: { title_EQ: "Matrix" } } - delete: { actors: { where: { node: { name_EQ: "Gloria Foster" } } } } + where: { node: { title: { eq: "Matrix" } } } + delete: { actors: { where: { node: { name: { eq: "Gloria Foster" } } } } } } } ) { diff --git a/packages/graphql/tests/tck/operations/delete-union.test.ts b/packages/graphql/tests/tck/operations/delete-union.test.ts index 5e0ce8ba80..87df91024a 100644 --- a/packages/graphql/tests/tck/operations/delete-union.test.ts +++ b/packages/graphql/tests/tck/operations/delete-union.test.ts @@ -75,7 +75,7 @@ describe("Cypher Delete - union", () => { test("Simple Delete", async () => { const query = /* GraphQL */ ` mutation { - deleteActors(where: { name_EQ: "Keanu" }) { + deleteActors(where: { name: { eq: "Keanu" } }) { nodesDeleted } } @@ -100,8 +100,8 @@ describe("Cypher Delete - union", () => { const query = /* GraphQL */ ` mutation { deleteActors( - where: { name_EQ: "Keanu" } - delete: { actedIn: { Movie: { where: { node: { title_EQ: "Matrix" } } } } } + where: { name: { eq: "Keanu" } } + delete: { actedIn: { Movie: { where: { node: { title: { eq: "Matrix" } } } } } } ) { nodesDeleted } @@ -141,12 +141,12 @@ describe("Cypher Delete - union", () => { const query = /* GraphQL */ ` mutation { deleteActors( - where: { name_EQ: "Keanu" } + where: { name: { eq: "Keanu" } } delete: { actedIn: { Movie: [ - { where: { node: { title_EQ: "Matrix" } } } - { where: { node: { title_EQ: "Matrix Reloaded" } } } + { where: { node: { title: { eq: "Matrix" } } } } + { where: { node: { title: { eq: "Matrix Reloaded" } } } } ] } } @@ -201,12 +201,12 @@ describe("Cypher Delete - union", () => { const query = /* GraphQL */ ` mutation { deleteActors( - where: { name_EQ: "Keanu" } + where: { name: { eq: "Keanu" } } delete: { actedIn: { Movie: { - where: { node: { title_EQ: "Matrix" } } - delete: { actors: { where: { node: { name_EQ: "Gloria Foster" } } } } + where: { node: { title: { eq: "Matrix" } } } + delete: { actors: { where: { node: { name: { eq: "Gloria Foster" } } } } } } } } @@ -262,12 +262,14 @@ describe("Cypher Delete - union", () => { const query = /* GraphQL */ ` mutation { deleteActors( - where: { name_EQ: "Keanu" } + where: { name: { eq: "Keanu" } } delete: { actedIn: { Movie: { - where: { node: { title_EQ: "Matrix" } } - delete: { workers: { ScreenWriter: { where: { node: { name_EQ: "Wachowski" } } } } } + where: { node: { title: { eq: "Matrix" } } } + delete: { + workers: { ScreenWriter: { where: { node: { name: { eq: "Wachowski" } } } } } + } } } } diff --git a/packages/graphql/tests/tck/operations/delete.test.ts b/packages/graphql/tests/tck/operations/delete.test.ts index 0ca51b5d22..b8180c4dc2 100644 --- a/packages/graphql/tests/tck/operations/delete.test.ts +++ b/packages/graphql/tests/tck/operations/delete.test.ts @@ -46,7 +46,7 @@ describe("Cypher Delete", () => { test("Simple Delete", async () => { const query = /* GraphQL */ ` mutation { - deleteMovies(where: { id_EQ: "123" }) { + deleteMovies(where: { id: { eq: "123" } }) { nodesDeleted } } @@ -70,7 +70,10 @@ describe("Cypher Delete", () => { test("Single Nested Delete", async () => { const query = /* GraphQL */ ` mutation { - deleteMovies(where: { id_EQ: 123 }, delete: { actors: { where: { node: { name_EQ: "Actor to delete" } } } }) { + deleteMovies( + where: { id: { eq: 123 } } + delete: { actors: { where: { node: { name: { eq: "Actor to delete" } } } } } + ) { nodesDeleted } } @@ -109,11 +112,11 @@ describe("Cypher Delete", () => { const query = /* GraphQL */ ` mutation { deleteMovies( - where: { id_EQ: 123 } + where: { id: { eq: 123 } } delete: { actors: [ - { where: { node: { name_EQ: "Actor to delete" } } } - { where: { node: { name_EQ: "Another actor to delete" } } } + { where: { node: { name: { eq: "Actor to delete" } } } } + { where: { node: { name: { eq: "Another actor to delete" } } } } ] } ) { @@ -167,11 +170,11 @@ describe("Cypher Delete", () => { const query = /* GraphQL */ ` mutation { deleteMovies( - where: { id_EQ: 123 } + where: { id: { eq: 123 } } delete: { actors: { - where: { node: { name_EQ: "Actor to delete" } } - delete: { movies: { where: { node: { id_EQ: 321 } } } } + where: { node: { name: { eq: "Actor to delete" } } } + delete: { movies: { where: { node: { id: { eq: 321 } } } } } } } ) { @@ -226,14 +229,14 @@ describe("Cypher Delete", () => { const query = /* GraphQL */ ` mutation { deleteMovies( - where: { id_EQ: 123 } + where: { id: { eq: 123 } } delete: { actors: { - where: { node: { name_EQ: "Actor to delete" } } + where: { node: { name: { eq: "Actor to delete" } } } delete: { movies: { - where: { node: { id_EQ: 321 } } - delete: { actors: { where: { node: { name_EQ: "Another actor to delete" } } } } + where: { node: { id: { eq: 321 } } } + delete: { actors: { where: { node: { name: { eq: "Another actor to delete" } } } } } } } } diff --git a/packages/graphql/tests/tck/operations/disconnect.test.ts b/packages/graphql/tests/tck/operations/disconnect.test.ts index 459da7a089..e6be30639d 100644 --- a/packages/graphql/tests/tck/operations/disconnect.test.ts +++ b/packages/graphql/tests/tck/operations/disconnect.test.ts @@ -68,12 +68,12 @@ describe("Cypher Disconnect", () => { colors: { disconnect: [ { - where: { node: { name_EQ: "Red" } } + where: { node: { name: { eq: "Red" } } } disconnect: { photos: [ { - where: { node: { id_EQ: "123" } } - disconnect: { color: { where: { node: { id_EQ: "134" } } } } + where: { node: { id: { eq: "123" } } } + disconnect: { color: { where: { node: { id: { eq: "134" } } } } } } ] } @@ -83,12 +83,12 @@ describe("Cypher Disconnect", () => { photos: { disconnect: [ { - where: { node: { id_EQ: "321" } } - disconnect: { color: { where: { node: { name_EQ: "Green" } } } } + where: { node: { id: { eq: "321" } } } + disconnect: { color: { where: { node: { name: { eq: "Green" } } } } } } { - where: { node: { id_EQ: "33211" } } - disconnect: { color: { where: { node: { name_EQ: "Red" } } } } + where: { node: { id: { eq: "33211" } } } + disconnect: { color: { where: { node: { name: { eq: "Red" } } } } } } ] } @@ -219,7 +219,9 @@ describe("Cypher Disconnect", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Red\\" + \\"name\\": { + \\"eq\\": \\"Red\\" + } } }, \\"disconnect\\": { @@ -227,7 +229,9 @@ describe("Cypher Disconnect", () => { { \\"where\\": { \\"node\\": { - \\"id_EQ\\": \\"123\\" + \\"id\\": { + \\"eq\\": \\"123\\" + } } }, \\"disconnect\\": { @@ -235,7 +239,9 @@ describe("Cypher Disconnect", () => { { \\"where\\": { \\"node\\": { - \\"id_EQ\\": \\"134\\" + \\"id\\": { + \\"eq\\": \\"134\\" + } } } } @@ -254,7 +260,9 @@ describe("Cypher Disconnect", () => { { \\"where\\": { \\"node\\": { - \\"id_EQ\\": \\"321\\" + \\"id\\": { + \\"eq\\": \\"321\\" + } } }, \\"disconnect\\": { @@ -262,7 +270,9 @@ describe("Cypher Disconnect", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Green\\" + \\"name\\": { + \\"eq\\": \\"Green\\" + } } } } @@ -272,7 +282,9 @@ describe("Cypher Disconnect", () => { { \\"where\\": { \\"node\\": { - \\"id_EQ\\": \\"33211\\" + \\"id\\": { + \\"eq\\": \\"33211\\" + } } }, \\"disconnect\\": { @@ -280,7 +292,9 @@ describe("Cypher Disconnect", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Red\\" + \\"name\\": { + \\"eq\\": \\"Red\\" + } } } } diff --git a/packages/graphql/tests/tck/operations/update.test.ts b/packages/graphql/tests/tck/operations/update.test.ts index ac9a1a2ab2..e2fdc29efc 100644 --- a/packages/graphql/tests/tck/operations/update.test.ts +++ b/packages/graphql/tests/tck/operations/update.test.ts @@ -50,7 +50,7 @@ describe("Cypher Update", () => { test("Simple Update", async () => { const query = /* GraphQL */ ` mutation { - updateMovies(where: { id_EQ: "1" }, update: { id_SET: "2" }) { + updateMovies(where: { id: { eq: "1" } }, update: { id_SET: "2" }) { movies { id } @@ -80,10 +80,13 @@ describe("Cypher Update", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { id_EQ: "1" } + where: { id: { eq: "1" } } update: { actors: [ - { where: { node: { name_EQ: "old name" } }, update: { node: { name_SET: "new name" } } } + { + where: { node: { name: { eq: "old name" } } } + update: { node: { name_SET: "new name" } } + } ] } ) { @@ -122,7 +125,9 @@ describe("Cypher Update", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"old name\\" + \\"name\\": { + \\"eq\\": \\"old name\\" + } } }, \\"update\\": { @@ -144,17 +149,17 @@ describe("Cypher Update", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { id_EQ: "1" } + where: { id: { eq: "1" } } update: { actors: [ { - where: { node: { name_EQ: "old actor name" } } + where: { node: { name: { eq: "old actor name" } } } update: { node: { name_SET: "new actor name" movies: [ { - where: { node: { id_EQ: "old movie title" } } + where: { node: { id: { eq: "old movie title" } } } update: { node: { title_SET: "new movie title" } } } ] @@ -209,7 +214,9 @@ describe("Cypher Update", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"old actor name\\" + \\"name\\": { + \\"eq\\": \\"old actor name\\" + } } }, \\"update\\": { @@ -219,7 +226,9 @@ describe("Cypher Update", () => { { \\"where\\": { \\"node\\": { - \\"id_EQ\\": \\"old movie title\\" + \\"id\\": { + \\"eq\\": \\"old movie title\\" + } } }, \\"update\\": { @@ -245,8 +254,8 @@ describe("Cypher Update", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { id_EQ: "1" } - update: { actors: { connect: [{ where: { node: { name_EQ: "Daniel" } } }] } } + where: { id: { eq: "1" } } + update: { actors: { connect: [{ where: { node: { name: { eq: "Daniel" } } } }] } } ) { movies { id @@ -294,12 +303,12 @@ describe("Cypher Update", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { id_EQ: "1" } + where: { id: { eq: "1" } } update: { actors: { connect: [ - { where: { node: { name_EQ: "Daniel" } } } - { where: { node: { name_EQ: "Darrell" } } } + { where: { node: { name: { eq: "Daniel" } } } } + { where: { node: { name: { eq: "Darrell" } } } } ] } } @@ -369,8 +378,8 @@ describe("Cypher Update", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { id_EQ: "1" } - update: { actors: { disconnect: [{ where: { node: { name_EQ: "Daniel" } } }] } } + where: { id: { eq: "1" } } + update: { actors: { disconnect: [{ where: { node: { name: { eq: "Daniel" } } } }] } } ) { movies { id @@ -413,7 +422,9 @@ describe("Cypher Update", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Daniel\\" + \\"name\\": { + \\"eq\\": \\"Daniel\\" + } } } } @@ -432,12 +443,12 @@ describe("Cypher Update", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { id_EQ: "1" } + where: { id: { eq: "1" } } update: { actors: { disconnect: [ - { where: { node: { name_EQ: "Daniel" } } } - { where: { node: { name_EQ: "Darrell" } } } + { where: { node: { name: { eq: "Daniel" } } } } + { where: { node: { name: { eq: "Darrell" } } } } ] } } @@ -497,14 +508,18 @@ describe("Cypher Update", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Daniel\\" + \\"name\\": { + \\"eq\\": \\"Daniel\\" + } } } }, { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Darrell\\" + \\"name\\": { + \\"eq\\": \\"Darrell\\" + } } } } @@ -523,7 +538,7 @@ describe("Cypher Update", () => { const query = /* GraphQL */ ` mutation { updateActors( - where: { name_EQ: "Dan" } + where: { name: { eq: "Dan" } } update: { movies: { create: [{ node: { id: "dan_movie_id", title: "The Story of Beer" } }] } } ) { actors { @@ -571,7 +586,7 @@ describe("Cypher Update", () => { const query = /* GraphQL */ ` mutation { updateActors( - where: { name_EQ: "Dan" } + where: { name: { eq: "Dan" } } update: { movies: { create: [{ node: { id: "dan_movie_id", title: "The Story of Beer" } }] } } ) { actors { @@ -619,7 +634,7 @@ describe("Cypher Update", () => { const query = /* GraphQL */ ` mutation { updateActors( - where: { name_EQ: "Dan" } + where: { name: { eq: "Dan" } } update: { movies: { create: [ @@ -680,10 +695,12 @@ describe("Cypher Update", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { id_EQ: "1" } + where: { id: { eq: "1" } } update: { actors: { - delete: { where: { node: { name_EQ: "Actor to delete" }, edge: { screenTime_EQ: 60 } } } + delete: { + where: { node: { name: { eq: "Actor to delete" } }, edge: { screenTime: { eq: 60 } } } + } } } ) { @@ -731,12 +748,16 @@ describe("Cypher Update", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Actor to delete\\" + \\"name\\": { + \\"eq\\": \\"Actor to delete\\" + } }, \\"edge\\": { - \\"screenTime_EQ\\": { - \\"low\\": 60, - \\"high\\": 0 + \\"screenTime\\": { + \\"eq\\": { + \\"low\\": 60, + \\"high\\": 0 + } } } } @@ -756,12 +777,12 @@ describe("Cypher Update", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { id_EQ: "1" } + where: { id: { eq: "1" } } update: { actors: { - where: { node: { name_EQ: "Actor to update" } } + where: { node: { name: { eq: "Actor to update" } } } update: { node: { name_SET: "Updated name" } } - delete: { where: { node: { name_EQ: "Actor to delete" } } } + delete: { where: { node: { name: { eq: "Actor to delete" } } } } } } ) { @@ -813,7 +834,9 @@ describe("Cypher Update", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Actor to update\\" + \\"name\\": { + \\"eq\\": \\"Actor to update\\" + } } }, \\"update\\": { @@ -825,7 +848,9 @@ describe("Cypher Update", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Actor to delete\\" + \\"name\\": { + \\"eq\\": \\"Actor to delete\\" + } } } } @@ -844,8 +869,8 @@ describe("Cypher Update", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { id_EQ: "1" } - update: { actors: { delete: { where: { node: { name_EQ: "Actor to delete" } } } } } + where: { id: { eq: "1" } } + update: { actors: { delete: { where: { node: { name: { eq: "Actor to delete" } } } } } } ) { movies { id @@ -887,7 +912,9 @@ describe("Cypher Update", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Actor to delete\\" + \\"name\\": { + \\"eq\\": \\"Actor to delete\\" + } } } } @@ -906,12 +933,12 @@ describe("Cypher Update", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { id_EQ: "1" } + where: { id: { eq: "1" } } update: { actors: { delete: { - where: { node: { name_EQ: "Actor to delete" } } - delete: { movies: { where: { node: { id_EQ: "2" } } } } + where: { node: { name: { eq: "Actor to delete" } } } + delete: { movies: { where: { node: { id: { eq: "2" } } } } } } } } @@ -969,7 +996,9 @@ describe("Cypher Update", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Actor to delete\\" + \\"name\\": { + \\"eq\\": \\"Actor to delete\\" + } } }, \\"delete\\": { @@ -977,7 +1006,9 @@ describe("Cypher Update", () => { { \\"where\\": { \\"node\\": { - \\"id_EQ\\": \\"2\\" + \\"id\\": { + \\"eq\\": \\"2\\" + } } } } diff --git a/packages/graphql/tests/tck/pagination.test.ts b/packages/graphql/tests/tck/pagination.test.ts index 5c7a0ea7e7..74b00c78c9 100644 --- a/packages/graphql/tests/tck/pagination.test.ts +++ b/packages/graphql/tests/tck/pagination.test.ts @@ -164,7 +164,7 @@ describe("Cypher pagination tests", () => { test("Skip + Limit with other variables", async () => { const query = /* GraphQL */ ` query ($offset: Int, $limit: Int, $title: String) { - movies(limit: $limit, offset: $offset, where: { title_EQ: $title }) { + movies(limit: $limit, offset: $offset, where: { title: { eq: $title } }) { title } } diff --git a/packages/graphql/tests/tck/pagination/cypher-connection-pagination.test.ts b/packages/graphql/tests/tck/pagination/cypher-connection-pagination.test.ts index 92395c2975..f6df0479f9 100644 --- a/packages/graphql/tests/tck/pagination/cypher-connection-pagination.test.ts +++ b/packages/graphql/tests/tck/pagination/cypher-connection-pagination.test.ts @@ -239,7 +239,7 @@ describe("Cypher Connection pagination", () => { sort: [{ numberOfActors: DESC }, { title: ASC }] first: 10 after: "some-cursor" - where: { title_EQ: "The Matrix" } + where: { title: { eq: "The Matrix" } } ) { edges { cursor diff --git a/packages/graphql/tests/tck/pagination/cypher-pagination.test.ts b/packages/graphql/tests/tck/pagination/cypher-pagination.test.ts index 170178e016..0f09b63402 100644 --- a/packages/graphql/tests/tck/pagination/cypher-pagination.test.ts +++ b/packages/graphql/tests/tck/pagination/cypher-pagination.test.ts @@ -199,7 +199,7 @@ describe("Cypher Sort tests", () => { sort: [{ numberOfActors: DESC }, { title: ASC }] offset: 10 limit: 10 - where: { title_EQ: "The Matrix" } + where: { title: { eq: "The Matrix" } } ) { id title diff --git a/packages/graphql/tests/tck/pringles.test.ts b/packages/graphql/tests/tck/pringles.test.ts index c7ac212dd4..7077e17a72 100644 --- a/packages/graphql/tests/tck/pringles.test.ts +++ b/packages/graphql/tests/tck/pringles.test.ts @@ -80,7 +80,7 @@ describe("Cypher Create Pringles", () => { id: 106 description: "Green photo" url: "g.png" - color: { connect: { where: { node: { id_EQ: "102" } } } } + color: { connect: { where: { node: { id: { eq: "102" } } } } } } } { @@ -88,7 +88,7 @@ describe("Cypher Create Pringles", () => { id: 107 description: "Red photo" url: "r.png" - color: { connect: { where: { node: { id_EQ: "100" } } } } + color: { connect: { where: { node: { id: { eq: "100" } } } } } } } ] @@ -225,17 +225,17 @@ describe("Cypher Create Pringles", () => { const query = /* GraphQL */ ` mutation { updateProducts( - where: { name_EQ: "Pringles" } + where: { name: { eq: "Pringles" } } update: { photos: [ { - where: { node: { description_EQ: "Green Photo" } } + where: { node: { description: { eq: "Green Photo" } } } update: { node: { description_SET: "Light Green Photo" color: { - connect: { where: { node: { name_EQ: "Light Green" } } } - disconnect: { where: { node: { name_EQ: "Green" } } } + connect: { where: { node: { name: { eq: "Light Green" } } } } + disconnect: { where: { node: { name: { eq: "Green" } } } } } } } @@ -311,7 +311,9 @@ describe("Cypher Create Pringles", () => { { \\"where\\": { \\"node\\": { - \\"description_EQ\\": \\"Green Photo\\" + \\"description\\": { + \\"eq\\": \\"Green Photo\\" + } } }, \\"update\\": { @@ -323,7 +325,9 @@ describe("Cypher Create Pringles", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Light Green\\" + \\"name\\": { + \\"eq\\": \\"Light Green\\" + } } } } @@ -332,7 +336,9 @@ describe("Cypher Create Pringles", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Green\\" + \\"name\\": { + \\"eq\\": \\"Green\\" + } } } } diff --git a/packages/graphql/tests/tck/projection.test.ts b/packages/graphql/tests/tck/projection.test.ts index eae6466ffe..2f8ff2289b 100644 --- a/packages/graphql/tests/tck/projection.test.ts +++ b/packages/graphql/tests/tck/projection.test.ts @@ -65,7 +65,7 @@ describe("Cypher Projection", () => { createProducts(input: [{ id: "1" }, { id: "2" }]) { products { id - photos(where: { url_EQ: "url.com" }) { + photos(where: { url: { eq: "url.com" } }) { url location { latitude @@ -73,10 +73,10 @@ describe("Cypher Projection", () => { height } } - colors(where: { id_EQ: 123 }) { + colors(where: { id: { eq: 123 } }) { id } - sizes(where: { name_EQ: "small" }) { + sizes(where: { name: { eq: "small" } }) { name } } diff --git a/packages/graphql/tests/tck/rfcs/rfc-022.test.ts b/packages/graphql/tests/tck/rfcs/rfc-022.test.ts index b2b2a8ae3c..8766f0e673 100644 --- a/packages/graphql/tests/tck/rfcs/rfc-022.test.ts +++ b/packages/graphql/tests/tck/rfcs/rfc-022.test.ts @@ -54,9 +54,9 @@ describe("tck/rfs/022 subquery projection", () => { test("Nested query", async () => { const query = /* GraphQL */ ` query Query { - movies(where: { released_EQ: 1999 }) { + movies(where: { released: { eq: 1999 } }) { title - actors(where: { name_EQ: "Keanu Reeves" }) { + actors(where: { name: { eq: "Keanu Reeves" } }) { name } } @@ -92,9 +92,9 @@ describe("tck/rfs/022 subquery projection", () => { test("Double nested query", async () => { const query = /* GraphQL */ ` query Query { - movies(where: { released_EQ: 1999 }) { + movies(where: { released: { eq: 1999 } }) { title - actors(where: { name_EQ: "Keanu Reeves" }) { + actors(where: { name: { eq: "Keanu Reeves" } }) { name directed { title @@ -154,9 +154,12 @@ describe("tck/rfs/022 subquery projection", () => { type Person @node @authorization( - filter: [{ where: { node: { name_EQ: "The Matrix" } } }] + filter: [{ where: { node: { name: { eq: "The Matrix" } } } }] validate: [ - { when: [BEFORE], where: { node: { name_EQ: "$jwt.test" }, jwt: { roles_INCLUDES: "admin" } } } + { + when: [BEFORE] + where: { node: { name: { eq: "$jwt.test" } }, jwt: { roles: { includes: "admin" } } } + } ] ) { name: String! @@ -177,9 +180,9 @@ describe("tck/rfs/022 subquery projection", () => { test("Nested query", async () => { const query = /* GraphQL */ ` query Query { - movies(where: { released_EQ: 1999 }) { + movies(where: { released: { eq: 1999 } }) { title - actors(where: { name_EQ: "Keanu Reeves" }) { + actors(where: { name: { eq: "Keanu Reeves" } }) { name } } diff --git a/packages/graphql/tests/tck/root-connection.test.ts b/packages/graphql/tests/tck/root-connection.test.ts index b3fac7a5dc..89c3c68321 100644 --- a/packages/graphql/tests/tck/root-connection.test.ts +++ b/packages/graphql/tests/tck/root-connection.test.ts @@ -46,7 +46,7 @@ describe("Root Connection Query tests", () => { test("Simple selection, Movie by title", async () => { const query = /* GraphQL */ ` { - moviesConnection(where: { title_EQ: "River Runs Through It, A" }) { + moviesConnection(where: { title: { eq: "River Runs Through It, A" } }) { totalCount edges { node { diff --git a/packages/graphql/tests/tck/simple.test.ts b/packages/graphql/tests/tck/simple.test.ts index 40c0066096..c9f1f7bbc1 100644 --- a/packages/graphql/tests/tck/simple.test.ts +++ b/packages/graphql/tests/tck/simple.test.ts @@ -40,7 +40,7 @@ describe("Simple Cypher tests", () => { test("Single selection, Movie by title", async () => { const query = /* GraphQL */ ` { - movies(where: { title_EQ: "River Runs Through It, A" }) { + movies(where: { title: { eq: "River Runs Through It, A" } }) { title } } @@ -64,7 +64,7 @@ describe("Simple Cypher tests", () => { test("Multi selection, Movie by title", async () => { const query = /* GraphQL */ ` { - movies(where: { title_EQ: "River Runs Through It, A" }) { + movies(where: { title: { eq: "River Runs Through It, A" } }) { id title } @@ -89,7 +89,7 @@ describe("Simple Cypher tests", () => { test("Multi selection, Movie by title via variable", async () => { const query = /* GraphQL */ ` query ($title: String) { - movies(where: { title_EQ: $title }) { + movies(where: { title: { eq: $title } }) { id title } diff --git a/packages/graphql/tests/tck/subscriptions/create-auth.test.ts b/packages/graphql/tests/tck/subscriptions/create-auth.test.ts index 60be4d6642..18a0a3f8a6 100644 --- a/packages/graphql/tests/tck/subscriptions/create-auth.test.ts +++ b/packages/graphql/tests/tck/subscriptions/create-auth.test.ts @@ -38,7 +38,7 @@ describe("Subscriptions metadata on create", () => { actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) } - extend type Actor @authorization(validate: [{ when: [AFTER], where: { node: { id_EQ: "$jwt.sub" } } }]) + extend type Actor @authorization(validate: [{ when: [AFTER], where: { node: { id: { eq: "$jwt.sub" } } } }]) `; neoSchema = new Neo4jGraphQL({ diff --git a/packages/graphql/tests/tck/subscriptions/delete.test.ts b/packages/graphql/tests/tck/subscriptions/delete.test.ts index d4db531e51..05463b717e 100644 --- a/packages/graphql/tests/tck/subscriptions/delete.test.ts +++ b/packages/graphql/tests/tck/subscriptions/delete.test.ts @@ -49,7 +49,7 @@ describe("Subscriptions metadata on delete", () => { test("Simple delete", async () => { const query = /* GraphQL */ ` mutation { - deleteMovies(where: { id_EQ: "1" }) { + deleteMovies(where: { id: { eq: "1" } }) { nodesDeleted } } @@ -73,7 +73,10 @@ describe("Subscriptions metadata on delete", () => { test("Nested delete", async () => { const query = /* GraphQL */ ` mutation { - deleteMovies(where: { id_EQ: "1" }, delete: { actors: { where: { node: { name_EQ: "1" } } } }) { + deleteMovies( + where: { id: { eq: "1" } } + delete: { actors: { where: { node: { name: { eq: "1" } } } } } + ) { nodesDeleted } } @@ -111,14 +114,14 @@ describe("Subscriptions metadata on delete", () => { const query = /* GraphQL */ ` mutation { deleteMovies( - where: { id_EQ: 123 } + where: { id: { eq: 123 } } delete: { actors: { - where: { node: { name_EQ: "Actor to delete" } } + where: { node: { name: { eq: "Actor to delete" } } } delete: { movies: { - where: { node: { id_EQ: 321 } } - delete: { actors: { where: { node: { name_EQ: "Another actor to delete" } } } } + where: { node: { id: { eq: 321 } } } + delete: { actors: { where: { node: { name: { eq: "Another actor to delete" } } } } } } } } diff --git a/packages/graphql/tests/tck/subscriptions/update.test.ts b/packages/graphql/tests/tck/subscriptions/update.test.ts index 16e377daa9..0c5c6e51ef 100644 --- a/packages/graphql/tests/tck/subscriptions/update.test.ts +++ b/packages/graphql/tests/tck/subscriptions/update.test.ts @@ -49,7 +49,7 @@ describe("Subscriptions metadata on update", () => { test("Simple update with subscriptions", async () => { const query = /* GraphQL */ ` mutation { - updateMovies(where: { id_EQ: "1" }, update: { id_SET: "2" }) { + updateMovies(where: { id: { eq: "1" } }, update: { id_SET: "2" }) { movies { id } @@ -79,10 +79,12 @@ describe("Subscriptions metadata on update", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { id_EQ: "1" } + where: { id: { eq: "1" } } update: { id_SET: "2" - actors: [{ where: { node: { name_EQ: "arthur" } }, update: { node: { name_SET: "ford" } } }] + actors: [ + { where: { node: { name: { eq: "arthur" } } }, update: { node: { name_SET: "ford" } } } + ] } ) { movies { @@ -123,7 +125,9 @@ describe("Subscriptions metadata on update", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"arthur\\" + \\"name\\": { + \\"eq\\": \\"arthur\\" + } } }, \\"update\\": { diff --git a/packages/graphql/tests/tck/types/bigint.test.ts b/packages/graphql/tests/tck/types/bigint.test.ts index 3e07ead095..83a2ab7403 100644 --- a/packages/graphql/tests/tck/types/bigint.test.ts +++ b/packages/graphql/tests/tck/types/bigint.test.ts @@ -40,7 +40,7 @@ describe("Cypher BigInt", () => { test("Querying with native BigInt in AST", async () => { const query = /* GraphQL */ ` query { - files(where: { size_EQ: 9223372036854775807 }) { + files(where: { size: { eq: 9223372036854775807 } }) { name } } @@ -67,7 +67,7 @@ describe("Cypher BigInt", () => { test("Querying with BigInt as string in AST", async () => { const query = /* GraphQL */ ` query { - files(where: { size_EQ: "9223372036854775807" }) { + files(where: { size: { eq: "9223372036854775807" } }) { name } } @@ -94,7 +94,7 @@ describe("Cypher BigInt", () => { test("Querying with BigInt as string in variables", async () => { const query = /* GraphQL */ ` query Files($size: BigInt) { - files(where: { size_EQ: $size }) { + files(where: { size: { eq: $size } }) { name } } diff --git a/packages/graphql/tests/tck/types/date.test.ts b/packages/graphql/tests/tck/types/date.test.ts index ceba74c061..7720a88554 100644 --- a/packages/graphql/tests/tck/types/date.test.ts +++ b/packages/graphql/tests/tck/types/date.test.ts @@ -40,7 +40,7 @@ describe("Cypher Date", () => { test("Simple Read", async () => { const query = /* GraphQL */ ` query { - movies(where: { date_EQ: "1970-01-01" }) { + movies(where: { date: { eq: "1970-01-01" } }) { date } } @@ -68,7 +68,7 @@ describe("Cypher Date", () => { test("GTE Read", async () => { const query = /* GraphQL */ ` query { - movies(where: { date_GTE: "1980-04-08" }) { + movies(where: { date: { gte: "1980-04-08" } }) { date } } diff --git a/packages/graphql/tests/tck/types/datetime.test.ts b/packages/graphql/tests/tck/types/datetime.test.ts index 8a31284608..9f28f649ac 100644 --- a/packages/graphql/tests/tck/types/datetime.test.ts +++ b/packages/graphql/tests/tck/types/datetime.test.ts @@ -40,7 +40,7 @@ describe("Cypher DateTime", () => { test("Simple Read", async () => { const query = /* GraphQL */ ` query { - movies(where: { datetime_EQ: "1970-01-01T00:00:00.000Z" }) { + movies(where: { datetime: { eq: "1970-01-01T00:00:00.000Z" } }) { datetime } } diff --git a/packages/graphql/tests/tck/types/duration.test.ts b/packages/graphql/tests/tck/types/duration.test.ts index f45c4baa35..70b2bd6b62 100644 --- a/packages/graphql/tests/tck/types/duration.test.ts +++ b/packages/graphql/tests/tck/types/duration.test.ts @@ -40,7 +40,7 @@ describe("Cypher Duration", () => { test("Simple Read", async () => { const query = /* GraphQL */ ` query { - movies(where: { duration_EQ: "P1Y" }) { + movies(where: { duration: { eq: "P1Y" } }) { duration } } @@ -75,7 +75,7 @@ describe("Cypher Duration", () => { test("GTE Read", async () => { const query = /* GraphQL */ ` query { - movies(where: { duration_GTE: "P3Y4M" }) { + movies(where: { duration: { gte: "P3Y4M" } }) { duration } } diff --git a/packages/graphql/tests/tck/types/localdatetime.test.ts b/packages/graphql/tests/tck/types/localdatetime.test.ts index 298e9beb90..e1e8b87733 100644 --- a/packages/graphql/tests/tck/types/localdatetime.test.ts +++ b/packages/graphql/tests/tck/types/localdatetime.test.ts @@ -40,7 +40,7 @@ describe("Cypher LocalDateTime", () => { test("Simple Read", async () => { const query = /* GraphQL */ ` query { - movies(where: { localDT_EQ: "2003-09-14T12:00:00" }) { + movies(where: { localDT: { eq: "2003-09-14T12:00:00" } }) { localDT } } @@ -72,7 +72,7 @@ describe("Cypher LocalDateTime", () => { test("GTE Read", async () => { const query = /* GraphQL */ ` query { - movies(where: { localDT_GTE: "2010-08-23T13:45:33.250" }) { + movies(where: { localDT: { gte: "2010-08-23T13:45:33.250" } }) { localDT } } diff --git a/packages/graphql/tests/tck/types/localtime.test.ts b/packages/graphql/tests/tck/types/localtime.test.ts index 8290fe047b..b50c5a55dc 100644 --- a/packages/graphql/tests/tck/types/localtime.test.ts +++ b/packages/graphql/tests/tck/types/localtime.test.ts @@ -40,7 +40,7 @@ describe("Cypher LocalTime", () => { test("Simple Read", async () => { const query = /* GraphQL */ ` query { - movies(where: { time_EQ: "12:00:00" }) { + movies(where: { time: { eq: "12:00:00" } }) { time } } @@ -69,7 +69,7 @@ describe("Cypher LocalTime", () => { test("GTE Read", async () => { const query = /* GraphQL */ ` query { - movies(where: { time_GTE: "13:45:33.250" }) { + movies(where: { time: { gte: "13:45:33.250" } }) { time } } diff --git a/packages/graphql/tests/tck/types/point.test.ts b/packages/graphql/tests/tck/types/point.test.ts index 3aec6e70d1..4591d2760f 100644 --- a/packages/graphql/tests/tck/types/point.test.ts +++ b/packages/graphql/tests/tck/types/point.test.ts @@ -40,7 +40,7 @@ describe("Cypher Points", () => { test("Simple Point query", async () => { const query = /* GraphQL */ ` { - pointContainers(where: { point_EQ: { longitude: 1.0, latitude: 2.0 } }) { + pointContainers(where: { point: { eq: { longitude: 1.0, latitude: 2.0 } } }) { point { longitude latitude @@ -71,7 +71,7 @@ describe("Cypher Points", () => { test("Simple Point NOT query", async () => { const query = /* GraphQL */ ` { - pointContainers(where: { NOT: { point_EQ: { longitude: 1.0, latitude: 2.0 } } }) { + pointContainers(where: { NOT: { point: { eq: { longitude: 1.0, latitude: 2.0 } } } }) { point { longitude latitude @@ -101,7 +101,7 @@ describe("Cypher Points", () => { test("Simple Point IN query", async () => { const query = /* GraphQL */ ` { - pointContainers(where: { point_IN: [{ longitude: 1.0, latitude: 2.0 }] }) { + pointContainers(where: { point: { in: [{ longitude: 1.0, latitude: 2.0 }] } }) { point { longitude latitude @@ -135,7 +135,9 @@ describe("Cypher Points", () => { test("Simple Point LT query", async () => { const query = /* GraphQL */ ` { - pointContainers(where: { point_LT: { point: { longitude: 1.1, latitude: 2.2 }, distance: 3.3 } }) { + pointContainers( + where: { point: { distance: { from: { longitude: 1.1, latitude: 2.2 }, lt: 3.3 } } } + ) { point { longitude latitude @@ -155,11 +157,11 @@ describe("Cypher Points", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": { + \\"distance\\": 3.3, \\"point\\": { \\"longitude\\": 1.1, \\"latitude\\": 2.2 - }, - \\"distance\\": 3.3 + } } }" `); @@ -168,7 +170,9 @@ describe("Cypher Points", () => { test("Simple Point LTE query", async () => { const query = /* GraphQL */ ` { - pointContainers(where: { point_LTE: { point: { longitude: 1.1, latitude: 2.2 }, distance: 3.3 } }) { + pointContainers( + where: { point: { distance: { from: { longitude: 1.1, latitude: 2.2 }, lte: 3.3 } } } + ) { point { longitude latitude @@ -188,11 +192,11 @@ describe("Cypher Points", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": { + \\"distance\\": 3.3, \\"point\\": { \\"longitude\\": 1.1, \\"latitude\\": 2.2 - }, - \\"distance\\": 3.3 + } } }" `); @@ -201,7 +205,9 @@ describe("Cypher Points", () => { test("Simple Point GT query", async () => { const query = /* GraphQL */ ` { - pointContainers(where: { point_GT: { point: { longitude: 1.1, latitude: 2.2 }, distance: 3.3 } }) { + pointContainers( + where: { point: { distance: { from: { longitude: 1.1, latitude: 2.2 }, gt: 3.3 } } } + ) { point { longitude latitude @@ -221,11 +227,11 @@ describe("Cypher Points", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": { + \\"distance\\": 3.3, \\"point\\": { \\"longitude\\": 1.1, \\"latitude\\": 2.2 - }, - \\"distance\\": 3.3 + } } }" `); @@ -234,7 +240,9 @@ describe("Cypher Points", () => { test("Simple Point GTE query", async () => { const query = /* GraphQL */ ` { - pointContainers(where: { point_GTE: { point: { longitude: 1.1, latitude: 2.2 }, distance: 3.3 } }) { + pointContainers( + where: { point: { distance: { from: { longitude: 1.1, latitude: 2.2 }, gte: 3.3 } } } + ) { point { longitude latitude @@ -254,11 +262,11 @@ describe("Cypher Points", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": { + \\"distance\\": 3.3, \\"point\\": { \\"longitude\\": 1.1, \\"latitude\\": 2.2 - }, - \\"distance\\": 3.3 + } } }" `); @@ -268,7 +276,7 @@ describe("Cypher Points", () => { const query = /* GraphQL */ ` { pointContainers( - where: { point_DISTANCE: { point: { longitude: 1.1, latitude: 2.2 }, distance: 3.3 } } + where: { point: { distance: { from: { longitude: 1.1, latitude: 2.2 }, eq: 3.3 } } } ) { point { longitude @@ -289,11 +297,11 @@ describe("Cypher Points", () => { expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": { + \\"distance\\": 3.3, \\"point\\": { \\"longitude\\": 1.1, \\"latitude\\": 2.2 - }, - \\"distance\\": 3.3 + } } }" `); @@ -347,7 +355,7 @@ describe("Cypher Points", () => { const query = /* GraphQL */ ` mutation { updatePointContainers( - where: { id_EQ: "id" } + where: { id: { eq: "id" } } update: { point_SET: { longitude: 1.0, latitude: 2.0 } } ) { pointContainers { diff --git a/packages/graphql/tests/tck/types/points.test.ts b/packages/graphql/tests/tck/types/points.test.ts index ff4218f22a..021c6790a5 100644 --- a/packages/graphql/tests/tck/types/points.test.ts +++ b/packages/graphql/tests/tck/types/points.test.ts @@ -40,7 +40,7 @@ describe("Cypher Points", () => { test("Simple Points query", async () => { const query = /* GraphQL */ ` { - pointContainers(where: { points_EQ: [{ longitude: 1.0, latitude: 2.0 }] }) { + pointContainers(where: { points: { eq: [{ longitude: 1.0, latitude: 2.0 }] } }) { points { longitude latitude @@ -73,7 +73,7 @@ describe("Cypher Points", () => { test("Simple Points NOT query", async () => { const query = /* GraphQL */ ` { - pointContainers(where: { NOT: { points_EQ: [{ longitude: 1.0, latitude: 2.0 }] } }) { + pointContainers(where: { NOT: { points: { eq: [{ longitude: 1.0, latitude: 2.0 }] } } }) { points { longitude latitude @@ -105,7 +105,7 @@ describe("Cypher Points", () => { test("Simple Points INCLUDES query", async () => { const query = /* GraphQL */ ` { - pointContainers(where: { points_INCLUDES: { longitude: 1.0, latitude: 2.0 } }) { + pointContainers(where: { points: { includes: { longitude: 1.0, latitude: 2.0 } } }) { points { longitude latitude @@ -182,7 +182,7 @@ describe("Cypher Points", () => { const query = /* GraphQL */ ` mutation { updatePointContainers( - where: { id_EQ: "id" } + where: { id: { eq: "id" } } update: { points_SET: [{ longitude: 1.0, latitude: 2.0 }] } ) { pointContainers { diff --git a/packages/graphql/tests/tck/types/time.test.ts b/packages/graphql/tests/tck/types/time.test.ts index 1a9608a017..124a22cb26 100644 --- a/packages/graphql/tests/tck/types/time.test.ts +++ b/packages/graphql/tests/tck/types/time.test.ts @@ -40,7 +40,7 @@ describe("Cypher Time", () => { test("Simple Read", async () => { const query = /* GraphQL */ ` query { - movies(where: { time_EQ: "12:00:00" }) { + movies(where: { time: { eq: "12:00:00" } }) { time } } @@ -70,7 +70,7 @@ describe("Cypher Time", () => { test("GTE Read", async () => { const query = /* GraphQL */ ` query { - movies(where: { time_GTE: "13:45:33.250" }) { + movies(where: { time: { gte: "13:45:33.250" } }) { time } } diff --git a/packages/graphql/tests/tck/undirected-relationships/query-direction.test.ts b/packages/graphql/tests/tck/undirected-relationships/query-direction.test.ts index 69da47f8b5..3843383439 100644 --- a/packages/graphql/tests/tck/undirected-relationships/query-direction.test.ts +++ b/packages/graphql/tests/tck/undirected-relationships/query-direction.test.ts @@ -68,7 +68,7 @@ describe("queryDirection in relationships", () => { test("query with filter", async () => { const query = /* GraphQL */ ` query { - users(where: { friends_SOME: { name_EQ: "John Smith" } }) { + users(where: { friends: { some: { name: { eq: "John Smith" } } } }) { name friends { name @@ -105,8 +105,8 @@ describe("queryDirection in relationships", () => { const query = /* GraphQL */ ` mutation { updateUsers( - where: { friends_SOME: { name_EQ: "John Smith" } } - update: { friends: { disconnect: { where: { node: { name_EQ: "Jane Smith" } } } } } + where: { friends: { some: { name: { eq: "John Smith" } } } } + update: { friends: { disconnect: { where: { node: { name: { eq: "Jane Smith" } } } } } } ) { users { name @@ -162,7 +162,9 @@ describe("queryDirection in relationships", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Jane Smith\\" + \\"name\\": { + \\"eq\\": \\"Jane Smith\\" + } } } } @@ -181,8 +183,8 @@ describe("queryDirection in relationships", () => { const query = /* GraphQL */ ` mutation { updateUsers( - where: { friends_SOME: { name_EQ: "John Smith" } } - update: { friends: { delete: { where: { node: { name_EQ: "Jane Smith" } } } } } + where: { friends: { some: { name: { eq: "John Smith" } } } } + update: { friends: { delete: { where: { node: { name: { eq: "Jane Smith" } } } } } } ) { users { name @@ -237,7 +239,9 @@ describe("queryDirection in relationships", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Jane Smith\\" + \\"name\\": { + \\"eq\\": \\"Jane Smith\\" + } } } } @@ -256,10 +260,10 @@ describe("queryDirection in relationships", () => { const query = /* GraphQL */ ` mutation { updateUsers( - where: { friends_SOME: { name_EQ: "John Smith" } } + where: { friends: { some: { name: { eq: "John Smith" } } } } update: { friends: { - where: { node: { name_EQ: "Jane Smith" } } + where: { node: { name: { eq: "Jane Smith" } } } update: { node: { name_SET: "Janet Smith" } } } } @@ -312,7 +316,9 @@ describe("queryDirection in relationships", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Jane Smith\\" + \\"name\\": { + \\"eq\\": \\"Jane Smith\\" + } } }, \\"update\\": { @@ -334,8 +340,8 @@ describe("queryDirection in relationships", () => { const query = /* GraphQL */ ` mutation { deleteUsers( - where: { friends_SOME: { name_EQ: "John Smith" } } - delete: { friends: { where: { node: { name_EQ: "Jane Smith" } } } } + where: { friends: { some: { name: { eq: "John Smith" } } } } + delete: { friends: { where: { node: { name: { eq: "Jane Smith" } } } } } ) { nodesDeleted } @@ -422,7 +428,7 @@ describe("queryDirection in relationships", () => { test("query with filter", async () => { const query = /* GraphQL */ ` query { - users(where: { friends_SOME: { name_EQ: "John Smith" } }) { + users(where: { friends: { some: { name: { eq: "John Smith" } } } }) { name friends { name @@ -459,8 +465,8 @@ describe("queryDirection in relationships", () => { const query = /* GraphQL */ ` mutation { updateUsers( - where: { friends_SOME: { name_EQ: "John Smith" } } - update: { friends: { disconnect: { where: { node: { name_EQ: "Jane Smith" } } } } } + where: { friends: { some: { name: { eq: "John Smith" } } } } + update: { friends: { disconnect: { where: { node: { name: { eq: "Jane Smith" } } } } } } ) { users { name @@ -516,7 +522,9 @@ describe("queryDirection in relationships", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Jane Smith\\" + \\"name\\": { + \\"eq\\": \\"Jane Smith\\" + } } } } @@ -535,8 +543,8 @@ describe("queryDirection in relationships", () => { const query = /* GraphQL */ ` mutation { updateUsers( - where: { friends_SOME: { name_EQ: "John Smith" } } - update: { friends: { delete: { where: { node: { name_EQ: "Jane Smith" } } } } } + where: { friends: { some: { name: { eq: "John Smith" } } } } + update: { friends: { delete: { where: { node: { name: { eq: "Jane Smith" } } } } } } ) { users { name @@ -591,7 +599,9 @@ describe("queryDirection in relationships", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Jane Smith\\" + \\"name\\": { + \\"eq\\": \\"Jane Smith\\" + } } } } @@ -610,10 +620,10 @@ describe("queryDirection in relationships", () => { const query = /* GraphQL */ ` mutation { updateUsers( - where: { friends_SOME: { name_EQ: "John Smith" } } + where: { friends: { some: { name: { eq: "John Smith" } } } } update: { friends: { - where: { node: { name_EQ: "Jane Smith" } } + where: { node: { name: { eq: "Jane Smith" } } } update: { node: { name_SET: "Janet Smith" } } } } @@ -666,7 +676,9 @@ describe("queryDirection in relationships", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"Jane Smith\\" + \\"name\\": { + \\"eq\\": \\"Jane Smith\\" + } } }, \\"update\\": { @@ -688,8 +700,8 @@ describe("queryDirection in relationships", () => { const query = /* GraphQL */ ` mutation { deleteUsers( - where: { friends_SOME: { name_EQ: "John Smith" } } - delete: { friends: { where: { node: { name_EQ: "Jane Smith" } } } } + where: { friends: { some: { name: { eq: "John Smith" } } } } + delete: { friends: { where: { node: { name: { eq: "Jane Smith" } } } } } ) { nodesDeleted } diff --git a/packages/graphql/tests/tck/union.test.ts b/packages/graphql/tests/tck/union.test.ts index 26957f6318..d39a6bcc1a 100644 --- a/packages/graphql/tests/tck/union.test.ts +++ b/packages/graphql/tests/tck/union.test.ts @@ -37,7 +37,7 @@ describe("Cypher Union", () => { { when: [BEFORE] operations: [READ] - where: { node: { name_EQ: "$jwt.jwtAllowedNamesExample" } } + where: { node: { name: { eq: "$jwt.jwtAllowedNamesExample" } } } } ] ) { @@ -160,9 +160,9 @@ describe("Cypher Union", () => { test("Read Unions with filter and limit", async () => { const query = /* GraphQL */ ` { - movies(where: { title_EQ: "some title" }) { + movies(where: { title: { eq: "some title" } }) { search( - where: { Movie: { title_EQ: "The Matrix" }, Genre: { name_EQ: "Horror" } } + where: { Movie: { title: { eq: "The Matrix" } }, Genre: { name: { eq: "Horror" } } } offset: 1 limit: 10 ) { @@ -308,7 +308,7 @@ describe("Cypher Union", () => { input: [ { title: "some movie" - search: { Genre: { connect: [{ where: { node: { name_EQ: "some genre" } } }] } } + search: { Genre: { connect: [{ where: { node: { name: { eq: "some genre" } } } }] } } } ] ) { @@ -366,11 +366,11 @@ describe("Cypher Union", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { title_EQ: "some movie" } + where: { title: { eq: "some movie" } } update: { search: { Genre: { - where: { node: { name_EQ: "some genre" } } + where: { node: { name: { eq: "some genre" } } } update: { node: { name_SET: "some new genre" } } } } @@ -413,7 +413,9 @@ describe("Cypher Union", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"some genre\\" + \\"name\\": { + \\"eq\\": \\"some genre\\" + } } }, \\"update\\": { @@ -436,8 +438,8 @@ describe("Cypher Union", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { title_EQ: "some movie" } - update: { search: { Genre: { disconnect: [{ where: { node: { name_EQ: "some genre" } } }] } } } + where: { title: { eq: "some movie" } } + update: { search: { Genre: { disconnect: [{ where: { node: { name: { eq: "some genre" } } } }] } } } ) { movies { title @@ -482,7 +484,9 @@ describe("Cypher Union", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"some genre\\" + \\"name\\": { + \\"eq\\": \\"some genre\\" + } } } } @@ -502,8 +506,8 @@ describe("Cypher Union", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { title_EQ: "some movie" } - update: { search: { Genre: { connect: { where: { node: { name_EQ: "some genre" } } } } } } + where: { title: { eq: "some movie" } } + update: { search: { Genre: { connect: { where: { node: { name: { eq: "some genre" } } } } } } } ) { movies { title @@ -552,8 +556,8 @@ describe("Cypher Union", () => { const query = /* GraphQL */ ` mutation { updateMovies( - where: { title_EQ: "some movie" } - update: { search: { Genre: { delete: { where: { node: { name_EQ: "some genre" } } } } } } + where: { title: { eq: "some movie" } } + update: { search: { Genre: { delete: { where: { node: { name: { eq: "some genre" } } } } } } } ) { movies { title @@ -597,7 +601,9 @@ describe("Cypher Union", () => { { \\"where\\": { \\"node\\": { - \\"name_EQ\\": \\"some genre\\" + \\"name\\": { + \\"eq\\": \\"some genre\\" + } } } } diff --git a/packages/graphql/tests/tck/where.test.ts b/packages/graphql/tests/tck/where.test.ts index f7311c9532..4e3fd6252d 100644 --- a/packages/graphql/tests/tck/where.test.ts +++ b/packages/graphql/tests/tck/where.test.ts @@ -47,7 +47,7 @@ describe("Cypher WHERE", () => { test("Simple", async () => { const query = /* GraphQL */ ` query ($title: String, $isFavorite: Boolean) { - movies(where: { title_EQ: $title, isFavorite_EQ: $isFavorite }) { + movies(where: { title: { eq: $title }, isFavorite: { eq: $isFavorite } }) { title } } @@ -74,7 +74,7 @@ describe("Cypher WHERE", () => { test("Simple AND", async () => { const query = /* GraphQL */ ` { - movies(where: { AND: [{ title_EQ: "some title" }] }) { + movies(where: { AND: [{ title: { eq: "some title" } }] }) { title } } @@ -98,7 +98,7 @@ describe("Cypher WHERE", () => { test("Simple AND with multiple parameters", async () => { const query = /* GraphQL */ ` { - movies(where: { AND: [{ title_EQ: "some title" }, { isFavorite_EQ: true }] }) { + movies(where: { AND: [{ title: { eq: "some title" } }, { isFavorite: { eq: true } }] }) { title } } @@ -123,7 +123,7 @@ describe("Cypher WHERE", () => { test("Nested AND", async () => { const query = /* GraphQL */ ` { - movies(where: { AND: [{ AND: [{ title_EQ: "some title" }] }] }) { + movies(where: { AND: [{ AND: [{ title: { eq: "some title" } }] }] }) { title } } @@ -147,7 +147,9 @@ describe("Cypher WHERE", () => { test("Nested AND with multiple properties", async () => { const query = /* GraphQL */ ` { - movies(where: { AND: [{ AND: [{ title_EQ: "some title" }, { title_EQ: "another title" }] }] }) { + movies( + where: { AND: [{ AND: [{ title: { eq: "some title" } }, { title: { eq: "another title" } }] }] } + ) { title } } @@ -172,7 +174,11 @@ describe("Cypher WHERE", () => { test("Nested AND and OR", async () => { const query = /* GraphQL */ ` { - movies(where: { AND: [{ OR: [{ title_EQ: "some title" }, { isFavorite_EQ: true }], id_EQ: 2 }] }) { + movies( + where: { + AND: [{ OR: [{ title: { eq: "some title" } }, { isFavorite: { eq: true } }], id: { eq: 2 } }] + } + ) { title } } @@ -198,7 +204,7 @@ describe("Cypher WHERE", () => { test("Super Nested AND", async () => { const query = /* GraphQL */ ` { - movies(where: { AND: [{ AND: [{ AND: [{ title_EQ: "some title" }] }] }] }) { + movies(where: { AND: [{ AND: [{ AND: [{ title: { eq: "some title" } }] }] }] }) { title } } @@ -222,7 +228,7 @@ describe("Cypher WHERE", () => { test("Simple OR", async () => { const query = /* GraphQL */ ` { - movies(where: { OR: [{ title_EQ: "some title" }] }) { + movies(where: { OR: [{ title: { eq: "some title" } }] }) { title } } @@ -246,7 +252,7 @@ describe("Cypher WHERE", () => { test("Nested OR", async () => { const query = /* GraphQL */ ` { - movies(where: { OR: [{ OR: [{ title_EQ: "some title" }] }] }) { + movies(where: { OR: [{ OR: [{ title: { eq: "some title" } }] }] }) { title } } @@ -270,7 +276,7 @@ describe("Cypher WHERE", () => { test("Super Nested OR", async () => { const query = /* GraphQL */ ` { - movies(where: { OR: [{ OR: [{ OR: [{ title_EQ: "some title" }] }] }] }) { + movies(where: { OR: [{ OR: [{ OR: [{ title: { eq: "some title" } }] }] }] }) { title } } @@ -295,7 +301,7 @@ describe("Cypher WHERE", () => { test("Match with NULL in where", async () => { const query = /* GraphQL */ ` { - movies(where: { title_EQ: null }) { + movies(where: { title: { eq: null } }) { title } } @@ -315,7 +321,7 @@ describe("Cypher WHERE", () => { test("Match with not NULL in where", async () => { const query = /* GraphQL */ ` { - movies(where: { NOT: { title_EQ: null } }) { + movies(where: { NOT: { title: { eq: null } } }) { title } } @@ -336,7 +342,7 @@ describe("Cypher WHERE", () => { test("Simple NOT", async () => { const query = /* GraphQL */ ` { - movies(where: { NOT: { title_EQ: "some title" } }) { + movies(where: { NOT: { title: { eq: "some title" } } }) { title } } @@ -360,7 +366,7 @@ describe("Cypher WHERE", () => { test("Simple NOT, implicit AND", async () => { const query = /* GraphQL */ ` { - movies(where: { NOT: { title_EQ: "some title", isFavorite_EQ: false } }) { + movies(where: { NOT: { title: { eq: "some title" }, isFavorite: { eq: false } } }) { title } }