From c340f321e6d965288af6db6503c190984827386c Mon Sep 17 00:00:00 2001 From: angrykoala Date: Fri, 17 Jan 2025 09:21:18 +0000 Subject: [PATCH 01/10] Add aggregation fields inside connection --- .../ImplementingEntityOperations.ts | 4 ++ .../src/schema/generation/aggregate-types.ts | 44 +++++++++++++++++++ packages/graphql/src/schema/pagination.ts | 3 ++ .../schema/resolvers/query/root-connection.ts | 21 ++++++--- .../queryAST/factory/OperationFactory.ts | 4 +- .../factory/Operations/AggregateFactory.ts | 14 +++--- packages/graphql/tests/schema/simple.test.ts | 12 +++++ 7 files changed, 88 insertions(+), 14 deletions(-) diff --git a/packages/graphql/src/schema-model/entity/model-adapters/ImplementingEntityOperations.ts b/packages/graphql/src/schema-model/entity/model-adapters/ImplementingEntityOperations.ts index a25d2615c8..caef40b2f5 100644 --- a/packages/graphql/src/schema-model/entity/model-adapters/ImplementingEntityOperations.ts +++ b/packages/graphql/src/schema-model/entity/model-adapters/ImplementingEntityOperations.ts @@ -33,6 +33,8 @@ export type RootTypeFieldNames = { type AggregateTypeNames = { selection: string; input: string; + connection: string; + node: string; }; type MutationResponseTypeNames = { @@ -161,6 +163,8 @@ export class ImplementingEntityOperations x.kind === Kind.FIELD && x.name.value === "pageInfo"); const pageInfoSelectionSet = pageInfoField?.selectionSet; const startCursorKey = getAliasKey({ selectionSet: pageInfoSelectionSet, key: "startCursor" }); @@ -123,6 +125,7 @@ export function createConnectionWithEdgeProperties({ return { [edgesKey]: mappedEdges, + [aggregateKey]: aggregate, [pageInfoKey]: { [startCursorKey]: startCursor, [endCursorKey]: endCursor, diff --git a/packages/graphql/src/schema/resolvers/query/root-connection.ts b/packages/graphql/src/schema/resolvers/query/root-connection.ts index 5313d0ee7e..43387d5243 100644 --- a/packages/graphql/src/schema/resolvers/query/root-connection.ts +++ b/packages/graphql/src/schema/resolvers/query/root-connection.ts @@ -25,7 +25,7 @@ import { type GraphQLResolveInfo, type SelectionSetNode, } from "graphql"; -import type { InputTypeComposer, SchemaComposer } from "graphql-compose"; +import type { InputTypeComposer, ObjectTypeComposerFieldConfigMapDefinition, SchemaComposer } from "graphql-compose"; import { PageInfo } from "../../../graphql/objects/PageInfo"; import type { ConcreteEntityAdapter } from "../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { InterfaceEntityAdapter } from "../../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; @@ -72,7 +72,7 @@ export function rootConnectionResolver({ const connection = createConnectionWithEdgeProperties({ selectionSet: resolveTree as unknown as SelectionSetNode, - source: { edges: record.edges }, + source: { edges: record.edges, aggregate: record.aggregate }, args: { first: args.first, after: args.after }, totalCount, }); @@ -81,6 +81,7 @@ export function rootConnectionResolver({ totalCount, edges: connection.edges, pageInfo: connection.pageInfo, + aggregate: connection.aggregate, }; } @@ -93,13 +94,19 @@ export function rootConnectionResolver({ directives: graphqlDirectivesToCompose(propagatedDirectives), }); + const rootFields: ObjectTypeComposerFieldConfigMapDefinition = { + totalCount: new GraphQLNonNull(GraphQLInt), + pageInfo: new GraphQLNonNull(PageInfo), + edges: rootEdge.NonNull.List.NonNull, + }; + + if (entityAdapter.isAggregable) { + rootFields["aggregate"] = `${entityAdapter.operations.aggregateTypeNames.connection}!`; + } + const rootConnection = composer.createObjectTC({ name: `${entityAdapter.upperFirstPlural}Connection`, - fields: { - totalCount: new GraphQLNonNull(GraphQLInt), - pageInfo: new GraphQLNonNull(PageInfo), - edges: rootEdge.NonNull.List.NonNull, - }, + fields: rootFields, directives: graphqlDirectivesToCompose(propagatedDirectives), }); diff --git a/packages/graphql/src/translate/queryAST/factory/OperationFactory.ts b/packages/graphql/src/translate/queryAST/factory/OperationFactory.ts index d729628e2b..b2401cb5fa 100644 --- a/packages/graphql/src/translate/queryAST/factory/OperationFactory.ts +++ b/packages/graphql/src/translate/queryAST/factory/OperationFactory.ts @@ -170,7 +170,7 @@ export class OperationsFactory { if (!entity || isUnionEntity(entity)) { throw new Error("Aggregate operations are not supported for Union types"); } - return this.aggregateFactory.createAggregationOperation(entity, resolveTree, context); + return this.aggregateFactory.createAggregationOperation({ entityOrRel: entity, resolveTree, context }); } case "CREATE": { assertIsConcreteEntity(entity); @@ -230,7 +230,7 @@ export class OperationsFactory { resolveTree: ResolveTree, context: Neo4jGraphQLTranslationContext ): AggregationOperation | CompositeAggregationOperation { - return this.aggregateFactory.createAggregationOperation(entityOrRel, resolveTree, context); + return this.aggregateFactory.createAggregationOperation({ entityOrRel, resolveTree, context }); } public splitConnectionFields(rawFields: Record): { diff --git a/packages/graphql/src/translate/queryAST/factory/Operations/AggregateFactory.ts b/packages/graphql/src/translate/queryAST/factory/Operations/AggregateFactory.ts index ac6148c423..725415c270 100644 --- a/packages/graphql/src/translate/queryAST/factory/Operations/AggregateFactory.ts +++ b/packages/graphql/src/translate/queryAST/factory/Operations/AggregateFactory.ts @@ -42,11 +42,15 @@ export class AggregateFactory { } // TODO: dupe from read operation - public createAggregationOperation( - entityOrRel: ConcreteEntityAdapter | RelationshipAdapter | InterfaceEntityAdapter, - resolveTree: ResolveTree, - context: Neo4jGraphQLTranslationContext - ): AggregationOperation | CompositeAggregationOperation { + public createAggregationOperation({ + entityOrRel, + resolveTree, + context, + }: { + entityOrRel: ConcreteEntityAdapter | RelationshipAdapter | InterfaceEntityAdapter; + resolveTree: ResolveTree; + context: Neo4jGraphQLTranslationContext; + }): AggregationOperation | CompositeAggregationOperation { let entity: ConcreteEntityAdapter | InterfaceEntityAdapter; if (entityOrRel instanceof RelationshipAdapter) { entity = entityOrRel.target as ConcreteEntityAdapter; // TODO: check this seems wrong but outside of the scope of this PR diff --git a/packages/graphql/tests/schema/simple.test.ts b/packages/graphql/tests/schema/simple.test.ts index 08a7cc95f0..a28ae74c3d 100644 --- a/packages/graphql/tests/schema/simple.test.ts +++ b/packages/graphql/tests/schema/simple.test.ts @@ -88,6 +88,17 @@ describe("Simple", () => { isActive: Boolean } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + actorCount: IntAggregateSelection! + averageRating: FloatAggregateSelection! + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! @@ -172,6 +183,7 @@ describe("Simple", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! From 484c0619f9c7f0f780707885f8529078695dfa0c Mon Sep 17 00:00:00 2001 From: angrykoala Date: Mon, 20 Jan 2025 10:08:00 +0000 Subject: [PATCH 02/10] Fix aggregation aliases --- .../ast/fields/ConnectionAggregationField.ts | 78 ++++++++++++ .../ast/operations/ConnectionReadOperation.ts | 39 ++++-- .../factory/Operations/AggregateFactory.ts | 13 +- .../factory/Operations/ConnectionFactory.ts | 57 +++++++-- .../aggregations/top-level/alias.int.test.ts | 82 ++++++------ .../aggregations/top-level/basic.int.test.ts | 28 ++++- .../aggregations/top-level/alias.int.test.ts | 118 ++++++++++++++++++ .../aggregations/top-level/basic.int.test.ts | 63 ++++++++++ 8 files changed, 418 insertions(+), 60 deletions(-) create mode 100644 packages/graphql/src/translate/queryAST/ast/fields/ConnectionAggregationField.ts create mode 100644 packages/graphql/tests/integration/deprecations/aggregations/top-level/alias.int.test.ts create mode 100644 packages/graphql/tests/integration/deprecations/aggregations/top-level/basic.int.test.ts diff --git a/packages/graphql/src/translate/queryAST/ast/fields/ConnectionAggregationField.ts b/packages/graphql/src/translate/queryAST/ast/fields/ConnectionAggregationField.ts new file mode 100644 index 0000000000..2147b5f2a4 --- /dev/null +++ b/packages/graphql/src/translate/queryAST/ast/fields/ConnectionAggregationField.ts @@ -0,0 +1,78 @@ +/* + * 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 Cypher from "@neo4j/cypher-builder"; +import { QueryASTContext } from "../QueryASTContext"; +import type { QueryASTNode } from "../QueryASTNode"; +import type { AggregationOperation } from "../operations/AggregationOperation"; +import { CypherOperation } from "../operations/CypherOperation"; +import { CypherScalarOperation } from "../operations/CypherScalarOperation"; +import type { CompositeAggregationOperation } from "../operations/composite/CompositeAggregationOperation"; +import { CompositeCypherOperation } from "../operations/composite/CompositeCypherOperation"; +import { Field } from "./Field"; + +export class ConnectionAggregationField extends Field { + public operation: AggregationOperation | CompositeAggregationOperation; + + public nodeAlias: string; + + private projectionExpr: Cypher.Expr | undefined; + + constructor({ + operation, + alias, + nodeAlias, + }: { + operation: AggregationOperation | CompositeAggregationOperation; + alias: string; + nodeAlias: string; + }) { + super(alias); + this.operation = operation; + this.nodeAlias = nodeAlias; + } + + public getChildren(): QueryASTNode[] { + return [this.operation]; + } + + public getProjectionField(): Record { + if (!this.projectionExpr) { + throw new Error("Projection expression of operation not available (has transpile been called)?"); + } + return { [this.alias]: new Cypher.Map({ [this.nodeAlias]: this.projectionExpr }) }; + } + + public getSubqueries(context: QueryASTContext): Cypher.Clause[] { + const subqueryContext = new QueryASTContext({ ...context, returnVariable: new Cypher.Variable() }); + const result = this.operation.transpile(subqueryContext); + this.projectionExpr = result.projectionExpr; + return result.clauses; + } + + public isCypherField(): this is this & { + operation: CypherOperation | CypherScalarOperation | CompositeCypherOperation; + } { + return ( + this.operation instanceof CypherOperation || + this.operation instanceof CypherScalarOperation || + this.operation instanceof CompositeCypherOperation + ); + } +} diff --git a/packages/graphql/src/translate/queryAST/ast/operations/ConnectionReadOperation.ts b/packages/graphql/src/translate/queryAST/ast/operations/ConnectionReadOperation.ts index bea14359aa..373bb4480b 100644 --- a/packages/graphql/src/translate/queryAST/ast/operations/ConnectionReadOperation.ts +++ b/packages/graphql/src/translate/queryAST/ast/operations/ConnectionReadOperation.ts @@ -24,6 +24,7 @@ import { filterTruthy } from "../../../../utils/utils"; import { wrapSubqueriesInCypherCalls } from "../../utils/wrap-subquery-in-calls"; import type { QueryASTContext } from "../QueryASTContext"; import type { QueryASTNode } from "../QueryASTNode"; +import type { ConnectionAggregationField } from "../fields/ConnectionAggregationField"; import type { Field } from "../fields/Field"; import { OperationField } from "../fields/OperationField"; import type { Filter } from "../filters/Filter"; @@ -42,7 +43,10 @@ export class ConnectionReadOperation extends Operation { public nodeFields: Field[] = []; public edgeFields: Field[] = []; // TODO: merge with attachedTo? - protected filters: Filter[] = []; + + public aggregationField: ConnectionAggregationField | undefined; + + public filters: Filter[] = []; protected pagination: Pagination | undefined; protected sortFields: Array<{ node: Sort[]; edge: Sort[] }> = []; protected authFilters: AuthorizationFilters[] = []; @@ -97,6 +101,7 @@ export class ConnectionReadOperation extends Operation { this.selection, ...this.nodeFields, ...this.edgeFields, + this.aggregationField, ...this.filters, ...this.authFilters, this.pagination, @@ -107,7 +112,8 @@ export class ConnectionReadOperation extends Operation { protected getWithCollectEdgesAndTotalCount( nestedContext: QueryASTContext, edgesVar: Cypher.Variable, - totalCount: Cypher.Variable + totalCount: Cypher.Variable, + extraColumns?: Array<[Cypher.Expr, Cypher.Variable]> ): Cypher.With { const nodeAndRelationshipMap = new Cypher.Map({ node: nestedContext.target, @@ -117,10 +123,11 @@ export class ConnectionReadOperation extends Operation { nodeAndRelationshipMap.set("relationship", nestedContext.relationship); } - return new Cypher.With([Cypher.collect(nodeAndRelationshipMap), edgesVar]).with(edgesVar, [ - Cypher.size(edgesVar), - totalCount, - ]); + return new Cypher.With([Cypher.collect(nodeAndRelationshipMap), edgesVar], ...(extraColumns ?? [])).with( + edgesVar, + [Cypher.size(edgesVar), totalCount], + ...(extraColumns ?? []).map((c) => c[1]) + ); } public transpile(context: QueryASTContext): OperationTranspileResult { @@ -148,6 +155,21 @@ export class ConnectionReadOperation extends Operation { const filtersSubqueries = [...authFilterSubqueries, ...normalFilterSubqueries]; + const returnMap: Record = {}; + let extraFieldsSubqueries: Cypher.Clause[] = []; + let extraFields: Array<[Cypher.Expr, Cypher.Variable]> = []; + if (this.aggregationField) { + extraFieldsSubqueries = this.aggregationField.getSubqueries(nestedContext); + + const aggregationProjectionField = this.aggregationField.getProjectionField(); + + extraFields = Object.entries(aggregationProjectionField).map(([key, value]) => { + const variable = new Cypher.Variable(); + returnMap[key] = variable; + return [value, variable]; + }); + } + const edgesVar = new Cypher.NamedVariable("edges"); const totalCount = new Cypher.NamedVariable("totalCount"); const edgesProjectionVar = new Cypher.Variable(); @@ -169,13 +191,15 @@ export class ConnectionReadOperation extends Operation { const withCollectEdgesAndTotalCount = this.getWithCollectEdgesAndTotalCount( nestedContext, edgesVar, - totalCount + totalCount, + extraFields ); const returnClause = new Cypher.Return([ new Cypher.Map({ edges: edgesProjectionVar, totalCount: totalCount, + ...returnMap, }), context.returnVariable, ]); @@ -187,6 +211,7 @@ export class ConnectionReadOperation extends Operation { selectionClause, ...filtersSubqueries, withWhere, + ...extraFieldsSubqueries, withCollectEdgesAndTotalCount, unwindAndProjectionSubquery, returnClause diff --git a/packages/graphql/src/translate/queryAST/factory/Operations/AggregateFactory.ts b/packages/graphql/src/translate/queryAST/factory/Operations/AggregateFactory.ts index 725415c270..97282d7e06 100644 --- a/packages/graphql/src/translate/queryAST/factory/Operations/AggregateFactory.ts +++ b/packages/graphql/src/translate/queryAST/factory/Operations/AggregateFactory.ts @@ -18,7 +18,7 @@ */ import type { ResolveTree } from "graphql-parse-resolve-info"; -import type { ConcreteEntityAdapter } from "../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import { ConcreteEntityAdapter } from "../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { InterfaceEntityAdapter } from "../../../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import { RelationshipAdapter } from "../../../../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { Neo4jGraphQLTranslationContext } from "../../../../types/neo4j-graphql-translation-context"; @@ -138,6 +138,7 @@ export class AggregateFactory { } } else { if (isConcreteEntity(entity)) { + // HERE let selection: EntitySelection; // NOTE: If we introduce vector index aggregation, checking the phrase will cause a problem if (context.resolveTree.args.fulltext || context.resolveTree.args.phrase) { @@ -232,8 +233,16 @@ export class AggregateFactory { edge: ResolveTree | undefined; fields: Record; } { + // Handle new aggregation node inside connection + let nodeFields: Record = {}; + if (adapter instanceof ConcreteEntityAdapter) { + nodeFields = resolveTree.fieldsByTypeName[adapter.operations.aggregateTypeNames.node] ?? {}; + } + const rawProjectionFields = { + // Handle deprecated aggregations ...resolveTree.fieldsByTypeName[adapter.operations.getAggregationFieldTypename()], + ...nodeFields, }; return this.queryASTFactory.operationsFactory.splitConnectionFields(rawProjectionFields); @@ -301,8 +310,10 @@ export class AggregateFactory { operation.setNodeFields(nodeFields); operation.setEdgeFields(edgeFields); } else { + console.log("HERE"); const rawProjectionFields = { ...resolveTree.fieldsByTypeName[entity.operations.aggregateTypeNames.selection], + ...resolveTree.fieldsByTypeName[entity.operations.aggregateTypeNames.node], // Handles both, deprecated and new aggregation parsing }; const fields = this.queryASTFactory.fieldFactory.createAggregationFields(entity, rawProjectionFields); diff --git a/packages/graphql/src/translate/queryAST/factory/Operations/ConnectionFactory.ts b/packages/graphql/src/translate/queryAST/factory/Operations/ConnectionFactory.ts index 909933bb81..fb9cb6bc2f 100644 --- a/packages/graphql/src/translate/queryAST/factory/Operations/ConnectionFactory.ts +++ b/packages/graphql/src/translate/queryAST/factory/Operations/ConnectionFactory.ts @@ -31,6 +31,8 @@ import type { RelationshipAdapter } from "../../../../schema-model/relationship/ import type { ConnectionQueryArgs } from "../../../../types"; import type { Neo4jGraphQLTranslationContext } from "../../../../types/neo4j-graphql-translation-context"; import { checkEntityAuthentication } from "../../../authorization/check-authentication"; +import { getResolveTreeByFieldName } from "../../../utils/resolveTree"; +import { ConnectionAggregationField } from "../../ast/fields/ConnectionAggregationField"; import type { Field } from "../../ast/fields/Field"; import { ConnectionReadOperation } from "../../ast/operations/ConnectionReadOperation"; import { CompositeConnectionPartial } from "../../ast/operations/composite/CompositeConnectionPartial"; @@ -46,15 +48,18 @@ import { isUnionEntity } from "../../utils/is-union-entity"; import type { QueryASTFactory } from "../QueryASTFactory"; import { findFieldsByNameInFieldsByTypeNameField } from "../parsers/find-fields-by-name-in-fields-by-type-name-field"; import { getFieldsByTypeName } from "../parsers/get-fields-by-type-name"; +import { AggregateFactory } from "./AggregateFactory"; import { FulltextFactory } from "./FulltextFactory"; export class ConnectionFactory { private queryASTFactory: QueryASTFactory; private fulltextFactory: FulltextFactory; + private aggregateFactory: AggregateFactory; constructor(queryASTFactory: QueryASTFactory) { this.queryASTFactory = queryASTFactory; this.fulltextFactory = new FulltextFactory(queryASTFactory); + this.aggregateFactory = new AggregateFactory(queryASTFactory); } public createCompositeConnectionOperationAST({ @@ -88,20 +93,22 @@ export class ConnectionFactory { directed, targetOverride: concreteEntity, }); - resolveTreeEdgeFields = this.parseConnectionFields({ + const { edges } = this.parseConnectionFields({ entityOrRel: relationship, target: concreteEntity, resolveTree, }); + resolveTreeEdgeFields = edges; } else { selection = new NodeSelection({ target: concreteEntity, }); - resolveTreeEdgeFields = this.parseConnectionFields({ + const { edges } = this.parseConnectionFields({ entityOrRel: concreteEntity, target: concreteEntity, resolveTree, }); + resolveTreeEdgeFields = edges; } const connectionPartial = new CompositeConnectionPartial({ @@ -162,16 +169,19 @@ export class ConnectionFactory { let selection: EntitySelection; let resolveTreeEdgeFields: Record; + let resolveTreeAggregate: ResolveTree | undefined; if (relationship) { selection = new RelationshipSelection({ relationship, directed: resolveTree.args.directed as boolean | undefined, }); - resolveTreeEdgeFields = this.parseConnectionFields({ + const { edges, aggregate } = this.parseConnectionFields({ entityOrRel: relationship, target, resolveTree, }); + resolveTreeEdgeFields = edges; + resolveTreeAggregate = aggregate; } else { if (context.resolveTree.args.fulltext || context.resolveTree.args.phrase) { selection = this.fulltextFactory.getFulltextSelection(target, context); @@ -180,15 +190,38 @@ export class ConnectionFactory { target, }); } - resolveTreeEdgeFields = this.parseConnectionFields({ + const { edges, aggregate } = this.parseConnectionFields({ entityOrRel: target, target, resolveTree, }); + resolveTreeEdgeFields = edges; + resolveTreeAggregate = aggregate; } const operation = new ConnectionReadOperation({ relationship, target, selection }); + const resolveTreeAggregateFields = + resolveTreeAggregate?.fieldsByTypeName[target.operations.aggregateTypeNames.connection]; + if (resolveTreeAggregate && resolveTreeAggregateFields) { + const nodeField = getResolveTreeByFieldName({ fieldName: "node", selection: resolveTreeAggregateFields }); + if (nodeField) { + // Maybe this should be using operationFactory instead + const aggregationOperation = this.aggregateFactory.createAggregationOperation({ + entityOrRel: relationship ?? target, + resolveTree: nodeField, + context, + }); + + const aggregationField = new ConnectionAggregationField({ + alias: resolveTreeAggregate.name, // Alias is hanlded by graphql on top level + nodeAlias: nodeField.alias, + operation: aggregationOperation, + }); + + operation.aggregationField = aggregationField; + } + } - return this.hydrateConnectionOperationAST({ + this.hydrateConnectionOperationAST({ relationship, target: target, resolveTree, @@ -197,11 +230,15 @@ export class ConnectionFactory { whereArgs: resolveTreeWhere, resolveTreeEdgeFields, }); + + if (operation.aggregationField) { + operation.aggregationField.operation.addFilters(...operation.filters); + } + return operation; } - // eslint-disable-next-line @typescript-eslint/comma-dangle private hydrateConnectionOperationsASTWithSort< - T extends ConnectionReadOperation | CompositeConnectionReadOperation + T extends ConnectionReadOperation | CompositeConnectionReadOperation, >({ entityOrRel, resolveTree, @@ -399,7 +436,7 @@ export class ConnectionFactory { entityOrRel: RelationshipAdapter | ConcreteEntityAdapter; target: ConcreteEntityAdapter; resolveTree: ResolveTree; - }): Record { + }): { edges: Record; aggregate: ResolveTree | undefined } { // Get interfaces of the entity const entityInterfaces = getEntityInterfaces(target); @@ -420,13 +457,13 @@ export class ConnectionFactory { ]); const edgeFieldsRaw = findFieldsByNameInFieldsByTypeNameField(resolveTreeConnectionFields, "edges"); - + const aggregateFieldsRaw = findFieldsByNameInFieldsByTypeNameField(resolveTreeConnectionFields, "aggregate"); const interfacesEdgeFields = entityInterfaces.map((interfaceAdapter) => { return getFieldsByTypeName(edgeFieldsRaw, `${interfaceAdapter.name}Edge`); }); const concreteEdgeFields = getFieldsByTypeName(edgeFieldsRaw, entityOrRel.operations.relationshipFieldTypename); - return mergeDeep([...interfacesEdgeFields, concreteEdgeFields]); + return { edges: mergeDeep([...interfacesEdgeFields, concreteEdgeFields]), aggregate: aggregateFieldsRaw[0] }; } } 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..4260585017 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 @@ -67,24 +67,28 @@ describe("aggregations-top_level-alias", () => { const query = /* GraphQL */ ` { - ${typeMovie.operations.aggregate}(where: { testString_EQ: "${testString}" }) { - _count: count - _id: id { - _shortest: shortest - _longest: longest - } - _title: title { - _shortest: shortest - _longest: longest - } - _imdbRating: imdbRating { - _min: min - _max: max - _average: average - } - _createdAt: createdAt { - _min: min - _max: max + ${typeMovie.operations.connection}(where: { testString_EQ: "${testString}" }) { + aggr: aggregate { + n: node { + _count: count + _id: id { + _shortest: shortest + _longest: longest + } + _title: title { + _shortest: shortest + _longest: longest + } + _imdbRating: imdbRating { + _min: min + _max: max + _average: average + } + _createdAt: createdAt { + _min: min + _max: max + } + } } } } @@ -94,24 +98,30 @@ describe("aggregations-top_level-alias", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[typeMovie.operations.aggregate]).toEqual({ - _count: 4, - _id: { - _shortest: "1", - _longest: "4444", - }, - _title: { - _shortest: "1", - _longest: "4444", - }, - _imdbRating: { - _min: 1, - _max: 4, - _average: 2.5, - }, - _createdAt: { - _min: minDate.toISOString(), - _max: maxDate.toISOString(), + expect(gqlResult.data).toEqual({ + [typeMovie.operations.connection]: { + aggr: { + n: { + _count: 4, + _id: { + _shortest: "1", + _longest: "4444", + }, + _title: { + _shortest: "1", + _longest: "4444", + }, + _imdbRating: { + _min: 1, + _max: 4, + _average: 2.5, + }, + _createdAt: { + _min: minDate.toISOString(), + _max: maxDate.toISOString(), + }, + }, + }, }, }); }); diff --git a/packages/graphql/tests/integration/aggregations/top-level/basic.int.test.ts b/packages/graphql/tests/integration/aggregations/top-level/basic.int.test.ts index 0e4314dae2..331275850a 100644 --- a/packages/graphql/tests/integration/aggregations/top-level/basic.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/top-level/basic.int.test.ts @@ -40,14 +40,21 @@ describe("aggregations-top_level-basic", () => { await testHelper.initNeo4jGraphQL({ typeDefs }); await testHelper.executeCypher(` - CREATE (:${randomType.name} {id: randomUUID()}) - CREATE (:${randomType.name} {id: randomUUID()}) + CREATE (:${randomType.name} {id: "asd"}) + CREATE (:${randomType.name} {id: "asd3"}) `); const query = ` { - ${randomType.operations.aggregate} { - count + ${randomType.operations.connection} { + aggregate { + node { + count + id { + longest + } + } + } } } `; @@ -56,8 +63,17 @@ describe("aggregations-top_level-basic", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[randomType.operations.aggregate]).toEqual({ - count: 2, + expect(gqlResult.data).toEqual({ + [randomType.operations.connection]: { + aggregate: { + node: { + count: 2, + id: { + longest: "asd3", + }, + }, + }, + }, }); }); }); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/top-level/alias.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/top-level/alias.int.test.ts new file mode 100644 index 0000000000..79a8a5ac00 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/aggregations/top-level/alias.int.test.ts @@ -0,0 +1,118 @@ +/* + * 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-alias", () => { + const testHelper = new TestHelper(); + let typeMovie: UniqueType; + + beforeEach(() => { + typeMovie = testHelper.createUniqueType("Movie"); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should perform many aggregations while aliasing each field and return correct data", async () => { + const typeDefs = ` + type ${typeMovie} @node { + testString: ID! + id: ID! + title: String! + imdbRating: Int! + createdAt: DateTime + } + `; + + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const minDate = new Date(); + + const maxDate = new Date(); + maxDate.setDate(maxDate.getDate() + 1); + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + await testHelper.executeCypher( + ` + CREATE (:${typeMovie} {testString: "${testString}", id: "1", title: "1", imdbRating: 1, createdAt: datetime("${minDate.toISOString()}")}) + CREATE (:${typeMovie} {testString: "${testString}", id: "22", title: "22", imdbRating: 2, createdAt: datetime()}) + CREATE (:${typeMovie} {testString: "${testString}", id: "333", title: "333", imdbRating: 3, createdAt: datetime()}) + CREATE (:${typeMovie} {testString: "${testString}", id: "4444", title: "4444", imdbRating: 4, createdAt: datetime("${maxDate.toISOString()}")}) + ` + ); + + const query = /* GraphQL */ ` + { + ${typeMovie.operations.aggregate}(where: { testString_EQ: "${testString}" }) { + _count: count + _id: id { + _shortest: shortest + _longest: longest + } + _title: title { + _shortest: shortest + _longest: longest + } + _imdbRating: imdbRating { + _min: min + _max: max + _average: average + } + _createdAt: createdAt { + _min: min + _max: max + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[typeMovie.operations.aggregate]).toEqual({ + _count: 4, + _id: { + _shortest: "1", + _longest: "4444", + }, + _title: { + _shortest: "1", + _longest: "4444", + }, + _imdbRating: { + _min: 1, + _max: 4, + _average: 2.5, + }, + _createdAt: { + _min: minDate.toISOString(), + _max: maxDate.toISOString(), + }, + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/top-level/basic.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/top-level/basic.int.test.ts new file mode 100644 index 0000000000..0e4314dae2 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/aggregations/top-level/basic.int.test.ts @@ -0,0 +1,63 @@ +/* + * 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("aggregations-top_level-basic", () => { + const testHelper = new TestHelper(); + + beforeAll(() => {}); + + afterAll(async () => { + await testHelper.close(); + }); + + test("should count nodes", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${randomType.name} @node { + id: ID + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + await testHelper.executeCypher(` + CREATE (:${randomType.name} {id: randomUUID()}) + CREATE (:${randomType.name} {id: randomUUID()}) + `); + + const query = ` + { + ${randomType.operations.aggregate} { + count + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[randomType.operations.aggregate]).toEqual({ + count: 2, + }); + }); +}); From 6cc7a095c165a2535e7f661d8857c07f2db6f7f5 Mon Sep 17 00:00:00 2001 From: angrykoala Date: Mon, 20 Jan 2025 16:19:09 +0000 Subject: [PATCH 03/10] update top level aggregation tests --- .../top-level/authorization.int.test.ts | 129 +++-- .../aggregations/top-level/bigint.test.ts | 140 +++-- .../aggregations/top-level/count.int.test.ts | 43 +- .../top-level/datetime.int.test.ts | 74 ++- .../top-level/duration.int.test.ts | 70 ++- .../aggregations/top-level/float.int.test.ts | 124 +++-- .../aggregations/top-level/id.int.test.ts | 72 ++- .../aggregations/top-level/int.int.test.ts | 130 +++-- .../aggregations/top-level/many.int.test.ts | 82 +-- .../aggregations/top-level/string.int.test.ts | 68 ++- .../top-level/authorization.int.test.ts | 501 ++++++++++++++++++ .../aggregations/top-level/basic.int.test.ts | 2 +- .../aggregations/top-level/bigint.test.ts | 289 ++++++++++ .../aggregations/top-level/count.int.test.ts | 105 ++++ .../top-level/datetime.int.test.ts | 175 ++++++ .../top-level/duration.int.test.ts | 179 +++++++ .../aggregations/top-level/float.int.test.ts | 259 +++++++++ .../aggregations/top-level/id.int.test.ts | 174 ++++++ .../aggregations/top-level/int.int.test.ts | 264 +++++++++ .../aggregations/top-level/many.int.test.ts | 120 +++++ .../aggregations/top-level/string.int.test.ts | 201 +++++++ 21 files changed, 2911 insertions(+), 290 deletions(-) create mode 100644 packages/graphql/tests/integration/deprecations/aggregations/top-level/authorization.int.test.ts create mode 100644 packages/graphql/tests/integration/deprecations/aggregations/top-level/bigint.test.ts create mode 100644 packages/graphql/tests/integration/deprecations/aggregations/top-level/count.int.test.ts create mode 100644 packages/graphql/tests/integration/deprecations/aggregations/top-level/datetime.int.test.ts create mode 100644 packages/graphql/tests/integration/deprecations/aggregations/top-level/duration.int.test.ts create mode 100644 packages/graphql/tests/integration/deprecations/aggregations/top-level/float.int.test.ts create mode 100644 packages/graphql/tests/integration/deprecations/aggregations/top-level/id.int.test.ts create mode 100644 packages/graphql/tests/integration/deprecations/aggregations/top-level/int.int.test.ts create mode 100644 packages/graphql/tests/integration/deprecations/aggregations/top-level/many.int.test.ts create mode 100644 packages/graphql/tests/integration/deprecations/aggregations/top-level/string.int.test.ts 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 3b0c6108f7..1b48ff7013 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 @@ -46,8 +46,12 @@ describe("aggregations-top_level authorization", () => { const query = ` { - ${randomType.operations.aggregate} { - count + ${randomType.operations.connection} { + aggregate { + node { + count + } + } } } `; @@ -73,19 +77,24 @@ describe("aggregations-top_level authorization", () => { }); test("should append auth where to predicate and return post count for this user", async () => { + const Post = testHelper.createUniqueType("Post"); + const User = testHelper.createUniqueType("User"); + const typeDefs = /* GraphQL */ ` - type User @node { + type ${User} @node { id: ID - posts: [Post!]! @relationship(type: "POSTED", direction: OUT) + posts: [${Post}!]! @relationship(type: "POSTED", direction: OUT) } - type Post @node { + type ${Post} @node { content: String - creator: User! @relationship(type: "POSTED", direction: IN) + creator: ${User}! @relationship(type: "POSTED", direction: IN) } - extend type Post - @authorization(filter: [{ operations: [AGGREGATE], where: { node: { creator: { id_EQ: "$jwt.sub" } } } }]) + extend type ${Post} + @authorization( + filter: [{ operations: [AGGREGATE], where: { node: { creator: { id_EQ: "$jwt.sub" } } } }] + ) `; const userId = generate({ @@ -94,8 +103,12 @@ describe("aggregations-top_level authorization", () => { const query = ` { - postsAggregate { - count + ${Post.operations.connection} { + aggregate { + node { + count + } + } } } `; @@ -110,7 +123,7 @@ describe("aggregations-top_level authorization", () => { }); await testHelper.executeCypher(` - CREATE (:User {id: "${userId}"})-[:POSTED]->(:Post {content: randomUUID()}) + CREATE (:${User} {id: "${userId}"})-[:POSTED]->(:${Post} {content: randomUUID()}) `); const token = createBearerToken(secret, { sub: userId }); @@ -120,8 +133,12 @@ describe("aggregations-top_level authorization", () => { expect(gqlResult.errors).toBeUndefined(); expect(gqlResult.data).toEqual({ - postsAggregate: { - count: 1, + [Post.operations.connection]: { + aggregate: { + node: { + count: 1, + }, + }, }, }); }); @@ -150,10 +167,14 @@ describe("aggregations-top_level authorization", () => { const query = ` { - moviesAggregate(where: {id_EQ: "${movieId}"}) { - imdbRatingInt { - min - max + moviesConnection(where: {id_EQ: "${movieId}"}) { + aggregate { + node { + imdbRatingInt { + min + max + } + } } } } @@ -203,10 +224,14 @@ describe("aggregations-top_level authorization", () => { const query = ` { - moviesAggregate(where: {id_EQ: "${movieId}"}) { - someId { - shortest - longest + moviesConnection(where: {id_EQ: "${movieId}"}) { + aggregate { + node { + someId { + shortest + longest + } + } } } } @@ -256,11 +281,15 @@ describe("aggregations-top_level authorization", () => { const query = ` { - moviesAggregate(where: {id_EQ: "${movieId}"}) { - someString { - shortest - longest - } + moviesConnection(where: {id_EQ: "${movieId}"}) { + aggregate { + node { + someString { + shortest + longest + } + } + } } } `; @@ -309,10 +338,14 @@ describe("aggregations-top_level authorization", () => { const query = ` { - moviesAggregate(where: {id_EQ: "${movieId}"}) { - imdbRatingFloat { - min - max + moviesConnection(where: {id_EQ: "${movieId}"}) { + aggregate { + node { + imdbRatingFloat { + min + max + } + } } } } @@ -362,10 +395,14 @@ describe("aggregations-top_level authorization", () => { const query = ` { - moviesAggregate(where: {id_EQ: "${movieId}"}) { - imdbRatingBigInt { - min - max + moviesConnection(where: {id_EQ: "${movieId}"}) { + aggregate { + node { + imdbRatingBigInt { + min + max + } + } } } } @@ -415,10 +452,14 @@ describe("aggregations-top_level authorization", () => { const query = ` { - moviesAggregate(where: {id_EQ: "${movieId}"}) { - createdAt { - min - max + moviesConnection(where: {id_EQ: "${movieId}"}) { + aggregate { + node { + createdAt { + min + max + } + } } } } @@ -468,10 +509,14 @@ describe("aggregations-top_level authorization", () => { const query = ` { - moviesAggregate(where: {id_EQ: "${movieId}"}) { - screenTime { - min - max + moviesConnection(where: {id_EQ: "${movieId}"}) { + aggregate { + node { + screenTime { + min + max + } + } } } } diff --git a/packages/graphql/tests/integration/aggregations/top-level/bigint.test.ts b/packages/graphql/tests/integration/aggregations/top-level/bigint.test.ts index 9b228feded..fa9a997f86 100644 --- a/packages/graphql/tests/integration/aggregations/top-level/bigint.test.ts +++ b/packages/graphql/tests/integration/aggregations/top-level/bigint.test.ts @@ -35,7 +35,7 @@ describe("aggregations-top_level-bigint", () => { const movieType = testHelper.createUniqueType("Movie"); const typeDefs = ` - type ${movieType.name} @node { + type ${movieType} @node { testString: String imdbRatingBigInt: BigInt } @@ -50,10 +50,10 @@ describe("aggregations-top_level-bigint", () => { await testHelper.executeCypher( ` - CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}1}) - CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}2}) - CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}3}) - CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}4}) + CREATE (:${movieType} {testString: $testString, imdbRatingBigInt: ${bigInt}1}) + CREATE (:${movieType} {testString: $testString, imdbRatingBigInt: ${bigInt}2}) + CREATE (:${movieType} {testString: $testString, imdbRatingBigInt: ${bigInt}3}) + CREATE (:${movieType} {testString: $testString, imdbRatingBigInt: ${bigInt}4}) `, { testString, @@ -62,9 +62,13 @@ describe("aggregations-top_level-bigint", () => { const query = ` { - ${movieType.operations.aggregate}(where: {testString_EQ: "${testString}"}) { - imdbRatingBigInt { - min + ${movieType.operations.connection}(where: {testString_EQ: "${testString}"}) { + aggregate { + node { + imdbRatingBigInt { + min + } + } } } } @@ -74,9 +78,15 @@ describe("aggregations-top_level-bigint", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[movieType.operations.aggregate]).toEqual({ - imdbRatingBigInt: { - min: `${bigInt}1`, + expect(gqlResult.data).toEqual({ + [movieType.operations.connection]: { + aggregate: { + node: { + imdbRatingBigInt: { + min: `${bigInt}1`, + }, + }, + }, }, }); }); @@ -112,10 +122,14 @@ describe("aggregations-top_level-bigint", () => { const query = ` { - ${movieType.operations.aggregate}(where: {testString_EQ: "${testString}"}) { - imdbRatingBigInt { - max - } + ${movieType.operations.connection}(where: {testString_EQ: "${testString}"}) { + aggregate { + node { + imdbRatingBigInt { + max + } + } + } } } `; @@ -124,9 +138,15 @@ describe("aggregations-top_level-bigint", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[movieType.operations.aggregate]).toEqual({ - imdbRatingBigInt: { - max: `${bigInt}4`, + expect(gqlResult.data).toEqual({ + [movieType.operations.connection]: { + aggregate: { + node: { + imdbRatingBigInt: { + max: `${bigInt}4`, + }, + }, + }, }, }); }); @@ -162,11 +182,15 @@ describe("aggregations-top_level-bigint", () => { const query = ` { - ${movieType.operations.aggregate}(where: {testString_EQ: "${testString}"}) { - imdbRatingBigInt { - average + ${movieType.operations.connection}(where: {testString_EQ: "${testString}"}) { + aggregate { + node { + imdbRatingBigInt { + average + } + } } - } + } } `; @@ -174,9 +198,15 @@ describe("aggregations-top_level-bigint", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[movieType.operations.aggregate]).toEqual({ - imdbRatingBigInt: { - average: `${bigInt}2.5`, + expect(gqlResult.data).toEqual({ + [movieType.operations.connection]: { + aggregate: { + node: { + imdbRatingBigInt: { + average: `${bigInt}2.5`, + }, + }, + }, }, }); }); @@ -212,10 +242,14 @@ describe("aggregations-top_level-bigint", () => { const query = ` { - ${movieType.operations.aggregate}(where: {testString_EQ: "${testString}"}) { - imdbRatingBigInt { - sum - } + ${movieType.operations.connection}(where: {testString_EQ: "${testString}"}) { + aggregate { + node { + imdbRatingBigInt { + sum + } + } + } } } `; @@ -224,9 +258,15 @@ describe("aggregations-top_level-bigint", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[movieType.operations.aggregate]).toEqual({ - imdbRatingBigInt: { - sum: "85899345890", + expect(gqlResult.data).toEqual({ + [movieType.operations.connection]: { + aggregate: { + node: { + imdbRatingBigInt: { + sum: "85899345890", + }, + }, + }, }, }); }); @@ -262,13 +302,17 @@ describe("aggregations-top_level-bigint", () => { const query = ` { - ${movieType.operations.aggregate}(where: {testString_EQ: "${testString}"}) { - imdbRatingBigInt { - min - max - average - sum - } + ${movieType.operations.connection}(where: {testString_EQ: "${testString}"}) { + aggregate { + node { + imdbRatingBigInt { + min + max + average + sum + } + } + } } } `; @@ -277,12 +321,18 @@ describe("aggregations-top_level-bigint", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[movieType.operations.aggregate]).toEqual({ - imdbRatingBigInt: { - min: `${bigInt}1`, - max: `${bigInt}4`, - average: `${bigInt}2.5`, - sum: "85899345890", + expect(gqlResult.data).toEqual({ + [movieType.operations.connection]: { + aggregate: { + node: { + imdbRatingBigInt: { + min: `${bigInt}1`, + max: `${bigInt}4`, + average: `${bigInt}2.5`, + sum: "85899345890", + }, + }, + }, }, }); }); diff --git a/packages/graphql/tests/integration/aggregations/top-level/count.int.test.ts b/packages/graphql/tests/integration/aggregations/top-level/count.int.test.ts index 1bbaa4f89a..a851d5ee96 100644 --- a/packages/graphql/tests/integration/aggregations/top-level/count.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/top-level/count.int.test.ts @@ -49,8 +49,12 @@ describe("Aggregate -> count", () => { const query = ` { - ${randomType.operations.aggregate}{ - count + ${randomType.operations.connection}{ + aggregate { + node { + count + } + } } } `; @@ -58,7 +62,15 @@ describe("Aggregate -> count", () => { const gqlResult = await testHelper.executeGraphQL(query); expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[randomType.operations.aggregate].count).toBe(2); + expect(gqlResult.data).toEqual({ + [randomType.operations.connection]: { + aggregate: { + node: { + count: 2, + }, + }, + }, + }); }); test("should count nodes with where and or predicate", async () => { @@ -80,18 +92,27 @@ describe("Aggregate -> count", () => { charset: "alphabetic", }); + const id3 = generate({ + charset: "alphabetic", + }); + await testHelper.executeCypher( ` CREATE (:${randomType.name} {id: $id1}) CREATE (:${randomType.name} {id: $id2}) + CREATE (:${randomType.name} {id: $id3}) `, - { id1, id2 } + { id1, id2, id3 } ); const query = ` { - ${randomType.operations.aggregate}(where: { OR: [{id_EQ: "${id1}"}, {id_EQ: "${id2}"}] }){ - count + ${randomType.operations.connection}(where: { OR: [{id_EQ: "${id1}"}, {id_EQ: "${id2}"}] }){ + aggregate { + node { + count + } + } } } `; @@ -100,6 +121,14 @@ describe("Aggregate -> count", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[randomType.operations.aggregate].count).toBe(2); + expect(gqlResult.data).toEqual({ + [randomType.operations.connection]: { + aggregate: { + node: { + count: 2, + }, + }, + }, + }); }); }); diff --git a/packages/graphql/tests/integration/aggregations/top-level/datetime.int.test.ts b/packages/graphql/tests/integration/aggregations/top-level/datetime.int.test.ts index 4be6e63be2..8700217ece 100644 --- a/packages/graphql/tests/integration/aggregations/top-level/datetime.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/top-level/datetime.int.test.ts @@ -64,9 +64,13 @@ describe("aggregations-top_level-datetime", () => { const query = ` { - ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { - createdAt { - min + ${Movie.operations.connection}(where: {testString_EQ: "${testString}"}) { + aggregate { + node { + createdAt { + min + } + } } } } @@ -76,9 +80,15 @@ describe("aggregations-top_level-datetime", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ - createdAt: { - min: minDate.toISOString(), + expect(gqlResult.data).toEqual({ + [Movie.operations.connection]: { + aggregate: { + node: { + createdAt: { + min: minDate.toISOString(), + }, + }, + }, }, }); }); @@ -108,10 +118,14 @@ describe("aggregations-top_level-datetime", () => { const query = ` { - ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { - createdAt { - max - } + ${Movie.operations.connection}(where: {testString_EQ: "${testString}"}) { + aggregate { + node { + createdAt { + max + } + } + } } } `; @@ -120,9 +134,15 @@ describe("aggregations-top_level-datetime", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ - createdAt: { - max: maxDate.toISOString(), + expect(gqlResult.data).toEqual({ + [Movie.operations.connection]: { + aggregate: { + node: { + createdAt: { + max: maxDate.toISOString(), + }, + }, + }, }, }); }); @@ -152,12 +172,16 @@ describe("aggregations-top_level-datetime", () => { const query = ` { - ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { - createdAt { - min - max + ${Movie.operations.connection}(where: {testString_EQ: "${testString}"}) { + aggregate { + node { + createdAt { + min + max + } + } } - } + } } `; @@ -165,10 +189,16 @@ describe("aggregations-top_level-datetime", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ - createdAt: { - min: minDate.toISOString(), - max: maxDate.toISOString(), + expect(gqlResult.data).toEqual({ + [Movie.operations.connection]: { + aggregate: { + node: { + createdAt: { + min: minDate.toISOString(), + max: maxDate.toISOString(), + }, + }, + }, }, }); }); diff --git a/packages/graphql/tests/integration/aggregations/top-level/duration.int.test.ts b/packages/graphql/tests/integration/aggregations/top-level/duration.int.test.ts index 94c16a3fb1..390b6de21f 100644 --- a/packages/graphql/tests/integration/aggregations/top-level/duration.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/top-level/duration.int.test.ts @@ -68,9 +68,13 @@ describe("aggregations-top_level-duration", () => { const query = ` { - ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { - runningTime { - min + ${Movie.operations.connection}(where: {testString_EQ: "${testString}"}) { + aggregate { + node { + runningTime { + min + } + } } } } @@ -80,9 +84,15 @@ describe("aggregations-top_level-duration", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ - runningTime: { - min: minDuration.toString(), + expect(gqlResult.data).toEqual({ + [Movie.operations.connection]: { + aggregate: { + node: { + runningTime: { + min: minDuration.toString(), + }, + }, + }, }, }); }); @@ -112,9 +122,13 @@ describe("aggregations-top_level-duration", () => { const query = ` { - ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { - runningTime { - max + ${Movie.operations.connection}(where: {testString_EQ: "${testString}"}) { + aggregate { + node { + runningTime { + max + } + } } } } @@ -124,9 +138,15 @@ describe("aggregations-top_level-duration", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ - runningTime: { - max: maxDuration.toString(), + expect(gqlResult.data).toEqual({ + [Movie.operations.connection]: { + aggregate: { + node: { + runningTime: { + max: maxDuration.toString(), + }, + }, + }, }, }); }); @@ -156,10 +176,14 @@ describe("aggregations-top_level-duration", () => { const query = ` { - ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { - runningTime { - min - max + ${Movie.operations.connection}(where: {testString_EQ: "${testString}"}) { + aggregate { + node { + runningTime { + min + max + } + } } } } @@ -169,10 +193,16 @@ describe("aggregations-top_level-duration", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ - runningTime: { - min: minDuration.toString(), - max: maxDuration.toString(), + expect(gqlResult.data).toEqual({ + [Movie.operations.connection]: { + aggregate: { + node: { + runningTime: { + min: minDuration.toString(), + max: maxDuration.toString(), + }, + }, + }, }, }); }); diff --git a/packages/graphql/tests/integration/aggregations/top-level/float.int.test.ts b/packages/graphql/tests/integration/aggregations/top-level/float.int.test.ts index 1ae161bc17..a3a1251d60 100644 --- a/packages/graphql/tests/integration/aggregations/top-level/float.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/top-level/float.int.test.ts @@ -60,9 +60,13 @@ describe("aggregations-top_level-float", () => { const query = ` { - ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { - imdbRating { - min + ${Movie.operations.connection}(where: {testString_EQ: "${testString}"}) { + aggregate { + node{ + imdbRating { + min + } + } } } } @@ -72,9 +76,15 @@ describe("aggregations-top_level-float", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ - imdbRating: { - min: expect.closeTo(1.1), + expect(gqlResult.data).toEqual({ + [Movie.operations.connection]: { + aggregate: { + node: { + imdbRating: { + min: expect.closeTo(1.1), + }, + }, + }, }, }); }); @@ -99,9 +109,13 @@ describe("aggregations-top_level-float", () => { const query = ` { - ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { - imdbRating { - max + ${Movie.operations.connection}(where: {testString_EQ: "${testString}"}) { + aggregate { + node { + imdbRating { + max + } + } } } } @@ -115,9 +129,15 @@ describe("aggregations-top_level-float", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ - imdbRating: { - max: expect.closeTo(4.1), + expect(gqlResult.data).toEqual({ + [Movie.operations.connection]: { + aggregate: { + node: { + imdbRating: { + max: expect.closeTo(4.1), + }, + }, + }, }, }); }); @@ -142,9 +162,13 @@ describe("aggregations-top_level-float", () => { const query = ` { - ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { - imdbRating { - average + ${Movie.operations.connection}(where: {testString_EQ: "${testString}"}) { + aggregate { + node { + imdbRating { + average + } + } } } } @@ -158,9 +182,15 @@ describe("aggregations-top_level-float", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ - imdbRating: { - average: expect.closeTo(2.6), + expect(gqlResult.data).toEqual({ + [Movie.operations.connection]: { + aggregate: { + node: { + imdbRating: { + average: expect.closeTo(2.6), + }, + }, + }, }, }); }); @@ -185,11 +215,15 @@ describe("aggregations-top_level-float", () => { const query = ` { - ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { - imdbRating { - sum + ${Movie.operations.connection}(where: {testString_EQ: "${testString}"}) { + aggregate { + node { + imdbRating { + sum + } + } } - } + } } `; @@ -201,9 +235,15 @@ describe("aggregations-top_level-float", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ - imdbRating: { - sum: expect.closeTo(10.4), + expect(gqlResult.data).toEqual({ + [Movie.operations.connection]: { + aggregate: { + node: { + imdbRating: { + sum: expect.closeTo(10.4), + }, + }, + }, }, }); }); @@ -228,12 +268,16 @@ describe("aggregations-top_level-float", () => { const query = ` { - ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { - imdbRating { - min - max - average - sum + ${Movie.operations.connection}(where: {testString_EQ: "${testString}"}) { + aggregate { + node { + imdbRating { + min + max + average + sum + } + } } } } @@ -247,12 +291,18 @@ describe("aggregations-top_level-float", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ - imdbRating: { - min: expect.closeTo(1.1), - max: expect.closeTo(4.1), - average: expect.closeTo(2.6), - sum: expect.closeTo(10.4), + expect(gqlResult.data).toEqual({ + [Movie.operations.connection]: { + aggregate: { + node: { + imdbRating: { + min: expect.closeTo(1.1), + max: expect.closeTo(4.1), + average: expect.closeTo(2.6), + sum: expect.closeTo(10.4), + }, + }, + }, }, }); }); 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 index c7c2fe3063..df30e88253 100644 --- a/packages/graphql/tests/integration/aggregations/top-level/id.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/top-level/id.int.test.ts @@ -61,9 +61,13 @@ describe("aggregations-top_level-id", () => { const query = ` { - ${Movie.operations.aggregate}(where: {testId_EQ: "${id}"}) { - id { - shortest + ${Movie.operations.connection}(where: {testId_EQ: "${id}"}) { + aggregate { + node { + id { + shortest + } + } } } } @@ -77,9 +81,15 @@ describe("aggregations-top_level-id", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ - id: { - shortest: "1", + expect(gqlResult.data).toEqual({ + [Movie.operations.connection]: { + aggregate: { + node: { + id: { + shortest: "1", + }, + }, + }, }, }); }); @@ -104,10 +114,14 @@ describe("aggregations-top_level-id", () => { const query = ` { - ${Movie.operations.aggregate}(where: {testId_EQ: "${id}"}) { - id { - longest - } + ${Movie.operations.connection}(where: {testId_EQ: "${id}"}) { + aggregate { + node { + id { + longest + } + } + } } } `; @@ -120,9 +134,15 @@ describe("aggregations-top_level-id", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ - id: { - longest: "4444", + expect(gqlResult.data).toEqual({ + [Movie.operations.connection]: { + aggregate: { + node: { + id: { + longest: "4444", + }, + }, + }, }, }); }); @@ -147,10 +167,14 @@ describe("aggregations-top_level-id", () => { const query = ` { - ${Movie.operations.aggregate}(where: {testId_EQ: "${id}"}) { - id { - shortest - longest + ${Movie.operations.connection}(where: {testId_EQ: "${id}"}) { + aggregate { + node { + id { + shortest + longest + } + } } } } @@ -164,10 +188,16 @@ describe("aggregations-top_level-id", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ - id: { - shortest: "1", - longest: "4444", + expect(gqlResult.data).toEqual({ + [Movie.operations.connection]: { + aggregate: { + node: { + id: { + shortest: "1", + longest: "4444", + }, + }, + }, }, }); }); diff --git a/packages/graphql/tests/integration/aggregations/top-level/int.int.test.ts b/packages/graphql/tests/integration/aggregations/top-level/int.int.test.ts index 9e20c43fb2..ec501d0836 100644 --- a/packages/graphql/tests/integration/aggregations/top-level/int.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/top-level/int.int.test.ts @@ -61,10 +61,14 @@ describe("aggregations-top_level-int", () => { const query = ` { - ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { - imdbRating { - min - } + ${Movie.operations.connection}(where: {testString_EQ: "${testString}"}) { + aggregate { + node { + imdbRating { + min + } + } + } } } `; @@ -77,9 +81,15 @@ describe("aggregations-top_level-int", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ - imdbRating: { - min: 1, + expect(gqlResult.data).toEqual({ + [Movie.operations.connection]: { + aggregate: { + node: { + imdbRating: { + min: 1, + }, + }, + }, }, }); }); @@ -104,10 +114,14 @@ describe("aggregations-top_level-int", () => { const query = ` { - ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { - imdbRating { - max - } + ${Movie.operations.connection}(where: {testString_EQ: "${testString}"}) { + aggregate { + node { + imdbRating { + max + } + } + } } } `; @@ -120,9 +134,15 @@ describe("aggregations-top_level-int", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ - imdbRating: { - max: 4, + expect(gqlResult.data).toEqual({ + [Movie.operations.connection]: { + aggregate: { + node: { + imdbRating: { + max: 4, + }, + }, + }, }, }); }); @@ -147,10 +167,14 @@ describe("aggregations-top_level-int", () => { const query = ` { - ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { - imdbRating { - average - } + ${Movie.operations.connection}(where: {testString_EQ: "${testString}"}) { + aggregate { + node { + imdbRating { + average + } + } + } } } `; @@ -163,9 +187,15 @@ describe("aggregations-top_level-int", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ - imdbRating: { - average: 2.5, + expect(gqlResult.data).toEqual({ + [Movie.operations.connection]: { + aggregate: { + node: { + imdbRating: { + average: 2.5, + }, + }, + }, }, }); }); @@ -190,10 +220,14 @@ describe("aggregations-top_level-int", () => { const query = ` { - ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { - imdbRating { - sum - } + ${Movie.operations.connection}(where: {testString_EQ: "${testString}"}) { + aggregate { + node { + imdbRating { + sum + } + } + } } } `; @@ -206,9 +240,15 @@ describe("aggregations-top_level-int", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ - imdbRating: { - sum: 10, + expect(gqlResult.data).toEqual({ + [Movie.operations.connection]: { + aggregate: { + node: { + imdbRating: { + sum: 10, + }, + }, + }, }, }); }); @@ -233,12 +273,16 @@ describe("aggregations-top_level-int", () => { const query = ` { - ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { - imdbRating { - min - max - average - sum + ${Movie.operations.connection}(where: {testString_EQ: "${testString}"}) { + aggregate { + node { + imdbRating { + min + max + average + sum + } + } } } } @@ -252,12 +296,18 @@ describe("aggregations-top_level-int", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ - imdbRating: { - min: 1, - max: 4, - average: 2.5, - sum: 10, + expect(gqlResult.data).toEqual({ + [Movie.operations.connection]: { + aggregate: { + node: { + imdbRating: { + min: 1, + max: 4, + average: 2.5, + sum: 10, + }, + }, + }, }, }); }); 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..434b44d03d 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 @@ -67,25 +67,29 @@ describe("aggregations-top_level-many", () => { const query = ` { - ${typeMovie.operations.aggregate}(where: { testId_EQ: "${testId}" }) { - id { - shortest - longest - } - title { - shortest - longest - } - imdbRating { - min - max - average - } - createdAt { - min - max - } - } + ${typeMovie.operations.connection}(where: { testId_EQ: "${testId}" }) { + aggregate { + node { + id { + shortest + longest + } + title { + shortest + longest + } + imdbRating { + min + max + average + } + createdAt { + min + max + } + } + } + } } `; @@ -97,23 +101,29 @@ 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", - }, - imdbRating: { - min: 1, - max: 4, - average: 2.5, - }, - createdAt: { - min: minDate.toISOString(), - max: maxDate.toISOString(), + expect(gqlResult.data).toEqual({ + [typeMovie.operations.connection]: { + aggregate: { + node: { + id: { + shortest: "1", + longest: "4444", + }, + title: { + shortest: "1", + longest: "4444", + }, + imdbRating: { + min: 1, + max: 4, + average: 2.5, + }, + createdAt: { + min: minDate.toISOString(), + max: maxDate.toISOString(), + }, + }, + }, }, }); }); diff --git a/packages/graphql/tests/integration/aggregations/top-level/string.int.test.ts b/packages/graphql/tests/integration/aggregations/top-level/string.int.test.ts index ed5379a53d..3cd770e00d 100644 --- a/packages/graphql/tests/integration/aggregations/top-level/string.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/top-level/string.int.test.ts @@ -70,11 +70,15 @@ describe("aggregations-top_level-string", () => { const query = ` { - ${typeMovie.operations.aggregate}(where: {testId_EQ: "${id}"}) { - title { + ${typeMovie.operations.connection}(where: {testId_EQ: "${id}"}) { + aggregate { + node { + title { shortest } - } + } + } + } } `; @@ -86,9 +90,15 @@ describe("aggregations-top_level-string", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[typeMovie.operations.aggregate]).toEqual({ - title: { - shortest: titles[0], + expect(gqlResult.data).toEqual({ + [typeMovie.operations.connection]: { + aggregate: { + node: { + title: { + shortest: titles[0], + }, + }, + }, }, }); }); @@ -122,11 +132,15 @@ describe("aggregations-top_level-string", () => { const query = ` { - ${typeMovie.operations.aggregate}(where: {testId_EQ: "${id}"}) { - title { + ${typeMovie.operations.connection}(where: {testId_EQ: "${id}"}) { + aggregate { + node { + title { longest } - } + } + } + } } `; @@ -138,9 +152,15 @@ describe("aggregations-top_level-string", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[typeMovie.operations.aggregate]).toEqual({ - title: { - longest: titles[3], + expect(gqlResult.data).toEqual({ + [typeMovie.operations.connection]: { + aggregate: { + node: { + title: { + longest: titles[3], + }, + }, + }, }, }); }); @@ -174,11 +194,15 @@ describe("aggregations-top_level-string", () => { const query = ` { - ${typeMovie.operations.aggregate}(where: {testId_EQ: "${id}"}) { - title { + ${typeMovie.operations.connection}(where: {testId_EQ: "${id}"}) { + aggregate { + node { + title { shortest longest - } + } + } + } } } `; @@ -191,10 +215,16 @@ describe("aggregations-top_level-string", () => { expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult.data as any)[typeMovie.operations.aggregate]).toEqual({ - title: { - shortest: titles[0], - longest: titles[3], + expect(gqlResult.data).toEqual({ + [typeMovie.operations.connection]: { + aggregate: { + node: { + title: { + shortest: titles[0], + longest: titles[3], + }, + }, + }, }, }); }); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/top-level/authorization.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/top-level/authorization.int.test.ts new file mode 100644 index 0000000000..4c9dbabd63 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/aggregations/top-level/authorization.int.test.ts @@ -0,0 +1,501 @@ +/* + * 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 { TestHelper } from "../../../../utils/tests-helper"; + +describe("aggregations-top_level authorization", () => { + const testHelper = new TestHelper(); + const secret = "secret"; + + afterEach(async () => { + await testHelper.close(); + }); + + test("should throw forbidden when incorrect allow on aggregate count", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = /* GraphQL */ ` + type ${randomType.name} @node { + id: ID + } + + extend type ${randomType.name} @authorization(validate: [ { operations: [AGGREGATE], when: BEFORE, where: { node: { id_EQ: "$jwt.sub" } } }]) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const query = ` + { + ${randomType.operations.aggregate} { + count + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:${randomType.name} {id: "${userId}"}) + `); + + const token = createBearerToken(secret, { sub: "invalid" }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Forbidden"); + }); + + test("should append auth where to predicate and return post count for this user", async () => { + const typeDefs = /* GraphQL */ ` + type User @node { + id: ID + posts: [Post!]! @relationship(type: "POSTED", direction: OUT) + } + + type Post @node { + content: String + creator: User! @relationship(type: "POSTED", direction: IN) + } + + extend type Post + @authorization( + filter: [{ operations: [AGGREGATE], where: { node: { creator: { id_EQ: "$jwt.sub" } } } }] + ) + `; + + const userId = generate({ + charset: "alphabetic", + }); + + const query = ` + { + postsAggregate { + count + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:User {id: "${userId}"})-[:POSTED]->(:Post {content: randomUUID()}) + `); + + const token = createBearerToken(secret, { sub: userId }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect(gqlResult.errors).toBeUndefined(); + + expect(gqlResult.data).toEqual({ + postsAggregate: { + count: 1, + }, + }); + }); + + test("should throw when invalid allow when aggregating a Int field", async () => { + const typeDefs = /* GraphQL */ ` + type Movie @node { + id: ID + director: Person! @relationship(type: "DIRECTED", direction: IN) + imdbRatingInt: Int + @authorization(validate: [{ when: BEFORE, where: { node: { director: { 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}"}) { + imdbRatingInt { + min + max + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:Person {id: "${userId}"})-[:DIRECTED]->(:Movie {id: "${movieId}", imdbRatingInt: rand()}) + `); + + 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 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: { 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 */ ` + type Movie @node { + id: ID + director: Person! @relationship(type: "DIRECTED", direction: IN) + someString: String + @authorization(validate: [{ when: BEFORE, where: { node: { director: { 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}"}) { + someString { + shortest + longest + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:Person {id: "${userId}"})-[:DIRECTED]->(:Movie {id: "${movieId}", someString: "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 Float field", async () => { + const typeDefs = /* GraphQL */ ` + type Movie @node { + id: ID + director: Person! @relationship(type: "DIRECTED", direction: IN) + imdbRatingFloat: Float + @authorization(validate: [{ when: BEFORE, where: { node: { director: { 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}"}) { + imdbRatingFloat { + min + max + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:Person {id: "${userId}"})-[:DIRECTED]->(:Movie {id: "${movieId}", imdbRatingFloat: rand()}) + `); + + 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 BigInt field", async () => { + const typeDefs = /* GraphQL */ ` + type Movie @node { + id: ID + director: Person! @relationship(type: "DIRECTED", direction: IN) + imdbRatingBigInt: BigInt + @authorization(validate: [{ when: BEFORE, where: { node: { director: { 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}"}) { + imdbRatingBigInt { + min + max + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:Person {id: "${userId}"})-[:DIRECTED]->(:Movie {id: "${movieId}", imdbRatingBigInt: rand()}) + `); + + 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 DateTime field", async () => { + const typeDefs = /* GraphQL */ ` + type Movie @node { + id: ID + director: Person! @relationship(type: "DIRECTED", direction: IN) + createdAt: DateTime + @authorization(validate: [{ when: BEFORE, where: { node: { director: { 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}"}) { + createdAt { + min + max + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:Person {id: "${userId}"})-[:DIRECTED]->(:Movie {id: "${movieId}", createdAt: datetime()}) + `); + + 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 Duration field", async () => { + const typeDefs = /* GraphQL */ ` + type Movie @node { + id: ID + director: Person! @relationship(type: "DIRECTED", direction: IN) + screenTime: Duration + @authorization(validate: [{ when: BEFORE, where: { node: { director: { 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}"}) { + screenTime { + min + max + } + } + } + `; + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { + key: secret, + }, + }, + }); + + await testHelper.executeCypher(` + CREATE (:Person {id: "${userId}"})-[:DIRECTED]->(:Movie {id: "${movieId}", createdAt: datetime()}) + `); + + const token = createBearerToken(secret, { sub: "invalid" }); + + const gqlResult = await testHelper.executeGraphQLWithToken(query, token); + + expect((gqlResult.errors as any[])[0].message).toBe("Forbidden"); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/top-level/basic.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/top-level/basic.int.test.ts index 0e4314dae2..14d1275c9b 100644 --- a/packages/graphql/tests/integration/deprecations/aggregations/top-level/basic.int.test.ts +++ b/packages/graphql/tests/integration/deprecations/aggregations/top-level/basic.int.test.ts @@ -17,7 +17,7 @@ * limitations under the License. */ -import { TestHelper } from "../../../utils/tests-helper"; +import { TestHelper } from "../../../../utils/tests-helper"; describe("aggregations-top_level-basic", () => { const testHelper = new TestHelper(); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/top-level/bigint.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/top-level/bigint.test.ts new file mode 100644 index 0000000000..88e4bf6dd1 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/aggregations/top-level/bigint.test.ts @@ -0,0 +1,289 @@ +/* + * 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 { TestHelper } from "../../../../utils/tests-helper"; + +describe("aggregations-top_level-bigint", () => { + const testHelper = new TestHelper(); + + const bigInt = "2147483647"; + + beforeEach(() => {}); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should return the min of node properties", async () => { + const movieType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${movieType.name} @node { + testString: String + imdbRatingBigInt: BigInt + } + `; + + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + await testHelper.executeCypher( + ` + CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}1}) + CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}2}) + CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}3}) + CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}4}) + `, + { + testString, + } + ); + + const query = ` + { + ${movieType.operations.aggregate}(where: {testString_EQ: "${testString}"}) { + imdbRatingBigInt { + min + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[movieType.operations.aggregate]).toEqual({ + imdbRatingBigInt: { + min: `${bigInt}1`, + }, + }); + }); + + test("should return the max of node properties", async () => { + const movieType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${movieType.name} @node { + testString: String + imdbRatingBigInt: BigInt + } + `; + + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + await testHelper.executeCypher( + ` + CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}1}) + CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}2}) + CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}3}) + CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}4}) + `, + { + testString, + } + ); + + const query = ` + { + ${movieType.operations.aggregate}(where: {testString_EQ: "${testString}"}) { + imdbRatingBigInt { + max + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[movieType.operations.aggregate]).toEqual({ + imdbRatingBigInt: { + max: `${bigInt}4`, + }, + }); + }); + + test("should return the average of node properties", async () => { + const movieType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${movieType.name} @node { + testString: String + imdbRatingBigInt: BigInt + } + `; + + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + await testHelper.executeCypher( + ` + CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}1}) + CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}2}) + CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}3}) + CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}4}) + `, + { + testString, + } + ); + + const query = ` + { + ${movieType.operations.aggregate}(where: {testString_EQ: "${testString}"}) { + imdbRatingBigInt { + average + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[movieType.operations.aggregate]).toEqual({ + imdbRatingBigInt: { + average: `${bigInt}2.5`, + }, + }); + }); + + test("should return the sum of node properties", async () => { + const movieType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${movieType.name} @node { + testString: String + imdbRatingBigInt: BigInt + } + `; + + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + await testHelper.executeCypher( + ` + CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}1}) + CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}2}) + CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}3}) + CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}4}) + `, + { + testString, + } + ); + + const query = ` + { + ${movieType.operations.aggregate}(where: {testString_EQ: "${testString}"}) { + imdbRatingBigInt { + sum + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[movieType.operations.aggregate]).toEqual({ + imdbRatingBigInt: { + sum: "85899345890", + }, + }); + }); + + test("should return the min, max, sum and average of node properties", async () => { + const movieType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${movieType.name} @node { + testString: String + imdbRatingBigInt: BigInt + } + `; + + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + await testHelper.executeCypher( + ` + CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}1}) + CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}2}) + CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}3}) + CREATE (:${movieType.name} {testString: $testString, imdbRatingBigInt: ${bigInt}4}) + `, + { + testString, + } + ); + + const query = ` + { + ${movieType.operations.aggregate}(where: {testString_EQ: "${testString}"}) { + imdbRatingBigInt { + min + max + average + sum + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[movieType.operations.aggregate]).toEqual({ + imdbRatingBigInt: { + min: `${bigInt}1`, + max: `${bigInt}4`, + average: `${bigInt}2.5`, + sum: "85899345890", + }, + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/top-level/count.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/top-level/count.int.test.ts new file mode 100644 index 0000000000..d07818c53d --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/aggregations/top-level/count.int.test.ts @@ -0,0 +1,105 @@ +/* + * 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 { TestHelper } from "../../../../utils/tests-helper"; + +describe("Aggregate -> count", () => { + const testHelper = new TestHelper(); + + beforeEach(() => {}); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should count nodes", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${randomType.name} @node { + id: ID + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {id: randomUUID()}) + CREATE (:${randomType.name} {id: randomUUID()}) + ` + ); + + const query = ` + { + ${randomType.operations.aggregate}{ + count + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + expect((gqlResult.data as any)[randomType.operations.aggregate].count).toBe(2); + }); + + test("should count nodes with where and or predicate", async () => { + const randomType = testHelper.createUniqueType("Movie"); + + const typeDefs = ` + type ${randomType.name} @node { + id: ID + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + const id1 = generate({ + charset: "alphabetic", + }); + + const id2 = generate({ + charset: "alphabetic", + }); + + await testHelper.executeCypher( + ` + CREATE (:${randomType.name} {id: $id1}) + CREATE (:${randomType.name} {id: $id2}) + `, + { id1, id2 } + ); + + const query = ` + { + ${randomType.operations.aggregate}(where: { OR: [{id_EQ: "${id1}"}, {id_EQ: "${id2}"}] }){ + count + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[randomType.operations.aggregate].count).toBe(2); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/top-level/datetime.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/top-level/datetime.int.test.ts new file mode 100644 index 0000000000..f93cf2f0de --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/aggregations/top-level/datetime.int.test.ts @@ -0,0 +1,175 @@ +/* + * 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-datetime", () => { + const testHelper = new TestHelper(); + let typeDefs: string; + let Movie: UniqueType; + + beforeEach(async () => { + Movie = testHelper.createUniqueType("Movie"); + typeDefs = ` + type ${Movie} @node { + testString: String + createdAt: DateTime + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should return the min of node properties", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const minDate = new Date(); + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {testString: $testString, createdAt: datetime("${minDate.toISOString()}")}) + CREATE (:${Movie} {testString: $testString, createdAt: datetime()}) + CREATE (:${Movie} {testString: $testString, createdAt: datetime()}) + CREATE (:${Movie} {testString: $testString, createdAt: datetime()}) + `, + { + testString, + } + ); + + const query = ` + { + ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { + createdAt { + min + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ + createdAt: { + min: minDate.toISOString(), + }, + }); + }); + + test("should return the max of node properties", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const minDate = new Date(); + + const maxDate = new Date(); + maxDate.setDate(maxDate.getDate() + 1); + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {testString: $testString, createdAt: datetime("${minDate.toISOString()}")}) + CREATE (:${Movie} {testString: $testString, createdAt: datetime()}) + CREATE (:${Movie} {testString: $testString, createdAt: datetime()}) + CREATE (:${Movie} {testString: $testString, createdAt: datetime("${maxDate.toISOString()}")}) + `, + { + testString, + } + ); + + const query = ` + { + ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { + createdAt { + max + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ + createdAt: { + max: maxDate.toISOString(), + }, + }); + }); + + test("should return the min and max of node properties", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const minDate = new Date(); + + const maxDate = new Date(); + maxDate.setDate(maxDate.getDate() + 1); + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {testString: $testString, createdAt: datetime("${minDate.toISOString()}")}) + CREATE (:${Movie} {testString: $testString, createdAt: datetime()}) + CREATE (:${Movie} {testString: $testString, createdAt: datetime()}) + CREATE (:${Movie} {testString: $testString, createdAt: datetime("${maxDate.toISOString()}")}) + `, + { + testString, + } + ); + + const query = ` + { + ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { + createdAt { + min + max + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ + createdAt: { + min: minDate.toISOString(), + max: maxDate.toISOString(), + }, + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/top-level/duration.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/top-level/duration.int.test.ts new file mode 100644 index 0000000000..d9f58e1007 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/aggregations/top-level/duration.int.test.ts @@ -0,0 +1,179 @@ +/* + * 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 type { UniqueType } from "../../../../utils/graphql-types"; +import { TestHelper } from "../../../../utils/tests-helper"; + +describe("aggregations-top_level-duration", () => { + const testHelper = new TestHelper(); + let Movie: UniqueType; + let typeDefs: string; + + beforeEach(async () => { + Movie = testHelper.createUniqueType("Movie"); + typeDefs = ` + type ${Movie} @node { + testString: String + runningTime: Duration + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should return the min of node properties", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const months = 1; + const days = 1; + const minDuration = new neo4jDriver.types.Duration(months, days, 0, 0); + const maxDuration = new neo4jDriver.types.Duration(months + 1, days, 0, 0); + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {testString: $testString, runningTime: $minDuration}) + CREATE (:${Movie} {testString: $testString, runningTime: $maxDuration}) + `, + { + testString, + minDuration, + maxDuration, + } + ); + + const query = ` + { + ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { + runningTime { + min + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ + runningTime: { + min: minDuration.toString(), + }, + }); + }); + + test("should return the max of node properties", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const months = 1; + const days = 1; + const minDuration = new neo4jDriver.types.Duration(months, days, 0, 0); + const maxDuration = new neo4jDriver.types.Duration(months + 1, days, 0, 0); + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {testString: $testString, runningTime: $minDuration}) + CREATE (:${Movie} {testString: $testString, runningTime: $maxDuration}) + `, + { + testString, + minDuration, + maxDuration, + } + ); + + const query = ` + { + ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { + runningTime { + max + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ + runningTime: { + max: maxDuration.toString(), + }, + }); + }); + + test("should return the min and max of node properties", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const months = 1; + const days = 1; + const minDuration = new neo4jDriver.types.Duration(months, days, 0, 0); + const maxDuration = new neo4jDriver.types.Duration(months + 1, days, 0, 0); + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {testString: $testString, runningTime: $minDuration}) + CREATE (:${Movie} {testString: $testString, runningTime: $maxDuration}) + `, + { + testString, + minDuration, + maxDuration, + } + ); + + const query = ` + { + ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { + runningTime { + min + max + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ + runningTime: { + min: minDuration.toString(), + max: maxDuration.toString(), + }, + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/top-level/float.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/top-level/float.int.test.ts new file mode 100644 index 0000000000..86ed28826e --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/aggregations/top-level/float.int.test.ts @@ -0,0 +1,259 @@ +/* + * 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-float", () => { + const testHelper = new TestHelper(); + let Movie: UniqueType; + + beforeAll(async () => { + Movie = testHelper.createUniqueType("Movie"); + const typeDefs = ` + type ${Movie} @node { + testString: String + imdbRating: Float + } + `; + await testHelper.initNeo4jGraphQL({ typeDefs }); + }); + + afterAll(async () => { + await testHelper.close(); + }); + + test("should return the min of node properties", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {testString: $testString, imdbRating: 1.1}) + CREATE (:${Movie} {testString: $testString, imdbRating: 2.1}) + CREATE (:${Movie} {testString: $testString, imdbRating: 3.1}) + CREATE (:${Movie} {testString: $testString, imdbRating: 4.1}) + `, + { + testString, + } + ); + + const query = ` + { + ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { + imdbRating { + min + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect((gqlResult.data as any)[Movie.operations.aggregate]).toEqual({ + imdbRating: { + min: expect.closeTo(1.1), + }, + }); + }); + + test("should return the max of node properties", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {testString: $testString, imdbRating: 1.1}) + CREATE (:${Movie} {testString: $testString, imdbRating: 2.1}) + CREATE (:${Movie} {testString: $testString, imdbRating: 3.1}) + CREATE (:${Movie} {testString: $testString, imdbRating: 4.1}) + `, + { + testString, + } + ); + + const query = ` + { + ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { + imdbRating { + max + } + } + } + `; + + 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({ + imdbRating: { + max: expect.closeTo(4.1), + }, + }); + }); + + test("should return the average of node properties", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {testString: $testString, imdbRating: 1.1}) + CREATE (:${Movie} {testString: $testString, imdbRating: 2.1}) + CREATE (:${Movie} {testString: $testString, imdbRating: 3.1}) + CREATE (:${Movie} {testString: $testString, imdbRating: 4.1}) + `, + { + testString, + } + ); + + const query = ` + { + ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { + imdbRating { + average + } + } + } + `; + + 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({ + imdbRating: { + average: expect.closeTo(2.6), + }, + }); + }); + + test("should return the sum of node properties", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {testString: $testString, imdbRating: 1.1}) + CREATE (:${Movie} {testString: $testString, imdbRating: 2.1}) + CREATE (:${Movie} {testString: $testString, imdbRating: 3.1}) + CREATE (:${Movie} {testString: $testString, imdbRating: 4.1}) + `, + { + testString, + } + ); + + const query = ` + { + ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { + imdbRating { + sum + } + } + } + `; + + 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({ + imdbRating: { + sum: expect.closeTo(10.4), + }, + }); + }); + + test("should return the min, max, sum and average of node properties", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {testString: $testString, imdbRating: 1.1}) + CREATE (:${Movie} {testString: $testString, imdbRating: 2.1}) + CREATE (:${Movie} {testString: $testString, imdbRating: 3.1}) + CREATE (:${Movie} {testString: $testString, imdbRating: 4.1}) + `, + { + testString, + } + ); + + const query = ` + { + ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { + imdbRating { + min + max + average + sum + } + } + } + `; + + 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({ + imdbRating: { + min: expect.closeTo(1.1), + max: expect.closeTo(4.1), + average: expect.closeTo(2.6), + sum: expect.closeTo(10.4), + }, + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/top-level/id.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/top-level/id.int.test.ts new file mode 100644 index 0000000000..8cfeb970c5 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/aggregations/top-level/id.int.test.ts @@ -0,0 +1,174 @@ +/* + * 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/deprecations/aggregations/top-level/int.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/top-level/int.int.test.ts new file mode 100644 index 0000000000..4826a6abef --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/aggregations/top-level/int.int.test.ts @@ -0,0 +1,264 @@ +/* + * 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-int", () => { + const testHelper = new TestHelper(); + let Movie: UniqueType; + + beforeEach(async () => { + Movie = testHelper.createUniqueType("Movie"); + const typeDefs = ` + type ${Movie} @node { + testString: String + imdbRating: Int + } + `; + + await testHelper.initNeo4jGraphQL({ typeDefs }); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should return the min of node properties", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {testString: $testString, imdbRating: 1}) + CREATE (:${Movie} {testString: $testString, imdbRating: 2}) + CREATE (:${Movie} {testString: $testString, imdbRating: 3}) + CREATE (:${Movie} {testString: $testString, imdbRating: 4}) + `, + { + testString, + } + ); + + const query = ` + { + ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { + imdbRating { + min + } + } + } + `; + + 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({ + imdbRating: { + min: 1, + }, + }); + }); + + test("should return the max of node properties", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {testString: $testString, imdbRating: 1}) + CREATE (:${Movie} {testString: $testString, imdbRating: 2}) + CREATE (:${Movie} {testString: $testString, imdbRating: 3}) + CREATE (:${Movie} {testString: $testString, imdbRating: 4}) + `, + { + testString, + } + ); + + const query = ` + { + ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { + imdbRating { + max + } + } + } + `; + + 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({ + imdbRating: { + max: 4, + }, + }); + }); + + test("should return the average of node properties", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {testString: $testString, imdbRating: 1}) + CREATE (:${Movie} {testString: $testString, imdbRating: 2}) + CREATE (:${Movie} {testString: $testString, imdbRating: 3}) + CREATE (:${Movie} {testString: $testString, imdbRating: 4}) + `, + { + testString, + } + ); + + const query = ` + { + ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { + imdbRating { + average + } + } + } + `; + + 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({ + imdbRating: { + average: 2.5, + }, + }); + }); + + test("should return the sum of node properties", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {testString: $testString, imdbRating: 1}) + CREATE (:${Movie} {testString: $testString, imdbRating: 2}) + CREATE (:${Movie} {testString: $testString, imdbRating: 3}) + CREATE (:${Movie} {testString: $testString, imdbRating: 4}) + `, + { + testString, + } + ); + + const query = ` + { + ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { + imdbRating { + sum + } + } + } + `; + + 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({ + imdbRating: { + sum: 10, + }, + }); + }); + + test("should return the min, max, sum and average of node properties", async () => { + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.executeCypher( + ` + CREATE (:${Movie} {testString: $testString, imdbRating: 1}) + CREATE (:${Movie} {testString: $testString, imdbRating: 2}) + CREATE (:${Movie} {testString: $testString, imdbRating: 3}) + CREATE (:${Movie} {testString: $testString, imdbRating: 4}) + `, + { + testString, + } + ); + + const query = ` + { + ${Movie.operations.aggregate}(where: {testString_EQ: "${testString}"}) { + imdbRating { + min + max + average + sum + } + } + } + `; + + 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({ + imdbRating: { + min: 1, + max: 4, + average: 2.5, + sum: 10, + }, + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/top-level/many.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/top-level/many.int.test.ts new file mode 100644 index 0000000000..3642c056b6 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/aggregations/top-level/many.int.test.ts @@ -0,0 +1,120 @@ +/* + * 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-many", () => { + const testHelper = new TestHelper(); + let typeMovie: UniqueType; + + beforeEach(() => { + typeMovie = testHelper.createUniqueType("Movie"); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should preform many aggregations and return correct data", async () => { + const typeDefs = ` + type ${typeMovie} @node { + testId: ID! + id: ID! + title: String! + imdbRating: Int! + createdAt: DateTime + } + `; + + const testId = generate({ + charset: "alphabetic", + readable: true, + }); + + const minDate = new Date(); + + const maxDate = new Date(); + maxDate.setDate(maxDate.getDate() + 1); + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + await testHelper.executeCypher( + ` + CREATE (:${typeMovie} {testId: "${testId}", id: "1", title: "1", imdbRating: 1, createdAt: datetime("${minDate.toISOString()}")}) + CREATE (:${typeMovie} {testId: "${testId}", id: "22", title: "22", imdbRating: 2, createdAt: datetime()}) + CREATE (:${typeMovie} {testId: "${testId}", id: "333", title: "333", imdbRating: 3, createdAt: datetime()}) + CREATE (:${typeMovie} {testId: "${testId}", id: "4444", title: "4444", imdbRating: 4, createdAt: datetime("${maxDate.toISOString()}")}) + ` + ); + + const query = ` + { + ${typeMovie.operations.aggregate}(where: { testId_EQ: "${testId}" }) { + id { + shortest + longest + } + title { + shortest + longest + } + imdbRating { + min + max + average + } + createdAt { + min + max + } + } + } + `; + + 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)[typeMovie.operations.aggregate]).toEqual({ + id: { + shortest: "1", + longest: "4444", + }, + title: { + shortest: "1", + longest: "4444", + }, + imdbRating: { + min: 1, + max: 4, + average: 2.5, + }, + createdAt: { + min: minDate.toISOString(), + max: maxDate.toISOString(), + }, + }); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/top-level/string.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/top-level/string.int.test.ts new file mode 100644 index 0000000000..eb78bd86a1 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/aggregations/top-level/string.int.test.ts @@ -0,0 +1,201 @@ +/* + * 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-string", () => { + const testHelper = new TestHelper(); + let typeMovie: UniqueType; + + const titles = [10, 11, 12, 13, 14].map((length) => + generate({ + charset: "alphabetic", + readable: true, + length, + }) + ); + + beforeEach(() => { + typeMovie = testHelper.createUniqueType("Movie"); + }); + + afterEach(async () => { + await testHelper.close(); + }); + + test("should return the shortest of node properties", async () => { + const typeDefs = ` + type ${typeMovie} @node { + testId: ID + title: String + } + `; + + const id = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + await testHelper.executeCypher( + ` + CREATE (:${typeMovie} {testId: $id, title: "${titles[0]}"}) + CREATE (:${typeMovie} {testId: $id, title: "${titles[1]}"}) + CREATE (:${typeMovie} {testId: $id, title: "${titles[2]}"}) + CREATE (:${typeMovie} {testId: $id, title: "${titles[3]}"}) + `, + { + id, + } + ); + + const query = ` + { + ${typeMovie.operations.aggregate}(where: {testId_EQ: "${id}"}) { + title { + 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)[typeMovie.operations.aggregate]).toEqual({ + title: { + shortest: titles[0], + }, + }); + }); + + test("should return the longest of node properties", async () => { + const typeDefs = ` + type ${typeMovie} @node { + testId: ID + title: String + } + `; + + const id = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + await testHelper.executeCypher( + ` + CREATE (:${typeMovie} {testId: $id, title: "${titles[0]}"}) + CREATE (:${typeMovie} {testId: $id, title: "${titles[1]}"}) + CREATE (:${typeMovie} {testId: $id, title: "${titles[2]}"}) + CREATE (:${typeMovie} {testId: $id, title: "${titles[3]}"}) + `, + { + id, + } + ); + + const query = ` + { + ${typeMovie.operations.aggregate}(where: {testId_EQ: "${id}"}) { + title { + 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)[typeMovie.operations.aggregate]).toEqual({ + title: { + longest: titles[3], + }, + }); + }); + + test("should return the shortest and longest of node properties", async () => { + const typeDefs = ` + type ${typeMovie} @node { + testId: ID + title: String + } + `; + + const id = generate({ + charset: "alphabetic", + readable: true, + }); + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + await testHelper.executeCypher( + ` + CREATE (:${typeMovie} {testId: $id, title: "${titles[0]}"}) + CREATE (:${typeMovie} {testId: $id, title: "${titles[1]}"}) + CREATE (:${typeMovie} {testId: $id, title: "${titles[2]}"}) + CREATE (:${typeMovie} {testId: $id, title: "${titles[3]}"}) + `, + { + id, + } + ); + + const query = ` + { + ${typeMovie.operations.aggregate}(where: {testId_EQ: "${id}"}) { + title { + 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)[typeMovie.operations.aggregate]).toEqual({ + title: { + shortest: titles[0], + longest: titles[3], + }, + }); + }); +}); From ef2d97916ea8541ab18243b29b1a62ffefc4b17a Mon Sep 17 00:00:00 2001 From: angrykoala Date: Tue, 21 Jan 2025 15:59:36 +0000 Subject: [PATCH 04/10] Add interface aggregations on top level --- .../ast/operations/ConnectionReadOperation.ts | 48 +++-- .../composite/CompositeConnectionPartial.ts | 5 + .../CompositeConnectionReadOperation.ts | 50 +++++- .../factory/Operations/AggregateFactory.ts | 1 - .../factory/Operations/ConnectionFactory.ts | 38 ++++ ...interfaces-top-level-with-auth.int.test.ts | 170 ++++++++++++++++++ ...gregation-interfaces-top-level.int.test.ts | 122 +++++++++++++ ...interfaces-top-level-with-auth.int.test.ts | 84 +++++---- ...gregation-interfaces-top-level.int.test.ts | 56 +++--- 9 files changed, 505 insertions(+), 69 deletions(-) create mode 100644 packages/graphql/tests/integration/deprecations/interfaces/aggregations/aggregation-interfaces-top-level-with-auth.int.test.ts create mode 100644 packages/graphql/tests/integration/deprecations/interfaces/aggregations/aggregation-interfaces-top-level.int.test.ts diff --git a/packages/graphql/src/translate/queryAST/ast/operations/ConnectionReadOperation.ts b/packages/graphql/src/translate/queryAST/ast/operations/ConnectionReadOperation.ts index 373bb4480b..3e2d0f58f3 100644 --- a/packages/graphql/src/translate/queryAST/ast/operations/ConnectionReadOperation.ts +++ b/packages/graphql/src/translate/queryAST/ast/operations/ConnectionReadOperation.ts @@ -44,7 +44,7 @@ export class ConnectionReadOperation extends Operation { public nodeFields: Field[] = []; public edgeFields: Field[] = []; // TODO: merge with attachedTo? - public aggregationField: ConnectionAggregationField | undefined; + public aggregationField: ConnectionAggregationField | undefined; // TODO: multiple aggregations public filters: Filter[] = []; protected pagination: Pagination | undefined; @@ -130,6 +130,33 @@ export class ConnectionReadOperation extends Operation { ); } + protected transpileAggregation(context: QueryASTContext): { + subqueries: Cypher.Clause[]; + fields: Array<[Cypher.Expr, Cypher.Variable]>; + returnMap: Record; + } { + const returnMap: Record = {}; + let extraFieldsSubqueries: Cypher.Clause[] = []; + let extraFields: Array<[Cypher.Expr, Cypher.Variable]> = []; + if (this.aggregationField) { + extraFieldsSubqueries = this.aggregationField.getSubqueries(context); + + const aggregationProjectionField = this.aggregationField.getProjectionField(); + + extraFields = Object.entries(aggregationProjectionField).map(([key, value]) => { + const variable = new Cypher.Variable(); + returnMap[key] = variable; + return [value, variable]; + }); + } + + return { + fields: extraFields, + subqueries: extraFieldsSubqueries, + returnMap, + }; + } + public transpile(context: QueryASTContext): OperationTranspileResult { if (!context.target) throw new Error(); @@ -155,20 +182,11 @@ export class ConnectionReadOperation extends Operation { const filtersSubqueries = [...authFilterSubqueries, ...normalFilterSubqueries]; - const returnMap: Record = {}; - let extraFieldsSubqueries: Cypher.Clause[] = []; - let extraFields: Array<[Cypher.Expr, Cypher.Variable]> = []; - if (this.aggregationField) { - extraFieldsSubqueries = this.aggregationField.getSubqueries(nestedContext); - - const aggregationProjectionField = this.aggregationField.getProjectionField(); - - extraFields = Object.entries(aggregationProjectionField).map(([key, value]) => { - const variable = new Cypher.Variable(); - returnMap[key] = variable; - return [value, variable]; - }); - } + const { + returnMap, + fields: extraFields, + subqueries: extraFieldsSubqueries, + } = this.transpileAggregation(nestedContext); const edgesVar = new Cypher.NamedVariable("edges"); const totalCount = new Cypher.NamedVariable("totalCount"); diff --git a/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeConnectionPartial.ts b/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeConnectionPartial.ts index c1bcf00f6b..a33b867492 100644 --- a/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeConnectionPartial.ts +++ b/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeConnectionPartial.ts @@ -25,6 +25,11 @@ import { ConnectionReadOperation } from "../ConnectionReadOperation"; import type { OperationTranspileResult } from "../operations"; export class CompositeConnectionPartial extends ConnectionReadOperation { + /** Prints the name of the Node */ + public print(): string { + return `${super.print()} <${this.target.name}>`; + } + public transpile(context: QueryASTContext): OperationTranspileResult { // eslint-disable-next-line prefer-const let { selection: clause, nestedContext } = this.selection.apply(context); diff --git a/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeConnectionReadOperation.ts b/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeConnectionReadOperation.ts index a462fef43e..4cb12e6d56 100644 --- a/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeConnectionReadOperation.ts +++ b/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeConnectionReadOperation.ts @@ -25,6 +25,7 @@ import { filterTruthy } from "../../../../../utils/utils"; import { hasTarget } from "../../../utils/context-has-target"; import { QueryASTContext } from "../../QueryASTContext"; import type { QueryASTNode } from "../../QueryASTNode"; +import type { ConnectionAggregationField } from "../../fields/ConnectionAggregationField"; import type { Pagination } from "../../pagination/Pagination"; import type { Sort, SortField } from "../../sort/Sort"; import type { CompositeConnectionPartial } from "./CompositeConnectionPartial"; @@ -34,11 +35,41 @@ export class CompositeConnectionReadOperation extends Operation { protected sortFields: Array<{ node: Sort[]; edge: Sort[] }> = []; private pagination: Pagination | undefined; + public aggregationField: ConnectionAggregationField | undefined; // TODO: multiple aggregations + constructor(children: CompositeConnectionPartial[]) { super(); this.children = children; } + // NOTE: duplicate from ConnectionReadOperation + protected transpileAggregation(context: QueryASTContext): { + subqueries: Cypher.Clause[]; + fields: Array<[Cypher.Expr, Cypher.Variable]>; + returnMap: Record; + } { + const returnMap: Record = {}; + let extraFieldsSubqueries: Cypher.Clause[] = []; + let extraFields: Array<[Cypher.Expr, Cypher.Variable]> = []; + if (this.aggregationField) { + extraFieldsSubqueries = this.aggregationField.getSubqueries(context); + + const aggregationProjectionField = this.aggregationField.getProjectionField(); + + extraFields = Object.entries(aggregationProjectionField).map(([key, value]) => { + const variable = new Cypher.Variable(); + returnMap[key] = variable; + return [value, variable]; + }); + } + + return { + fields: extraFields, + subqueries: extraFieldsSubqueries, + returnMap, + }; + } + public transpile(context: QueryASTContext): OperationTranspileResult { const edgeVar = new Cypher.NamedVariable("edge"); const edgesVar = new Cypher.NamedVariable("edges"); @@ -94,18 +125,31 @@ export class CompositeConnectionReadOperation extends Operation { orderSubquery = new Cypher.Call(extraWithOrder).importWith(edgesVar); } - nestedSubquery.with([Cypher.collect(edgeVar), edgesVar]).with(edgesVar, [Cypher.size(edgesVar), totalCount]); + const { + fields: extraFields, + subqueries: aggregateSubqueries, + returnMap: aggregateReturnMap, + } = this.transpileAggregation(context); + + const subqueryWith = new Cypher.With([Cypher.collect(edgeVar), edgesVar], ...extraFields).with( + edgesVar, + [Cypher.size(edgesVar), totalCount], + ...(extraFields ?? []).map((c) => c[1]) + ); const returnClause = new Cypher.Return([ new Cypher.Map({ edges: returnEdgesVar, totalCount: totalCount, + ...aggregateReturnMap, }), context.returnVariable, ]); return { - clauses: [Cypher.utils.concat(nestedSubquery, orderSubquery, returnClause)], + clauses: [ + Cypher.utils.concat(nestedSubquery, ...aggregateSubqueries, subqueryWith, orderSubquery, returnClause), + ], projectionExpr: context.returnVariable, }; } @@ -123,7 +167,7 @@ export class CompositeConnectionReadOperation extends Operation { return [...s.edge, ...s.node]; }); - return filterTruthy([...this.children, ...sortFields, this.pagination]); + return filterTruthy([...this.children, this.aggregationField, ...sortFields, this.pagination]); } protected getSortFields( diff --git a/packages/graphql/src/translate/queryAST/factory/Operations/AggregateFactory.ts b/packages/graphql/src/translate/queryAST/factory/Operations/AggregateFactory.ts index 97282d7e06..ca3a1f7875 100644 --- a/packages/graphql/src/translate/queryAST/factory/Operations/AggregateFactory.ts +++ b/packages/graphql/src/translate/queryAST/factory/Operations/AggregateFactory.ts @@ -310,7 +310,6 @@ export class AggregateFactory { operation.setNodeFields(nodeFields); operation.setEdgeFields(edgeFields); } else { - console.log("HERE"); const rawProjectionFields = { ...resolveTree.fieldsByTypeName[entity.operations.aggregateTypeNames.selection], ...resolveTree.fieldsByTypeName[entity.operations.aggregateTypeNames.node], // Handles both, deprecated and new aggregation parsing diff --git a/packages/graphql/src/translate/queryAST/factory/Operations/ConnectionFactory.ts b/packages/graphql/src/translate/queryAST/factory/Operations/ConnectionFactory.ts index fb9cb6bc2f..133e0fdbe0 100644 --- a/packages/graphql/src/translate/queryAST/factory/Operations/ConnectionFactory.ts +++ b/packages/graphql/src/translate/queryAST/factory/Operations/ConnectionFactory.ts @@ -87,6 +87,7 @@ export class ConnectionFactory { const concreteConnectionOperations = concreteEntities.map((concreteEntity: ConcreteEntityAdapter) => { let selection: EntitySelection; let resolveTreeEdgeFields: Record; + if (relationship) { selection = new RelationshipSelection({ relationship, @@ -130,6 +131,43 @@ export class ConnectionFactory { const compositeConnectionOp = new CompositeConnectionReadOperation(concreteConnectionOperations); + if (isInterfaceEntity(target)) { + const fields = resolveTree.fieldsByTypeName[target.operations.connectionFieldTypename]; + if (fields) { + const resolveTreeAggregate = findFieldsByNameInFieldsByTypeNameField(fields, "aggregate")[0]; + if (resolveTreeAggregate) { + const resolveTreeAggregateFields = + resolveTreeAggregate.fieldsByTypeName[target.operations.aggregateTypeNames.connection]; + + if (resolveTreeAggregateFields) { + // Maybe this should be using operationFactory instead + const nodeField = getResolveTreeByFieldName({ + fieldName: "node", + selection: resolveTreeAggregateFields, + }); + + if (nodeField) { + const typeNameNode = target.operations.aggregateTypeNames.node; + // Sugar syntax for aggregations. This allows to use normal aggregations in each composite field, by renaming the type name + nodeField.fieldsByTypeName[typeNameNode] = + nodeField.fieldsByTypeName[target.operations.aggregateTypeNames.node] ?? {}; + const aggregationOperation = this.aggregateFactory.createAggregationOperation({ + entityOrRel: relationship ?? target, + resolveTree: nodeField, + context, + }); + const aggregationField = new ConnectionAggregationField({ + alias: resolveTreeAggregate.name, // Alias is hanlded by graphql on top level + nodeAlias: nodeField.alias, + operation: aggregationOperation, + }); + compositeConnectionOp.aggregationField = aggregationField; + } + } + } + } + } + // These sort fields will be duplicated on nested "CompositeConnectionPartial" this.hydrateConnectionOperationsASTWithSort({ diff --git a/packages/graphql/tests/integration/deprecations/interfaces/aggregations/aggregation-interfaces-top-level-with-auth.int.test.ts b/packages/graphql/tests/integration/deprecations/interfaces/aggregations/aggregation-interfaces-top-level-with-auth.int.test.ts new file mode 100644 index 0000000000..50a0a313f3 --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/interfaces/aggregations/aggregation-interfaces-top-level-with-auth.int.test.ts @@ -0,0 +1,170 @@ +/* + * 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 { createBearerToken } from "../../../../utils/create-bearer-token"; +import { TestHelper } from "../../../../utils/tests-helper"; + +describe("Top-level interface query fields with authorization", () => { + const secret = "the-secret"; + + const testHelper = new TestHelper(); + let typeDefs: string; + + const Movie = testHelper.createUniqueType("Movie"); + const Series = testHelper.createUniqueType("Series"); + + beforeAll(async () => { + typeDefs = /* GraphQL */ ` + type JWT @jwt { + roles: [String!]! + } + + interface Production { + title: String! + cost: Float! + } + + type ${Movie} implements Production @authorization(validate: [{ where: { jwt: { roles_INCLUDES: "movies-reader" } } }]) @node { + title: String! + cost: Float! + runtime: Int + } + + type ${Series} implements Production @node { + title: String! + cost: Float! + episodes: Int + } + `; + + await testHelper.executeCypher(` + CREATE(m1:${Movie} {title: "The Matrix", cost: 10}) + CREATE(m2:${Movie} {title: "The Matrix is a very interesting movie: The Documentary", cost: 20}) + + CREATE(s1:${Series} {title: "The Show", cost: 1}) + CREATE(s2:${Series} {title: "The Show 2", cost: 2}) + `); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + features: { + authorization: { key: secret }, + }, + }); + }); + + afterAll(async () => { + await testHelper.close(); + }); + + test("top level count and string fields", async () => { + const query = ` + query { + productionsAggregate { + count + title { + longest + shortest + } + } + } + `; + + const token = createBearerToken(secret, { roles: ["movies-reader"] }); + const queryResult = await testHelper.executeGraphQLWithToken(query, token); + expect(queryResult.errors).toBeUndefined(); + expect(queryResult.data).toEqual({ + productionsAggregate: { + count: 4, + title: { + longest: "The Matrix is a very interesting movie: The Documentary", + shortest: "The Show", + }, + }, + }); + }); + + test("top level count and string fields with no roles should fail", async () => { + const query = ` + query { + productionsAggregate { + count + title { + longest + shortest + } + } + } + `; + + const token = createBearerToken(secret, { roles: [] }); + const queryResult = await testHelper.executeGraphQLWithToken(query, token); + expect(queryResult.errors).toBeDefined(); + expect((queryResult.errors as GraphQLError[]).some((el) => el.message.includes("Forbidden"))).toBeTruthy(); + expect(queryResult.data).toBeNull(); + }); + + test("top level number fields", async () => { + const query = ` + query { + productionsAggregate { + cost { + max + min + average + } + } + } + `; + + const token = createBearerToken(secret, { roles: ["movies-reader"] }); + const queryResult = await testHelper.executeGraphQLWithToken(query, token); + expect(queryResult.errors).toBeUndefined(); + expect(queryResult.data).toEqual({ + productionsAggregate: { + cost: { + min: 1, + max: 20, + average: 8.25, + }, + }, + }); + }); + + test("top level number fields with no roles should fail", async () => { + const query = ` + query { + productionsAggregate { + cost { + max + min + average + } + } + } + `; + + const token = createBearerToken(secret, { roles: [] }); + const queryResult = await testHelper.executeGraphQLWithToken(query, token); + expect(queryResult.errors).toBeDefined(); + expect((queryResult.errors as GraphQLError[]).some((el) => el.message.includes("Forbidden"))).toBeTruthy(); + expect(queryResult.data).toBeNull(); + }); +}); diff --git a/packages/graphql/tests/integration/deprecations/interfaces/aggregations/aggregation-interfaces-top-level.int.test.ts b/packages/graphql/tests/integration/deprecations/interfaces/aggregations/aggregation-interfaces-top-level.int.test.ts new file mode 100644 index 0000000000..ea30d9721d --- /dev/null +++ b/packages/graphql/tests/integration/deprecations/interfaces/aggregations/aggregation-interfaces-top-level.int.test.ts @@ -0,0 +1,122 @@ +/* + * 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("Top-level interface query fields", () => { + const secret = "the-secret"; + + const testHelper = new TestHelper(); + let typeDefs: string; + + const Movie = testHelper.createUniqueType("Movie"); + const Series = testHelper.createUniqueType("Series"); + + beforeAll(async () => { + typeDefs = ` + interface Production { + title: String! + cost: Float! + } + + type ${Movie} implements Production @node { + title: String! + cost: Float! + runtime: Int + } + + type ${Series} implements Production @node { + title: String! + cost: Float! + episodes: Int + } + `; + + await testHelper.executeCypher(` + CREATE(m1:${Movie} {title: "The Matrix", cost: 10}) + CREATE(m2:${Movie} {title: "The Matrix is a very interesting movie: The Documentary", cost: 20}) + + CREATE(s1:${Series} {title: "The Show", cost: 1}) + CREATE(s2:${Series} {title: "The Show 2", cost: 2}) + `); + + await testHelper.initNeo4jGraphQL({ + typeDefs, + }); + }); + + afterAll(async () => { + await testHelper.close(); + }); + + test("top level count and string fields", async () => { + const query = ` + query { + productionsAggregate { + count + title { + longest + shortest + } + } + } + `; + + const token = createBearerToken(secret, {}); + const queryResult = await testHelper.executeGraphQLWithToken(query, token); + expect(queryResult.errors).toBeUndefined(); + expect(queryResult.data).toEqual({ + productionsAggregate: { + count: 4, + title: { + longest: "The Matrix is a very interesting movie: The Documentary", + shortest: "The Show", + }, + }, + }); + }); + + test("top level number fields", async () => { + const query = ` + query { + productionsAggregate { + cost { + max + min + average + } + } + } + `; + + const token = createBearerToken(secret, {}); + const queryResult = await testHelper.executeGraphQLWithToken(query, token); + expect(queryResult.errors).toBeUndefined(); + expect(queryResult.data).toEqual({ + productionsAggregate: { + cost: { + min: 1, + max: 20, + average: 8.25, + }, + }, + }); + }); +}); diff --git a/packages/graphql/tests/integration/interfaces/aggegations/aggregation-interfaces-top-level-with-auth.int.test.ts b/packages/graphql/tests/integration/interfaces/aggegations/aggregation-interfaces-top-level-with-auth.int.test.ts index 25eb989e8d..09bedd37c6 100644 --- a/packages/graphql/tests/integration/interfaces/aggegations/aggregation-interfaces-top-level-with-auth.int.test.ts +++ b/packages/graphql/tests/integration/interfaces/aggegations/aggregation-interfaces-top-level-with-auth.int.test.ts @@ -77,11 +77,15 @@ describe("Top-level interface query fields with authorization", () => { test("top level count and string fields", async () => { const query = ` query { - productionsAggregate { - count - title { - longest - shortest + productionsConnection { + aggregate { + node { + count + title { + longest + shortest + } + } } } } @@ -91,11 +95,15 @@ describe("Top-level interface query fields with authorization", () => { const queryResult = await testHelper.executeGraphQLWithToken(query, token); expect(queryResult.errors).toBeUndefined(); expect(queryResult.data).toEqual({ - productionsAggregate: { - count: 4, - title: { - longest: "The Matrix is a very interesting movie: The Documentary", - shortest: "The Show", + productionsConnection: { + aggregate: { + node: { + count: 4, + title: { + longest: "The Matrix is a very interesting movie: The Documentary", + shortest: "The Show", + }, + }, }, }, }); @@ -104,11 +112,15 @@ describe("Top-level interface query fields with authorization", () => { test("top level count and string fields with no roles should fail", async () => { const query = ` query { - productionsAggregate { - count - title { - longest - shortest + productionsConnection { + aggregate { + node { + count + title { + longest + shortest + } + } } } } @@ -124,11 +136,15 @@ describe("Top-level interface query fields with authorization", () => { test("top level number fields", async () => { const query = ` query { - productionsAggregate { - cost { - max - min - average + productionsConnection { + aggregate { + node { + cost { + max + min + average + } + } } } } @@ -138,11 +154,15 @@ describe("Top-level interface query fields with authorization", () => { const queryResult = await testHelper.executeGraphQLWithToken(query, token); expect(queryResult.errors).toBeUndefined(); expect(queryResult.data).toEqual({ - productionsAggregate: { - cost: { - min: 1, - max: 20, - average: 8.25, + productionsConnection: { + aggregate: { + node: { + cost: { + min: 1, + max: 20, + average: 8.25, + }, + }, }, }, }); @@ -151,11 +171,15 @@ describe("Top-level interface query fields with authorization", () => { test("top level number fields with no roles should fail", async () => { const query = ` query { - productionsAggregate { - cost { - max - min - average + productionsConnection { + aggregate { + node { + cost { + max + min + average + } + } } } } diff --git a/packages/graphql/tests/integration/interfaces/aggegations/aggregation-interfaces-top-level.int.test.ts b/packages/graphql/tests/integration/interfaces/aggegations/aggregation-interfaces-top-level.int.test.ts index d7ec9bcc77..f66d60f001 100644 --- a/packages/graphql/tests/integration/interfaces/aggegations/aggregation-interfaces-top-level.int.test.ts +++ b/packages/graphql/tests/integration/interfaces/aggegations/aggregation-interfaces-top-level.int.test.ts @@ -69,11 +69,15 @@ describe("Top-level interface query fields", () => { test("top level count and string fields", async () => { const query = ` query { - productionsAggregate { - count - title { - longest - shortest + productionsConnection { + aggregate { + node { + count + title { + longest + shortest + } + } } } } @@ -83,11 +87,15 @@ describe("Top-level interface query fields", () => { const queryResult = await testHelper.executeGraphQLWithToken(query, token); expect(queryResult.errors).toBeUndefined(); expect(queryResult.data).toEqual({ - productionsAggregate: { - count: 4, - title: { - longest: "The Matrix is a very interesting movie: The Documentary", - shortest: "The Show", + productionsConnection: { + aggregate: { + node: { + count: 4, + title: { + longest: "The Matrix is a very interesting movie: The Documentary", + shortest: "The Show", + }, + }, }, }, }); @@ -96,11 +104,15 @@ describe("Top-level interface query fields", () => { test("top level number fields", async () => { const query = ` query { - productionsAggregate { - cost { - max - min - average + productionsConnection { + aggregate { + node { + cost { + max + min + average + } + } } } } @@ -110,11 +122,15 @@ describe("Top-level interface query fields", () => { const queryResult = await testHelper.executeGraphQLWithToken(query, token); expect(queryResult.errors).toBeUndefined(); expect(queryResult.data).toEqual({ - productionsAggregate: { - cost: { - min: 1, - max: 20, - average: 8.25, + productionsConnection: { + aggregate: { + node: { + cost: { + min: 1, + max: 20, + average: 8.25, + }, + }, }, }, }); From c3e341683b7c2485c3f719cb0d56d8009d098cea Mon Sep 17 00:00:00 2001 From: angrykoala Date: Tue, 21 Jan 2025 17:04:49 +0000 Subject: [PATCH 05/10] Update tck tests with aggregate --- .../graphql/tests/schema/aggregations.test.ts | 50 ++ .../tests/schema/array-methods.test.ts | 21 + packages/graphql/tests/schema/arrays.test.ts | 11 + .../tests/schema/authorization.test.ts | 22 + .../graphql/tests/schema/comments.test.ts | 94 ++ .../tests/schema/connect-or-create-id.test.ts | 44 + .../schema/connect-or-create-unions.test.ts | 32 + .../tests/schema/connect-or-create.test.ts | 42 + .../tests/schema/connections/enums.test.ts | 20 + .../schema/connections/interfaces.test.ts | 53 ++ .../tests/schema/connections/sort.test.ts | 19 + .../tests/schema/connections/unions.test.ts | 30 + .../tests/schema/custom-mutations.test.ts | 10 + .../tests/schema/directive-preserve.test.ts | 188 ++++ .../tests/schema/directives/alias.test.ts | 22 + .../schema/directives/autogenerate.test.ts | 11 + .../schema/directives/customResolver.test.ts | 22 + .../tests/schema/directives/cypher.test.ts | 135 +++ .../tests/schema/directives/default.test.ts | 27 + .../schema/directives/filterable.test.ts | 336 +++++++ .../tests/schema/directives/plural.test.ts | 73 ++ .../schema/directives/populatedBy.test.ts | 66 ++ .../tests/schema/directives/private.test.ts | 41 + .../directives/relationship-aggregate.test.ts | 168 ++++ .../relationship-nested-operations.test.ts | 823 ++++++++++++++++++ .../relationship-properties.test.ts | 60 ++ .../schema/directives/relationship.test.ts | 40 + .../schema/directives/selectable.test.ts | 234 +++++ .../tests/schema/directives/settable.test.ts | 417 +++++++++ .../schema/directives/timestamps.test.ts | 12 + packages/graphql/tests/schema/enum.test.ts | 9 + packages/graphql/tests/schema/extend.test.ts | 11 + .../graphql/tests/schema/federation.test.ts | 40 + .../graphql/tests/schema/fulltext.test.ts | 11 + .../graphql/tests/schema/global-node.test.ts | 11 + .../graphql/tests/schema/inheritance.test.ts | 20 + packages/graphql/tests/schema/inputs.test.ts | 10 + .../schema/interface-relationships.test.ts | 452 ++++++++++ .../graphql/tests/schema/interfaces.test.ts | 40 + .../graphql/tests/schema/issues/1038.test.ts | 22 + .../graphql/tests/schema/issues/1182.test.ts | 23 + .../graphql/tests/schema/issues/1575.test.ts | 9 + .../graphql/tests/schema/issues/1614.test.ts | 19 + .../graphql/tests/schema/issues/162.test.ts | 30 + .../graphql/tests/schema/issues/200.test.ts | 12 + .../graphql/tests/schema/issues/2187.test.ts | 22 + .../graphql/tests/schema/issues/2377.test.ts | 24 + .../graphql/tests/schema/issues/2969.test.ts | 21 + .../graphql/tests/schema/issues/2981.test.ts | 31 + .../graphql/tests/schema/issues/2993.test.ts | 22 + .../graphql/tests/schema/issues/3428.test.ts | 51 ++ .../graphql/tests/schema/issues/3439.test.ts | 192 ++++ .../graphql/tests/schema/issues/3537.test.ts | 42 + .../graphql/tests/schema/issues/3541.test.ts | 30 + .../graphql/tests/schema/issues/3698.test.ts | 111 +++ .../graphql/tests/schema/issues/3816.test.ts | 40 + .../graphql/tests/schema/issues/3817.test.ts | 10 + .../graphql/tests/schema/issues/4511.test.ts | 51 ++ .../graphql/tests/schema/issues/4615.test.ts | 43 + .../graphql/tests/schema/issues/5428.test.ts | 10 + .../graphql/tests/schema/issues/5631.test.ts | 18 + .../graphql/tests/schema/issues/609.test.ts | 10 + .../graphql/tests/schema/issues/872.test.ts | 31 + .../tests/schema/lowercase-type-names.test.ts | 25 + packages/graphql/tests/schema/math.test.ts | 105 +++ .../schema/nested-aggregation-on-type.test.ts | 22 + packages/graphql/tests/schema/null.test.ts | 14 + .../schema/pluralize-consistency.test.ts | 20 + .../tests/schema/query-direction.test.ts | 20 + .../remove-deprecated/aggregations.test.ts | 20 + .../remove-deprecated/array-methods.test.ts | 21 + .../schema/remove-deprecated/comments.test.ts | 94 ++ .../connect-or-create.test.ts | 21 + .../directed-argument.test.ts | 40 + .../implicit-equality.test.ts | 20 + .../remove-deprecated/implicit-set.test.ts | 20 + .../options-argument.test.ts | 40 + .../remove-deprecated/query-direction.test.ts | 30 + .../remove-deprecated/typename_IN.test.ts | 34 + packages/graphql/tests/schema/scalar.test.ts | 10 + .../tests/schema/string-comparators.test.ts | 50 ++ .../tests/schema/subscriptions.test.ts | 219 +++++ .../graphql/tests/schema/types/bigint.test.ts | 11 + .../graphql/tests/schema/types/date.test.ts | 10 + .../tests/schema/types/datetime.test.ts | 11 + .../tests/schema/types/duration.test.ts | 11 + .../tests/schema/types/localdatetime.test.ts | 11 + .../tests/schema/types/localtime.test.ts | 11 + .../graphql/tests/schema/types/point.test.ts | 36 + .../graphql/tests/schema/types/time.test.ts | 11 + .../union-interface-relationship.test.ts | 58 ++ packages/graphql/tests/schema/unions.test.ts | 20 + packages/graphql/tests/schema/vector.test.ts | 11 + 93 files changed, 5627 insertions(+) diff --git a/packages/graphql/tests/schema/aggregations.test.ts b/packages/graphql/tests/schema/aggregations.test.ts index bbdd87d28a..c05856d9ea 100644 --- a/packages/graphql/tests/schema/aggregations.test.ts +++ b/packages/graphql/tests/schema/aggregations.test.ts @@ -147,6 +147,25 @@ describe("Aggregations", () => { title: String } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + createdAt: DateTimeAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + imdbRating: FloatAggregateSelection! + isbn: StringAggregateSelection! + screenTime: DurationAggregateSelection! + someBigInt: BigIntAggregateSelection! + someInt: IntAggregateSelection! + someLocalDateTime: LocalDateTimeAggregateSelection! + someLocalTime: LocalTimeAggregateSelection! + someTime: TimeAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! createdAt: DateTimeAggregateSelection! @@ -321,6 +340,7 @@ describe("Aggregations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -837,6 +857,16 @@ describe("Aggregations", () => { title: String } + type PostAggregate { + node: PostAggregateNode! + } + + type PostAggregateNode { + count: Int! + someID: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + title: StringAggregateSelection! + } + type PostAggregateSelection { count: Int! someID: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -1185,6 +1215,7 @@ describe("Aggregations", () => { } type PostsConnection { + aggregate: PostAggregate! edges: [PostEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1253,6 +1284,24 @@ describe("Aggregations", () => { someTime: Time } + type UserAggregate { + node: UserAggregateNode! + } + + type UserAggregateNode { + count: Int! + someBigInt: BigIntAggregateSelection! + someDateTime: DateTimeAggregateSelection! + someDuration: DurationAggregateSelection! + someFloat: FloatAggregateSelection! + someID: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someInt: IntAggregateSelection! + someLocalDateTime: LocalDateTimeAggregateSelection! + someLocalTime: LocalTimeAggregateSelection! + someString: StringAggregateSelection! + someTime: TimeAggregateSelection! + } + type UserAggregateSelection { count: Int! someBigInt: BigIntAggregateSelection! @@ -1420,6 +1469,7 @@ describe("Aggregations", () => { } type UsersConnection { + aggregate: UserAggregate! edges: [UserEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/array-methods.test.ts b/packages/graphql/tests/schema/array-methods.test.ts index e161f35c93..e753a0e6b0 100644 --- a/packages/graphql/tests/schema/array-methods.test.ts +++ b/packages/graphql/tests/schema/array-methods.test.ts @@ -208,6 +208,15 @@ describe("Arrays Methods", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -309,6 +318,7 @@ describe("Arrays Methods", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -473,6 +483,16 @@ describe("Arrays Methods", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + averageRating: FloatAggregateSelection! + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { averageRating: FloatAggregateSelection! count: Int! @@ -588,6 +608,7 @@ describe("Arrays Methods", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/arrays.test.ts b/packages/graphql/tests/schema/arrays.test.ts index 8b80ec9628..dacc11d226 100644 --- a/packages/graphql/tests/schema/arrays.test.ts +++ b/packages/graphql/tests/schema/arrays.test.ts @@ -79,6 +79,16 @@ describe("Arrays", () => { ratings: [Float!]! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + averageRating: FloatAggregateSelection! + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { averageRating: FloatAggregateSelection! count: Int! @@ -151,6 +161,7 @@ describe("Arrays", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/authorization.test.ts b/packages/graphql/tests/schema/authorization.test.ts index 9d13211209..46902c4f85 100644 --- a/packages/graphql/tests/schema/authorization.test.ts +++ b/packages/graphql/tests/schema/authorization.test.ts @@ -103,6 +103,16 @@ describe("Authorization", () => { name: String! } + type PostAggregate { + node: PostAggregateNode! + } + + type PostAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + name: StringAggregateSelection! + } + type PostAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -288,6 +298,7 @@ describe("Authorization", () => { } type PostsConnection { + aggregate: PostAggregate! edges: [PostEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -343,6 +354,16 @@ describe("Authorization", () => { postsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! } + type UserAggregate { + node: UserAggregateNode! + } + + type UserAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + name: StringAggregateSelection! + } + type UserAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -562,6 +583,7 @@ describe("Authorization", () => { } type UsersConnection { + aggregate: UserAggregate! edges: [UserEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/comments.test.ts b/packages/graphql/tests/schema/comments.test.ts index 9efc6dfdd2..2d3b4b189d 100644 --- a/packages/graphql/tests/schema/comments.test.ts +++ b/packages/graphql/tests/schema/comments.test.ts @@ -132,6 +132,17 @@ describe("Comments", () => { isActive: Boolean } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + actorCount: IntAggregateSelection! + averageRating: FloatAggregateSelection! + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! @@ -230,6 +241,7 @@ describe("Comments", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -306,6 +318,15 @@ describe("Comments", () => { name: String } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -358,6 +379,7 @@ describe("Comments", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -505,6 +527,15 @@ describe("Comments", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -584,6 +615,7 @@ describe("Comments", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -852,6 +884,15 @@ describe("Comments", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -945,6 +986,7 @@ describe("Comments", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -993,6 +1035,16 @@ describe("Comments", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + runtime: IntAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! runtime: IntAggregateSelection! @@ -1055,6 +1107,7 @@ describe("Comments", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1084,6 +1137,15 @@ describe("Comments", () => { title: String! } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type ProductionAggregateSelection { count: Int! title: StringAggregateSelection! @@ -1144,6 +1206,7 @@ describe("Comments", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1169,6 +1232,16 @@ describe("Comments", () => { title: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + episodes: IntAggregateSelection! + title: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! episodes: IntAggregateSelection! @@ -1176,6 +1249,7 @@ describe("Comments", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1329,6 +1403,15 @@ describe("Comments", () => { id: ID } + type GenreAggregate { + node: GenreAggregateNode! + } + + type GenreAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type GenreAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -1381,6 +1464,7 @@ describe("Comments", () => { } type GenresConnection { + aggregate: GenreAggregate! edges: [GenreEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1398,6 +1482,15 @@ describe("Comments", () => { searchNoDirective: Search } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -1614,6 +1707,7 @@ describe("Comments", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/connect-or-create-id.test.ts b/packages/graphql/tests/schema/connect-or-create-id.test.ts index 34baa5f066..74b82e7547 100644 --- a/packages/graphql/tests/schema/connect-or-create-id.test.ts +++ b/packages/graphql/tests/schema/connect-or-create-id.test.ts @@ -51,6 +51,15 @@ describe("connect or create with id", () => { name: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -255,6 +264,7 @@ describe("connect or create with id", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -296,6 +306,16 @@ describe("connect or create with id", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -369,6 +389,7 @@ describe("connect or create with id", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -524,6 +545,17 @@ describe("connect or create with id", () => { id: ID! } + type PostAggregate { + node: PostAggregateNode! + } + + type PostAggregateNode { + content: StringAggregateSelection! + count: Int! + createdAt: DateTimeAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type PostAggregateSelection { content: StringAggregateSelection! count: Int! @@ -759,6 +791,7 @@ describe("connect or create with id", () => { } type PostsConnection { + aggregate: PostAggregate! edges: [PostEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -814,6 +847,16 @@ describe("connect or create with id", () => { postsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! } + type UserAggregate { + node: UserAggregateNode! + } + + type UserAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + name: StringAggregateSelection! + } + type UserAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -1065,6 +1108,7 @@ describe("connect or create with id", () => { } type UsersConnection { + aggregate: UserAggregate! edges: [UserEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/connect-or-create-unions.test.ts b/packages/graphql/tests/schema/connect-or-create-unions.test.ts index 8494cab31f..5e46fd079a 100644 --- a/packages/graphql/tests/schema/connect-or-create-unions.test.ts +++ b/packages/graphql/tests/schema/connect-or-create-unions.test.ts @@ -247,6 +247,15 @@ describe("Connect Or Create", () => { Series: [ActorActedInSeriesUpdateFieldInput!] } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -325,6 +334,7 @@ describe("Connect Or Create", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -366,6 +376,16 @@ describe("Connect Or Create", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + isan: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! isan: StringAggregateSelection! @@ -443,6 +463,7 @@ describe("Connect Or Create", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -499,6 +520,16 @@ describe("Connect Or Create", () => { title: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + isan: StringAggregateSelection! + title: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! isan: StringAggregateSelection! @@ -514,6 +545,7 @@ describe("Connect Or Create", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/connect-or-create.test.ts b/packages/graphql/tests/schema/connect-or-create.test.ts index c6ef2205ce..54c5c20988 100644 --- a/packages/graphql/tests/schema/connect-or-create.test.ts +++ b/packages/graphql/tests/schema/connect-or-create.test.ts @@ -51,6 +51,15 @@ describe("Connect Or Create", () => { name: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -260,6 +269,7 @@ describe("Connect Or Create", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -296,6 +306,16 @@ describe("Connect Or Create", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + isan: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! isan: StringAggregateSelection! @@ -373,6 +393,7 @@ describe("Connect Or Create", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -560,6 +581,15 @@ describe("Connect Or Create", () => { name: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -783,6 +813,7 @@ describe("Connect Or Create", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -826,6 +857,16 @@ describe("Connect Or Create", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + isan: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! isan: StringAggregateSelection! @@ -903,6 +944,7 @@ describe("Connect Or Create", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/connections/enums.test.ts b/packages/graphql/tests/schema/connections/enums.test.ts index abb1119ae0..d934abd46b 100644 --- a/packages/graphql/tests/schema/connections/enums.test.ts +++ b/packages/graphql/tests/schema/connections/enums.test.ts @@ -91,6 +91,15 @@ describe("Enums", () => { name: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -294,6 +303,7 @@ describe("Enums", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -444,6 +454,15 @@ describe("Enums", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -535,6 +554,7 @@ describe("Enums", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/connections/interfaces.test.ts b/packages/graphql/tests/schema/connections/interfaces.test.ts index d959b6870a..40f90b82b0 100644 --- a/packages/graphql/tests/schema/connections/interfaces.test.ts +++ b/packages/graphql/tests/schema/connections/interfaces.test.ts @@ -91,6 +91,15 @@ describe("Connection with interfaces", () => { moviesConnection(after: String, first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! } + type CreatureAggregate { + node: CreatureAggregateNode! + } + + type CreatureAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type CreatureAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -248,6 +257,7 @@ describe("Connection with interfaces", () => { } type CreaturesConnection { + aggregate: CreatureAggregate! edges: [CreatureEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -281,6 +291,16 @@ describe("Connection with interfaces", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -446,6 +466,7 @@ describe("Connection with interfaces", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -472,6 +493,7 @@ describe("Connection with interfaces", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -484,6 +506,15 @@ describe("Connection with interfaces", () => { moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type PersonAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -621,6 +652,15 @@ describe("Connection with interfaces", () => { id: ID } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type ProductionAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -810,6 +850,7 @@ describe("Connection with interfaces", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -842,6 +883,17 @@ describe("Connection with interfaces", () => { title: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + episode: IntAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + title: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! episode: IntAggregateSelection! @@ -850,6 +902,7 @@ describe("Connection with interfaces", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/connections/sort.test.ts b/packages/graphql/tests/schema/connections/sort.test.ts index 52a681ac97..97335b6c87 100644 --- a/packages/graphql/tests/schema/connections/sort.test.ts +++ b/packages/graphql/tests/schema/connections/sort.test.ts @@ -85,6 +85,15 @@ describe("Sort", () => { relatedToConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: Node1RelatedToConnectionWhere): Node1RelatedToConnection! } + type Node1Aggregate { + node: Node1AggregateNode! + } + + type Node1AggregateNode { + count: Int! + property: StringAggregateSelection! + } + type Node1AggregateSelection { count: Int! property: StringAggregateSelection! @@ -251,6 +260,7 @@ describe("Sort", () => { } type Node1sConnection { + aggregate: Node1Aggregate! edges: [Node1Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -262,6 +272,14 @@ describe("Sort", () => { relatedToConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [Node2RelatedToConnectionSort!], where: Node2RelatedToConnectionWhere): Node2RelatedToConnection! } + type Node2Aggregate { + node: Node2AggregateNode! + } + + type Node2AggregateNode { + count: Int! + } + type Node2AggregateSelection { count: Int! } @@ -438,6 +456,7 @@ describe("Sort", () => { } type Node2sConnection { + aggregate: Node2Aggregate! edges: [Node2Edge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/connections/unions.test.ts b/packages/graphql/tests/schema/connections/unions.test.ts index f77ff546d9..cb0f606264 100644 --- a/packages/graphql/tests/schema/connections/unions.test.ts +++ b/packages/graphql/tests/schema/connections/unions.test.ts @@ -61,6 +61,15 @@ describe("Unions", () => { publicationsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [AuthorPublicationsConnectionSort!], where: AuthorPublicationsConnectionWhere): AuthorPublicationsConnection! } + type AuthorAggregate { + node: AuthorAggregateNode! + } + + type AuthorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type AuthorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -297,6 +306,7 @@ describe("Unions", () => { } type AuthorsConnection { + aggregate: AuthorAggregate! edges: [AuthorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -309,6 +319,15 @@ describe("Unions", () => { title: String! } + type BookAggregate { + node: BookAggregateNode! + } + + type BookAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type BookAggregateSelection { count: Int! title: StringAggregateSelection! @@ -518,6 +537,7 @@ describe("Unions", () => { } type BooksConnection { + aggregate: BookAggregate! edges: [BookEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -568,6 +588,15 @@ describe("Unions", () => { subject: String! } + type JournalAggregate { + node: JournalAggregateNode! + } + + type JournalAggregateNode { + count: Int! + subject: StringAggregateSelection! + } + type JournalAggregateSelection { count: Int! subject: StringAggregateSelection! @@ -777,6 +806,7 @@ describe("Unions", () => { } type JournalsConnection { + aggregate: JournalAggregate! edges: [JournalEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/custom-mutations.test.ts b/packages/graphql/tests/schema/custom-mutations.test.ts index 3680a0dcae..27d8ae6279 100644 --- a/packages/graphql/tests/schema/custom-mutations.test.ts +++ b/packages/graphql/tests/schema/custom-mutations.test.ts @@ -92,6 +92,15 @@ describe("Custom-mutations", () => { id: ID } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -140,6 +149,7 @@ describe("Custom-mutations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/directive-preserve.test.ts b/packages/graphql/tests/schema/directive-preserve.test.ts index cf24230abf..d14269a86b 100644 --- a/packages/graphql/tests/schema/directive-preserve.test.ts +++ b/packages/graphql/tests/schema/directive-preserve.test.ts @@ -76,6 +76,15 @@ describe("Directive-preserve", () => { id: ID @preservedFieldLevel(string: \\"str\\", int: 12, float: 1.2, boolean: true) } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -124,6 +133,7 @@ describe("Directive-preserve", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -237,6 +247,15 @@ describe("Directive-preserve", () => { name: String } + type GenreAggregate { + node: GenreAggregateNode! + } + + type GenreAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type GenreAggregateSelection { count: Int! name: StringAggregateSelection! @@ -476,6 +495,7 @@ describe("Directive-preserve", () => { } type GenresConnection { + aggregate: GenreAggregate! edges: [GenreEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -497,6 +517,17 @@ describe("Directive-preserve", () => { year: Int } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + imdbRating: FloatAggregateSelection! + title: StringAggregateSelection! + year: IntAggregateSelection! + } + type MovieAggregateSelection { count: Int! imdbRating: FloatAggregateSelection! @@ -724,6 +755,7 @@ describe("Directive-preserve", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1001,6 +1033,15 @@ describe("Directive-preserve", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -1106,6 +1147,7 @@ describe("Directive-preserve", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1240,6 +1282,16 @@ describe("Directive-preserve", () => { where: ProductionActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + runtime: IntAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! runtime: IntAggregateSelection! @@ -1333,6 +1385,7 @@ describe("Directive-preserve", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1510,6 +1563,15 @@ describe("Directive-preserve", () => { where: ProductionActorsConnectionWhere } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type ProductionAggregateSelection { count: Int! title: StringAggregateSelection! @@ -1608,6 +1670,7 @@ describe("Directive-preserve", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1719,6 +1782,16 @@ describe("Directive-preserve", () => { where: ProductionActorsConnectionWhere } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + episodes: IntAggregateSelection! + title: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! episodes: IntAggregateSelection! @@ -1726,6 +1799,7 @@ describe("Directive-preserve", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2066,6 +2140,15 @@ describe("Directive-preserve", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -2171,6 +2254,7 @@ describe("Directive-preserve", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2340,6 +2424,16 @@ describe("Directive-preserve", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + runtime: IntAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! runtime: IntAggregateSelection! @@ -2433,6 +2527,7 @@ describe("Directive-preserve", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2463,6 +2558,15 @@ describe("Directive-preserve", () => { title: String! } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type ProductionAggregateSelection { count: Int! title: StringAggregateSelection! @@ -2523,6 +2627,7 @@ describe("Directive-preserve", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2669,6 +2774,16 @@ describe("Directive-preserve", () => { where: SeriesActorsConnectionWhere } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + episodes: IntAggregateSelection! + title: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! episodes: IntAggregateSelection! @@ -2676,6 +2791,7 @@ describe("Directive-preserve", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3004,6 +3120,15 @@ describe("Directive-preserve", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -3109,6 +3234,7 @@ describe("Directive-preserve", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3278,6 +3404,16 @@ describe("Directive-preserve", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + runtime: IntAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! runtime: IntAggregateSelection! @@ -3371,6 +3507,7 @@ describe("Directive-preserve", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3401,6 +3538,15 @@ describe("Directive-preserve", () => { title: String! } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type ProductionAggregateSelection { count: Int! title: StringAggregateSelection! @@ -3461,6 +3607,7 @@ describe("Directive-preserve", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3607,6 +3754,16 @@ describe("Directive-preserve", () => { where: SeriesActorsConnectionWhere } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + episodes: IntAggregateSelection! + title: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! episodes: IntAggregateSelection! @@ -3614,6 +3771,7 @@ describe("Directive-preserve", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3782,6 +3940,15 @@ describe("Directive-preserve", () => { title: String } + type BlogAggregate { + node: BlogAggregateNode! + } + + type BlogAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type BlogAggregateSelection { count: Int! title: StringAggregateSelection! @@ -3976,6 +4143,7 @@ describe("Directive-preserve", () => { } type BlogsConnection { + aggregate: BlogAggregate! edges: [BlogEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4043,6 +4211,15 @@ describe("Directive-preserve", () => { content: String @deprecated(reason: \\"Do not use post.content\\") } + type PostAggregate { + node: PostAggregateNode! + } + + type PostAggregateNode { + content: StringAggregateSelection! + count: Int! + } + type PostAggregateSelection { content: StringAggregateSelection! count: Int! @@ -4095,6 +4272,7 @@ describe("Directive-preserve", () => { } type PostsConnection { + aggregate: PostAggregate! edges: [PostEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4163,6 +4341,15 @@ describe("Directive-preserve", () => { name: String } + type UserAggregate { + node: UserAggregateNode! + } + + type UserAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type UserAggregateSelection { count: Int! name: StringAggregateSelection! @@ -4357,6 +4544,7 @@ describe("Directive-preserve", () => { } type UsersConnection { + aggregate: UserAggregate! edges: [UserEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/directives/alias.test.ts b/packages/graphql/tests/schema/directives/alias.test.ts index f655871bae..0b0922fbc8 100644 --- a/packages/graphql/tests/schema/directives/alias.test.ts +++ b/packages/graphql/tests/schema/directives/alias.test.ts @@ -267,6 +267,16 @@ describe("Alias", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + city: StringAggregateSelection! + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { city: StringAggregateSelection! count: Int! @@ -373,6 +383,7 @@ describe("Alias", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -423,6 +434,16 @@ describe("Alias", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + rating: FloatAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! rating: FloatAggregateSelection! @@ -491,6 +512,7 @@ describe("Alias", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/directives/autogenerate.test.ts b/packages/graphql/tests/schema/directives/autogenerate.test.ts index 8e2ea3b380..3abbe119c9 100644 --- a/packages/graphql/tests/schema/directives/autogenerate.test.ts +++ b/packages/graphql/tests/schema/directives/autogenerate.test.ts @@ -70,6 +70,16 @@ describe("Autogenerate", () => { name: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + name: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -126,6 +136,7 @@ describe("Autogenerate", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/directives/customResolver.test.ts b/packages/graphql/tests/schema/directives/customResolver.test.ts index 5c6cf58cf3..2649091ed0 100644 --- a/packages/graphql/tests/schema/directives/customResolver.test.ts +++ b/packages/graphql/tests/schema/directives/customResolver.test.ts @@ -139,6 +139,17 @@ describe("@customResolver directive", () => { username: String! } + type UserAggregate { + node: UserAggregateNode! + } + + type UserAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type UserAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -161,6 +172,15 @@ describe("@customResolver directive", () => { customResolver: String } + type UserInterfaceAggregate { + node: UserInterfaceAggregateNode! + } + + type UserInterfaceAggregateNode { + count: Int! + customResolver: StringAggregateSelection! + } + type UserInterfaceAggregateSelection { count: Int! customResolver: StringAggregateSelection! @@ -206,6 +226,7 @@ describe("@customResolver directive", () => { } type UserInterfacesConnection { + aggregate: UserInterfaceAggregate! edges: [UserInterfaceEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -263,6 +284,7 @@ describe("@customResolver directive", () => { } type UsersConnection { + aggregate: UserAggregate! edges: [UserEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/directives/cypher.test.ts b/packages/graphql/tests/schema/directives/cypher.test.ts index 26b8ec04ca..0e28996002 100644 --- a/packages/graphql/tests/schema/directives/cypher.test.ts +++ b/packages/graphql/tests/schema/directives/cypher.test.ts @@ -136,6 +136,15 @@ describe("Cypher", () => { name: String } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -184,6 +193,7 @@ describe("Cypher", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -300,6 +310,15 @@ describe("Cypher", () => { list_of_custom_times: [Time] } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -497,6 +516,7 @@ describe("Cypher", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -632,6 +652,14 @@ describe("Cypher", () => { custom_cypher_string_list: [String] } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + } + type MovieAggregateSelection { count: Int! } @@ -670,6 +698,7 @@ describe("Cypher", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -753,6 +782,14 @@ describe("Cypher", () => { custom_string_with_param(param: String): String } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + } + type MovieAggregateSelection { count: Int! } @@ -799,6 +836,7 @@ describe("Cypher", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -894,6 +932,15 @@ describe("Cypher", () => { title: String } + type BlogAggregate { + node: BlogAggregateNode! + } + + type BlogAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type BlogAggregateSelection { count: Int! title: StringAggregateSelection! @@ -948,6 +995,7 @@ describe("Cypher", () => { } type BlogsConnection { + aggregate: BlogAggregate! edges: [BlogEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1007,6 +1055,15 @@ describe("Cypher", () => { content: String } + type PostAggregate { + node: PostAggregateNode! + } + + type PostAggregateNode { + content: StringAggregateSelection! + count: Int! + } + type PostAggregateSelection { content: StringAggregateSelection! count: Int! @@ -1055,6 +1112,7 @@ describe("Cypher", () => { } type PostsConnection { + aggregate: PostAggregate! edges: [PostEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1174,6 +1232,15 @@ describe("Cypher", () => { name: String } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -1228,6 +1295,7 @@ describe("Cypher", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1264,6 +1332,14 @@ describe("Cypher", () => { actors: [Actor] } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + } + type MovieAggregateSelection { count: Int! } @@ -1305,6 +1381,7 @@ describe("Cypher", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1332,6 +1409,14 @@ describe("Cypher", () => { actors: [Actor] } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + } + type ProductionAggregateSelection { count: Int! } @@ -1359,6 +1444,7 @@ describe("Cypher", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1469,6 +1555,15 @@ describe("Cypher", () => { name: String } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -1523,6 +1618,7 @@ describe("Cypher", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1559,6 +1655,14 @@ describe("Cypher", () => { actors: [Actor] } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + } + type MovieAggregateSelection { count: Int! } @@ -1600,6 +1704,7 @@ describe("Cypher", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1707,6 +1812,15 @@ describe("Cypher", () => { totalScreenTime: Int! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -1763,6 +1877,7 @@ describe("Cypher", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1804,6 +1919,15 @@ describe("Cypher", () => { id: ID } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -1852,6 +1976,7 @@ describe("Cypher", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1969,6 +2094,15 @@ describe("Cypher", () => { title: String } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -2060,6 +2194,7 @@ describe("Cypher", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/directives/default.test.ts b/packages/graphql/tests/schema/directives/default.test.ts index 99e01dad0d..50b08ba7c8 100644 --- a/packages/graphql/tests/schema/directives/default.test.ts +++ b/packages/graphql/tests/schema/directives/default.test.ts @@ -174,6 +174,21 @@ describe("@default directive", () => { verifiedDate: DateTime! } + type UserAggregate { + node: UserAggregateNode! + } + + type UserAggregateNode { + count: Int! + fromInterface: StringAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + name: StringAggregateSelection! + numberOfFriends: IntAggregateSelection! + rating: FloatAggregateSelection! + toBeOverridden: StringAggregateSelection! + verifiedDate: DateTimeAggregateSelection! + } + type UserAggregateSelection { count: Int! fromInterface: StringAggregateSelection! @@ -207,6 +222,16 @@ describe("@default directive", () => { toBeOverridden: String! } + type UserInterfaceAggregate { + node: UserInterfaceAggregateNode! + } + + type UserInterfaceAggregateNode { + count: Int! + fromInterface: StringAggregateSelection! + toBeOverridden: StringAggregateSelection! + } + type UserInterfaceAggregateSelection { count: Int! fromInterface: StringAggregateSelection! @@ -260,6 +285,7 @@ describe("@default directive", () => { } type UserInterfacesConnection { + aggregate: UserInterfaceAggregate! edges: [UserInterfaceEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -373,6 +399,7 @@ describe("@default directive", () => { } type UsersConnection { + aggregate: UserAggregate! edges: [UserEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/directives/filterable.test.ts b/packages/graphql/tests/schema/directives/filterable.test.ts index 66508076e1..29c8056e1b 100644 --- a/packages/graphql/tests/schema/directives/filterable.test.ts +++ b/packages/graphql/tests/schema/directives/filterable.test.ts @@ -901,6 +901,16 @@ describe("@filterable directive", () => { username: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! password: StringAggregateSelection! @@ -1129,6 +1139,7 @@ describe("@filterable directive", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1297,6 +1308,15 @@ describe("@filterable directive", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -1423,6 +1443,7 @@ describe("@filterable directive", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1534,6 +1555,16 @@ describe("@filterable directive", () => { username: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! password: StringAggregateSelection! @@ -1784,6 +1815,7 @@ describe("@filterable directive", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1952,6 +1984,15 @@ describe("@filterable directive", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -2078,6 +2119,7 @@ describe("@filterable directive", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2189,6 +2231,16 @@ describe("@filterable directive", () => { username: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! password: StringAggregateSelection! @@ -2439,6 +2491,7 @@ describe("@filterable directive", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2607,6 +2660,15 @@ describe("@filterable directive", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -2715,6 +2777,7 @@ describe("@filterable directive", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2829,6 +2892,16 @@ describe("@filterable directive", () => { username: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! password: StringAggregateSelection! @@ -3079,6 +3152,7 @@ describe("@filterable directive", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3198,6 +3272,15 @@ describe("@filterable directive", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -3323,6 +3406,7 @@ describe("@filterable directive", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3436,6 +3520,16 @@ describe("@filterable directive", () => { username: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! password: StringAggregateSelection! @@ -3686,6 +3780,7 @@ describe("@filterable directive", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3854,6 +3949,15 @@ describe("@filterable directive", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -3980,6 +4084,7 @@ describe("@filterable directive", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4093,6 +4198,16 @@ describe("@filterable directive", () => { username: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! password: StringAggregateSelection! @@ -4343,6 +4458,7 @@ describe("@filterable directive", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4511,6 +4627,15 @@ describe("@filterable directive", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -4613,6 +4738,7 @@ describe("@filterable directive", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4726,6 +4852,16 @@ describe("@filterable directive", () => { username: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! password: StringAggregateSelection! @@ -4976,6 +5112,7 @@ describe("@filterable directive", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5095,6 +5232,15 @@ describe("@filterable directive", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -5220,6 +5366,7 @@ describe("@filterable directive", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5338,6 +5485,16 @@ describe("@filterable directive", () => { username: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! password: StringAggregateSelection! @@ -5576,6 +5733,7 @@ describe("@filterable directive", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5678,6 +5836,15 @@ describe("@filterable directive", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -5812,6 +5979,7 @@ describe("@filterable directive", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5835,6 +6003,7 @@ describe("@filterable directive", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5844,6 +6013,15 @@ describe("@filterable directive", () => { username: String! } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + username: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! username: StringAggregateSelection! @@ -6000,6 +6178,16 @@ describe("@filterable directive", () => { username: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! password: StringAggregateSelection! @@ -6238,6 +6426,7 @@ describe("@filterable directive", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -6374,6 +6563,15 @@ describe("@filterable directive", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -6509,6 +6707,7 @@ describe("@filterable directive", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -6532,6 +6731,7 @@ describe("@filterable directive", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -6541,6 +6741,15 @@ describe("@filterable directive", () => { username: String! } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + username: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! username: StringAggregateSelection! @@ -6697,6 +6906,16 @@ describe("@filterable directive", () => { username: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! password: StringAggregateSelection! @@ -6935,6 +7154,7 @@ describe("@filterable directive", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -7037,6 +7257,15 @@ describe("@filterable directive", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -7171,6 +7400,7 @@ describe("@filterable directive", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -7194,6 +7424,7 @@ describe("@filterable directive", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -7203,6 +7434,15 @@ describe("@filterable directive", () => { username: String! } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + username: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! username: StringAggregateSelection! @@ -7363,6 +7603,16 @@ describe("@filterable directive", () => { username: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! password: StringAggregateSelection! @@ -7613,6 +7863,7 @@ describe("@filterable directive", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -7626,6 +7877,16 @@ describe("@filterable directive", () => { username: String! } + type AppearanceAggregate { + node: AppearanceAggregateNode! + } + + type AppearanceAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type AppearanceAggregateSelection { count: Int! password: StringAggregateSelection! @@ -7876,6 +8137,7 @@ describe("@filterable directive", () => { } type AppearancesConnection { + aggregate: AppearanceAggregate! edges: [AppearanceEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -8055,6 +8317,15 @@ describe("@filterable directive", () => { Appearance: [MovieActorsAppearanceUpdateFieldInput!] } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -8180,6 +8451,7 @@ describe("@filterable directive", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -8330,6 +8602,16 @@ describe("@filterable directive", () => { username: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! password: StringAggregateSelection! @@ -8580,6 +8862,7 @@ describe("@filterable directive", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -8593,6 +8876,16 @@ describe("@filterable directive", () => { username: String! } + type AppearanceAggregate { + node: AppearanceAggregateNode! + } + + type AppearanceAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type AppearanceAggregateSelection { count: Int! password: StringAggregateSelection! @@ -8843,6 +9136,7 @@ describe("@filterable directive", () => { } type AppearancesConnection { + aggregate: AppearanceAggregate! edges: [AppearanceEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -9022,6 +9316,15 @@ describe("@filterable directive", () => { Appearance: [MovieActorsAppearanceUpdateFieldInput!] } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -9147,6 +9450,7 @@ describe("@filterable directive", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -9297,6 +9601,16 @@ describe("@filterable directive", () => { username: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! password: StringAggregateSelection! @@ -9547,6 +9861,7 @@ describe("@filterable directive", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -9560,6 +9875,16 @@ describe("@filterable directive", () => { username: String! } + type AppearanceAggregate { + node: AppearanceAggregateNode! + } + + type AppearanceAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type AppearanceAggregateSelection { count: Int! password: StringAggregateSelection! @@ -9810,6 +10135,7 @@ describe("@filterable directive", () => { } type AppearancesConnection { + aggregate: AppearanceAggregate! edges: [AppearanceEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -9989,6 +10315,15 @@ describe("@filterable directive", () => { Appearance: [MovieActorsAppearanceUpdateFieldInput!] } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -10114,6 +10449,7 @@ describe("@filterable directive", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/directives/plural.test.ts b/packages/graphql/tests/schema/directives/plural.test.ts index fc73835c95..6c2349341f 100644 --- a/packages/graphql/tests/schema/directives/plural.test.ts +++ b/packages/graphql/tests/schema/directives/plural.test.ts @@ -101,6 +101,16 @@ describe("Plural option", () => { value: String } + type TechAggregate { + node: TechAggregateNode! + } + + type TechAggregateNode { + count: Int! + name: StringAggregateSelection! + value: StringAggregateSelection! + } + type TechAggregateSelection { count: Int! name: StringAggregateSelection! @@ -160,6 +170,7 @@ describe("Plural option", () => { } type TechsConnection { + aggregate: TechAggregate! edges: [TechEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -260,6 +271,16 @@ describe("Plural option", () => { value: String } + type TechAggregate { + node: TechAggregateNode! + } + + type TechAggregateNode { + count: Int! + name: StringAggregateSelection! + value: StringAggregateSelection! + } + type TechAggregateSelection { count: Int! name: StringAggregateSelection! @@ -319,6 +340,7 @@ describe("Plural option", () => { } type TechsConnection { + aggregate: TechAggregate! edges: [TechEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -419,6 +441,16 @@ describe("Plural option", () => { value: String } + type TechAggregate { + node: TechAggregateNode! + } + + type TechAggregateNode { + count: Int! + name: StringAggregateSelection! + value: StringAggregateSelection! + } + type TechAggregateSelection { count: Int! name: StringAggregateSelection! @@ -478,6 +510,7 @@ describe("Plural option", () => { } type TechnologiesConnection { + aggregate: TechAggregate! edges: [TechEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -577,12 +610,22 @@ describe("Plural option", () => { value: String } + type TechsAggregate { + node: TechsAggregateNode! + } + + type TechsAggregateNode { + count: Int! + value: StringAggregateSelection! + } + type TechsAggregateSelection { count: Int! value: StringAggregateSelection! } type TechsConnection { + aggregate: TechsAggregate! edges: [TechsEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -721,6 +764,7 @@ describe("Plural option", () => { } type TechsConnection { + aggregate: UserAggregate! edges: [UserEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -745,6 +789,15 @@ describe("Plural option", () => { value: String } + type UserAggregate { + node: UserAggregateNode! + } + + type UserAggregateNode { + count: Int! + value: StringAggregateSelection! + } + type UserAggregateSelection { count: Int! value: StringAggregateSelection! @@ -886,6 +939,15 @@ describe("Plural option", () => { value: String } + type UserAggregate { + node: UserAggregateNode! + } + + type UserAggregateNode { + count: Int! + value: StringAggregateSelection! + } + type UserAggregateSelection { count: Int! value: StringAggregateSelection! @@ -934,6 +996,7 @@ describe("Plural option", () => { } type UsersConnection { + aggregate: UserAggregate! edges: [UserEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1033,12 +1096,22 @@ describe("Plural option", () => { value: String } + type UsersAggregate { + node: UsersAggregateNode! + } + + type UsersAggregateNode { + count: Int! + value: StringAggregateSelection! + } + type UsersAggregateSelection { count: Int! value: StringAggregateSelection! } type UsersConnection { + aggregate: UsersAggregate! edges: [UsersEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/directives/populatedBy.test.ts b/packages/graphql/tests/schema/directives/populatedBy.test.ts index 734ca1c724..bf51368b5c 100644 --- a/packages/graphql/tests/schema/directives/populatedBy.test.ts +++ b/packages/graphql/tests/schema/directives/populatedBy.test.ts @@ -195,6 +195,18 @@ describe("@populatedBy tests", () => { id: ID } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + callback1: StringAggregateSelection! + callback2: StringAggregateSelection! + callback3: StringAggregateSelection! + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { callback1: StringAggregateSelection! callback2: StringAggregateSelection! @@ -270,6 +282,7 @@ describe("@populatedBy tests", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -400,6 +413,18 @@ describe("@populatedBy tests", () => { id: ID } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + callback1: IntAggregateSelection! + callback2: IntAggregateSelection! + callback3: IntAggregateSelection! + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { callback1: IntAggregateSelection! callback2: IntAggregateSelection! @@ -480,6 +505,7 @@ describe("@populatedBy tests", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -739,6 +765,15 @@ describe("@populatedBy tests", () => { id: ID! } + type GenreAggregate { + node: GenreAggregateNode! + } + + type GenreAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type GenreAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -791,6 +826,7 @@ describe("@populatedBy tests", () => { } type GenresConnection { + aggregate: GenreAggregate! edges: [GenreEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -808,6 +844,15 @@ describe("@populatedBy tests", () => { id: ID } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -1000,6 +1045,7 @@ describe("@populatedBy tests", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1261,6 +1307,15 @@ describe("@populatedBy tests", () => { id: ID! } + type GenreAggregate { + node: GenreAggregateNode! + } + + type GenreAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type GenreAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -1313,6 +1368,7 @@ describe("@populatedBy tests", () => { } type GenresConnection { + aggregate: GenreAggregate! edges: [GenreEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1337,6 +1393,15 @@ describe("@populatedBy tests", () => { id: ID } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -1529,6 +1594,7 @@ describe("@populatedBy tests", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/directives/private.test.ts b/packages/graphql/tests/schema/directives/private.test.ts index b8642c55ec..865f351784 100644 --- a/packages/graphql/tests/schema/directives/private.test.ts +++ b/packages/graphql/tests/schema/directives/private.test.ts @@ -121,6 +121,15 @@ describe("@private directive", () => { id: ID } + type UserAggregate { + node: UserAggregateNode! + } + + type UserAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type UserAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -139,6 +148,15 @@ describe("@private directive", () => { id: ID } + type UserInterfaceAggregate { + node: UserInterfaceAggregateNode! + } + + type UserInterfaceAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type UserInterfaceAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -184,6 +202,7 @@ describe("@private directive", () => { } type UserInterfacesConnection { + aggregate: UserInterfaceAggregate! edges: [UserInterfaceEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -223,6 +242,7 @@ describe("@private directive", () => { } type UsersConnection { + aggregate: UserAggregate! edges: [UserEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -334,6 +354,16 @@ describe("@private directive", () => { private: String } + type UserAggregate { + node: UserAggregateNode! + } + + type UserAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + private: StringAggregateSelection! + } + type UserAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -354,6 +384,15 @@ describe("@private directive", () => { id: ID } + type UserInterfaceAggregate { + node: UserInterfaceAggregateNode! + } + + type UserInterfaceAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type UserInterfaceAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -399,6 +438,7 @@ describe("@private directive", () => { } type UserInterfacesConnection { + aggregate: UserInterfaceAggregate! edges: [UserInterfaceEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -447,6 +487,7 @@ describe("@private directive", () => { } type UsersConnection { + aggregate: UserAggregate! edges: [UserEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts index 7567cc23ea..4c7b7b79a4 100644 --- a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts @@ -232,6 +232,16 @@ describe("@relationship directive, aggregate argument", () => { username: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! password: StringAggregateSelection! @@ -295,6 +305,7 @@ describe("@relationship directive, aggregate argument", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -441,6 +452,15 @@ describe("@relationship directive, aggregate argument", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -520,6 +540,7 @@ describe("@relationship directive, aggregate argument", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -613,6 +634,16 @@ describe("@relationship directive, aggregate argument", () => { username: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! password: StringAggregateSelection! @@ -676,6 +707,7 @@ describe("@relationship directive, aggregate argument", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -833,6 +865,15 @@ describe("@relationship directive, aggregate argument", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -912,6 +953,7 @@ describe("@relationship directive, aggregate argument", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1011,6 +1053,16 @@ describe("@relationship directive, aggregate argument", () => { username: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! password: StringAggregateSelection! @@ -1070,6 +1122,7 @@ describe("@relationship directive, aggregate argument", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1212,6 +1265,15 @@ describe("@relationship directive, aggregate argument", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -1291,6 +1353,7 @@ describe("@relationship directive, aggregate argument", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1314,6 +1377,7 @@ describe("@relationship directive, aggregate argument", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1324,6 +1388,16 @@ describe("@relationship directive, aggregate argument", () => { username: String! } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! password: StringAggregateSelection! @@ -1469,6 +1543,16 @@ describe("@relationship directive, aggregate argument", () => { username: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! password: StringAggregateSelection! @@ -1528,6 +1612,7 @@ describe("@relationship directive, aggregate argument", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1671,6 +1756,15 @@ describe("@relationship directive, aggregate argument", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -1760,6 +1854,7 @@ describe("@relationship directive, aggregate argument", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1783,6 +1878,7 @@ describe("@relationship directive, aggregate argument", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1793,6 +1889,16 @@ describe("@relationship directive, aggregate argument", () => { username: String! } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! password: StringAggregateSelection! @@ -1942,6 +2048,16 @@ describe("@relationship directive, aggregate argument", () => { username: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! password: StringAggregateSelection! @@ -2005,6 +2121,7 @@ describe("@relationship directive, aggregate argument", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2167,6 +2284,15 @@ describe("@relationship directive, aggregate argument", () => { Person: [MovieActorsPersonUpdateFieldInput!] } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -2245,6 +2371,7 @@ describe("@relationship directive, aggregate argument", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2271,6 +2398,7 @@ describe("@relationship directive, aggregate argument", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2280,6 +2408,15 @@ describe("@relationship directive, aggregate argument", () => { name: String! } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! name: StringAggregateSelection! @@ -2422,6 +2559,16 @@ describe("@relationship directive, aggregate argument", () => { username: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! password: StringAggregateSelection! @@ -2485,6 +2632,7 @@ describe("@relationship directive, aggregate argument", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2647,6 +2795,15 @@ describe("@relationship directive, aggregate argument", () => { Person: [MovieActorsPersonUpdateFieldInput!] } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -2725,6 +2882,7 @@ describe("@relationship directive, aggregate argument", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2751,6 +2909,7 @@ describe("@relationship directive, aggregate argument", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2760,6 +2919,15 @@ describe("@relationship directive, aggregate argument", () => { name: String! } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! name: StringAggregateSelection! 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 4c4fcbb000..3affe8bc9b 100644 --- a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts @@ -144,6 +144,15 @@ describe("Relationship nested operations", () => { node: Person! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -226,6 +235,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -249,6 +259,7 @@ describe("Relationship nested operations", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -258,6 +269,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! name: StringAggregateSelection! @@ -476,6 +496,15 @@ describe("Relationship nested operations", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -560,6 +589,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -583,6 +613,7 @@ describe("Relationship nested operations", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -592,6 +623,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! name: StringAggregateSelection! @@ -814,6 +854,15 @@ describe("Relationship nested operations", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -898,6 +947,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -921,6 +971,7 @@ describe("Relationship nested operations", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -930,6 +981,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! name: StringAggregateSelection! @@ -1148,6 +1208,15 @@ describe("Relationship nested operations", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -1231,6 +1300,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1254,6 +1324,7 @@ describe("Relationship nested operations", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1263,6 +1334,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! name: StringAggregateSelection! @@ -1477,6 +1557,15 @@ describe("Relationship nested operations", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -1564,6 +1653,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1587,6 +1677,7 @@ describe("Relationship nested operations", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1596,6 +1687,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! name: StringAggregateSelection! @@ -1810,6 +1910,15 @@ describe("Relationship nested operations", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -1893,6 +2002,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1916,6 +2026,7 @@ describe("Relationship nested operations", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1925,6 +2036,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! name: StringAggregateSelection! @@ -2131,6 +2251,15 @@ describe("Relationship nested operations", () => { node: Person! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -2213,6 +2342,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2236,6 +2366,7 @@ describe("Relationship nested operations", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2245,6 +2376,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! name: StringAggregateSelection! @@ -2480,6 +2620,15 @@ describe("Relationship nested operations", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -2565,6 +2714,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2588,6 +2738,7 @@ describe("Relationship nested operations", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2598,6 +2749,16 @@ describe("Relationship nested operations", () => { name: String } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -2866,6 +3027,15 @@ describe("Relationship nested operations", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -3054,6 +3224,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3077,6 +3248,7 @@ describe("Relationship nested operations", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3086,6 +3258,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! name: StringAggregateSelection! @@ -3312,6 +3493,15 @@ describe("Relationship nested operations", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -3496,6 +3686,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3519,6 +3710,7 @@ describe("Relationship nested operations", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3528,6 +3720,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! name: StringAggregateSelection! @@ -3724,6 +3925,15 @@ describe("Relationship nested operations", () => { node: Person! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -3796,6 +4006,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3827,6 +4038,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonOneAggregate { + node: PersonOneAggregateNode! + } + + type PersonOneAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonOneAggregateSelection { count: Int! name: StringAggregateSelection! @@ -3875,6 +4095,7 @@ describe("Relationship nested operations", () => { } type PersonOnesConnection { + aggregate: PersonOneAggregate! edges: [PersonOneEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3884,6 +4105,15 @@ describe("Relationship nested operations", () => { nameTwo: String } + type PersonTwoAggregate { + node: PersonTwoAggregateNode! + } + + type PersonTwoAggregateNode { + count: Int! + nameTwo: StringAggregateSelection! + } + type PersonTwoAggregateSelection { count: Int! nameTwo: StringAggregateSelection! @@ -3932,6 +4162,7 @@ describe("Relationship nested operations", () => { } type PersonTwosConnection { + aggregate: PersonTwoAggregate! edges: [PersonTwoEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4135,6 +4366,15 @@ describe("Relationship nested operations", () => { PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -4209,6 +4449,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4240,6 +4481,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonOneAggregate { + node: PersonOneAggregateNode! + } + + type PersonOneAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonOneAggregateSelection { count: Int! name: StringAggregateSelection! @@ -4288,6 +4538,7 @@ describe("Relationship nested operations", () => { } type PersonOnesConnection { + aggregate: PersonOneAggregate! edges: [PersonOneEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4297,6 +4548,15 @@ describe("Relationship nested operations", () => { nameTwo: String } + type PersonTwoAggregate { + node: PersonTwoAggregateNode! + } + + type PersonTwoAggregateNode { + count: Int! + nameTwo: StringAggregateSelection! + } + type PersonTwoAggregateSelection { count: Int! nameTwo: StringAggregateSelection! @@ -4345,6 +4605,7 @@ describe("Relationship nested operations", () => { } type PersonTwosConnection { + aggregate: PersonTwoAggregate! edges: [PersonTwoEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4548,6 +4809,15 @@ describe("Relationship nested operations", () => { PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -4622,6 +4892,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4653,6 +4924,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonOneAggregate { + node: PersonOneAggregateNode! + } + + type PersonOneAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonOneAggregateSelection { count: Int! name: StringAggregateSelection! @@ -4705,6 +4985,7 @@ describe("Relationship nested operations", () => { } type PersonOnesConnection { + aggregate: PersonOneAggregate! edges: [PersonOneEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4714,6 +4995,15 @@ describe("Relationship nested operations", () => { nameTwo: String } + type PersonTwoAggregate { + node: PersonTwoAggregateNode! + } + + type PersonTwoAggregateNode { + count: Int! + nameTwo: StringAggregateSelection! + } + type PersonTwoAggregateSelection { count: Int! nameTwo: StringAggregateSelection! @@ -4766,6 +5056,7 @@ describe("Relationship nested operations", () => { } type PersonTwosConnection { + aggregate: PersonTwoAggregate! edges: [PersonTwoEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4956,6 +5247,15 @@ describe("Relationship nested operations", () => { PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -5029,6 +5329,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5060,6 +5361,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonOneAggregate { + node: PersonOneAggregateNode! + } + + type PersonOneAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonOneAggregateSelection { count: Int! name: StringAggregateSelection! @@ -5108,6 +5418,7 @@ describe("Relationship nested operations", () => { } type PersonOnesConnection { + aggregate: PersonOneAggregate! edges: [PersonOneEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5117,6 +5428,15 @@ describe("Relationship nested operations", () => { nameTwo: String } + type PersonTwoAggregate { + node: PersonTwoAggregateNode! + } + + type PersonTwoAggregateNode { + count: Int! + nameTwo: StringAggregateSelection! + } + type PersonTwoAggregateSelection { count: Int! nameTwo: StringAggregateSelection! @@ -5165,6 +5485,7 @@ describe("Relationship nested operations", () => { } type PersonTwosConnection { + aggregate: PersonTwoAggregate! edges: [PersonTwoEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5360,6 +5681,15 @@ describe("Relationship nested operations", () => { PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -5437,6 +5767,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5468,6 +5799,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonOneAggregate { + node: PersonOneAggregateNode! + } + + type PersonOneAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonOneAggregateSelection { count: Int! name: StringAggregateSelection! @@ -5516,6 +5856,7 @@ describe("Relationship nested operations", () => { } type PersonOnesConnection { + aggregate: PersonOneAggregate! edges: [PersonOneEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5525,6 +5866,15 @@ describe("Relationship nested operations", () => { nameTwo: String } + type PersonTwoAggregate { + node: PersonTwoAggregateNode! + } + + type PersonTwoAggregateNode { + count: Int! + nameTwo: StringAggregateSelection! + } + type PersonTwoAggregateSelection { count: Int! nameTwo: StringAggregateSelection! @@ -5573,6 +5923,7 @@ describe("Relationship nested operations", () => { } type PersonTwosConnection { + aggregate: PersonTwoAggregate! edges: [PersonTwoEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5763,6 +6114,15 @@ describe("Relationship nested operations", () => { PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -5836,6 +6196,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5867,6 +6228,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonOneAggregate { + node: PersonOneAggregateNode! + } + + type PersonOneAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonOneAggregateSelection { count: Int! name: StringAggregateSelection! @@ -5915,6 +6285,7 @@ describe("Relationship nested operations", () => { } type PersonOnesConnection { + aggregate: PersonOneAggregate! edges: [PersonOneEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5924,6 +6295,15 @@ describe("Relationship nested operations", () => { nameTwo: String } + type PersonTwoAggregate { + node: PersonTwoAggregateNode! + } + + type PersonTwoAggregateNode { + count: Int! + nameTwo: StringAggregateSelection! + } + type PersonTwoAggregateSelection { count: Int! nameTwo: StringAggregateSelection! @@ -5972,6 +6352,7 @@ describe("Relationship nested operations", () => { } type PersonTwosConnection { + aggregate: PersonTwoAggregate! edges: [PersonTwoEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -6140,6 +6521,15 @@ describe("Relationship nested operations", () => { node: Person! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -6212,6 +6602,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -6243,6 +6634,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonOneAggregate { + node: PersonOneAggregateNode! + } + + type PersonOneAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonOneAggregateSelection { count: Int! name: StringAggregateSelection! @@ -6291,6 +6691,7 @@ describe("Relationship nested operations", () => { } type PersonOnesConnection { + aggregate: PersonOneAggregate! edges: [PersonOneEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -6300,6 +6701,15 @@ describe("Relationship nested operations", () => { nameTwo: String } + type PersonTwoAggregate { + node: PersonTwoAggregateNode! + } + + type PersonTwoAggregateNode { + count: Int! + nameTwo: StringAggregateSelection! + } + type PersonTwoAggregateSelection { count: Int! nameTwo: StringAggregateSelection! @@ -6348,6 +6758,7 @@ describe("Relationship nested operations", () => { } type PersonTwosConnection { + aggregate: PersonTwoAggregate! edges: [PersonTwoEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -6564,6 +6975,15 @@ describe("Relationship nested operations", () => { PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -6638,6 +7058,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -6670,6 +7091,16 @@ describe("Relationship nested operations", () => { name: String } + type PersonOneAggregate { + node: PersonOneAggregateNode! + } + + type PersonOneAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + name: StringAggregateSelection! + } + type PersonOneAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -6739,6 +7170,7 @@ describe("Relationship nested operations", () => { } type PersonOnesConnection { + aggregate: PersonOneAggregate! edges: [PersonOneEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -6749,6 +7181,16 @@ describe("Relationship nested operations", () => { nameTwo: String } + type PersonTwoAggregate { + node: PersonTwoAggregateNode! + } + + type PersonTwoAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + nameTwo: StringAggregateSelection! + } + type PersonTwoAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -6818,6 +7260,7 @@ describe("Relationship nested operations", () => { } type PersonTwosConnection { + aggregate: PersonTwoAggregate! edges: [PersonTwoEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -7071,6 +7514,15 @@ describe("Relationship nested operations", () => { PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -7227,6 +7679,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -7258,6 +7711,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonOneAggregate { + node: PersonOneAggregateNode! + } + + type PersonOneAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonOneAggregateSelection { count: Int! name: StringAggregateSelection! @@ -7310,6 +7772,7 @@ describe("Relationship nested operations", () => { } type PersonOnesConnection { + aggregate: PersonOneAggregate! edges: [PersonOneEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -7319,6 +7782,15 @@ describe("Relationship nested operations", () => { nameTwo: String } + type PersonTwoAggregate { + node: PersonTwoAggregateNode! + } + + type PersonTwoAggregateNode { + count: Int! + nameTwo: StringAggregateSelection! + } + type PersonTwoAggregateSelection { count: Int! nameTwo: StringAggregateSelection! @@ -7371,6 +7843,7 @@ describe("Relationship nested operations", () => { } type PersonTwosConnection { + aggregate: PersonTwoAggregate! edges: [PersonTwoEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -7577,6 +8050,15 @@ describe("Relationship nested operations", () => { PersonTwo: [MovieActorsPersonTwoUpdateFieldInput!] } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -7729,6 +8211,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -7760,6 +8243,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonOneAggregate { + node: PersonOneAggregateNode! + } + + type PersonOneAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonOneAggregateSelection { count: Int! name: StringAggregateSelection! @@ -7808,6 +8300,7 @@ describe("Relationship nested operations", () => { } type PersonOnesConnection { + aggregate: PersonOneAggregate! edges: [PersonOneEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -7817,6 +8310,15 @@ describe("Relationship nested operations", () => { nameTwo: String } + type PersonTwoAggregate { + node: PersonTwoAggregateNode! + } + + type PersonTwoAggregateNode { + count: Int! + nameTwo: StringAggregateSelection! + } + type PersonTwoAggregateSelection { count: Int! nameTwo: StringAggregateSelection! @@ -7865,6 +8367,7 @@ describe("Relationship nested operations", () => { } type PersonTwosConnection { + aggregate: PersonTwoAggregate! edges: [PersonTwoEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -8069,6 +8572,15 @@ describe("Relationship nested operations", () => { node: Person! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -8151,6 +8663,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -8177,6 +8690,7 @@ describe("Relationship nested operations", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -8186,6 +8700,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! name: StringAggregateSelection! @@ -8206,6 +8729,15 @@ describe("Relationship nested operations", () => { someExtraProp: [Int!]! } + type PersonOneAggregate { + node: PersonOneAggregateNode! + } + + type PersonOneAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonOneAggregateSelection { count: Int! name: StringAggregateSelection! @@ -8262,6 +8794,7 @@ describe("Relationship nested operations", () => { } type PersonOnesConnection { + aggregate: PersonOneAggregate! edges: [PersonOneEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -8287,6 +8820,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonTwoAggregate { + node: PersonTwoAggregateNode! + } + + type PersonTwoAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonTwoAggregateSelection { count: Int! name: StringAggregateSelection! @@ -8335,6 +8877,7 @@ describe("Relationship nested operations", () => { } type PersonTwosConnection { + aggregate: PersonTwoAggregate! edges: [PersonTwoEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -8550,6 +9093,15 @@ describe("Relationship nested operations", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -8634,6 +9186,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -8660,6 +9213,7 @@ describe("Relationship nested operations", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -8669,6 +9223,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! name: StringAggregateSelection! @@ -8694,6 +9257,15 @@ describe("Relationship nested operations", () => { someExtraProp: [Int!]! } + type PersonOneAggregate { + node: PersonOneAggregateNode! + } + + type PersonOneAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonOneAggregateSelection { count: Int! name: StringAggregateSelection! @@ -8750,6 +9322,7 @@ describe("Relationship nested operations", () => { } type PersonOnesConnection { + aggregate: PersonOneAggregate! edges: [PersonOneEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -8775,6 +9348,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonTwoAggregate { + node: PersonTwoAggregateNode! + } + + type PersonTwoAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonTwoAggregateSelection { count: Int! name: StringAggregateSelection! @@ -8823,6 +9405,7 @@ describe("Relationship nested operations", () => { } type PersonTwosConnection { + aggregate: PersonTwoAggregate! edges: [PersonTwoEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -9038,6 +9621,15 @@ describe("Relationship nested operations", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -9122,6 +9714,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -9148,6 +9741,7 @@ describe("Relationship nested operations", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -9157,6 +9751,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! name: StringAggregateSelection! @@ -9181,6 +9784,15 @@ describe("Relationship nested operations", () => { someExtraProp: [Int!]! } + type PersonOneAggregate { + node: PersonOneAggregateNode! + } + + type PersonOneAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonOneAggregateSelection { count: Int! name: StringAggregateSelection! @@ -9237,6 +9849,7 @@ describe("Relationship nested operations", () => { } type PersonOnesConnection { + aggregate: PersonOneAggregate! edges: [PersonOneEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -9262,6 +9875,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonTwoAggregate { + node: PersonTwoAggregateNode! + } + + type PersonTwoAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonTwoAggregateSelection { count: Int! name: StringAggregateSelection! @@ -9310,6 +9932,7 @@ describe("Relationship nested operations", () => { } type PersonTwosConnection { + aggregate: PersonTwoAggregate! edges: [PersonTwoEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -9521,6 +10144,15 @@ describe("Relationship nested operations", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -9604,6 +10236,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -9630,6 +10263,7 @@ describe("Relationship nested operations", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -9639,6 +10273,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! name: StringAggregateSelection! @@ -9659,6 +10302,15 @@ describe("Relationship nested operations", () => { someExtraProp: [Int!]! } + type PersonOneAggregate { + node: PersonOneAggregateNode! + } + + type PersonOneAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonOneAggregateSelection { count: Int! name: StringAggregateSelection! @@ -9715,6 +10367,7 @@ describe("Relationship nested operations", () => { } type PersonOnesConnection { + aggregate: PersonOneAggregate! edges: [PersonOneEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -9740,6 +10393,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonTwoAggregate { + node: PersonTwoAggregateNode! + } + + type PersonTwoAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonTwoAggregateSelection { count: Int! name: StringAggregateSelection! @@ -9788,6 +10450,7 @@ describe("Relationship nested operations", () => { } type PersonTwosConnection { + aggregate: PersonTwoAggregate! edges: [PersonTwoEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -10004,6 +10667,15 @@ describe("Relationship nested operations", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -10091,6 +10763,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -10117,6 +10790,7 @@ describe("Relationship nested operations", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -10126,6 +10800,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! name: StringAggregateSelection! @@ -10146,6 +10829,15 @@ describe("Relationship nested operations", () => { someExtraProp: [Int!]! } + type PersonOneAggregate { + node: PersonOneAggregateNode! + } + + type PersonOneAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonOneAggregateSelection { count: Int! name: StringAggregateSelection! @@ -10202,6 +10894,7 @@ describe("Relationship nested operations", () => { } type PersonOnesConnection { + aggregate: PersonOneAggregate! edges: [PersonOneEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -10227,6 +10920,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonTwoAggregate { + node: PersonTwoAggregateNode! + } + + type PersonTwoAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonTwoAggregateSelection { count: Int! name: StringAggregateSelection! @@ -10275,6 +10977,7 @@ describe("Relationship nested operations", () => { } type PersonTwosConnection { + aggregate: PersonTwoAggregate! edges: [PersonTwoEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -10486,6 +11189,15 @@ describe("Relationship nested operations", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -10569,6 +11281,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -10595,6 +11308,7 @@ describe("Relationship nested operations", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -10604,6 +11318,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! name: StringAggregateSelection! @@ -10624,6 +11347,15 @@ describe("Relationship nested operations", () => { someExtraProp: [Int!]! } + type PersonOneAggregate { + node: PersonOneAggregateNode! + } + + type PersonOneAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonOneAggregateSelection { count: Int! name: StringAggregateSelection! @@ -10680,6 +11412,7 @@ describe("Relationship nested operations", () => { } type PersonOnesConnection { + aggregate: PersonOneAggregate! edges: [PersonOneEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -10705,6 +11438,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonTwoAggregate { + node: PersonTwoAggregateNode! + } + + type PersonTwoAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonTwoAggregateSelection { count: Int! name: StringAggregateSelection! @@ -10753,6 +11495,7 @@ describe("Relationship nested operations", () => { } type PersonTwosConnection { + aggregate: PersonTwoAggregate! edges: [PersonTwoEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -10993,6 +11736,15 @@ describe("Relationship nested operations", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -11181,6 +11933,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -11207,6 +11960,7 @@ describe("Relationship nested operations", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -11216,6 +11970,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! name: StringAggregateSelection! @@ -11245,6 +12008,15 @@ describe("Relationship nested operations", () => { someExtraProp: [Int!]! } + type PersonOneAggregate { + node: PersonOneAggregateNode! + } + + type PersonOneAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonOneAggregateSelection { count: Int! name: StringAggregateSelection! @@ -11301,6 +12073,7 @@ describe("Relationship nested operations", () => { } type PersonOnesConnection { + aggregate: PersonOneAggregate! edges: [PersonOneEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -11326,6 +12099,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonTwoAggregate { + node: PersonTwoAggregateNode! + } + + type PersonTwoAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonTwoAggregateSelection { count: Int! name: StringAggregateSelection! @@ -11374,6 +12156,7 @@ describe("Relationship nested operations", () => { } type PersonTwosConnection { + aggregate: PersonTwoAggregate! edges: [PersonTwoEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -11604,6 +12387,15 @@ describe("Relationship nested operations", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -11792,6 +12584,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -11818,6 +12611,7 @@ describe("Relationship nested operations", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -11827,6 +12621,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! name: StringAggregateSelection! @@ -11852,6 +12655,15 @@ describe("Relationship nested operations", () => { someExtraProp: [Int!]! } + type PersonOneAggregate { + node: PersonOneAggregateNode! + } + + type PersonOneAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonOneAggregateSelection { count: Int! name: StringAggregateSelection! @@ -11908,6 +12720,7 @@ describe("Relationship nested operations", () => { } type PersonOnesConnection { + aggregate: PersonOneAggregate! edges: [PersonOneEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -11933,6 +12746,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonTwoAggregate { + node: PersonTwoAggregateNode! + } + + type PersonTwoAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonTwoAggregateSelection { count: Int! name: StringAggregateSelection! @@ -11981,6 +12803,7 @@ describe("Relationship nested operations", () => { } type PersonTwosConnection { + aggregate: PersonTwoAggregate! edges: [PersonTwoEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/directives/relationship-properties.test.ts b/packages/graphql/tests/schema/directives/relationship-properties.test.ts index 57d687d396..a7c2103405 100644 --- a/packages/graphql/tests/schema/directives/relationship-properties.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-properties.test.ts @@ -139,6 +139,15 @@ describe("Relationship-properties", () => { name: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -348,6 +357,7 @@ describe("Relationship-properties", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -514,6 +524,15 @@ describe("Relationship-properties", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -605,6 +624,7 @@ describe("Relationship-properties", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -805,6 +825,15 @@ describe("Relationship-properties", () => { name: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -1016,6 +1045,7 @@ describe("Relationship-properties", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1194,6 +1224,15 @@ describe("Relationship-properties", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -1285,6 +1324,7 @@ describe("Relationship-properties", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1444,6 +1484,15 @@ describe("Relationship-properties", () => { name: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -1651,6 +1700,7 @@ describe("Relationship-properties", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1818,6 +1868,15 @@ describe("Relationship-properties", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -1909,6 +1968,7 @@ describe("Relationship-properties", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/directives/relationship.test.ts b/packages/graphql/tests/schema/directives/relationship.test.ts index 07b502b68a..dedfbfbf6e 100644 --- a/packages/graphql/tests/schema/directives/relationship.test.ts +++ b/packages/graphql/tests/schema/directives/relationship.test.ts @@ -47,6 +47,15 @@ describe("Relationship", () => { name: String } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -99,6 +108,7 @@ describe("Relationship", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -245,6 +255,15 @@ describe("Relationship", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -324,6 +343,7 @@ describe("Relationship", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -418,6 +438,15 @@ describe("Relationship", () => { name: String } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -610,6 +639,7 @@ describe("Relationship", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -759,6 +789,15 @@ describe("Relationship", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -850,6 +889,7 @@ describe("Relationship", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/directives/selectable.test.ts b/packages/graphql/tests/schema/directives/selectable.test.ts index 91d6ec5a8f..1cc9ed686b 100644 --- a/packages/graphql/tests/schema/directives/selectable.test.ts +++ b/packages/graphql/tests/schema/directives/selectable.test.ts @@ -64,6 +64,16 @@ describe("@selectable", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -123,6 +133,7 @@ describe("@selectable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -219,6 +230,15 @@ describe("@selectable", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -277,6 +297,7 @@ describe("@selectable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -372,6 +393,15 @@ describe("@selectable", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -430,6 +460,7 @@ describe("@selectable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -534,6 +565,16 @@ describe("@selectable", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -634,6 +675,7 @@ describe("@selectable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -817,6 +859,15 @@ describe("@selectable", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -906,6 +957,7 @@ describe("@selectable", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -942,6 +994,16 @@ describe("@selectable", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -1005,6 +1067,7 @@ describe("@selectable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1208,6 +1271,15 @@ describe("@selectable", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -1297,6 +1369,7 @@ describe("@selectable", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1333,6 +1406,16 @@ describe("@selectable", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -1396,6 +1479,7 @@ describe("@selectable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1599,6 +1683,15 @@ describe("@selectable", () => { Series: [ActorActedInSeriesUpdateFieldInput!] } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -1677,6 +1770,7 @@ describe("@selectable", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1718,6 +1812,16 @@ describe("@selectable", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -1781,6 +1885,7 @@ describe("@selectable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1837,6 +1942,16 @@ describe("@selectable", () => { name: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + description: StringAggregateSelection! + name: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! description: StringAggregateSelection! @@ -1848,6 +1963,7 @@ describe("@selectable", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2092,6 +2208,15 @@ describe("@selectable", () => { Series: [ActorActedInSeriesUpdateFieldInput!] } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -2170,6 +2295,7 @@ describe("@selectable", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2211,6 +2337,16 @@ describe("@selectable", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -2274,6 +2410,7 @@ describe("@selectable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2330,6 +2467,16 @@ describe("@selectable", () => { name: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + description: StringAggregateSelection! + name: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! description: StringAggregateSelection! @@ -2341,6 +2488,7 @@ describe("@selectable", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2567,6 +2715,15 @@ describe("@selectable", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -2656,6 +2813,7 @@ describe("@selectable", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2697,6 +2855,16 @@ describe("@selectable", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -2756,6 +2924,7 @@ describe("@selectable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2786,6 +2955,16 @@ describe("@selectable", () => { title: String! } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type ProductionAggregateSelection { count: Int! description: StringAggregateSelection! @@ -2856,6 +3035,7 @@ describe("@selectable", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2881,6 +3061,16 @@ describe("@selectable", () => { title: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! description: StringAggregateSelection! @@ -2888,6 +3078,7 @@ describe("@selectable", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3128,6 +3319,15 @@ describe("@selectable", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -3217,6 +3417,7 @@ describe("@selectable", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3258,6 +3459,16 @@ describe("@selectable", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -3317,6 +3528,7 @@ describe("@selectable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3347,6 +3559,16 @@ describe("@selectable", () => { title: String! } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type ProductionAggregateSelection { count: Int! description: StringAggregateSelection! @@ -3417,6 +3639,7 @@ describe("@selectable", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3442,6 +3665,16 @@ describe("@selectable", () => { title: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! description: StringAggregateSelection! @@ -3449,6 +3682,7 @@ describe("@selectable", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/directives/settable.test.ts b/packages/graphql/tests/schema/directives/settable.test.ts index be8ef975fd..cfb14a67f8 100644 --- a/packages/graphql/tests/schema/directives/settable.test.ts +++ b/packages/graphql/tests/schema/directives/settable.test.ts @@ -65,6 +65,16 @@ describe("@settable", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -123,6 +133,7 @@ describe("@settable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -219,6 +230,16 @@ describe("@settable", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -276,6 +297,7 @@ describe("@settable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -381,6 +403,16 @@ describe("@settable", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -479,6 +511,7 @@ describe("@settable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -674,6 +707,15 @@ describe("@settable", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -762,6 +804,7 @@ describe("@settable", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -798,6 +841,16 @@ describe("@settable", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -861,6 +914,7 @@ describe("@settable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1048,6 +1102,15 @@ describe("@settable", () => { node: Movie! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -1136,6 +1199,7 @@ describe("@settable", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1172,6 +1236,16 @@ describe("@settable", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -1235,6 +1309,7 @@ describe("@settable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1428,6 +1503,15 @@ describe("@settable", () => { node: Movie! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -1528,6 +1612,7 @@ describe("@settable", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1673,6 +1758,16 @@ describe("@settable", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -1775,6 +1870,7 @@ describe("@settable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1976,6 +2072,15 @@ describe("@settable", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -2076,6 +2181,7 @@ describe("@settable", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2221,6 +2327,16 @@ describe("@settable", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -2323,6 +2439,7 @@ describe("@settable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2523,6 +2640,15 @@ describe("@settable", () => { Series: [ActorActedInSeriesUpdateFieldInput!] } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -2600,6 +2726,7 @@ describe("@settable", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2641,6 +2768,16 @@ describe("@settable", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -2704,6 +2841,7 @@ describe("@settable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2760,6 +2898,16 @@ describe("@settable", () => { name: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + description: StringAggregateSelection! + name: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! description: StringAggregateSelection! @@ -2771,6 +2919,7 @@ describe("@settable", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2977,6 +3126,15 @@ describe("@settable", () => { create: [ActorActedInSeriesCreateFieldInput!] } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -3054,6 +3212,7 @@ describe("@settable", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3095,6 +3254,16 @@ describe("@settable", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -3158,6 +3327,7 @@ describe("@settable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3214,6 +3384,16 @@ describe("@settable", () => { name: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + description: StringAggregateSelection! + name: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! description: StringAggregateSelection! @@ -3225,6 +3405,7 @@ describe("@settable", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3451,6 +3632,15 @@ describe("@settable", () => { create: [ActorActedInSeriesCreateFieldInput!] } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -3540,6 +3730,7 @@ describe("@settable", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3690,6 +3881,16 @@ describe("@settable", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -3792,6 +3993,7 @@ describe("@settable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3848,6 +4050,16 @@ describe("@settable", () => { name: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + description: StringAggregateSelection! + name: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! description: StringAggregateSelection! @@ -3859,6 +4071,7 @@ describe("@settable", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4101,6 +4314,15 @@ describe("@settable", () => { Series: [ActorActedInSeriesUpdateFieldInput!] } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -4190,6 +4412,7 @@ describe("@settable", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4340,6 +4563,16 @@ describe("@settable", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -4442,6 +4675,7 @@ describe("@settable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4498,6 +4732,16 @@ describe("@settable", () => { name: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + description: StringAggregateSelection! + name: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! description: StringAggregateSelection! @@ -4509,6 +4753,7 @@ describe("@settable", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4747,6 +4992,15 @@ describe("@settable", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -4835,6 +5089,7 @@ describe("@settable", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4876,6 +5131,16 @@ describe("@settable", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -4935,6 +5200,7 @@ describe("@settable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4965,6 +5231,16 @@ describe("@settable", () => { title: String! } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type ProductionAggregateSelection { count: Int! description: StringAggregateSelection! @@ -5035,6 +5311,7 @@ describe("@settable", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5060,6 +5337,16 @@ describe("@settable", () => { title: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! description: StringAggregateSelection! @@ -5067,6 +5354,7 @@ describe("@settable", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5291,6 +5579,15 @@ describe("@settable", () => { node: Production! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -5379,6 +5676,7 @@ describe("@settable", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5420,6 +5718,16 @@ describe("@settable", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -5479,6 +5787,7 @@ describe("@settable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5509,6 +5818,16 @@ describe("@settable", () => { title: String! } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type ProductionAggregateSelection { count: Int! description: StringAggregateSelection! @@ -5572,6 +5891,7 @@ describe("@settable", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5597,6 +5917,16 @@ describe("@settable", () => { title: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! description: StringAggregateSelection! @@ -5604,6 +5934,7 @@ describe("@settable", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5836,6 +6167,15 @@ describe("@settable", () => { node: Production! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -5936,6 +6276,7 @@ describe("@settable", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -6054,6 +6395,16 @@ describe("@settable", () => { where: ProductionActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -6144,6 +6495,7 @@ describe("@settable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -6251,6 +6603,16 @@ describe("@settable", () => { node: Actor! } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type ProductionAggregateSelection { count: Int! description: StringAggregateSelection! @@ -6351,6 +6713,7 @@ describe("@settable", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -6453,6 +6816,16 @@ describe("@settable", () => { where: ProductionActorsConnectionWhere } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! description: StringAggregateSelection! @@ -6460,6 +6833,7 @@ describe("@settable", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -6731,6 +7105,15 @@ describe("@settable", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -6831,6 +7214,7 @@ describe("@settable", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -6949,6 +7333,16 @@ describe("@settable", () => { where: ProductionActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -7039,6 +7433,7 @@ describe("@settable", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -7163,6 +7558,16 @@ describe("@settable", () => { where: ProductionActorsConnectionWhere } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type ProductionAggregateSelection { count: Int! description: StringAggregateSelection! @@ -7271,6 +7676,7 @@ describe("@settable", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -7373,6 +7779,16 @@ describe("@settable", () => { where: ProductionActorsConnectionWhere } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! description: StringAggregateSelection! @@ -7380,6 +7796,7 @@ describe("@settable", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/directives/timestamps.test.ts b/packages/graphql/tests/schema/directives/timestamps.test.ts index 06473882b8..2cf9ae64aa 100644 --- a/packages/graphql/tests/schema/directives/timestamps.test.ts +++ b/packages/graphql/tests/schema/directives/timestamps.test.ts @@ -80,6 +80,17 @@ describe("Timestamps", () => { updatedAt: DateTime! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + createdAt: DateTimeAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + updatedAt: DateTimeAggregateSelection! + } + type MovieAggregateSelection { count: Int! createdAt: DateTimeAggregateSelection! @@ -149,6 +160,7 @@ describe("Timestamps", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/enum.test.ts b/packages/graphql/tests/schema/enum.test.ts index 347e9928bd..7c326df72b 100644 --- a/packages/graphql/tests/schema/enum.test.ts +++ b/packages/graphql/tests/schema/enum.test.ts @@ -69,6 +69,14 @@ describe("Enum", () => { status: Status } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + } + type MovieAggregateSelection { count: Int! } @@ -113,6 +121,7 @@ describe("Enum", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/extend.test.ts b/packages/graphql/tests/schema/extend.test.ts index 80f6787d49..580ccd220e 100644 --- a/packages/graphql/tests/schema/extend.test.ts +++ b/packages/graphql/tests/schema/extend.test.ts @@ -73,6 +73,16 @@ describe("Extend", () => { name: String } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + name: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -132,6 +142,7 @@ describe("Extend", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/federation.test.ts b/packages/graphql/tests/schema/federation.test.ts index cc59bf40f9..5731de4740 100644 --- a/packages/graphql/tests/schema/federation.test.ts +++ b/packages/graphql/tests/schema/federation.test.ts @@ -119,6 +119,15 @@ describe("Apollo Federation", () => { content: String! } + type PostAggregate { + node: PostAggregateNode! + } + + type PostAggregateNode { + content: StringAggregateSelection! + count: Int! + } + type PostAggregateSelection { content: StringAggregateSelection! count: Int! @@ -294,6 +303,7 @@ describe("Apollo Federation", () => { } type PostsConnection { + aggregate: PostAggregate! edges: [PostEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -349,6 +359,15 @@ describe("Apollo Federation", () => { postsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! } + type UserAggregate @shareable { + node: UserAggregateNode! + } + + type UserAggregateNode @shareable { + count: Int! + name: StringAggregateSelection! + } + type UserAggregateSelection @shareable { count: Int! name: StringAggregateSelection! @@ -546,6 +565,7 @@ describe("Apollo Federation", () => { } type UsersConnection @shareable { + aggregate: UserAggregate! edges: [UserEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -669,6 +689,15 @@ describe("Apollo Federation", () => { content: String! } + type PostAggregate { + node: PostAggregateNode! + } + + type PostAggregateNode { + content: StringAggregateSelection! + count: Int! + } + type PostAggregateSelection { content: StringAggregateSelection! count: Int! @@ -829,6 +858,7 @@ describe("Apollo Federation", () => { } type PostsConnection { + aggregate: PostAggregate! edges: [PostEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -882,6 +912,15 @@ describe("Apollo Federation", () => { name: String! } + type UserAggregate { + node: UserAggregateNode! + } + + type UserAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type UserAggregateSelection { count: Int! name: StringAggregateSelection! @@ -934,6 +973,7 @@ describe("Apollo Federation", () => { } type UsersConnection { + aggregate: UserAggregate! edges: [UserEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/fulltext.test.ts b/packages/graphql/tests/schema/fulltext.test.ts index 0f6bd99d1e..5120dc3907 100644 --- a/packages/graphql/tests/schema/fulltext.test.ts +++ b/packages/graphql/tests/schema/fulltext.test.ts @@ -79,6 +79,16 @@ describe("@fulltext schema", () => { title: String } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -169,6 +179,7 @@ describe("@fulltext schema", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/global-node.test.ts b/packages/graphql/tests/schema/global-node.test.ts index 264af12eaa..f1ba8170e8 100644 --- a/packages/graphql/tests/schema/global-node.test.ts +++ b/packages/graphql/tests/schema/global-node.test.ts @@ -71,6 +71,16 @@ describe("Node Interface Types", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + imdb: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! imdb: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -131,6 +141,7 @@ describe("Node Interface Types", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/inheritance.test.ts b/packages/graphql/tests/schema/inheritance.test.ts index 74057cb385..017e0e67ff 100644 --- a/packages/graphql/tests/schema/inheritance.test.ts +++ b/packages/graphql/tests/schema/inheritance.test.ts @@ -65,6 +65,15 @@ describe("inheritance", () => { name: String } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -233,6 +242,7 @@ describe("inheritance", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -343,6 +353,7 @@ describe("inheritance", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -354,6 +365,15 @@ describe("inheritance", () => { name: String @customDirectiveField } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! name: StringAggregateSelection! diff --git a/packages/graphql/tests/schema/inputs.test.ts b/packages/graphql/tests/schema/inputs.test.ts index 3d21e8ac0b..77769583d2 100644 --- a/packages/graphql/tests/schema/inputs.test.ts +++ b/packages/graphql/tests/schema/inputs.test.ts @@ -76,6 +76,15 @@ describe("Inputs", () => { id: ID } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -124,6 +133,7 @@ describe("Inputs", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/interface-relationships.test.ts b/packages/graphql/tests/schema/interface-relationships.test.ts index 01187dc39c..034248fcdf 100644 --- a/packages/graphql/tests/schema/interface-relationships.test.ts +++ b/packages/graphql/tests/schema/interface-relationships.test.ts @@ -223,6 +223,15 @@ describe("Interface Relationships", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -316,6 +325,7 @@ describe("Interface Relationships", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -364,6 +374,16 @@ describe("Interface Relationships", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + runtime: IntAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! runtime: IntAggregateSelection! @@ -426,6 +446,7 @@ describe("Interface Relationships", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -455,6 +476,15 @@ describe("Interface Relationships", () => { title: String! } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type ProductionAggregateSelection { count: Int! title: StringAggregateSelection! @@ -515,6 +545,7 @@ describe("Interface Relationships", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -540,6 +571,16 @@ describe("Interface Relationships", () => { title: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + episodes: IntAggregateSelection! + title: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! episodes: IntAggregateSelection! @@ -547,6 +588,7 @@ describe("Interface Relationships", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -861,6 +903,15 @@ describe("Interface Relationships", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -966,6 +1017,7 @@ describe("Interface Relationships", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1014,6 +1066,15 @@ describe("Interface Relationships", () => { seriesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [EpisodeSeriesConnectionSort!], where: EpisodeSeriesConnectionWhere): EpisodeSeriesConnection! } + type EpisodeAggregate { + node: EpisodeAggregateNode! + } + + type EpisodeAggregateNode { + count: Int! + runtime: IntAggregateSelection! + } + type EpisodeAggregateSelection { count: Int! runtime: IntAggregateSelection! @@ -1213,6 +1274,7 @@ describe("Interface Relationships", () => { } type EpisodesConnection { + aggregate: EpisodeAggregate! edges: [EpisodeEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1316,6 +1378,16 @@ describe("Interface Relationships", () => { where: ProductionActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + runtime: IntAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! runtime: IntAggregateSelection! @@ -1409,6 +1481,7 @@ describe("Interface Relationships", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1589,6 +1662,15 @@ describe("Interface Relationships", () => { where: ProductionActorsConnectionWhere } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type ProductionAggregateSelection { count: Int! title: StringAggregateSelection! @@ -1687,6 +1769,7 @@ describe("Interface Relationships", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1804,6 +1887,16 @@ describe("Interface Relationships", () => { where: ProductionActorsConnectionWhere } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + episodeCount: IntAggregateSelection! + title: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! episodeCount: IntAggregateSelection! @@ -1820,6 +1913,7 @@ describe("Interface Relationships", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2317,6 +2411,15 @@ describe("Interface Relationships", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -2422,6 +2525,7 @@ describe("Interface Relationships", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2470,6 +2574,15 @@ describe("Interface Relationships", () => { seriesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [EpisodeSeriesConnectionSort!], where: EpisodeSeriesConnectionWhere): EpisodeSeriesConnection! } + type EpisodeAggregate { + node: EpisodeAggregateNode! + } + + type EpisodeAggregateNode { + count: Int! + runtime: IntAggregateSelection! + } + type EpisodeAggregateSelection { count: Int! runtime: IntAggregateSelection! @@ -2669,6 +2782,7 @@ describe("Interface Relationships", () => { } type EpisodesConnection { + aggregate: EpisodeAggregate! edges: [EpisodeEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2772,6 +2886,16 @@ describe("Interface Relationships", () => { where: ProductionActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + runtime: IntAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! runtime: IntAggregateSelection! @@ -2865,6 +2989,7 @@ describe("Interface Relationships", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3065,6 +3190,15 @@ describe("Interface Relationships", () => { where: ProductionActorsConnectionWhere } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type ProductionAggregateSelection { count: Int! title: StringAggregateSelection! @@ -3163,6 +3297,7 @@ describe("Interface Relationships", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3280,6 +3415,16 @@ describe("Interface Relationships", () => { where: ProductionActorsConnectionWhere } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + episodeCount: IntAggregateSelection! + title: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! episodeCount: IntAggregateSelection! @@ -3296,6 +3441,7 @@ describe("Interface Relationships", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3729,6 +3875,15 @@ describe("Interface Relationships", () => { interface2Connection(after: String, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } + type Interface1Aggregate { + node: Interface1AggregateNode! + } + + type Interface1AggregateNode { + count: Int! + field1: StringAggregateSelection! + } + type Interface1AggregateSelection { count: Int! field1: StringAggregateSelection! @@ -3920,6 +4075,7 @@ describe("Interface Relationships", () => { } type Interface1sConnection { + aggregate: Interface1Aggregate! edges: [Interface1Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -3929,6 +4085,15 @@ describe("Interface Relationships", () => { field2: String } + type Interface2Aggregate { + node: Interface2AggregateNode! + } + + type Interface2AggregateNode { + count: Int! + field2: StringAggregateSelection! + } + type Interface2AggregateSelection { count: Int! field2: StringAggregateSelection! @@ -3989,6 +4154,7 @@ describe("Interface Relationships", () => { } type Interface2sConnection { + aggregate: Interface2Aggregate! edges: [Interface2Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -4064,6 +4230,15 @@ describe("Interface Relationships", () => { interface1Connection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [Type1Interface1ConnectionSort!], where: Type1Interface1ConnectionWhere): Type1Interface1Connection! } + type Type1Aggregate { + node: Type1AggregateNode! + } + + type Type1AggregateNode { + count: Int! + field1: StringAggregateSelection! + } + type Type1AggregateSelection { count: Int! field1: StringAggregateSelection! @@ -4090,6 +4265,10 @@ describe("Interface Relationships", () => { interface2Connection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } + type Type1Interface1Aggregate { + node: Type1Interface1AggregateNode! + } + input Type1Interface1AggregateInput { AND: [Type1Interface1AggregateInput!] NOT: Type1Interface1AggregateInput @@ -4103,6 +4282,11 @@ describe("Interface Relationships", () => { node: Type1Interface1NodeAggregationWhereInput } + type Type1Interface1AggregateNode { + count: Int! + field1: StringAggregateSelection! + } + type Type1Interface1AggregateSelection { count: Int! field1: StringAggregateSelection! @@ -4356,6 +4540,7 @@ describe("Interface Relationships", () => { } type Type1Interface1sConnection { + aggregate: Type1Interface1Aggregate! edges: [Type1Interface1Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -4365,6 +4550,15 @@ describe("Interface Relationships", () => { field2: String! } + type Type1Interface2Aggregate { + node: Type1Interface2AggregateNode! + } + + type Type1Interface2AggregateNode { + count: Int! + field2: StringAggregateSelection! + } + type Type1Interface2AggregateSelection { count: Int! field2: StringAggregateSelection! @@ -4413,6 +4607,7 @@ describe("Interface Relationships", () => { } type Type1Interface2sConnection { + aggregate: Type1Interface2Aggregate! edges: [Type1Interface2Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -4478,6 +4673,7 @@ describe("Interface Relationships", () => { } type Type1sConnection { + aggregate: Type1Aggregate! edges: [Type1Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -4490,6 +4686,15 @@ describe("Interface Relationships", () => { interface2Connection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } + type Type2Interface1Aggregate { + node: Type2Interface1AggregateNode! + } + + type Type2Interface1AggregateNode { + count: Int! + field1: StringAggregateSelection! + } + type Type2Interface1AggregateSelection { count: Int! field1: StringAggregateSelection! @@ -4654,6 +4859,7 @@ describe("Interface Relationships", () => { } type Type2Interface1sConnection { + aggregate: Type2Interface1Aggregate! edges: [Type2Interface1Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -4663,6 +4869,15 @@ describe("Interface Relationships", () => { field2: String! } + type Type2Interface2Aggregate { + node: Type2Interface2AggregateNode! + } + + type Type2Interface2AggregateNode { + count: Int! + field2: StringAggregateSelection! + } + type Type2Interface2AggregateSelection { count: Int! field2: StringAggregateSelection! @@ -4711,6 +4926,7 @@ describe("Interface Relationships", () => { } type Type2Interface2sConnection { + aggregate: Type2Interface2Aggregate! edges: [Type2Interface2Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -4860,6 +5076,15 @@ describe("Interface Relationships", () => { interface2Connection(after: String, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } + type Interface1Aggregate { + node: Interface1AggregateNode! + } + + type Interface1AggregateNode { + count: Int! + field1: StringAggregateSelection! + } + type Interface1AggregateSelection { count: Int! field1: StringAggregateSelection! @@ -5105,6 +5330,7 @@ describe("Interface Relationships", () => { } type Interface1sConnection { + aggregate: Interface1Aggregate! edges: [Interface1Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -5114,6 +5340,15 @@ describe("Interface Relationships", () => { field2: String } + type Interface2Aggregate { + node: Interface2AggregateNode! + } + + type Interface2AggregateNode { + count: Int! + field2: StringAggregateSelection! + } + type Interface2AggregateSelection { count: Int! field2: StringAggregateSelection! @@ -5174,6 +5409,7 @@ describe("Interface Relationships", () => { } type Interface2sConnection { + aggregate: Interface2Aggregate! edges: [Interface2Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -5312,6 +5548,15 @@ describe("Interface Relationships", () => { interface1Connection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [Type1Interface1ConnectionSort!], where: Type1Interface1ConnectionWhere): Type1Interface1Connection! } + type Type1Aggregate { + node: Type1AggregateNode! + } + + type Type1AggregateNode { + count: Int! + field1: StringAggregateSelection! + } + type Type1AggregateSelection { count: Int! field1: StringAggregateSelection! @@ -5338,6 +5583,10 @@ describe("Interface Relationships", () => { interface2Connection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } + type Type1Interface1Aggregate { + node: Type1Interface1AggregateNode! + } + input Type1Interface1AggregateInput { AND: [Type1Interface1AggregateInput!] NOT: Type1Interface1AggregateInput @@ -5351,6 +5600,11 @@ describe("Interface Relationships", () => { node: Type1Interface1NodeAggregationWhereInput } + type Type1Interface1AggregateNode { + count: Int! + field1: StringAggregateSelection! + } + type Type1Interface1AggregateSelection { count: Int! field1: StringAggregateSelection! @@ -5613,6 +5867,7 @@ describe("Interface Relationships", () => { } type Type1Interface1sConnection { + aggregate: Type1Interface1Aggregate! edges: [Type1Interface1Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -5622,6 +5877,15 @@ describe("Interface Relationships", () => { field2: String! } + type Type1Interface2Aggregate { + node: Type1Interface2AggregateNode! + } + + type Type1Interface2AggregateNode { + count: Int! + field2: StringAggregateSelection! + } + type Type1Interface2AggregateSelection { count: Int! field2: StringAggregateSelection! @@ -5670,6 +5934,7 @@ describe("Interface Relationships", () => { } type Type1Interface2sConnection { + aggregate: Type1Interface2Aggregate! edges: [Type1Interface2Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -5735,6 +6000,7 @@ describe("Interface Relationships", () => { } type Type1sConnection { + aggregate: Type1Aggregate! edges: [Type1Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -5747,6 +6013,15 @@ describe("Interface Relationships", () => { interface2Connection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } + type Type2Interface1Aggregate { + node: Type2Interface1AggregateNode! + } + + type Type2Interface1AggregateNode { + count: Int! + field1: StringAggregateSelection! + } + type Type2Interface1AggregateSelection { count: Int! field1: StringAggregateSelection! @@ -5920,6 +6195,7 @@ describe("Interface Relationships", () => { } type Type2Interface1sConnection { + aggregate: Type2Interface1Aggregate! edges: [Type2Interface1Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -5929,6 +6205,15 @@ describe("Interface Relationships", () => { field2: String! } + type Type2Interface2Aggregate { + node: Type2Interface2AggregateNode! + } + + type Type2Interface2AggregateNode { + count: Int! + field2: StringAggregateSelection! + } + type Type2Interface2AggregateSelection { count: Int! field2: StringAggregateSelection! @@ -5977,6 +6262,7 @@ describe("Interface Relationships", () => { } type Type2Interface2sConnection { + aggregate: Type2Interface2Aggregate! edges: [Type2Interface2Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -6132,6 +6418,15 @@ describe("Interface Relationships", () => { interface2Connection(after: String, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } + type Interface1Aggregate { + node: Interface1AggregateNode! + } + + type Interface1AggregateNode { + count: Int! + field1: StringAggregateSelection! + } + type Interface1AggregateSelection { count: Int! field1: StringAggregateSelection! @@ -6397,6 +6692,7 @@ describe("Interface Relationships", () => { } type Interface1sConnection { + aggregate: Interface1Aggregate! edges: [Interface1Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -6406,6 +6702,15 @@ describe("Interface Relationships", () => { field2: String } + type Interface2Aggregate { + node: Interface2AggregateNode! + } + + type Interface2AggregateNode { + count: Int! + field2: StringAggregateSelection! + } + type Interface2AggregateSelection { count: Int! field2: StringAggregateSelection! @@ -6466,6 +6771,7 @@ describe("Interface Relationships", () => { } type Interface2sConnection { + aggregate: Interface2Aggregate! edges: [Interface2Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -6541,6 +6847,15 @@ describe("Interface Relationships", () => { interface1Connection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [Type1Interface1ConnectionSort!], where: Type1Interface1ConnectionWhere): Type1Interface1Connection! } + type Type1Aggregate { + node: Type1AggregateNode! + } + + type Type1AggregateNode { + count: Int! + field1: StringAggregateSelection! + } + type Type1AggregateSelection { count: Int! field1: StringAggregateSelection! @@ -6567,6 +6882,10 @@ describe("Interface Relationships", () => { interface2Connection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } + type Type1Interface1Aggregate { + node: Type1Interface1AggregateNode! + } + input Type1Interface1AggregateInput { AND: [Type1Interface1AggregateInput!] NOT: Type1Interface1AggregateInput @@ -6580,6 +6899,11 @@ describe("Interface Relationships", () => { node: Type1Interface1NodeAggregationWhereInput } + type Type1Interface1AggregateNode { + count: Int! + field1: StringAggregateSelection! + } + type Type1Interface1AggregateSelection { count: Int! field1: StringAggregateSelection! @@ -6842,6 +7166,7 @@ describe("Interface Relationships", () => { } type Type1Interface1sConnection { + aggregate: Type1Interface1Aggregate! edges: [Type1Interface1Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -6851,6 +7176,15 @@ describe("Interface Relationships", () => { field2: String! } + type Type1Interface2Aggregate { + node: Type1Interface2AggregateNode! + } + + type Type1Interface2AggregateNode { + count: Int! + field2: StringAggregateSelection! + } + type Type1Interface2AggregateSelection { count: Int! field2: StringAggregateSelection! @@ -6899,6 +7233,7 @@ describe("Interface Relationships", () => { } type Type1Interface2sConnection { + aggregate: Type1Interface2Aggregate! edges: [Type1Interface2Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -7026,6 +7361,7 @@ describe("Interface Relationships", () => { } type Type1sConnection { + aggregate: Type1Aggregate! edges: [Type1Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -7038,6 +7374,15 @@ describe("Interface Relationships", () => { interface2Connection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } + type Type2Interface1Aggregate { + node: Type2Interface1AggregateNode! + } + + type Type2Interface1AggregateNode { + count: Int! + field1: StringAggregateSelection! + } + type Type2Interface1AggregateSelection { count: Int! field1: StringAggregateSelection! @@ -7211,6 +7556,7 @@ describe("Interface Relationships", () => { } type Type2Interface1sConnection { + aggregate: Type2Interface1Aggregate! edges: [Type2Interface1Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -7220,6 +7566,15 @@ describe("Interface Relationships", () => { field2: String! } + type Type2Interface2Aggregate { + node: Type2Interface2AggregateNode! + } + + type Type2Interface2AggregateNode { + count: Int! + field2: StringAggregateSelection! + } + type Type2Interface2AggregateSelection { count: Int! field2: StringAggregateSelection! @@ -7268,6 +7623,7 @@ describe("Interface Relationships", () => { } type Type2Interface2sConnection { + aggregate: Type2Interface2Aggregate! edges: [Type2Interface2Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -7426,6 +7782,16 @@ describe("Interface Relationships", () => { postConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [CommentPostConnectionSort!], where: CommentPostConnectionWhere): CommentPostConnection! } + type CommentAggregate { + node: CommentAggregateNode! + } + + type CommentAggregateNode { + content: StringAggregateSelection! + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type CommentAggregateSelection { content: StringAggregateSelection! count: Int! @@ -7716,6 +8082,7 @@ describe("Interface Relationships", () => { } type CommentsConnection { + aggregate: CommentAggregate! edges: [CommentEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -7728,6 +8095,16 @@ describe("Interface Relationships", () => { id: ID } + type ContentAggregate { + node: ContentAggregateNode! + } + + type ContentAggregateNode { + content: StringAggregateSelection! + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type ContentAggregateSelection { content: StringAggregateSelection! count: Int! @@ -7916,6 +8293,7 @@ describe("Interface Relationships", () => { } type ContentsConnection { + aggregate: ContentAggregate! edges: [ContentEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -7988,6 +8366,16 @@ describe("Interface Relationships", () => { id: ID } + type PostAggregate { + node: PostAggregateNode! + } + + type PostAggregateNode { + content: StringAggregateSelection! + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type PostAggregateSelection { content: StringAggregateSelection! count: Int! @@ -8300,6 +8688,7 @@ describe("Interface Relationships", () => { } type PostsConnection { + aggregate: PostAggregate! edges: [PostEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -8366,6 +8755,16 @@ describe("Interface Relationships", () => { name: String } + type UserAggregate { + node: UserAggregateNode! + } + + type UserAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + name: StringAggregateSelection! + } + type UserAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -8581,6 +8980,7 @@ describe("Interface Relationships", () => { } type UsersConnection { + aggregate: UserAggregate! edges: [UserEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -8805,6 +9205,15 @@ describe("Interface Relationships", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -8910,6 +9319,7 @@ describe("Interface Relationships", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -9044,6 +9454,16 @@ describe("Interface Relationships", () => { where: ShowActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + runtime: IntAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! runtime: IntAggregateSelection! @@ -9137,6 +9557,7 @@ describe("Interface Relationships", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -9167,6 +9588,15 @@ describe("Interface Relationships", () => { title: String! } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type ProductionAggregateSelection { count: Int! title: StringAggregateSelection! @@ -9213,6 +9643,7 @@ describe("Interface Relationships", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -9327,6 +9758,16 @@ describe("Interface Relationships", () => { where: ShowActorsConnectionWhere } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + episodeCount: IntAggregateSelection! + title: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! episodeCount: IntAggregateSelection! @@ -9334,6 +9775,7 @@ describe("Interface Relationships", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -9597,6 +10039,15 @@ describe("Interface Relationships", () => { where: ShowActorsConnectionWhere } + type ShowAggregate { + node: ShowAggregateNode! + } + + type ShowAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type ShowAggregateSelection { count: Int! title: StringAggregateSelection! @@ -9695,6 +10146,7 @@ describe("Interface Relationships", () => { } type ShowsConnection { + aggregate: ShowAggregate! edges: [ShowEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/interfaces.test.ts b/packages/graphql/tests/schema/interfaces.test.ts index cc7a924385..0542193f3b 100644 --- a/packages/graphql/tests/schema/interfaces.test.ts +++ b/packages/graphql/tests/schema/interfaces.test.ts @@ -89,6 +89,15 @@ describe("Interfaces", () => { nodes: [MovieNode] } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -196,6 +205,15 @@ describe("Interfaces", () => { moviesConnection(after: String, first: Int, sort: [MovieNodeMoviesConnectionSort!], where: MovieNodeMoviesConnectionWhere): MovieNodeMoviesConnection! } + type MovieNodeAggregate { + node: MovieNodeAggregateNode! + } + + type MovieNodeAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieNodeAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -327,6 +345,7 @@ describe("Interfaces", () => { } type MovieNodesConnection { + aggregate: MovieNodeAggregate! edges: [MovieNodeEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -397,6 +416,7 @@ describe("Interfaces", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -519,6 +539,15 @@ describe("Interfaces", () => { nodes: [MovieNode] } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -626,6 +655,15 @@ describe("Interfaces", () => { moviesConnection(after: String, first: Int, sort: [MovieNodeMoviesConnectionSort!], where: MovieNodeMoviesConnectionWhere): MovieNodeMoviesConnection! } + type MovieNodeAggregate { + node: MovieNodeAggregateNode! + } + + type MovieNodeAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieNodeAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -757,6 +795,7 @@ describe("Interfaces", () => { } type MovieNodesConnection { + aggregate: MovieNodeAggregate! edges: [MovieNodeEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -827,6 +866,7 @@ describe("Interfaces", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/issues/1038.test.ts b/packages/graphql/tests/schema/issues/1038.test.ts index dd3a671e10..43567b37f7 100644 --- a/packages/graphql/tests/schema/issues/1038.test.ts +++ b/packages/graphql/tests/schema/issues/1038.test.ts @@ -49,6 +49,16 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { code: String } + type AWSAccountAggregate { + node: AWSAccountAggregateNode! + } + + type AWSAccountAggregateNode { + accountName: StringAggregateSelection! + code: StringAggregateSelection! + count: Int! + } + type AWSAccountAggregateSelection { accountName: StringAggregateSelection! code: StringAggregateSelection! @@ -108,6 +118,7 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { } type AwsAccountsConnection { + aggregate: AWSAccountAggregate! edges: [AWSAccountEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -136,6 +147,16 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { zoneType: String } + type DNSZoneAggregate { + node: DNSZoneAggregateNode! + } + + type DNSZoneAggregateNode { + awsId: StringAggregateSelection! + count: Int! + zoneType: StringAggregateSelection! + } + type DNSZoneAggregateSelection { awsId: StringAggregateSelection! count: Int! @@ -203,6 +224,7 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { } type DnsZonesConnection { + aggregate: DNSZoneAggregate! edges: [DNSZoneEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/issues/1182.test.ts b/packages/graphql/tests/schema/issues/1182.test.ts index 16dc6b1296..93bf16aaf7 100644 --- a/packages/graphql/tests/schema/issues/1182.test.ts +++ b/packages/graphql/tests/schema/issues/1182.test.ts @@ -54,6 +54,17 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { name: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + dob: DateTimeAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! dob: DateTimeAggregateSelection! @@ -153,6 +164,7 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -341,6 +353,16 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -428,6 +450,7 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/issues/1575.test.ts b/packages/graphql/tests/schema/issues/1575.test.ts index 9cec38153d..3e1fa2c2b1 100644 --- a/packages/graphql/tests/schema/issues/1575.test.ts +++ b/packages/graphql/tests/schema/issues/1575.test.ts @@ -64,6 +64,14 @@ describe("https://github.com/neo4j/graphql/issues/1575", () => { point: Point } + type FooAggregate { + node: FooAggregateNode! + } + + type FooAggregateNode { + count: Int! + } + type FooAggregateSelection { count: Int! } @@ -125,6 +133,7 @@ describe("https://github.com/neo4j/graphql/issues/1575", () => { } type FoosConnection { + aggregate: FooAggregate! edges: [FooEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/issues/1614.test.ts b/packages/graphql/tests/schema/issues/1614.test.ts index debe720f73..f69350f7f1 100644 --- a/packages/graphql/tests/schema/issues/1614.test.ts +++ b/packages/graphql/tests/schema/issues/1614.test.ts @@ -77,6 +77,14 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [CrewMemberMoviesConnectionSort!], where: CrewMemberMoviesConnectionWhere): CrewMemberMoviesConnection! } + type CrewMemberAggregate { + node: CrewMemberAggregateNode! + } + + type CrewMemberAggregateNode { + count: Int! + } + type CrewMemberAggregateSelection { count: Int! } @@ -222,6 +230,7 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { } type CrewMembersConnection { + aggregate: CrewMemberAggregate! edges: [CrewMemberEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -275,6 +284,15 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { name: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! name: StringAggregateSelection! @@ -327,6 +345,7 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/issues/162.test.ts b/packages/graphql/tests/schema/issues/162.test.ts index a58c06f962..c1ba32fa0f 100644 --- a/packages/graphql/tests/schema/issues/162.test.ts +++ b/packages/graphql/tests/schema/issues/162.test.ts @@ -135,6 +135,15 @@ describe("162", () => { x: Int } + type TigerAggregate { + node: TigerAggregateNode! + } + + type TigerAggregateNode { + count: Int! + x: IntAggregateSelection! + } + type TigerAggregateSelection { count: Int! x: IntAggregateSelection! @@ -160,6 +169,15 @@ describe("162", () => { part1Connection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [TigerJawLevel2Part1ConnectionSort!], where: TigerJawLevel2Part1ConnectionWhere): TigerJawLevel2Part1Connection! } + type TigerJawLevel2Aggregate { + node: TigerJawLevel2AggregateNode! + } + + type TigerJawLevel2AggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type TigerJawLevel2AggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -195,6 +213,10 @@ describe("162", () => { tigerConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [TigerJawLevel2Part1TigerConnectionSort!], where: TigerJawLevel2Part1TigerConnectionWhere): TigerJawLevel2Part1TigerConnection! } + type TigerJawLevel2Part1Aggregate { + node: TigerJawLevel2Part1AggregateNode! + } + input TigerJawLevel2Part1AggregateInput { AND: [TigerJawLevel2Part1AggregateInput!] NOT: TigerJawLevel2Part1AggregateInput @@ -208,6 +230,11 @@ describe("162", () => { node: TigerJawLevel2Part1NodeAggregationWhereInput } + type TigerJawLevel2Part1AggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type TigerJawLevel2Part1AggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -464,6 +491,7 @@ describe("162", () => { } type TigerJawLevel2Part1sConnection { + aggregate: TigerJawLevel2Part1Aggregate! edges: [TigerJawLevel2Part1Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -507,6 +535,7 @@ describe("162", () => { } type TigerJawLevel2sConnection { + aggregate: TigerJawLevel2Aggregate! edges: [TigerJawLevel2Edge!]! pageInfo: PageInfo! totalCount: Int! @@ -549,6 +578,7 @@ describe("162", () => { } type TigersConnection { + aggregate: TigerAggregate! edges: [TigerEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/issues/200.test.ts b/packages/graphql/tests/schema/issues/200.test.ts index 870bd950d3..b9284c414d 100644 --- a/packages/graphql/tests/schema/issues/200.test.ts +++ b/packages/graphql/tests/schema/issues/200.test.ts @@ -42,6 +42,7 @@ describe("200", () => { } type CategoriesConnection { + aggregate: CategoryAggregate! edges: [CategoryEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -54,6 +55,17 @@ describe("200", () => { name: String! } + type CategoryAggregate { + node: CategoryAggregateNode! + } + + type CategoryAggregateNode { + categoryId: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + count: Int! + description: StringAggregateSelection! + name: StringAggregateSelection! + } + type CategoryAggregateSelection { categoryId: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") count: Int! diff --git a/packages/graphql/tests/schema/issues/2187.test.ts b/packages/graphql/tests/schema/issues/2187.test.ts index 71e8cf4dee..7844ae7ff3 100644 --- a/packages/graphql/tests/schema/issues/2187.test.ts +++ b/packages/graphql/tests/schema/issues/2187.test.ts @@ -88,6 +88,15 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { name: String } + type GenreAggregate { + node: GenreAggregateNode! + } + + type GenreAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type GenreAggregateSelection { count: Int! name: StringAggregateSelection! @@ -327,6 +336,7 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { } type GenresConnection { + aggregate: GenreAggregate! edges: [GenreEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -348,6 +358,17 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { year: Int } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + imdbRating: FloatAggregateSelection! + title: StringAggregateSelection! + year: IntAggregateSelection! + } + type MovieAggregateSelection { count: Int! imdbRating: FloatAggregateSelection! @@ -575,6 +596,7 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/issues/2377.test.ts b/packages/graphql/tests/schema/issues/2377.test.ts index 49c0e27f42..20b63bf677 100644 --- a/packages/graphql/tests/schema/issues/2377.test.ts +++ b/packages/graphql/tests/schema/issues/2377.test.ts @@ -165,6 +165,18 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { updatedAt: DateTime! } + type ResourceAggregate { + node: ResourceAggregateNode! + } + + type ResourceAggregateNode { + count: Int! + createdAt: DateTimeAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + name: StringAggregateSelection! + updatedAt: DateTimeAggregateSelection! + } + type ResourceAggregateSelection { count: Int! createdAt: DateTimeAggregateSelection! @@ -348,6 +360,7 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { } type ResourceEntitiesConnection { + aggregate: ResourceEntityAggregate! edges: [ResourceEntityEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -363,6 +376,16 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { type: ResourceType! } + type ResourceEntityAggregate { + node: ResourceEntityAggregateNode! + } + + type ResourceEntityAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + name: StringAggregateSelection! + } + type ResourceEntityAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -568,6 +591,7 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { } type ResourcesConnection { + aggregate: ResourceAggregate! edges: [ResourceEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/issues/2969.test.ts b/packages/graphql/tests/schema/issues/2969.test.ts index daf9ccf34a..39b326d367 100644 --- a/packages/graphql/tests/schema/issues/2969.test.ts +++ b/packages/graphql/tests/schema/issues/2969.test.ts @@ -100,6 +100,15 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { content: String! } + type PostAggregate { + node: PostAggregateNode! + } + + type PostAggregateNode { + content: StringAggregateSelection! + count: Int! + } + type PostAggregateSelection { content: StringAggregateSelection! count: Int! @@ -286,6 +295,7 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { } type PostsConnection { + aggregate: PostAggregate! edges: [PostEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -341,6 +351,16 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { postsConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! } + type UserAggregate { + node: UserAggregateNode! + } + + type UserAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + name: StringAggregateSelection! + } + type UserAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -549,6 +569,7 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { } type UsersConnection { + aggregate: UserAggregate! edges: [UserEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/issues/2981.test.ts b/packages/graphql/tests/schema/issues/2981.test.ts index dbb59a67ca..3fb8b0436e 100644 --- a/packages/graphql/tests/schema/issues/2981.test.ts +++ b/packages/graphql/tests/schema/issues/2981.test.ts @@ -59,6 +59,16 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { translatedTitleConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, where: BookTranslatedTitleConnectionWhere): BookTranslatedTitleConnection! } + type BookAggregate { + node: BookAggregateNode! + } + + type BookAggregateNode { + count: Int! + isbn: StringAggregateSelection! + originalTitle: StringAggregateSelection! + } + type BookAggregateSelection { count: Int! isbn: StringAggregateSelection! @@ -112,12 +122,14 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { union BookTitle = BookTitle_EN | BookTitle_SV type BookTitleEnsConnection { + aggregate: BookTitle_ENAggregate! edges: [BookTitle_ENEdge!]! pageInfo: PageInfo! totalCount: Int! } type BookTitleSvsConnection { + aggregate: BookTitle_SVAggregate! edges: [BookTitle_SVEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -135,6 +147,15 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { value: String! } + type BookTitle_ENAggregate { + node: BookTitle_ENAggregateNode! + } + + type BookTitle_ENAggregateNode { + count: Int! + value: StringAggregateSelection! + } + type BookTitle_ENAggregateSelection { count: Int! value: StringAggregateSelection! @@ -332,6 +353,15 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { value: String! } + type BookTitle_SVAggregate { + node: BookTitle_SVAggregateNode! + } + + type BookTitle_SVAggregateNode { + count: Int! + value: StringAggregateSelection! + } + type BookTitle_SVAggregateSelection { count: Int! value: StringAggregateSelection! @@ -680,6 +710,7 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { } type BooksConnection { + aggregate: BookAggregate! edges: [BookEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/issues/2993.test.ts b/packages/graphql/tests/schema/issues/2993.test.ts index 9a9bd7c0d0..9bc0f7ad11 100644 --- a/packages/graphql/tests/schema/issues/2993.test.ts +++ b/packages/graphql/tests/schema/issues/2993.test.ts @@ -149,6 +149,16 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { userName: String! } + type ProfileAggregate { + node: ProfileAggregateNode! + } + + type ProfileAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + userName: StringAggregateSelection! + } + type ProfileAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -217,6 +227,7 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { } type ProfilesConnection { + aggregate: ProfileAggregate! edges: [ProfileEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -267,6 +278,16 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { userName: String! } + type UserAggregate { + node: UserAggregateNode! + } + + type UserAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + userName: StringAggregateSelection! + } + type UserAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -474,6 +495,7 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { } type UsersConnection { + aggregate: UserAggregate! edges: [UserEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/issues/3428.test.ts b/packages/graphql/tests/schema/issues/3428.test.ts index f337b8317b..7713de24e3 100644 --- a/packages/graphql/tests/schema/issues/3428.test.ts +++ b/packages/graphql/tests/schema/issues/3428.test.ts @@ -148,6 +148,15 @@ describe("Relationship nested operations", () => { node: Person! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -231,6 +240,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -254,6 +264,7 @@ describe("Relationship nested operations", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -264,6 +275,16 @@ describe("Relationship nested operations", () => { name: String } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -461,6 +482,15 @@ describe("Relationship nested operations", () => { node: Person! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -533,6 +563,7 @@ describe("Relationship nested operations", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -564,6 +595,15 @@ describe("Relationship nested operations", () => { name: String } + type PersonOneAggregate { + node: PersonOneAggregateNode! + } + + type PersonOneAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonOneAggregateSelection { count: Int! name: StringAggregateSelection! @@ -612,6 +652,7 @@ describe("Relationship nested operations", () => { } type PersonOnesConnection { + aggregate: PersonOneAggregate! edges: [PersonOneEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -621,6 +662,15 @@ describe("Relationship nested operations", () => { nameTwo: String } + type PersonTwoAggregate { + node: PersonTwoAggregateNode! + } + + type PersonTwoAggregateNode { + count: Int! + nameTwo: StringAggregateSelection! + } + type PersonTwoAggregateSelection { count: Int! nameTwo: StringAggregateSelection! @@ -669,6 +719,7 @@ describe("Relationship nested operations", () => { } type PersonTwosConnection { + aggregate: PersonTwoAggregate! edges: [PersonTwoEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/issues/3439.test.ts b/packages/graphql/tests/schema/issues/3439.test.ts index e382ec6dac..9813fd03b3 100644 --- a/packages/graphql/tests/schema/issues/3439.test.ts +++ b/packages/graphql/tests/schema/issues/3439.test.ts @@ -119,6 +119,15 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { productConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! } + type GenreAggregate { + node: GenreAggregateNode! + } + + type GenreAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type GenreAggregateSelection { count: Int! name: StringAggregateSelection! @@ -373,6 +382,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type GenresConnection { + aggregate: GenreAggregate! edges: [GenreEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -382,6 +392,15 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { id: String! } + type INodeAggregate { + node: INodeAggregateNode! + } + + type INodeAggregateNode { + count: Int! + id: StringAggregateSelection! + } + type INodeAggregateSelection { count: Int! id: StringAggregateSelection! @@ -428,6 +447,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type INodesConnection { + aggregate: INodeAggregate! edges: [INodeEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -439,6 +459,16 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name: String! } + type IProductAggregate { + node: IProductAggregateNode! + } + + type IProductAggregateNode { + count: Int! + id: StringAggregateSelection! + name: StringAggregateSelection! + } + type IProductAggregateSelection { count: Int! id: StringAggregateSelection! @@ -509,6 +539,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type IProductsConnection { + aggregate: IProductAggregate! edges: [IProductEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -522,6 +553,16 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: StringAggregateSelection! + name: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: StringAggregateSelection! @@ -749,6 +790,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -800,6 +842,16 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + id: StringAggregateSelection! + name: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! id: StringAggregateSelection! @@ -807,6 +859,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1174,6 +1227,15 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { productConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! } + type GenreAggregate { + node: GenreAggregateNode! + } + + type GenreAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type GenreAggregateSelection { count: Int! name: StringAggregateSelection! @@ -1428,6 +1490,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type GenresConnection { + aggregate: GenreAggregate! edges: [GenreEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1439,6 +1502,16 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name: String! } + type IProductAggregate { + node: IProductAggregateNode! + } + + type IProductAggregateNode { + count: Int! + id: StringAggregateSelection! + name: StringAggregateSelection! + } + type IProductAggregateSelection { count: Int! id: StringAggregateSelection! @@ -1509,6 +1582,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type IProductsConnection { + aggregate: IProductAggregate! edges: [IProductEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1522,6 +1596,16 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: StringAggregateSelection! + name: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: StringAggregateSelection! @@ -1749,6 +1833,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1797,6 +1882,16 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + id: StringAggregateSelection! + name: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! id: StringAggregateSelection! @@ -1804,6 +1899,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2179,6 +2275,15 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { productConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! } + type GenreAggregate { + node: GenreAggregateNode! + } + + type GenreAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type GenreAggregateSelection { count: Int! name: StringAggregateSelection! @@ -2436,6 +2541,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type GenresConnection { + aggregate: GenreAggregate! edges: [GenreEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2448,6 +2554,16 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name: String! } + type IProductAggregate { + node: IProductAggregateNode! + } + + type IProductAggregateNode { + count: Int! + id: StringAggregateSelection! + name: StringAggregateSelection! + } + type IProductAggregateSelection { count: Int! id: StringAggregateSelection! @@ -2711,6 +2827,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type IProductsConnection { + aggregate: IProductAggregate! edges: [IProductEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2731,6 +2848,16 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: StringAggregateSelection! + name: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: StringAggregateSelection! @@ -2998,6 +3125,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3046,6 +3174,16 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + id: StringAggregateSelection! + name: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! id: StringAggregateSelection! @@ -3053,6 +3191,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3480,6 +3619,15 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { productConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! } + type GenreAggregate { + node: GenreAggregateNode! + } + + type GenreAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type GenreAggregateSelection { count: Int! name: StringAggregateSelection! @@ -3737,6 +3885,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type GenresConnection { + aggregate: GenreAggregate! edges: [GenreEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3749,6 +3898,16 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name: String! } + type IProductAggregate { + node: IProductAggregateNode! + } + + type IProductAggregateNode { + count: Int! + id: StringAggregateSelection! + name: StringAggregateSelection! + } + type IProductAggregateSelection { count: Int! id: StringAggregateSelection! @@ -4037,6 +4196,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type IProductsConnection { + aggregate: IProductAggregate! edges: [IProductEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4056,6 +4216,16 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: StringAggregateSelection! + name: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: StringAggregateSelection! @@ -4300,6 +4470,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4360,6 +4531,15 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { productConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [RatingProductConnectionSort!], where: RatingProductConnectionWhere): RatingProductConnection! } + type RatingAggregate { + node: RatingAggregateNode! + } + + type RatingAggregateNode { + count: Int! + number: IntAggregateSelection! + } + type RatingAggregateSelection { count: Int! number: IntAggregateSelection! @@ -4621,6 +4801,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type RatingsConnection { + aggregate: RatingAggregate! edges: [RatingEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4633,6 +4814,16 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + id: StringAggregateSelection! + name: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! id: StringAggregateSelection! @@ -4640,6 +4831,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/issues/3537.test.ts b/packages/graphql/tests/schema/issues/3537.test.ts index c31a6e4db5..6bddfdeda6 100644 --- a/packages/graphql/tests/schema/issues/3537.test.ts +++ b/packages/graphql/tests/schema/issues/3537.test.ts @@ -335,6 +335,16 @@ describe("Extending the schema in when using getSubgraphSchema", () => { username: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! password: StringAggregateSelection! @@ -382,6 +392,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -391,6 +402,15 @@ describe("Extending the schema in when using getSubgraphSchema", () => { title: String } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -430,6 +450,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -540,6 +561,16 @@ describe("Extending the schema in when using getSubgraphSchema", () => { username: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + password: StringAggregateSelection! + username: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! password: StringAggregateSelection! @@ -629,6 +660,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -672,6 +704,15 @@ describe("Extending the schema in when using getSubgraphSchema", () => { title: String } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -743,6 +784,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/issues/3541.test.ts b/packages/graphql/tests/schema/issues/3541.test.ts index 1e50dc1d37..c28b9f3a62 100644 --- a/packages/graphql/tests/schema/issues/3541.test.ts +++ b/packages/graphql/tests/schema/issues/3541.test.ts @@ -69,6 +69,15 @@ describe("Extending the schema in when using getSubgraphSchema", () => { name: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -108,6 +117,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -185,6 +195,15 @@ describe("Extending the schema in when using getSubgraphSchema", () => { node: Actor! } + type MovieAggregate @shareable { + node: MovieAggregateNode! + } + + type MovieAggregateNode @shareable { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection @shareable { count: Int! title: StringAggregateSelection! @@ -249,6 +268,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { } type MoviesConnection @shareable { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -359,6 +379,15 @@ describe("Extending the schema in when using getSubgraphSchema", () => { name: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -411,6 +440,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/issues/3698.test.ts b/packages/graphql/tests/schema/issues/3698.test.ts index 32a30bf166..c31e6a3c42 100644 --- a/packages/graphql/tests/schema/issues/3698.test.ts +++ b/packages/graphql/tests/schema/issues/3698.test.ts @@ -112,6 +112,15 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { productConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! } + type GenreAggregate { + node: GenreAggregateNode! + } + + type GenreAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type GenreAggregateSelection { count: Int! name: StringAggregateSelection! @@ -382,6 +391,7 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { } type GenresConnection { + aggregate: GenreAggregate! edges: [GenreEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -394,6 +404,17 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { name: String! } + type IProductAggregate { + node: IProductAggregateNode! + } + + type IProductAggregateNode { + count: Int! + id: StringAggregateSelection! + info: StringAggregateSelection! + name: StringAggregateSelection! + } + type IProductAggregateSelection { count: Int! id: StringAggregateSelection! @@ -472,6 +493,7 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { } type IProductsConnection { + aggregate: IProductAggregate! edges: [IProductEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -486,6 +508,16 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { name: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: StringAggregateSelection! + name: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: StringAggregateSelection! @@ -713,6 +745,7 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -878,6 +911,15 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { productConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! } + type GenreAggregate { + node: GenreAggregateNode! + } + + type GenreAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type GenreAggregateSelection { count: Int! name: StringAggregateSelection! @@ -1151,6 +1193,7 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { } type GenresConnection { + aggregate: GenreAggregate! edges: [GenreEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1164,6 +1207,17 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { name: String! } + type IProductAggregate { + node: IProductAggregateNode! + } + + type IProductAggregateNode { + count: Int! + id: StringAggregateSelection! + info: StringAggregateSelection! + name: StringAggregateSelection! + } + type IProductAggregateSelection { count: Int! id: StringAggregateSelection! @@ -1360,6 +1414,7 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { } type IProductsConnection { + aggregate: IProductAggregate! edges: [IProductEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1374,6 +1429,16 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { name: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: StringAggregateSelection! + name: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: StringAggregateSelection! @@ -1569,6 +1634,7 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1747,6 +1813,15 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { productConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! } + type GenreAggregate { + node: GenreAggregateNode! + } + + type GenreAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type GenreAggregateSelection { count: Int! name: StringAggregateSelection! @@ -2020,6 +2095,7 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { } type GenresConnection { + aggregate: GenreAggregate! edges: [GenreEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2033,6 +2109,17 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { name: String! } + type IProductAggregate { + node: IProductAggregateNode! + } + + type IProductAggregateNode { + count: Int! + id: StringAggregateSelection! + info: StringAggregateSelection! + name: StringAggregateSelection! + } + type IProductAggregateSelection { count: Int! id: StringAggregateSelection! @@ -2231,6 +2318,7 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { } type IProductsConnection { + aggregate: IProductAggregate! edges: [IProductEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2245,6 +2333,16 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { name: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: StringAggregateSelection! + name: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: StringAggregateSelection! @@ -2440,6 +2538,7 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2489,6 +2588,17 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { name: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + id: StringAggregateSelection! + info: StringAggregateSelection! + name: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! id: StringAggregateSelection! @@ -2497,6 +2607,7 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/issues/3816.test.ts b/packages/graphql/tests/schema/issues/3816.test.ts index 2b509d0e2d..4ef81f41f5 100644 --- a/packages/graphql/tests/schema/issues/3816.test.ts +++ b/packages/graphql/tests/schema/issues/3816.test.ts @@ -78,6 +78,15 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { name: String! } + type GenreAggregate { + node: GenreAggregateNode! + } + + type GenreAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type GenreAggregateSelection { count: Int! name: StringAggregateSelection! @@ -274,6 +283,7 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { } type GenresConnection { + aggregate: GenreAggregate! edges: [GenreEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -286,6 +296,15 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { name: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! name: StringAggregateSelection! @@ -440,6 +459,7 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -561,6 +581,15 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { name: String! } + type GenreAggregate { + node: GenreAggregateNode! + } + + type GenreAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type GenreAggregateSelection { count: Int! name: StringAggregateSelection! @@ -743,6 +772,7 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { } type GenresConnection { + aggregate: GenreAggregate! edges: [GenreEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -755,6 +785,15 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { name: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! name: StringAggregateSelection! @@ -875,6 +914,7 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/issues/3817.test.ts b/packages/graphql/tests/schema/issues/3817.test.ts index 25b25c2373..875c98a3f6 100644 --- a/packages/graphql/tests/schema/issues/3817.test.ts +++ b/packages/graphql/tests/schema/issues/3817.test.ts @@ -157,6 +157,7 @@ describe("3817", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -169,6 +170,15 @@ describe("3817", () => { id: ID! } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type PersonAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") diff --git a/packages/graphql/tests/schema/issues/4511.test.ts b/packages/graphql/tests/schema/issues/4511.test.ts index 315952e867..6f8e97647d 100644 --- a/packages/graphql/tests/schema/issues/4511.test.ts +++ b/packages/graphql/tests/schema/issues/4511.test.ts @@ -92,6 +92,14 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { moviesConnection(after: String, first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! } + type CreatureAggregate { + node: CreatureAggregateNode! + } + + type CreatureAggregateNode { + count: Int! + } + type CreatureAggregateSelection { count: Int! } @@ -229,6 +237,7 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { } type CreaturesConnection { + aggregate: CreatureAggregate! edges: [CreatureEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -270,6 +279,16 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -391,6 +410,7 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -417,6 +437,7 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -428,6 +449,14 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + } + type PersonAggregateSelection { count: Int! } @@ -559,6 +588,15 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { id: ID } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type ProductionAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -697,6 +735,7 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -729,6 +768,17 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { title: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + episode: IntAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + title: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! episode: IntAggregateSelection! @@ -737,6 +787,7 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/issues/4615.test.ts b/packages/graphql/tests/schema/issues/4615.test.ts index eb03d11b3b..746411ecc6 100644 --- a/packages/graphql/tests/schema/issues/4615.test.ts +++ b/packages/graphql/tests/schema/issues/4615.test.ts @@ -234,6 +234,15 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -339,6 +348,7 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -482,6 +492,17 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { where: ShowActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + release: DateTimeAggregateSelection! + runtime: IntAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! release: DateTimeAggregateSelection! @@ -587,6 +608,7 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -718,6 +740,16 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { where: ShowActorsConnectionWhere } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + episodes: IntAggregateSelection! + title: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! episodes: IntAggregateSelection! @@ -725,6 +757,7 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -968,6 +1001,15 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { where: ShowActorsConnectionWhere } + type ShowAggregate { + node: ShowAggregateNode! + } + + type ShowAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type ShowAggregateSelection { count: Int! title: StringAggregateSelection! @@ -1066,6 +1108,7 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { } type ShowsConnection { + aggregate: ShowAggregate! edges: [ShowEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/issues/5428.test.ts b/packages/graphql/tests/schema/issues/5428.test.ts index a25c614f7e..c0688a38e5 100644 --- a/packages/graphql/tests/schema/issues/5428.test.ts +++ b/packages/graphql/tests/schema/issues/5428.test.ts @@ -98,12 +98,22 @@ describe("https://github.com/neo4j/graphql/issues/5428", () => { Name: String } + type TestAggregate { + node: TestAggregateNode! + } + + type TestAggregateNode { + Name: StringAggregateSelection! + count: Int! + } + type TestAggregateSelection { Name: StringAggregateSelection! count: Int! } type TestConnection { + aggregate: TestAggregate! edges: [TestEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/issues/5631.test.ts b/packages/graphql/tests/schema/issues/5631.test.ts index 6de7cbd1fc..8c20badaf8 100644 --- a/packages/graphql/tests/schema/issues/5631.test.ts +++ b/packages/graphql/tests/schema/issues/5631.test.ts @@ -63,6 +63,14 @@ describe("https://github.com/neo4j/graphql/issues/5631", () => { custom_string_with_zero_param: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + } + type ActorAggregateSelection { count: Int! } @@ -116,6 +124,7 @@ describe("https://github.com/neo4j/graphql/issues/5631", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -153,6 +162,14 @@ describe("https://github.com/neo4j/graphql/issues/5631", () => { custom_string_with_non_nullable_param(param: String!): String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + } + type MovieAggregateSelection { count: Int! } @@ -189,6 +206,7 @@ describe("https://github.com/neo4j/graphql/issues/5631", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/issues/609.test.ts b/packages/graphql/tests/schema/issues/609.test.ts index 6af0e722cd..e97e08fa3f 100644 --- a/packages/graphql/tests/schema/issues/609.test.ts +++ b/packages/graphql/tests/schema/issues/609.test.ts @@ -63,6 +63,15 @@ describe("609", () => { deprecatedField: String @deprecated } + type DeprecatedAggregate { + node: DeprecatedAggregateNode! + } + + type DeprecatedAggregateNode { + count: Int! + deprecatedField: StringAggregateSelection! + } + type DeprecatedAggregateSelection { count: Int! deprecatedField: StringAggregateSelection! @@ -111,6 +120,7 @@ describe("609", () => { } type DeprecatedsConnection { + aggregate: DeprecatedAggregate! edges: [DeprecatedEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/issues/872.test.ts b/packages/graphql/tests/schema/issues/872.test.ts index b0aaf37f45..70bb877990 100644 --- a/packages/graphql/tests/schema/issues/872.test.ts +++ b/packages/graphql/tests/schema/issues/872.test.ts @@ -63,6 +63,15 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { name: String! } + type Actor2Aggregate { + node: Actor2AggregateNode! + } + + type Actor2AggregateNode { + count: Int! + name: StringAggregateSelection! + } + type Actor2AggregateSelection { count: Int! name: StringAggregateSelection! @@ -267,11 +276,21 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { } type Actor2sConnection { + aggregate: Actor2Aggregate! edges: [Actor2Edge!]! pageInfo: PageInfo! totalCount: Int! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -476,6 +495,7 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -522,6 +542,16 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -595,6 +625,7 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/lowercase-type-names.test.ts b/packages/graphql/tests/schema/lowercase-type-names.test.ts index ea7956d1fc..a984b0a242 100644 --- a/packages/graphql/tests/schema/lowercase-type-names.test.ts +++ b/packages/graphql/tests/schema/lowercase-type-names.test.ts @@ -51,6 +51,7 @@ describe("lower case type names", () => { } type ActorsConnection { + aggregate: actorAggregate! edges: [actorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -98,6 +99,7 @@ describe("lower case type names", () => { } type MoviesConnection { + aggregate: movieAggregate! edges: [movieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -171,6 +173,17 @@ describe("lower case type names", () => { year: Int } + type actorAggregate { + node: actorAggregateNode! + } + + type actorAggregateNode { + count: Int! + createdAt: DateTimeAggregateSelection! + name: StringAggregateSelection! + year: IntAggregateSelection! + } + type actorAggregateSelection { count: Int! createdAt: DateTimeAggregateSelection! @@ -578,6 +591,18 @@ describe("lower case type names", () => { where: movieActorsConnectionWhere } + type movieAggregate { + node: movieAggregateNode! + } + + type movieAggregateNode { + count: Int! + createdAt: DateTimeAggregateSelection! + name: StringAggregateSelection! + testId: StringAggregateSelection! + year: IntAggregateSelection! + } + type movieAggregateSelection { count: Int! createdAt: DateTimeAggregateSelection! diff --git a/packages/graphql/tests/schema/math.test.ts b/packages/graphql/tests/schema/math.test.ts index 63949ea0ea..0415cded33 100644 --- a/packages/graphql/tests/schema/math.test.ts +++ b/packages/graphql/tests/schema/math.test.ts @@ -76,6 +76,16 @@ describe("Algebraic", () => { viewers: Int! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + viewers: IntAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -138,6 +148,7 @@ describe("Algebraic", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -246,6 +257,16 @@ describe("Algebraic", () => { viewers: BigInt! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + viewers: BigIntAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -308,6 +329,7 @@ describe("Algebraic", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -412,6 +434,16 @@ describe("Algebraic", () => { viewers: Float! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + viewers: FloatAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -476,6 +508,7 @@ describe("Algebraic", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -580,6 +613,15 @@ describe("Algebraic", () => { lastName: String! } + type DirectorAggregate { + node: DirectorAggregateNode! + } + + type DirectorAggregateNode { + count: Int! + lastName: StringAggregateSelection! + } + type DirectorAggregateSelection { count: Int! lastName: StringAggregateSelection! @@ -793,6 +835,7 @@ describe("Algebraic", () => { } type DirectorsConnection { + aggregate: DirectorAggregate! edges: [DirectorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -818,6 +861,16 @@ describe("Algebraic", () => { viewers: Int! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + viewers: IntAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -1007,6 +1060,7 @@ describe("Algebraic", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1144,6 +1198,16 @@ describe("Algebraic", () => { workersConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [MovieWorkersConnectionSort!], where: MovieWorkersConnectionWhere): MovieWorkersConnection! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + viewers: IntAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -1343,6 +1407,7 @@ describe("Algebraic", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1366,6 +1431,7 @@ describe("Algebraic", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1378,6 +1444,15 @@ describe("Algebraic", () => { worksInProductionConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [PersonWorksInProductionConnectionSort!], where: PersonWorksInProductionConnectionWhere): PersonWorksInProductionConnection! } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! name: StringAggregateSelection! @@ -1576,6 +1651,15 @@ describe("Algebraic", () => { viewers: Int! } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + viewers: IntAggregateSelection! + } + type ProductionAggregateSelection { count: Int! viewers: IntAggregateSelection! @@ -1637,6 +1721,7 @@ describe("Algebraic", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1934,6 +2019,15 @@ describe("Algebraic", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -2039,6 +2133,7 @@ describe("Algebraic", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2062,6 +2157,7 @@ describe("Algebraic", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2178,6 +2274,15 @@ describe("Algebraic", () => { where: PersonActedInMoviesConnectionWhere } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type PersonAggregateSelection { count: Int! name: StringAggregateSelection! 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 c275371ecd..84c25eebcc 100644 --- a/packages/graphql/tests/schema/nested-aggregation-on-type.test.ts +++ b/packages/graphql/tests/schema/nested-aggregation-on-type.test.ts @@ -240,6 +240,15 @@ describe("nested aggregation on interface", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -335,6 +344,7 @@ describe("nested aggregation on interface", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -386,6 +396,17 @@ describe("nested aggregation on interface", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + cost: FloatAggregateSelection! + count: Int! + runtime: IntAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { cost: FloatAggregateSelection! count: Int! @@ -468,6 +489,7 @@ describe("nested aggregation on interface", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/null.test.ts b/packages/graphql/tests/schema/null.test.ts index ee6bddb691..0d8193da81 100644 --- a/packages/graphql/tests/schema/null.test.ts +++ b/packages/graphql/tests/schema/null.test.ts @@ -114,6 +114,19 @@ describe("Null", () => { names: [String!]! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + actorCount: IntAggregateSelection! + averageRating: FloatAggregateSelection! + count: Int! + createdAt: DateTimeAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + name: StringAggregateSelection! + } + type MovieAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! @@ -282,6 +295,7 @@ describe("Null", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/pluralize-consistency.test.ts b/packages/graphql/tests/schema/pluralize-consistency.test.ts index 126ced4d44..fd5cc84244 100644 --- a/packages/graphql/tests/schema/pluralize-consistency.test.ts +++ b/packages/graphql/tests/schema/pluralize-consistency.test.ts @@ -109,12 +109,14 @@ describe("Pluralize consistency", () => { } type SuperFriendsConnection { + aggregate: super_friendAggregate! edges: [super_friendEdge!]! pageInfo: PageInfo! totalCount: Int! } type SuperUsersConnection { + aggregate: super_userAggregate! edges: [super_userEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -144,6 +146,15 @@ describe("Pluralize consistency", () => { name: String! } + type super_friendAggregate { + node: super_friendAggregateNode! + } + + type super_friendAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type super_friendAggregateSelection { count: Int! name: StringAggregateSelection! @@ -202,6 +213,15 @@ describe("Pluralize consistency", () => { name: String! } + type super_userAggregate { + node: super_userAggregateNode! + } + + type super_userAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type super_userAggregateSelection { count: Int! name: StringAggregateSelection! diff --git a/packages/graphql/tests/schema/query-direction.test.ts b/packages/graphql/tests/schema/query-direction.test.ts index 9476ac6eed..0a1cfbae51 100644 --- a/packages/graphql/tests/schema/query-direction.test.ts +++ b/packages/graphql/tests/schema/query-direction.test.ts @@ -115,6 +115,15 @@ describe("Query Direction", () => { name: String! } + type UserAggregate { + node: UserAggregateNode! + } + + type UserAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type UserAggregateSelection { count: Int! name: StringAggregateSelection! @@ -312,6 +321,7 @@ describe("Query Direction", () => { } type UsersConnection { + aggregate: UserAggregate! edges: [UserEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -411,6 +421,15 @@ describe("Query Direction", () => { name: String! } + type UserAggregate { + node: UserAggregateNode! + } + + type UserAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type UserAggregateSelection { count: Int! name: StringAggregateSelection! @@ -608,6 +627,7 @@ describe("Query Direction", () => { } type UsersConnection { + aggregate: UserAggregate! edges: [UserEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/remove-deprecated/aggregations.test.ts b/packages/graphql/tests/schema/remove-deprecated/aggregations.test.ts index 5a681f045d..fd9adc503a 100644 --- a/packages/graphql/tests/schema/remove-deprecated/aggregations.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/aggregations.test.ts @@ -168,6 +168,15 @@ describe("Aggregations", () => { title: String } + type PostAggregate { + node: PostAggregateNode! + } + + type PostAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type PostAggregateSelection { count: Int! title: StringAggregateSelection! @@ -372,6 +381,7 @@ describe("Aggregations", () => { } type PostsConnection { + aggregate: PostAggregate! edges: [PostEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -424,6 +434,15 @@ describe("Aggregations", () => { someString: String } + type UserAggregate { + node: UserAggregateNode! + } + + type UserAggregateNode { + count: Int! + someString: StringAggregateSelection! + } + type UserAggregateSelection { count: Int! someString: StringAggregateSelection! @@ -486,6 +505,7 @@ describe("Aggregations", () => { } type UsersConnection { + aggregate: UserAggregate! 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 index 8918610362..e4614b5351 100644 --- a/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts @@ -210,6 +210,15 @@ describe("Arrays Methods", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -311,6 +320,7 @@ describe("Arrays Methods", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -475,6 +485,16 @@ describe("Arrays Methods", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + averageRating: FloatAggregateSelection! + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { averageRating: FloatAggregateSelection! count: Int! @@ -590,6 +610,7 @@ describe("Arrays Methods", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/remove-deprecated/comments.test.ts b/packages/graphql/tests/schema/remove-deprecated/comments.test.ts index 7948b41902..73a4a863f5 100644 --- a/packages/graphql/tests/schema/remove-deprecated/comments.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/comments.test.ts @@ -134,6 +134,17 @@ describe("Comments", () => { isActive: Boolean } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + actorCount: IntAggregateSelection! + averageRating: FloatAggregateSelection! + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! @@ -232,6 +243,7 @@ describe("Comments", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -310,6 +322,15 @@ describe("Comments", () => { name: String } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -362,6 +383,7 @@ describe("Comments", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -509,6 +531,15 @@ describe("Comments", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -588,6 +619,7 @@ describe("Comments", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -858,6 +890,15 @@ describe("Comments", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -951,6 +992,7 @@ describe("Comments", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -999,6 +1041,16 @@ describe("Comments", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + runtime: IntAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! runtime: IntAggregateSelection! @@ -1061,6 +1113,7 @@ describe("Comments", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1090,6 +1143,15 @@ describe("Comments", () => { title: String! } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type ProductionAggregateSelection { count: Int! title: StringAggregateSelection! @@ -1150,6 +1212,7 @@ describe("Comments", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1175,6 +1238,16 @@ describe("Comments", () => { title: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + episodes: IntAggregateSelection! + title: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! episodes: IntAggregateSelection! @@ -1182,6 +1255,7 @@ describe("Comments", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1337,6 +1411,15 @@ describe("Comments", () => { id: ID } + type GenreAggregate { + node: GenreAggregateNode! + } + + type GenreAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type GenreAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -1389,6 +1472,7 @@ describe("Comments", () => { } type GenresConnection { + aggregate: GenreAggregate! edges: [GenreEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1406,6 +1490,15 @@ describe("Comments", () => { searchNoDirective: Search } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -1622,6 +1715,7 @@ describe("Comments", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/remove-deprecated/connect-or-create.test.ts b/packages/graphql/tests/schema/remove-deprecated/connect-or-create.test.ts index 285aaeb702..bcffd61c81 100644 --- a/packages/graphql/tests/schema/remove-deprecated/connect-or-create.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/connect-or-create.test.ts @@ -54,6 +54,15 @@ describe("Connect Or Create", () => { name: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -252,6 +261,7 @@ describe("Connect Or Create", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -288,6 +298,16 @@ describe("Connect Or Create", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + isan: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! isan: StringAggregateSelection! @@ -351,6 +371,7 @@ describe("Connect Or Create", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts b/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts index 7c1ed7cbbf..c7a87f3e7b 100644 --- a/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts @@ -167,6 +167,15 @@ describe("Deprecated directed argument", () => { name: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -376,6 +385,7 @@ describe("Deprecated directed argument", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -419,6 +429,15 @@ describe("Deprecated directed argument", () => { id: ID } + type GenreAggregate { + node: GenreAggregateNode! + } + + type GenreAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type GenreAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -467,6 +486,7 @@ describe("Deprecated directed argument", () => { } type GenresConnection { + aggregate: GenreAggregate! edges: [GenreEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -609,6 +629,15 @@ describe("Deprecated directed argument", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -700,6 +729,7 @@ describe("Deprecated directed argument", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -729,6 +759,15 @@ describe("Deprecated directed argument", () => { title: String! } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type ProductionAggregateSelection { count: Int! title: StringAggregateSelection! @@ -774,6 +813,7 @@ describe("Deprecated directed argument", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/remove-deprecated/implicit-equality.test.ts b/packages/graphql/tests/schema/remove-deprecated/implicit-equality.test.ts index 861eafb088..18e3da8938 100644 --- a/packages/graphql/tests/schema/remove-deprecated/implicit-equality.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/implicit-equality.test.ts @@ -116,6 +116,15 @@ describe("Implicit Equality filters", () => { name: String } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -311,6 +320,7 @@ describe("Implicit Equality filters", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -472,6 +482,15 @@ describe("Implicit Equality filters", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -554,6 +573,7 @@ describe("Implicit Equality filters", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts b/packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts index 6873ef3c9f..e79043aa75 100644 --- a/packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts @@ -115,6 +115,15 @@ describe("Implicit SET field", () => { name: String } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -318,6 +327,7 @@ describe("Implicit SET field", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -479,6 +489,15 @@ describe("Implicit SET field", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -569,6 +588,7 @@ describe("Implicit SET field", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts b/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts index b7dffb16f1..63ae23d658 100644 --- a/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts @@ -155,6 +155,15 @@ describe("Deprecated options argument", () => { name: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -355,6 +364,7 @@ describe("Deprecated options argument", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -398,6 +408,15 @@ describe("Deprecated options argument", () => { id: ID } + type GenreAggregate { + node: GenreAggregateNode! + } + + type GenreAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type GenreAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -437,6 +456,7 @@ describe("Deprecated options argument", () => { } type GenresConnection { + aggregate: GenreAggregate! edges: [GenreEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -579,6 +599,15 @@ describe("Deprecated options argument", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -661,6 +690,7 @@ describe("Deprecated options argument", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -690,6 +720,15 @@ describe("Deprecated options argument", () => { title: String! } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type ProductionAggregateSelection { count: Int! title: StringAggregateSelection! @@ -726,6 +765,7 @@ describe("Deprecated options argument", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/remove-deprecated/query-direction.test.ts b/packages/graphql/tests/schema/remove-deprecated/query-direction.test.ts index 978517857d..945a9d3e67 100644 --- a/packages/graphql/tests/schema/remove-deprecated/query-direction.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/query-direction.test.ts @@ -116,6 +116,15 @@ describe("Query Direction", () => { name: String! } + type UserAggregate { + node: UserAggregateNode! + } + + type UserAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type UserAggregateSelection { count: Int! name: StringAggregateSelection! @@ -313,6 +322,7 @@ describe("Query Direction", () => { } type UsersConnection { + aggregate: UserAggregate! edges: [UserEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -412,6 +422,15 @@ describe("Query Direction", () => { name: String! } + type UserAggregate { + node: UserAggregateNode! + } + + type UserAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type UserAggregateSelection { count: Int! name: StringAggregateSelection! @@ -609,6 +628,7 @@ describe("Query Direction", () => { } type UsersConnection { + aggregate: UserAggregate! edges: [UserEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -708,6 +728,15 @@ describe("Query Direction", () => { name: String! } + type UserAggregate { + node: UserAggregateNode! + } + + type UserAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type UserAggregateSelection { count: Int! name: StringAggregateSelection! @@ -905,6 +934,7 @@ describe("Query Direction", () => { } type UsersConnection { + aggregate: UserAggregate! edges: [UserEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/remove-deprecated/typename_IN.test.ts b/packages/graphql/tests/schema/remove-deprecated/typename_IN.test.ts index 0b875f0fe3..a6fe109979 100644 --- a/packages/graphql/tests/schema/remove-deprecated/typename_IN.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/typename_IN.test.ts @@ -100,6 +100,16 @@ describe("typename_IN", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -159,6 +169,7 @@ describe("typename_IN", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -186,6 +197,16 @@ describe("typename_IN", () => { title: String! } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + title: StringAggregateSelection! + } + type ProductionAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -239,6 +260,7 @@ describe("typename_IN", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -262,6 +284,17 @@ describe("typename_IN", () => { title: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + numberOfEpisodes: IntAggregateSelection! + title: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -270,6 +303,7 @@ describe("typename_IN", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/scalar.test.ts b/packages/graphql/tests/schema/scalar.test.ts index fde3ef35ed..aff6e9deb1 100644 --- a/packages/graphql/tests/schema/scalar.test.ts +++ b/packages/graphql/tests/schema/scalar.test.ts @@ -78,6 +78,15 @@ describe("Scalar", () => { myRequiredCustomArrayScalar: [CustomScalar!]! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -145,6 +154,7 @@ describe("Scalar", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/string-comparators.test.ts b/packages/graphql/tests/schema/string-comparators.test.ts index 20689225f5..9fdfc686e0 100644 --- a/packages/graphql/tests/schema/string-comparators.test.ts +++ b/packages/graphql/tests/schema/string-comparators.test.ts @@ -75,6 +75,15 @@ describe("String Comparators", () => { title: String } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -127,6 +136,7 @@ describe("String Comparators", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -224,6 +234,15 @@ describe("String Comparators", () => { title: String } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -272,6 +291,7 @@ describe("String Comparators", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -378,6 +398,15 @@ describe("String Comparators", () => { title: String } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -428,6 +457,7 @@ describe("String Comparators", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -691,6 +721,15 @@ describe("String Comparators", () => { where: ActorActedInConnectionWhere } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -800,6 +839,7 @@ describe("String Comparators", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -956,6 +996,15 @@ describe("String Comparators", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! title: StringAggregateSelection! @@ -1051,6 +1100,7 @@ describe("String Comparators", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/subscriptions.test.ts b/packages/graphql/tests/schema/subscriptions.test.ts index 467a12c2ad..d1c718afbd 100644 --- a/packages/graphql/tests/schema/subscriptions.test.ts +++ b/packages/graphql/tests/schema/subscriptions.test.ts @@ -57,6 +57,15 @@ describe("Subscriptions", () => { name: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -144,6 +153,7 @@ describe("Subscriptions", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -315,6 +325,17 @@ describe("Subscriptions", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + actorCount: IntAggregateSelection! + averageRating: FloatAggregateSelection! + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! @@ -484,6 +505,7 @@ describe("Subscriptions", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -596,6 +618,14 @@ describe("Subscriptions", () => { moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + } + type ActorAggregateSelection { count: Int! } @@ -824,6 +854,7 @@ describe("Subscriptions", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -967,6 +998,17 @@ describe("Subscriptions", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + actorCount: IntAggregateSelection! + averageRating: FloatAggregateSelection! + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! @@ -1148,6 +1190,7 @@ describe("Subscriptions", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1457,6 +1500,17 @@ describe("Subscriptions", () => { Star: [MovieActorsStarUpdateFieldInput!] } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + actorCount: IntAggregateSelection! + averageRating: FloatAggregateSelection! + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! @@ -1637,6 +1691,7 @@ describe("Subscriptions", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1663,6 +1718,7 @@ describe("Subscriptions", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1674,6 +1730,14 @@ describe("Subscriptions", () => { moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + } + type PersonAggregateSelection { count: Int! } @@ -1934,6 +1998,14 @@ describe("Subscriptions", () => { moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! } + type StarAggregate { + node: StarAggregateNode! + } + + type StarAggregateNode { + count: Int! + } + type StarAggregateSelection { count: Int! } @@ -2162,6 +2234,7 @@ describe("Subscriptions", () => { } type StarsConnection { + aggregate: StarAggregate! edges: [StarEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2309,6 +2382,14 @@ describe("Subscriptions", () => { moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + } + type ActorAggregateSelection { count: Int! } @@ -2537,6 +2618,7 @@ describe("Subscriptions", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2695,6 +2777,17 @@ describe("Subscriptions", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + actorCount: IntAggregateSelection! + averageRating: FloatAggregateSelection! + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! @@ -2876,6 +2969,7 @@ describe("Subscriptions", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -2979,6 +3073,15 @@ describe("Subscriptions", () => { name: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! name: StringAggregateSelection! @@ -3066,6 +3169,7 @@ describe("Subscriptions", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3237,6 +3341,17 @@ describe("Subscriptions", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + actorCount: IntAggregateSelection! + averageRating: FloatAggregateSelection! + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! @@ -3352,6 +3467,7 @@ describe("Subscriptions", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3459,6 +3575,16 @@ describe("Subscriptions", () => { ownerConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [AgreementOwnerConnectionSort!], where: AgreementOwnerConnectionWhere): AgreementOwnerConnection! } + type AgreementAggregate { + node: AgreementAggregateNode! + } + + type AgreementAggregateNode { + count: Int! + id: IntAggregateSelection! + name: StringAggregateSelection! + } + type AgreementAggregateSelection { count: Int! id: IntAggregateSelection! @@ -3692,6 +3818,7 @@ describe("Subscriptions", () => { } type AgreementsConnection { + aggregate: AgreementAggregate! edges: [AgreementEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -3795,6 +3922,16 @@ describe("Subscriptions", () => { username: String! } + type UserAggregate { + node: UserAggregateNode! + } + + type UserAggregateNode { + count: Int! + name: StringAggregateSelection! + username: StringAggregateSelection! + } + type UserAggregateSelection { count: Int! name: StringAggregateSelection! @@ -3858,6 +3995,7 @@ describe("Subscriptions", () => { } type UsersConnection { + aggregate: UserAggregate! edges: [UserEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4104,6 +4242,17 @@ describe("Subscriptions", () => { Star: [MovieActorsStarUpdateFieldInput!] } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + actorCount: IntAggregateSelection! + averageRating: FloatAggregateSelection! + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! @@ -4284,6 +4433,7 @@ describe("Subscriptions", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4310,6 +4460,7 @@ describe("Subscriptions", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4321,6 +4472,14 @@ describe("Subscriptions", () => { moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + } + type PersonAggregateSelection { count: Int! } @@ -4581,6 +4740,14 @@ describe("Subscriptions", () => { moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! } + type StarAggregate { + node: StarAggregateNode! + } + + type StarAggregateNode { + count: Int! + } + type StarAggregateSelection { count: Int! } @@ -4794,6 +4961,7 @@ describe("Subscriptions", () => { } type StarsConnection { + aggregate: StarAggregate! edges: [StarEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -4908,6 +5076,14 @@ describe("Subscriptions", () => { moviesConnection(after: String, first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! } + type CreatureAggregate { + node: CreatureAggregateNode! + } + + type CreatureAggregateNode { + count: Int! + } + type CreatureAggregateSelection { count: Int! } @@ -5045,6 +5221,7 @@ describe("Subscriptions", () => { } type CreaturesConnection { + aggregate: CreatureAggregate! edges: [CreatureEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5086,6 +5263,16 @@ describe("Subscriptions", () => { title: String! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -5207,6 +5394,7 @@ describe("Subscriptions", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5233,6 +5421,7 @@ describe("Subscriptions", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5244,6 +5433,14 @@ describe("Subscriptions", () => { moviesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + } + type PersonAggregateSelection { count: Int! } @@ -5375,6 +5572,15 @@ describe("Subscriptions", () => { id: ID } + type ProductionAggregate { + node: ProductionAggregateNode! + } + + type ProductionAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type ProductionAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -5513,6 +5719,7 @@ describe("Subscriptions", () => { } type ProductionsConnection { + aggregate: ProductionAggregate! edges: [ProductionEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -5545,6 +5752,17 @@ describe("Subscriptions", () => { title: String! } + type SeriesAggregate { + node: SeriesAggregateNode! + } + + type SeriesAggregateNode { + count: Int! + episode: IntAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + title: StringAggregateSelection! + } + type SeriesAggregateSelection { count: Int! episode: IntAggregateSelection! @@ -5553,6 +5771,7 @@ describe("Subscriptions", () => { } type SeriesConnection { + aggregate: SeriesAggregate! edges: [SeriesEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/types/bigint.test.ts b/packages/graphql/tests/schema/types/bigint.test.ts index cfa692bb60..a7d1e4a2c2 100644 --- a/packages/graphql/tests/schema/types/bigint.test.ts +++ b/packages/graphql/tests/schema/types/bigint.test.ts @@ -77,6 +77,16 @@ describe("Bigint", () => { size: BigInt! } + type FileAggregate { + node: FileAggregateNode! + } + + type FileAggregateNode { + count: Int! + name: StringAggregateSelection! + size: BigIntAggregateSelection! + } + type FileAggregateSelection { count: Int! name: StringAggregateSelection! @@ -139,6 +149,7 @@ describe("Bigint", () => { } type FilesConnection { + aggregate: FileAggregate! edges: [FileEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/types/date.test.ts b/packages/graphql/tests/schema/types/date.test.ts index af7ea0876e..cfd735e1e0 100644 --- a/packages/graphql/tests/schema/types/date.test.ts +++ b/packages/graphql/tests/schema/types/date.test.ts @@ -73,6 +73,15 @@ describe("Date", () => { id: ID } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -132,6 +141,7 @@ describe("Date", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/types/datetime.test.ts b/packages/graphql/tests/schema/types/datetime.test.ts index 0932a7c88e..93feab3193 100644 --- a/packages/graphql/tests/schema/types/datetime.test.ts +++ b/packages/graphql/tests/schema/types/datetime.test.ts @@ -78,6 +78,16 @@ describe("Datetime", () => { id: ID } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + datetime: DateTimeAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! datetime: DateTimeAggregateSelection! @@ -138,6 +148,7 @@ describe("Datetime", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/types/duration.test.ts b/packages/graphql/tests/schema/types/duration.test.ts index 15d0333d9c..5872970fd7 100644 --- a/packages/graphql/tests/schema/types/duration.test.ts +++ b/packages/graphql/tests/schema/types/duration.test.ts @@ -78,6 +78,16 @@ describe("Duration", () => { id: ID } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + duration: DurationAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! duration: DurationAggregateSelection! @@ -138,6 +148,7 @@ describe("Duration", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/types/localdatetime.test.ts b/packages/graphql/tests/schema/types/localdatetime.test.ts index 74ebcae80e..ebf666ad52 100644 --- a/packages/graphql/tests/schema/types/localdatetime.test.ts +++ b/packages/graphql/tests/schema/types/localdatetime.test.ts @@ -78,6 +78,16 @@ describe("Localdatetime", () => { localDT: LocalDateTime } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + localDT: LocalDateTimeAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -138,6 +148,7 @@ describe("Localdatetime", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/types/localtime.test.ts b/packages/graphql/tests/schema/types/localtime.test.ts index 8adf888974..9b239d86d7 100644 --- a/packages/graphql/tests/schema/types/localtime.test.ts +++ b/packages/graphql/tests/schema/types/localtime.test.ts @@ -80,6 +80,16 @@ describe("Localtime", () => { time: LocalTime } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + time: LocalTimeAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -140,6 +150,7 @@ describe("Localtime", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/types/point.test.ts b/packages/graphql/tests/schema/types/point.test.ts index dd2801aba1..081b5d9146 100644 --- a/packages/graphql/tests/schema/types/point.test.ts +++ b/packages/graphql/tests/schema/types/point.test.ts @@ -63,6 +63,14 @@ describe("Point", () => { filmedAt: Point! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + } + type MovieAggregateSelection { count: Int! } @@ -112,6 +120,7 @@ describe("Point", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -251,6 +260,14 @@ describe("Point", () => { partLocation: CartesianPoint! } + type MachineAggregate { + node: MachineAggregateNode! + } + + type MachineAggregateNode { + count: Int! + } + type MachineAggregateSelection { count: Int! } @@ -300,6 +317,7 @@ describe("Point", () => { } type MachinesConnection { + aggregate: MachineAggregate! edges: [MachineEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -390,6 +408,14 @@ describe("Point", () => { filmedAt: [Point!]! } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + } + type MovieAggregateSelection { count: Int! } @@ -425,6 +451,7 @@ describe("Point", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -543,6 +570,14 @@ describe("Point", () => { partLocations: [CartesianPoint!]! } + type MachineAggregate { + node: MachineAggregateNode! + } + + type MachineAggregateNode { + count: Int! + } + type MachineAggregateSelection { count: Int! } @@ -578,6 +613,7 @@ describe("Point", () => { } type MachinesConnection { + aggregate: MachineAggregate! edges: [MachineEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/types/time.test.ts b/packages/graphql/tests/schema/types/time.test.ts index 423c6ade93..aa1a1f7436 100644 --- a/packages/graphql/tests/schema/types/time.test.ts +++ b/packages/graphql/tests/schema/types/time.test.ts @@ -70,6 +70,16 @@ describe("Time", () => { time: Time } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + time: TimeAggregateSelection! + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -130,6 +140,7 @@ describe("Time", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/union-interface-relationship.test.ts b/packages/graphql/tests/schema/union-interface-relationship.test.ts index 3918fb36bf..a3c3f49ffe 100644 --- a/packages/graphql/tests/schema/union-interface-relationship.test.ts +++ b/packages/graphql/tests/schema/union-interface-relationship.test.ts @@ -151,6 +151,16 @@ describe("Union Interface Relationships", () => { name: String! } + type ActorAggregate { + node: ActorAggregateNode! + } + + type ActorAggregateNode { + count: Int! + id: IntAggregateSelection! + name: StringAggregateSelection! + } + type ActorAggregateSelection { count: Int! id: IntAggregateSelection! @@ -421,6 +431,7 @@ describe("Union Interface Relationships", () => { } type ActorsConnection { + aggregate: ActorAggregate! edges: [ActorEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -511,6 +522,17 @@ describe("Union Interface Relationships", () => { url: String! } + type InfluencerAggregate { + node: InfluencerAggregateNode! + } + + type InfluencerAggregateNode { + count: Int! + reputation: IntAggregateSelection! + reviewerId: IntAggregateSelection! + url: StringAggregateSelection! + } + type InfluencerAggregateSelection { count: Int! reputation: IntAggregateSelection! @@ -587,6 +609,7 @@ describe("Union Interface Relationships", () => { } type InfluencersConnection { + aggregate: InfluencerAggregate! edges: [InfluencerEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -763,6 +786,16 @@ describe("Union Interface Relationships", () => { where: MovieActorsConnectionWhere } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + imdbId: IntAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! imdbId: IntAggregateSelection! @@ -1244,6 +1277,7 @@ describe("Union Interface Relationships", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1273,6 +1307,7 @@ describe("Union Interface Relationships", () => { } type PeopleConnection { + aggregate: PersonAggregate! edges: [PersonEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -1288,6 +1323,18 @@ describe("Union Interface Relationships", () => { reviewerId: Int } + type PersonAggregate { + node: PersonAggregateNode! + } + + type PersonAggregateNode { + count: Int! + id: IntAggregateSelection! + name: StringAggregateSelection! + reputation: IntAggregateSelection! + reviewerId: IntAggregateSelection! + } + type PersonAggregateSelection { count: Int! id: IntAggregateSelection! @@ -1682,6 +1729,16 @@ describe("Union Interface Relationships", () => { reviewerId: Int } + type ReviewerAggregate { + node: ReviewerAggregateNode! + } + + type ReviewerAggregateNode { + count: Int! + reputation: IntAggregateSelection! + reviewerId: IntAggregateSelection! + } + type ReviewerAggregateSelection { count: Int! reputation: IntAggregateSelection! @@ -1758,6 +1815,7 @@ describe("Union Interface Relationships", () => { } type ReviewersConnection { + aggregate: ReviewerAggregate! edges: [ReviewerEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/unions.test.ts b/packages/graphql/tests/schema/unions.test.ts index a72e80dcb0..5e5a801e45 100644 --- a/packages/graphql/tests/schema/unions.test.ts +++ b/packages/graphql/tests/schema/unions.test.ts @@ -76,6 +76,15 @@ describe("Unions", () => { id: ID } + type GenreAggregate { + node: GenreAggregateNode! + } + + type GenreAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type GenreAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -128,6 +137,7 @@ describe("Unions", () => { } type GenresConnection { + aggregate: GenreAggregate! edges: [GenreEdge!]! pageInfo: PageInfo! totalCount: Int! @@ -145,6 +155,15 @@ describe("Unions", () => { searchNoDirective: Search } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + } + type MovieAggregateSelection { count: Int! id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") @@ -361,6 +380,7 @@ describe("Unions", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! diff --git a/packages/graphql/tests/schema/vector.test.ts b/packages/graphql/tests/schema/vector.test.ts index 0ada3210a5..0110505694 100644 --- a/packages/graphql/tests/schema/vector.test.ts +++ b/packages/graphql/tests/schema/vector.test.ts @@ -83,6 +83,16 @@ describe("@vector schema", () => { title: String } + type MovieAggregate { + node: MovieAggregateNode! + } + + type MovieAggregateNode { + count: Int! + description: StringAggregateSelection! + title: StringAggregateSelection! + } + type MovieAggregateSelection { count: Int! description: StringAggregateSelection! @@ -160,6 +170,7 @@ describe("@vector schema", () => { } type MoviesConnection { + aggregate: MovieAggregate! edges: [MovieEdge!]! pageInfo: PageInfo! totalCount: Int! From 4e8ab687e342f72e47838d4bf0bc4b71a4c448a5 Mon Sep 17 00:00:00 2001 From: angrykoala Date: Tue, 21 Jan 2025 17:25:41 +0000 Subject: [PATCH 06/10] Deprecate top level aggregation --- packages/graphql/src/schema/constants.ts | 12 +- .../src/schema/make-augmented-schema.ts | 18 +- .../src/schema/resolvers/query/aggregate.ts | 2 +- .../graphql/tests/schema/aggregations.test.ts | 6 +- .../tests/schema/array-methods.test.ts | 4 +- packages/graphql/tests/schema/arrays.test.ts | 2 +- .../tests/schema/authorization.test.ts | 4 +- .../graphql/tests/schema/comments.test.ts | 18 +- .../tests/schema/connect-or-create-id.test.ts | 8 +- .../schema/connect-or-create-unions.test.ts | 6 +- .../tests/schema/connect-or-create.test.ts | 8 +- .../tests/schema/connections/enums.test.ts | 4 +- .../schema/connections/interfaces.test.ts | 10 +- .../tests/schema/connections/sort.test.ts | 4 +- .../tests/schema/connections/unions.test.ts | 6 +- .../tests/schema/custom-mutations.test.ts | 2 +- .../tests/schema/directive-preserve.test.ts | 36 ++-- .../tests/schema/directives/alias.test.ts | 4 +- .../schema/directives/autogenerate.test.ts | 2 +- .../schema/directives/customResolver.test.ts | 4 +- .../tests/schema/directives/cypher.test.ts | 28 +-- .../tests/schema/directives/default.test.ts | 4 +- .../schema/directives/filterable.test.ts | 64 +++---- .../tests/schema/directives/plural.test.ts | 14 +- .../schema/directives/populatedBy.test.ts | 12 +- .../tests/schema/directives/private.test.ts | 8 +- .../directives/relationship-aggregate.test.ts | 32 ++-- .../relationship-nested-operations.test.ts | 164 +++++++++--------- .../relationship-properties.test.ts | 12 +- .../schema/directives/relationship.test.ts | 8 +- .../schema/directives/selectable.test.ts | 44 ++--- .../tests/schema/directives/settable.test.ts | 78 ++++----- .../schema/directives/timestamps.test.ts | 2 +- packages/graphql/tests/schema/enum.test.ts | 2 +- packages/graphql/tests/schema/extend.test.ts | 2 +- .../graphql/tests/schema/federation.test.ts | 8 +- .../graphql/tests/schema/fulltext.test.ts | 2 +- .../graphql/tests/schema/global-node.test.ts | 2 +- .../graphql/tests/schema/inheritance.test.ts | 4 +- packages/graphql/tests/schema/inputs.test.ts | 2 +- .../schema/interface-relationships.test.ts | 88 +++++----- .../graphql/tests/schema/interfaces.test.ts | 8 +- .../graphql/tests/schema/issues/1038.test.ts | 4 +- .../graphql/tests/schema/issues/1182.test.ts | 4 +- .../graphql/tests/schema/issues/1575.test.ts | 2 +- .../graphql/tests/schema/issues/1614.test.ts | 4 +- .../graphql/tests/schema/issues/162.test.ts | 6 +- .../graphql/tests/schema/issues/200.test.ts | 2 +- .../graphql/tests/schema/issues/2187.test.ts | 4 +- .../graphql/tests/schema/issues/2377.test.ts | 4 +- .../graphql/tests/schema/issues/2969.test.ts | 4 +- .../graphql/tests/schema/issues/2981.test.ts | 6 +- .../graphql/tests/schema/issues/2993.test.ts | 4 +- .../graphql/tests/schema/issues/3428.test.ts | 10 +- .../graphql/tests/schema/issues/3439.test.ts | 36 ++-- .../graphql/tests/schema/issues/3537.test.ts | 8 +- .../graphql/tests/schema/issues/3541.test.ts | 6 +- .../graphql/tests/schema/issues/3698.test.ts | 20 +-- .../graphql/tests/schema/issues/3816.test.ts | 8 +- .../graphql/tests/schema/issues/3817.test.ts | 2 +- .../graphql/tests/schema/issues/4511.test.ts | 10 +- .../graphql/tests/schema/issues/4615.test.ts | 8 +- .../graphql/tests/schema/issues/5428.test.ts | 2 +- .../graphql/tests/schema/issues/5631.test.ts | 4 +- .../graphql/tests/schema/issues/609.test.ts | 2 +- .../graphql/tests/schema/issues/872.test.ts | 6 +- .../tests/schema/lowercase-type-names.test.ts | 4 +- packages/graphql/tests/schema/math.test.ts | 20 +-- .../schema/nested-aggregation-on-type.test.ts | 4 +- packages/graphql/tests/schema/null.test.ts | 2 +- .../schema/pluralize-consistency.test.ts | 4 +- .../tests/schema/query-direction.test.ts | 4 +- .../remove-deprecated/aggregations.test.ts | 4 +- .../remove-deprecated/array-methods.test.ts | 4 +- .../schema/remove-deprecated/comments.test.ts | 18 +- .../connect-or-create.test.ts | 4 +- .../directed-argument.test.ts | 8 +- .../implicit-equality.test.ts | 4 +- .../remove-deprecated/implicit-set.test.ts | 4 +- .../options-argument.test.ts | 8 +- .../remove-deprecated/query-direction.test.ts | 6 +- .../remove-deprecated/typename_IN.test.ts | 6 +- packages/graphql/tests/schema/scalar.test.ts | 2 +- packages/graphql/tests/schema/simple.test.ts | 2 +- .../tests/schema/string-comparators.test.ts | 10 +- .../tests/schema/subscriptions.test.ts | 42 ++--- .../graphql/tests/schema/types/bigint.test.ts | 2 +- .../graphql/tests/schema/types/date.test.ts | 2 +- .../tests/schema/types/datetime.test.ts | 2 +- .../tests/schema/types/duration.test.ts | 2 +- .../tests/schema/types/localdatetime.test.ts | 2 +- .../tests/schema/types/localtime.test.ts | 2 +- .../graphql/tests/schema/types/point.test.ts | 8 +- .../graphql/tests/schema/types/time.test.ts | 2 +- .../union-interface-relationship.test.ts | 10 +- packages/graphql/tests/schema/unions.test.ts | 4 +- packages/graphql/tests/schema/vector.test.ts | 2 +- 97 files changed, 562 insertions(+), 550 deletions(-) diff --git a/packages/graphql/src/schema/constants.ts b/packages/graphql/src/schema/constants.ts index 5f7d1fc932..d72ab10a51 100644 --- a/packages/graphql/src/schema/constants.ts +++ b/packages/graphql/src/schema/constants.ts @@ -18,6 +18,8 @@ */ import { DEPRECATED } from "../constants"; +import type { ConcreteEntityAdapter } from "../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { InterfaceEntityAdapter } from "../schema-model/entity/model-adapters/InterfaceEntityAdapter"; export const DEPRECATE_IMPLICIT_EQUAL_FILTERS = { name: DEPRECATED, @@ -61,7 +63,6 @@ export const DEPRECATE_OVERWRITE = { }, }; - export const DEPRECATE_ID_AGGREGATION = { name: DEPRECATED, args: { @@ -75,3 +76,12 @@ export const DEPRECATE_TYPENAME_IN = { reason: "The typename_IN filter is deprecated, please use the typename filter instead", }, }; + +export function DEPRECATE_AGGREGATION(entity: ConcreteEntityAdapter | InterfaceEntityAdapter) { + return { + name: DEPRECATED, + args: { + reason: `Please use the explicit the field "aggregate" inside "${entity.operations.rootTypeFieldNames.connection}"`, + }, + }; +} diff --git a/packages/graphql/src/schema/make-augmented-schema.ts b/packages/graphql/src/schema/make-augmented-schema.ts index 974c140bdf..e479df4e35 100644 --- a/packages/graphql/src/schema/make-augmented-schema.ts +++ b/packages/graphql/src/schema/make-augmented-schema.ts @@ -72,6 +72,7 @@ import { RelationshipDeclarationAdapter } from "../schema-model/relationship/mod import type { CypherField, Neo4jFeaturesSettings } from "../types"; import { filterTruthy } from "../utils/utils"; import { augmentVectorSchema } from "./augment/vector"; +import { DEPRECATE_AGGREGATION } from "./constants"; import { createConnectionFields } from "./create-connection-fields"; import { addGlobalNodeFields } from "./create-global-nodes"; import { createRelationshipFields } from "./create-relationship-fields/create-relationship-fields"; @@ -580,15 +581,16 @@ function generateObjectType({ features, }); + // TODO: remove with deprecated flag composer.Query.addFields({ [concreteEntityAdapter.operations.rootTypeFieldNames.aggregate]: aggregateResolver({ entityAdapter: concreteEntityAdapter, }), }); - composer.Query.setFieldDirectives( - concreteEntityAdapter.operations.rootTypeFieldNames.aggregate, - graphqlDirectivesToCompose(propagatedDirectives) - ); + composer.Query.setFieldDirectives(concreteEntityAdapter.operations.rootTypeFieldNames.aggregate, [ + ...graphqlDirectivesToCompose(propagatedDirectives), + DEPRECATE_AGGREGATION(concreteEntityAdapter), + ]); } if (concreteEntityAdapter.isCreatable) { @@ -725,9 +727,9 @@ function generateInterfaceObjectType({ entityAdapter: interfaceEntityAdapter, }), }); - composer.Query.setFieldDirectives( - interfaceEntityAdapter.operations.rootTypeFieldNames.aggregate, - graphqlDirectivesToCompose(propagatedDirectives) - ); + composer.Query.setFieldDirectives(interfaceEntityAdapter.operations.rootTypeFieldNames.aggregate, [ + ...graphqlDirectivesToCompose(propagatedDirectives), + DEPRECATE_AGGREGATION(interfaceEntityAdapter), + ]); } } diff --git a/packages/graphql/src/schema/resolvers/query/aggregate.ts b/packages/graphql/src/schema/resolvers/query/aggregate.ts index 23919637c7..340dc08af7 100644 --- a/packages/graphql/src/schema/resolvers/query/aggregate.ts +++ b/packages/graphql/src/schema/resolvers/query/aggregate.ts @@ -21,11 +21,11 @@ import type { GraphQLResolveInfo } from "graphql"; import type { ConcreteEntityAdapter } from "../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { InterfaceEntityAdapter } from "../../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import { translateAggregate } from "../../../translate"; +import { isConcreteEntity } from "../../../translate/queryAST/utils/is-concrete-entity"; import type { Neo4jGraphQLTranslationContext } from "../../../types/neo4j-graphql-translation-context"; import { execute } from "../../../utils"; import getNeo4jResolveTree from "../../../utils/get-neo4j-resolve-tree"; import type { Neo4jGraphQLComposedContext } from "../composition/wrap-query-and-mutation"; -import { isConcreteEntity } from "../../../translate/queryAST/utils/is-concrete-entity"; export function aggregateResolver({ entityAdapter, diff --git a/packages/graphql/tests/schema/aggregations.test.ts b/packages/graphql/tests/schema/aggregations.test.ts index c05856d9ea..06613ec42e 100644 --- a/packages/graphql/tests/schema/aggregations.test.ts +++ b/packages/graphql/tests/schema/aggregations.test.ts @@ -362,7 +362,7 @@ describe("Aggregations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1223,10 +1223,10 @@ describe("Aggregations", () => { type Query { posts(limit: Int, offset: Int, options: PostOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! + postsAggregate(where: PostWhere): PostAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\"\\") postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! + usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\"\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } diff --git a/packages/graphql/tests/schema/array-methods.test.ts b/packages/graphql/tests/schema/array-methods.test.ts index e753a0e6b0..f2f4b12202 100644 --- a/packages/graphql/tests/schema/array-methods.test.ts +++ b/packages/graphql/tests/schema/array-methods.test.ts @@ -633,10 +633,10 @@ describe("Arrays Methods", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/arrays.test.ts b/packages/graphql/tests/schema/arrays.test.ts index dacc11d226..3fd58dc9ab 100644 --- a/packages/graphql/tests/schema/arrays.test.ts +++ b/packages/graphql/tests/schema/arrays.test.ts @@ -183,7 +183,7 @@ describe("Arrays", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/authorization.test.ts b/packages/graphql/tests/schema/authorization.test.ts index 46902c4f85..8178ed60fa 100644 --- a/packages/graphql/tests/schema/authorization.test.ts +++ b/packages/graphql/tests/schema/authorization.test.ts @@ -306,10 +306,10 @@ describe("Authorization", () => { type Query { posts(limit: Int, offset: Int, options: PostOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! + postsAggregate(where: PostWhere): PostAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\"\\") postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! + usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\"\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } diff --git a/packages/graphql/tests/schema/comments.test.ts b/packages/graphql/tests/schema/comments.test.ts index 2d3b4b189d..7e3e61a2c1 100644 --- a/packages/graphql/tests/schema/comments.test.ts +++ b/packages/graphql/tests/schema/comments.test.ts @@ -263,7 +263,7 @@ describe("Comments", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -640,10 +640,10 @@ describe("Comments", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1214,16 +1214,16 @@ describe("Comments", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -1732,10 +1732,10 @@ describe("Comments", () => { type Query { genres(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\"\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! searches(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: SearchWhere): [Search!]! } diff --git a/packages/graphql/tests/schema/connect-or-create-id.test.ts b/packages/graphql/tests/schema/connect-or-create-id.test.ts index 74b82e7547..c81142a3e0 100644 --- a/packages/graphql/tests/schema/connect-or-create-id.test.ts +++ b/packages/graphql/tests/schema/connect-or-create-id.test.ts @@ -414,10 +414,10 @@ describe("connect or create with id", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -799,10 +799,10 @@ describe("connect or create with id", () => { type Query { posts(limit: Int, offset: Int, options: PostOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! + postsAggregate(where: PostWhere): PostAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\"\\") postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! + usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\"\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } diff --git a/packages/graphql/tests/schema/connect-or-create-unions.test.ts b/packages/graphql/tests/schema/connect-or-create-unions.test.ts index 5e46fd079a..f4d64dfe51 100644 --- a/packages/graphql/tests/schema/connect-or-create-unions.test.ts +++ b/packages/graphql/tests/schema/connect-or-create-unions.test.ts @@ -498,14 +498,14 @@ describe("Connect Or Create", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ProductionWhere): [Production!]! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } diff --git a/packages/graphql/tests/schema/connect-or-create.test.ts b/packages/graphql/tests/schema/connect-or-create.test.ts index 54c5c20988..bb13cd2ba9 100644 --- a/packages/graphql/tests/schema/connect-or-create.test.ts +++ b/packages/graphql/tests/schema/connect-or-create.test.ts @@ -418,10 +418,10 @@ describe("Connect Or Create", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -969,10 +969,10 @@ describe("Connect Or Create", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/connections/enums.test.ts b/packages/graphql/tests/schema/connections/enums.test.ts index d934abd46b..611b3d3db4 100644 --- a/packages/graphql/tests/schema/connections/enums.test.ts +++ b/packages/graphql/tests/schema/connections/enums.test.ts @@ -579,10 +579,10 @@ describe("Enums", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/connections/interfaces.test.ts b/packages/graphql/tests/schema/connections/interfaces.test.ts index 40f90b82b0..a7e288f32b 100644 --- a/packages/graphql/tests/schema/connections/interfaces.test.ts +++ b/packages/graphql/tests/schema/connections/interfaces.test.ts @@ -858,19 +858,19 @@ describe("Connection with interfaces", () => { type Query { creatures(limit: Int, offset: Int, options: CreatureOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [CreatureSort!], where: CreatureWhere): [Creature!]! - creaturesAggregate(where: CreatureWhere): CreatureAggregateSelection! + creaturesAggregate(where: CreatureWhere): CreatureAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"creaturesConnection\\\\\\"\\") creaturesConnection(after: String, first: Int, sort: [CreatureSort!], where: CreatureWhere): CreaturesConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } diff --git a/packages/graphql/tests/schema/connections/sort.test.ts b/packages/graphql/tests/schema/connections/sort.test.ts index 97335b6c87..1c5309c17c 100644 --- a/packages/graphql/tests/schema/connections/sort.test.ts +++ b/packages/graphql/tests/schema/connections/sort.test.ts @@ -472,10 +472,10 @@ describe("Sort", () => { type Query { node1s(limit: Int, offset: Int, options: Node1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Node1Sort!], where: Node1Where): [Node1!]! - node1sAggregate(where: Node1Where): Node1AggregateSelection! + node1sAggregate(where: Node1Where): Node1AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"node1sConnection\\\\\\"\\") node1sConnection(after: String, first: Int, sort: [Node1Sort!], where: Node1Where): Node1sConnection! node2s(limit: Int, offset: Int, options: Node2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: Node2Where): [Node2!]! - node2sAggregate(where: Node2Where): Node2AggregateSelection! + node2sAggregate(where: Node2Where): Node2AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"node2sConnection\\\\\\"\\") node2sConnection(after: String, first: Int, where: Node2Where): Node2sConnection! } diff --git a/packages/graphql/tests/schema/connections/unions.test.ts b/packages/graphql/tests/schema/connections/unions.test.ts index cb0f606264..debefdc4ca 100644 --- a/packages/graphql/tests/schema/connections/unions.test.ts +++ b/packages/graphql/tests/schema/connections/unions.test.ts @@ -841,13 +841,13 @@ describe("Unions", () => { type Query { authors(limit: Int, offset: Int, options: AuthorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [AuthorSort!], where: AuthorWhere): [Author!]! - authorsAggregate(where: AuthorWhere): AuthorAggregateSelection! + authorsAggregate(where: AuthorWhere): AuthorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"authorsConnection\\\\\\"\\") authorsConnection(after: String, first: Int, sort: [AuthorSort!], where: AuthorWhere): AuthorsConnection! books(limit: Int, offset: Int, options: BookOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [BookSort!], where: BookWhere): [Book!]! - booksAggregate(where: BookWhere): BookAggregateSelection! + booksAggregate(where: BookWhere): BookAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"booksConnection\\\\\\"\\") booksConnection(after: String, first: Int, sort: [BookSort!], where: BookWhere): BooksConnection! journals(limit: Int, offset: Int, options: JournalOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [JournalSort!], where: JournalWhere): [Journal!]! - journalsAggregate(where: JournalWhere): JournalAggregateSelection! + journalsAggregate(where: JournalWhere): JournalAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"journalsConnection\\\\\\"\\") journalsConnection(after: String, first: Int, sort: [JournalSort!], where: JournalWhere): JournalsConnection! publications(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PublicationWhere): [Publication!]! } diff --git a/packages/graphql/tests/schema/custom-mutations.test.ts b/packages/graphql/tests/schema/custom-mutations.test.ts index 27d8ae6279..fdc74c6e36 100644 --- a/packages/graphql/tests/schema/custom-mutations.test.ts +++ b/packages/graphql/tests/schema/custom-mutations.test.ts @@ -173,7 +173,7 @@ describe("Custom-mutations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! testCypherQuery(input: ExampleInput): String testQuery(input: ExampleInput): String diff --git a/packages/graphql/tests/schema/directive-preserve.test.ts b/packages/graphql/tests/schema/directive-preserve.test.ts index d14269a86b..0acfec9206 100644 --- a/packages/graphql/tests/schema/directive-preserve.test.ts +++ b/packages/graphql/tests/schema/directive-preserve.test.ts @@ -155,7 +155,7 @@ describe("Directive-preserve", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -780,10 +780,10 @@ describe("Directive-preserve", () => { type Query { genres(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\"\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1678,16 +1678,16 @@ describe("Directive-preserve", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -2635,16 +2635,16 @@ describe("Directive-preserve", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -3615,16 +3615,16 @@ describe("Directive-preserve", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -4280,14 +4280,14 @@ describe("Directive-preserve", () => { type Query { blogs(limit: Int, offset: Int, options: BlogOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [BlogSort!], where: BlogWhere): [Blog!]! - blogsAggregate(where: BlogWhere): BlogAggregateSelection! + blogsAggregate(where: BlogWhere): BlogAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"blogsConnection\\\\\\"\\") blogsConnection(after: String, first: Int, sort: [BlogSort!], where: BlogWhere): BlogsConnection! contents(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ContentWhere): [Content!]! posts(limit: Int, offset: Int, options: PostOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! + postsAggregate(where: PostWhere): PostAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\"\\") postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! + usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\"\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } diff --git a/packages/graphql/tests/schema/directives/alias.test.ts b/packages/graphql/tests/schema/directives/alias.test.ts index 0b0922fbc8..8dbf1a7258 100644 --- a/packages/graphql/tests/schema/directives/alias.test.ts +++ b/packages/graphql/tests/schema/directives/alias.test.ts @@ -537,10 +537,10 @@ describe("Alias", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/directives/autogenerate.test.ts b/packages/graphql/tests/schema/directives/autogenerate.test.ts index 3abbe119c9..8ceeab3855 100644 --- a/packages/graphql/tests/schema/directives/autogenerate.test.ts +++ b/packages/graphql/tests/schema/directives/autogenerate.test.ts @@ -158,7 +158,7 @@ describe("Autogenerate", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/directives/customResolver.test.ts b/packages/graphql/tests/schema/directives/customResolver.test.ts index 2649091ed0..ae60a6844b 100644 --- a/packages/graphql/tests/schema/directives/customResolver.test.ts +++ b/packages/graphql/tests/schema/directives/customResolver.test.ts @@ -96,10 +96,10 @@ describe("@customResolver directive", () => { type Query { userInterfaces(limit: Int, offset: Int, options: UserInterfaceOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserInterfaceSort!], where: UserInterfaceWhere): [UserInterface!]! - userInterfacesAggregate(where: UserInterfaceWhere): UserInterfaceAggregateSelection! + userInterfacesAggregate(where: UserInterfaceWhere): UserInterfaceAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"userInterfacesConnection\\\\\\"\\") userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): UserInterfacesConnection! users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! + usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\"\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } diff --git a/packages/graphql/tests/schema/directives/cypher.test.ts b/packages/graphql/tests/schema/directives/cypher.test.ts index 0e28996002..196e24d6f2 100644 --- a/packages/graphql/tests/schema/directives/cypher.test.ts +++ b/packages/graphql/tests/schema/directives/cypher.test.ts @@ -566,10 +566,10 @@ describe("Cypher", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -720,7 +720,7 @@ describe("Cypher", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, where: MovieWhere): MoviesConnection! } @@ -858,7 +858,7 @@ describe("Cypher", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1120,11 +1120,11 @@ describe("Cypher", () => { type Query { blogs(limit: Int, offset: Int, options: BlogOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [BlogSort!], where: BlogWhere): [Blog!]! - blogsAggregate(where: BlogWhere): BlogAggregateSelection! + blogsAggregate(where: BlogWhere): BlogAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"blogsConnection\\\\\\"\\") blogsConnection(after: String, first: Int, sort: [BlogSort!], where: BlogWhere): BlogsConnection! contents(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ContentWhere): [Content!]! posts(limit: Int, offset: Int, options: PostOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! + postsAggregate(where: PostWhere): PostAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\"\\") postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! } @@ -1452,13 +1452,13 @@ describe("Cypher", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, where: ProductionWhere): ProductionsConnection! } @@ -1729,10 +1729,10 @@ describe("Cypher", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, where: MovieWhere): MoviesConnection! } @@ -2001,10 +2001,10 @@ describe("Cypher", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -2216,7 +2216,7 @@ describe("Cypher", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/directives/default.test.ts b/packages/graphql/tests/schema/directives/default.test.ts index 50b08ba7c8..9208b71bc8 100644 --- a/packages/graphql/tests/schema/directives/default.test.ts +++ b/packages/graphql/tests/schema/directives/default.test.ts @@ -127,10 +127,10 @@ describe("@default directive", () => { type Query { userInterfaces(limit: Int, offset: Int, options: UserInterfaceOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserInterfaceSort!], where: UserInterfaceWhere): [UserInterface!]! - userInterfacesAggregate(where: UserInterfaceWhere): UserInterfaceAggregateSelection! + userInterfacesAggregate(where: UserInterfaceWhere): UserInterfaceAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"userInterfacesConnection\\\\\\"\\") userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): UserInterfacesConnection! users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! + usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\"\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } diff --git a/packages/graphql/tests/schema/directives/filterable.test.ts b/packages/graphql/tests/schema/directives/filterable.test.ts index 29c8056e1b..4aa5c2560d 100644 --- a/packages/graphql/tests/schema/directives/filterable.test.ts +++ b/packages/graphql/tests/schema/directives/filterable.test.ts @@ -1468,10 +1468,10 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -2144,10 +2144,10 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -2802,10 +2802,10 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -3431,10 +3431,10 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -4109,10 +4109,10 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -4763,10 +4763,10 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -5391,10 +5391,10 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -6081,13 +6081,13 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -6809,13 +6809,13 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -7502,13 +7502,13 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -8486,13 +8486,13 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! appearances(limit: Int, offset: Int, options: AppearanceOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [AppearanceSort!], where: AppearanceWhere): [Appearance!]! - appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! + appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"appearancesConnection\\\\\\"\\") appearancesConnection(after: String, first: Int, sort: [AppearanceSort!], where: AppearanceWhere): AppearancesConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! } @@ -9485,13 +9485,13 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! appearances(limit: Int, offset: Int, options: AppearanceOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [AppearanceSort!], where: AppearanceWhere): [Appearance!]! - appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! + appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"appearancesConnection\\\\\\"\\") appearancesConnection(after: String, first: Int, sort: [AppearanceSort!], where: AppearanceWhere): AppearancesConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! } @@ -10484,13 +10484,13 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! appearances(limit: Int, offset: Int, options: AppearanceOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [AppearanceSort!], where: AppearanceWhere): [Appearance!]! - appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! + appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"appearancesConnection\\\\\\"\\") appearancesConnection(after: String, first: Int, sort: [AppearanceSort!], where: AppearanceWhere): AppearancesConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! } diff --git a/packages/graphql/tests/schema/directives/plural.test.ts b/packages/graphql/tests/schema/directives/plural.test.ts index 6c2349341f..6dc057ab9c 100644 --- a/packages/graphql/tests/schema/directives/plural.test.ts +++ b/packages/graphql/tests/schema/directives/plural.test.ts @@ -79,7 +79,7 @@ describe("Plural option", () => { type Query { techs(limit: Int, offset: Int, options: TechOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [TechSort!], where: TechWhere): [Tech!]! - techsAggregate(where: TechWhere): TechAggregateSelection! + techsAggregate(where: TechWhere): TechAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"techsConnection\\\\\\"\\") techsConnection(after: String, first: Int, sort: [TechSort!], where: TechWhere): TechsConnection! } @@ -249,7 +249,7 @@ describe("Plural option", () => { type Query { techs(limit: Int, offset: Int, options: TechOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [TechSort!], where: TechWhere): [Tech!]! - techsAggregate(where: TechWhere): TechAggregateSelection! + techsAggregate(where: TechWhere): TechAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"techsConnection\\\\\\"\\") techsConnection(after: String, first: Int, sort: [TechSort!], where: TechWhere): TechsConnection! } @@ -419,7 +419,7 @@ describe("Plural option", () => { type Query { technologies(limit: Int, offset: Int, options: TechOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [TechSort!], where: TechWhere): [Tech!]! - technologiesAggregate(where: TechWhere): TechAggregateSelection! + technologiesAggregate(where: TechWhere): TechAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"technologiesConnection\\\\\\"\\") technologiesConnection(after: String, first: Int, sort: [TechSort!], where: TechWhere): TechnologiesConnection! } @@ -589,7 +589,7 @@ describe("Plural option", () => { type Query { techs(limit: Int, offset: Int, options: TechsOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [TechsSort!], where: TechsWhere): [Techs!]! - techsAggregate(where: TechsWhere): TechsAggregateSelection! + techsAggregate(where: TechsWhere): TechsAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"techsConnection\\\\\\"\\") techsConnection(after: String, first: Int, sort: [TechsSort!], where: TechsWhere): TechsConnection! } @@ -746,7 +746,7 @@ describe("Plural option", () => { type Query { techs(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - techsAggregate(where: UserWhere): UserAggregateSelection! + techsAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"techsConnection\\\\\\"\\") techsConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): TechsConnection! } @@ -903,7 +903,7 @@ describe("Plural option", () => { type Query { users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! + usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\"\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } @@ -1060,7 +1060,7 @@ describe("Plural option", () => { type Query { users(limit: Int, offset: Int, options: UsersOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UsersSort!], where: UsersWhere): [Users!]! - usersAggregate(where: UsersWhere): UsersAggregateSelection! + usersAggregate(where: UsersWhere): UsersAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\"\\") usersConnection(after: String, first: Int, sort: [UsersSort!], where: UsersWhere): UsersConnection! } diff --git a/packages/graphql/tests/schema/directives/populatedBy.test.ts b/packages/graphql/tests/schema/directives/populatedBy.test.ts index bf51368b5c..5216d42125 100644 --- a/packages/graphql/tests/schema/directives/populatedBy.test.ts +++ b/packages/graphql/tests/schema/directives/populatedBy.test.ts @@ -304,7 +304,7 @@ describe("@populatedBy tests", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -527,7 +527,7 @@ describe("@populatedBy tests", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1070,10 +1070,10 @@ describe("@populatedBy tests", () => { type Query { genres(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\"\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1619,10 +1619,10 @@ describe("@populatedBy tests", () => { type Query { genres(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\"\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/directives/private.test.ts b/packages/graphql/tests/schema/directives/private.test.ts index 865f351784..4c2f6a4907 100644 --- a/packages/graphql/tests/schema/directives/private.test.ts +++ b/packages/graphql/tests/schema/directives/private.test.ts @@ -87,10 +87,10 @@ describe("@private directive", () => { type Query { userInterfaces(limit: Int, offset: Int, options: UserInterfaceOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserInterfaceSort!], where: UserInterfaceWhere): [UserInterface!]! - userInterfacesAggregate(where: UserInterfaceWhere): UserInterfaceAggregateSelection! + userInterfacesAggregate(where: UserInterfaceWhere): UserInterfaceAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"userInterfacesConnection\\\\\\"\\") userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): UserInterfacesConnection! users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! + usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\"\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } @@ -314,10 +314,10 @@ describe("@private directive", () => { type Query { userInterfaces(limit: Int, offset: Int, options: UserInterfaceOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserInterfaceSort!], where: UserInterfaceWhere): [UserInterface!]! - userInterfacesAggregate(where: UserInterfaceWhere): UserInterfaceAggregateSelection! + userInterfacesAggregate(where: UserInterfaceWhere): UserInterfaceAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"userInterfacesConnection\\\\\\"\\") userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): UserInterfacesConnection! users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! + usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\"\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } diff --git a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts index 4c7b7b79a4..9a0360a464 100644 --- a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts @@ -565,10 +565,10 @@ describe("@relationship directive, aggregate argument", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -978,10 +978,10 @@ describe("@relationship directive, aggregate argument", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1467,13 +1467,13 @@ describe("@relationship directive, aggregate argument", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -1968,13 +1968,13 @@ describe("@relationship directive, aggregate argument", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -2470,14 +2470,14 @@ describe("@relationship directive, aggregate argument", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! castMembers(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: CastMemberWhere): [CastMember!]! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -2981,14 +2981,14 @@ describe("@relationship directive, aggregate argument", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! castMembers(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: CastMemberWhere): [CastMember!]! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } 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 3affe8bc9b..986dba3c4c 100644 --- a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts @@ -327,10 +327,10 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -681,10 +681,10 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -1043,10 +1043,10 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -1392,10 +1392,10 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -1745,10 +1745,10 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -2094,10 +2094,10 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -2434,10 +2434,10 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -2829,10 +2829,10 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -3320,10 +3320,10 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -3778,10 +3778,10 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -4175,14 +4175,14 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! personOnes(limit: Int, offset: Int, options: PersonOneOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\"\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, options: PersonTwoOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\"\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -4618,14 +4618,14 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! personOnes(limit: Int, offset: Int, options: PersonOneOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\"\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, options: PersonTwoOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\"\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -5069,14 +5069,14 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! personOnes(limit: Int, offset: Int, options: PersonOneOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\"\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, options: PersonTwoOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\"\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -5498,14 +5498,14 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! personOnes(limit: Int, offset: Int, options: PersonOneOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\"\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, options: PersonTwoOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\"\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -5936,14 +5936,14 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! personOnes(limit: Int, offset: Int, options: PersonOneOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\"\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, options: PersonTwoOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\"\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -6365,14 +6365,14 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! personOnes(limit: Int, offset: Int, options: PersonOneOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\"\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, options: PersonTwoOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\"\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -6771,14 +6771,14 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! personOnes(limit: Int, offset: Int, options: PersonOneOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\"\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, options: PersonTwoOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\"\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -7273,14 +7273,14 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! personOnes(limit: Int, offset: Int, options: PersonOneOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\"\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, options: PersonTwoOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\"\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -7856,14 +7856,14 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! personOnes(limit: Int, offset: Int, options: PersonOneOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\"\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, options: PersonTwoOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\"\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -8380,14 +8380,14 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! personOnes(limit: Int, offset: Int, options: PersonOneOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\"\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, options: PersonTwoOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\"\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -8899,16 +8899,16 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! personOnes(limit: Int, offset: Int, options: PersonOneOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\"\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, options: PersonTwoOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\"\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -9427,16 +9427,16 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! personOnes(limit: Int, offset: Int, options: PersonOneOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\"\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, options: PersonTwoOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\"\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -9954,16 +9954,16 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! personOnes(limit: Int, offset: Int, options: PersonOneOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\"\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, options: PersonTwoOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\"\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -10477,16 +10477,16 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! personOnes(limit: Int, offset: Int, options: PersonOneOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\"\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, options: PersonTwoOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\"\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -10999,16 +10999,16 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! personOnes(limit: Int, offset: Int, options: PersonOneOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\"\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, options: PersonTwoOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\"\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -11517,16 +11517,16 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! personOnes(limit: Int, offset: Int, options: PersonOneOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\"\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, options: PersonTwoOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\"\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -12183,16 +12183,16 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! personOnes(limit: Int, offset: Int, options: PersonOneOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\"\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, options: PersonTwoOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\"\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -12825,16 +12825,16 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! personOnes(limit: Int, offset: Int, options: PersonOneOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\"\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, options: PersonTwoOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\"\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } diff --git a/packages/graphql/tests/schema/directives/relationship-properties.test.ts b/packages/graphql/tests/schema/directives/relationship-properties.test.ts index a7c2103405..5b136b0f95 100644 --- a/packages/graphql/tests/schema/directives/relationship-properties.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-properties.test.ts @@ -649,10 +649,10 @@ describe("Relationship-properties", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1349,10 +1349,10 @@ describe("Relationship-properties", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1993,10 +1993,10 @@ describe("Relationship-properties", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/directives/relationship.test.ts b/packages/graphql/tests/schema/directives/relationship.test.ts index dedfbfbf6e..3e2599e89f 100644 --- a/packages/graphql/tests/schema/directives/relationship.test.ts +++ b/packages/graphql/tests/schema/directives/relationship.test.ts @@ -368,10 +368,10 @@ describe("Relationship", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -914,10 +914,10 @@ describe("Relationship", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/directives/selectable.test.ts b/packages/graphql/tests/schema/directives/selectable.test.ts index 1cc9ed686b..63da28a752 100644 --- a/packages/graphql/tests/schema/directives/selectable.test.ts +++ b/packages/graphql/tests/schema/directives/selectable.test.ts @@ -155,7 +155,7 @@ describe("@selectable", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -319,7 +319,7 @@ describe("@selectable", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -482,7 +482,7 @@ describe("@selectable", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -697,7 +697,7 @@ describe("@selectable", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1092,10 +1092,10 @@ describe("@selectable", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1504,10 +1504,10 @@ describe("@selectable", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1920,14 +1920,14 @@ describe("@selectable", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ProductionWhere): [Production!]! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -2445,14 +2445,14 @@ describe("@selectable", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ProductionWhere): [Production!]! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -3043,16 +3043,16 @@ describe("@selectable", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -3647,16 +3647,16 @@ describe("@selectable", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } diff --git a/packages/graphql/tests/schema/directives/settable.test.ts b/packages/graphql/tests/schema/directives/settable.test.ts index cfb14a67f8..58715c565f 100644 --- a/packages/graphql/tests/schema/directives/settable.test.ts +++ b/packages/graphql/tests/schema/directives/settable.test.ts @@ -155,7 +155,7 @@ describe("@settable", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -319,7 +319,7 @@ describe("@settable", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -533,7 +533,7 @@ describe("@settable", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -939,10 +939,10 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1334,10 +1334,10 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1895,10 +1895,10 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -2464,10 +2464,10 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -2876,14 +2876,14 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ProductionWhere): [Production!]! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -3362,14 +3362,14 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ProductionWhere): [Production!]! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -4028,14 +4028,14 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ProductionWhere): [Production!]! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -4710,14 +4710,14 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ProductionWhere): [Production!]! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -5319,16 +5319,16 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -5899,16 +5899,16 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -6721,16 +6721,16 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -7684,16 +7684,16 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } diff --git a/packages/graphql/tests/schema/directives/timestamps.test.ts b/packages/graphql/tests/schema/directives/timestamps.test.ts index 2cf9ae64aa..230a169bd5 100644 --- a/packages/graphql/tests/schema/directives/timestamps.test.ts +++ b/packages/graphql/tests/schema/directives/timestamps.test.ts @@ -182,7 +182,7 @@ describe("Timestamps", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/enum.test.ts b/packages/graphql/tests/schema/enum.test.ts index 7c326df72b..260f244da0 100644 --- a/packages/graphql/tests/schema/enum.test.ts +++ b/packages/graphql/tests/schema/enum.test.ts @@ -143,7 +143,7 @@ describe("Enum", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/extend.test.ts b/packages/graphql/tests/schema/extend.test.ts index 580ccd220e..171240bc05 100644 --- a/packages/graphql/tests/schema/extend.test.ts +++ b/packages/graphql/tests/schema/extend.test.ts @@ -164,7 +164,7 @@ describe("Extend", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/federation.test.ts b/packages/graphql/tests/schema/federation.test.ts index 5731de4740..a8670c5b9e 100644 --- a/packages/graphql/tests/schema/federation.test.ts +++ b/packages/graphql/tests/schema/federation.test.ts @@ -312,10 +312,10 @@ describe("Apollo Federation", () => { type Query { _service: _Service! posts(limit: Int, offset: Int, options: PostOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! + postsAggregate(where: PostWhere): PostAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\"\\") postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! @shareable - usersAggregate(where: UserWhere): UserAggregateSelection! @shareable + usersAggregate(where: UserWhere): UserAggregateSelection! @shareable @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\"\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! @shareable } @@ -868,10 +868,10 @@ describe("Apollo Federation", () => { _entities(representations: [_Any!]!): [_Entity]! _service: _Service! posts(limit: Int, offset: Int, options: PostOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! + postsAggregate(where: PostWhere): PostAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\"\\") postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! + usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\"\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } diff --git a/packages/graphql/tests/schema/fulltext.test.ts b/packages/graphql/tests/schema/fulltext.test.ts index 5120dc3907..9849a96574 100644 --- a/packages/graphql/tests/schema/fulltext.test.ts +++ b/packages/graphql/tests/schema/fulltext.test.ts @@ -217,7 +217,7 @@ describe("@fulltext schema", () => { \\"\\"\\" fulltext: MovieFulltext where: MovieWhere - ): MovieAggregateSelection! + ): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection( after: String first: Int diff --git a/packages/graphql/tests/schema/global-node.test.ts b/packages/graphql/tests/schema/global-node.test.ts index f1ba8170e8..8ce7529ee8 100644 --- a/packages/graphql/tests/schema/global-node.test.ts +++ b/packages/graphql/tests/schema/global-node.test.ts @@ -169,7 +169,7 @@ describe("Node Interface Types", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! \\"\\"\\"Fetches an object given its ID\\"\\"\\" node( diff --git a/packages/graphql/tests/schema/inheritance.test.ts b/packages/graphql/tests/schema/inheritance.test.ts index 017e0e67ff..3c5c83f3dd 100644 --- a/packages/graphql/tests/schema/inheritance.test.ts +++ b/packages/graphql/tests/schema/inheritance.test.ts @@ -608,10 +608,10 @@ describe("inheritance", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } diff --git a/packages/graphql/tests/schema/inputs.test.ts b/packages/graphql/tests/schema/inputs.test.ts index 77769583d2..fc13691648 100644 --- a/packages/graphql/tests/schema/inputs.test.ts +++ b/packages/graphql/tests/schema/inputs.test.ts @@ -159,7 +159,7 @@ describe("Inputs", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! name(input: NodeInput): String } diff --git a/packages/graphql/tests/schema/interface-relationships.test.ts b/packages/graphql/tests/schema/interface-relationships.test.ts index 034248fcdf..38b6012db9 100644 --- a/packages/graphql/tests/schema/interface-relationships.test.ts +++ b/packages/graphql/tests/schema/interface-relationships.test.ts @@ -553,16 +553,16 @@ describe("Interface Relationships", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -1777,19 +1777,19 @@ describe("Interface Relationships", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! episodes(limit: Int, offset: Int, options: EpisodeOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [EpisodeSort!], where: EpisodeWhere): [Episode!]! - episodesAggregate(where: EpisodeWhere): EpisodeAggregateSelection! + episodesAggregate(where: EpisodeWhere): EpisodeAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"episodesConnection\\\\\\"\\") episodesConnection(after: String, first: Int, sort: [EpisodeSort!], where: EpisodeWhere): EpisodesConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -3305,19 +3305,19 @@ describe("Interface Relationships", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! episodes(limit: Int, offset: Int, options: EpisodeOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [EpisodeSort!], where: EpisodeWhere): [Episode!]! - episodesAggregate(where: EpisodeWhere): EpisodeAggregateSelection! + episodesAggregate(where: EpisodeWhere): EpisodeAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"episodesConnection\\\\\\"\\") episodesConnection(after: String, first: Int, sort: [EpisodeSort!], where: EpisodeWhere): EpisodesConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -4188,25 +4188,25 @@ describe("Interface Relationships", () => { type Query { interface1s(limit: Int, offset: Int, options: Interface1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface1Sort!], where: Interface1Where): [Interface1!]! - interface1sAggregate(where: Interface1Where): Interface1AggregateSelection! + interface1sAggregate(where: Interface1Where): Interface1AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"interface1sConnection\\\\\\"\\") interface1sConnection(after: String, first: Int, sort: [Interface1Sort!], where: Interface1Where): Interface1sConnection! interface2s(limit: Int, offset: Int, options: Interface2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! - interface2sAggregate(where: Interface2Where): Interface2AggregateSelection! + interface2sAggregate(where: Interface2Where): Interface2AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"interface2sConnection\\\\\\"\\") interface2sConnection(after: String, first: Int, sort: [Interface2Sort!], where: Interface2Where): Interface2sConnection! type1Interface1s(limit: Int, offset: Int, options: Type1Interface1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Type1Interface1Sort!], where: Type1Interface1Where): [Type1Interface1!]! - type1Interface1sAggregate(where: Type1Interface1Where): Type1Interface1AggregateSelection! + type1Interface1sAggregate(where: Type1Interface1Where): Type1Interface1AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"type1Interface1sConnection\\\\\\"\\") type1Interface1sConnection(after: String, first: Int, sort: [Type1Interface1Sort!], where: Type1Interface1Where): Type1Interface1sConnection! type1Interface2s(limit: Int, offset: Int, options: Type1Interface2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Type1Interface2Sort!], where: Type1Interface2Where): [Type1Interface2!]! - type1Interface2sAggregate(where: Type1Interface2Where): Type1Interface2AggregateSelection! + type1Interface2sAggregate(where: Type1Interface2Where): Type1Interface2AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"type1Interface2sConnection\\\\\\"\\") type1Interface2sConnection(after: String, first: Int, sort: [Type1Interface2Sort!], where: Type1Interface2Where): Type1Interface2sConnection! type1s(limit: Int, offset: Int, options: Type1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Type1Sort!], where: Type1Where): [Type1!]! - type1sAggregate(where: Type1Where): Type1AggregateSelection! + type1sAggregate(where: Type1Where): Type1AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"type1sConnection\\\\\\"\\") type1sConnection(after: String, first: Int, sort: [Type1Sort!], where: Type1Where): Type1sConnection! type2Interface1s(limit: Int, offset: Int, options: Type2Interface1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Type2Interface1Sort!], where: Type2Interface1Where): [Type2Interface1!]! - type2Interface1sAggregate(where: Type2Interface1Where): Type2Interface1AggregateSelection! + type2Interface1sAggregate(where: Type2Interface1Where): Type2Interface1AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"type2Interface1sConnection\\\\\\"\\") type2Interface1sConnection(after: String, first: Int, sort: [Type2Interface1Sort!], where: Type2Interface1Where): Type2Interface1sConnection! type2Interface2s(limit: Int, offset: Int, options: Type2Interface2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Type2Interface2Sort!], where: Type2Interface2Where): [Type2Interface2!]! - type2Interface2sAggregate(where: Type2Interface2Where): Type2Interface2AggregateSelection! + type2Interface2sAggregate(where: Type2Interface2Where): Type2Interface2AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"type2Interface2sConnection\\\\\\"\\") type2Interface2sConnection(after: String, first: Int, sort: [Type2Interface2Sort!], where: Type2Interface2Where): Type2Interface2sConnection! } @@ -5506,25 +5506,25 @@ describe("Interface Relationships", () => { type Query { interface1s(limit: Int, offset: Int, options: Interface1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface1Sort!], where: Interface1Where): [Interface1!]! - interface1sAggregate(where: Interface1Where): Interface1AggregateSelection! + interface1sAggregate(where: Interface1Where): Interface1AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"interface1sConnection\\\\\\"\\") interface1sConnection(after: String, first: Int, sort: [Interface1Sort!], where: Interface1Where): Interface1sConnection! interface2s(limit: Int, offset: Int, options: Interface2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! - interface2sAggregate(where: Interface2Where): Interface2AggregateSelection! + interface2sAggregate(where: Interface2Where): Interface2AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"interface2sConnection\\\\\\"\\") interface2sConnection(after: String, first: Int, sort: [Interface2Sort!], where: Interface2Where): Interface2sConnection! type1Interface1s(limit: Int, offset: Int, options: Type1Interface1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Type1Interface1Sort!], where: Type1Interface1Where): [Type1Interface1!]! - type1Interface1sAggregate(where: Type1Interface1Where): Type1Interface1AggregateSelection! + type1Interface1sAggregate(where: Type1Interface1Where): Type1Interface1AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"type1Interface1sConnection\\\\\\"\\") type1Interface1sConnection(after: String, first: Int, sort: [Type1Interface1Sort!], where: Type1Interface1Where): Type1Interface1sConnection! type1Interface2s(limit: Int, offset: Int, options: Type1Interface2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Type1Interface2Sort!], where: Type1Interface2Where): [Type1Interface2!]! - type1Interface2sAggregate(where: Type1Interface2Where): Type1Interface2AggregateSelection! + type1Interface2sAggregate(where: Type1Interface2Where): Type1Interface2AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"type1Interface2sConnection\\\\\\"\\") type1Interface2sConnection(after: String, first: Int, sort: [Type1Interface2Sort!], where: Type1Interface2Where): Type1Interface2sConnection! type1s(limit: Int, offset: Int, options: Type1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Type1Sort!], where: Type1Where): [Type1!]! - type1sAggregate(where: Type1Where): Type1AggregateSelection! + type1sAggregate(where: Type1Where): Type1AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"type1sConnection\\\\\\"\\") type1sConnection(after: String, first: Int, sort: [Type1Sort!], where: Type1Where): Type1sConnection! type2Interface1s(limit: Int, offset: Int, options: Type2Interface1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Type2Interface1Sort!], where: Type2Interface1Where): [Type2Interface1!]! - type2Interface1sAggregate(where: Type2Interface1Where): Type2Interface1AggregateSelection! + type2Interface1sAggregate(where: Type2Interface1Where): Type2Interface1AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"type2Interface1sConnection\\\\\\"\\") type2Interface1sConnection(after: String, first: Int, sort: [Type2Interface1Sort!], where: Type2Interface1Where): Type2Interface1sConnection! type2Interface2s(limit: Int, offset: Int, options: Type2Interface2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Type2Interface2Sort!], where: Type2Interface2Where): [Type2Interface2!]! - type2Interface2sAggregate(where: Type2Interface2Where): Type2Interface2AggregateSelection! + type2Interface2sAggregate(where: Type2Interface2Where): Type2Interface2AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"type2Interface2sConnection\\\\\\"\\") type2Interface2sConnection(after: String, first: Int, sort: [Type2Interface2Sort!], where: Type2Interface2Where): Type2Interface2sConnection! } @@ -6805,25 +6805,25 @@ describe("Interface Relationships", () => { type Query { interface1s(limit: Int, offset: Int, options: Interface1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface1Sort!], where: Interface1Where): [Interface1!]! - interface1sAggregate(where: Interface1Where): Interface1AggregateSelection! + interface1sAggregate(where: Interface1Where): Interface1AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"interface1sConnection\\\\\\"\\") interface1sConnection(after: String, first: Int, sort: [Interface1Sort!], where: Interface1Where): Interface1sConnection! interface2s(limit: Int, offset: Int, options: Interface2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! - interface2sAggregate(where: Interface2Where): Interface2AggregateSelection! + interface2sAggregate(where: Interface2Where): Interface2AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"interface2sConnection\\\\\\"\\") interface2sConnection(after: String, first: Int, sort: [Interface2Sort!], where: Interface2Where): Interface2sConnection! type1Interface1s(limit: Int, offset: Int, options: Type1Interface1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Type1Interface1Sort!], where: Type1Interface1Where): [Type1Interface1!]! - type1Interface1sAggregate(where: Type1Interface1Where): Type1Interface1AggregateSelection! + type1Interface1sAggregate(where: Type1Interface1Where): Type1Interface1AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"type1Interface1sConnection\\\\\\"\\") type1Interface1sConnection(after: String, first: Int, sort: [Type1Interface1Sort!], where: Type1Interface1Where): Type1Interface1sConnection! type1Interface2s(limit: Int, offset: Int, options: Type1Interface2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Type1Interface2Sort!], where: Type1Interface2Where): [Type1Interface2!]! - type1Interface2sAggregate(where: Type1Interface2Where): Type1Interface2AggregateSelection! + type1Interface2sAggregate(where: Type1Interface2Where): Type1Interface2AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"type1Interface2sConnection\\\\\\"\\") type1Interface2sConnection(after: String, first: Int, sort: [Type1Interface2Sort!], where: Type1Interface2Where): Type1Interface2sConnection! type1s(limit: Int, offset: Int, options: Type1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Type1Sort!], where: Type1Where): [Type1!]! - type1sAggregate(where: Type1Where): Type1AggregateSelection! + type1sAggregate(where: Type1Where): Type1AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"type1sConnection\\\\\\"\\") type1sConnection(after: String, first: Int, sort: [Type1Sort!], where: Type1Where): Type1sConnection! type2Interface1s(limit: Int, offset: Int, options: Type2Interface1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Type2Interface1Sort!], where: Type2Interface1Where): [Type2Interface1!]! - type2Interface1sAggregate(where: Type2Interface1Where): Type2Interface1AggregateSelection! + type2Interface1sAggregate(where: Type2Interface1Where): Type2Interface1AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"type2Interface1sConnection\\\\\\"\\") type2Interface1sConnection(after: String, first: Int, sort: [Type2Interface1Sort!], where: Type2Interface1Where): Type2Interface1sConnection! type2Interface2s(limit: Int, offset: Int, options: Type2Interface2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Type2Interface2Sort!], where: Type2Interface2Where): [Type2Interface2!]! - type2Interface2sAggregate(where: Type2Interface2Where): Type2Interface2AggregateSelection! + type2Interface2sAggregate(where: Type2Interface2Where): Type2Interface2AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"type2Interface2sConnection\\\\\\"\\") type2Interface2sConnection(after: String, first: Int, sort: [Type2Interface2Sort!], where: Type2Interface2Where): Type2Interface2sConnection! } @@ -8696,16 +8696,16 @@ describe("Interface Relationships", () => { type Query { comments(limit: Int, offset: Int, options: CommentOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [CommentSort!], where: CommentWhere): [Comment!]! - commentsAggregate(where: CommentWhere): CommentAggregateSelection! + commentsAggregate(where: CommentWhere): CommentAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"commentsConnection\\\\\\"\\") commentsConnection(after: String, first: Int, sort: [CommentSort!], where: CommentWhere): CommentsConnection! contents(limit: Int, offset: Int, options: ContentOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ContentSort!], where: ContentWhere): [Content!]! - contentsAggregate(where: ContentWhere): ContentAggregateSelection! + contentsAggregate(where: ContentWhere): ContentAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"contentsConnection\\\\\\"\\") contentsConnection(after: String, first: Int, sort: [ContentSort!], where: ContentWhere): ContentsConnection! posts(limit: Int, offset: Int, options: PostOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! + postsAggregate(where: PostWhere): PostAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\"\\") postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! + usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\"\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } @@ -9651,19 +9651,19 @@ describe("Interface Relationships", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! shows(limit: Int, offset: Int, options: ShowOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ShowSort!], where: ShowWhere): [Show!]! - showsAggregate(where: ShowWhere): ShowAggregateSelection! + showsAggregate(where: ShowWhere): ShowAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"showsConnection\\\\\\"\\") showsConnection(after: String, first: Int, sort: [ShowSort!], where: ShowWhere): ShowsConnection! } diff --git a/packages/graphql/tests/schema/interfaces.test.ts b/packages/graphql/tests/schema/interfaces.test.ts index 0542193f3b..e1634e6c5e 100644 --- a/packages/graphql/tests/schema/interfaces.test.ts +++ b/packages/graphql/tests/schema/interfaces.test.ts @@ -438,10 +438,10 @@ describe("Interfaces", () => { type Query { movieNodes(limit: Int, offset: Int, options: MovieNodeOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieNodeSort!], where: MovieNodeWhere): [MovieNode!]! - movieNodesAggregate(where: MovieNodeWhere): MovieNodeAggregateSelection! + movieNodesAggregate(where: MovieNodeWhere): MovieNodeAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"movieNodesConnection\\\\\\"\\") movieNodesConnection(after: String, first: Int, sort: [MovieNodeSort!], where: MovieNodeWhere): MovieNodesConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -888,10 +888,10 @@ describe("Interfaces", () => { type Query { movieNodes(limit: Int, offset: Int, options: MovieNodeOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieNodeSort!], where: MovieNodeWhere): [MovieNode!]! - movieNodesAggregate(where: MovieNodeWhere): MovieNodeAggregateSelection! + movieNodesAggregate(where: MovieNodeWhere): MovieNodeAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"movieNodesConnection\\\\\\"\\") movieNodesConnection(after: String, first: Int, sort: [MovieNodeSort!], where: MovieNodeWhere): MovieNodesConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/issues/1038.test.ts b/packages/graphql/tests/schema/issues/1038.test.ts index 43567b37f7..7c71e237e5 100644 --- a/packages/graphql/tests/schema/issues/1038.test.ts +++ b/packages/graphql/tests/schema/issues/1038.test.ts @@ -249,10 +249,10 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { type Query { awsAccounts(limit: Int, offset: Int, options: AWSAccountOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [AWSAccountSort!], where: AWSAccountWhere): [AWSAccount!]! - awsAccountsAggregate(where: AWSAccountWhere): AWSAccountAggregateSelection! + awsAccountsAggregate(where: AWSAccountWhere): AWSAccountAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"awsAccountsConnection\\\\\\"\\") awsAccountsConnection(after: String, first: Int, sort: [AWSAccountSort!], where: AWSAccountWhere): AwsAccountsConnection! dnsZones(limit: Int, offset: Int, options: DNSZoneOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [DNSZoneSort!], where: DNSZoneWhere): [DNSZone!]! - dnsZonesAggregate(where: DNSZoneWhere): DNSZoneAggregateSelection! + dnsZonesAggregate(where: DNSZoneWhere): DNSZoneAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"dnsZonesConnection\\\\\\"\\") dnsZonesConnection(after: String, first: Int, sort: [DNSZoneSort!], where: DNSZoneWhere): DnsZonesConnection! } diff --git a/packages/graphql/tests/schema/issues/1182.test.ts b/packages/graphql/tests/schema/issues/1182.test.ts index 93bf16aaf7..b1702f63f4 100644 --- a/packages/graphql/tests/schema/issues/1182.test.ts +++ b/packages/graphql/tests/schema/issues/1182.test.ts @@ -500,10 +500,10 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/issues/1575.test.ts b/packages/graphql/tests/schema/issues/1575.test.ts index 3e1fa2c2b1..d8a17da50b 100644 --- a/packages/graphql/tests/schema/issues/1575.test.ts +++ b/packages/graphql/tests/schema/issues/1575.test.ts @@ -180,7 +180,7 @@ describe("https://github.com/neo4j/graphql/issues/1575", () => { type Query { foos(limit: Int, offset: Int, options: FooOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [FooSort!], where: FooWhere): [Foo!]! - foosAggregate(where: FooWhere): FooAggregateSelection! + foosAggregate(where: FooWhere): FooAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"foosConnection\\\\\\"\\") foosConnection(after: String, first: Int, sort: [FooSort!], where: FooWhere): FoosConnection! } diff --git a/packages/graphql/tests/schema/issues/1614.test.ts b/packages/graphql/tests/schema/issues/1614.test.ts index f69350f7f1..e3534dc17a 100644 --- a/packages/graphql/tests/schema/issues/1614.test.ts +++ b/packages/graphql/tests/schema/issues/1614.test.ts @@ -370,10 +370,10 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { type Query { crewMembers(limit: Int, offset: Int, options: CrewMemberOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: CrewMemberWhere): [CrewMember!]! - crewMembersAggregate(where: CrewMemberWhere): CrewMemberAggregateSelection! + crewMembersAggregate(where: CrewMemberWhere): CrewMemberAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"crewMembersConnection\\\\\\"\\") crewMembersConnection(after: String, first: Int, where: CrewMemberWhere): CrewMembersConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/issues/162.test.ts b/packages/graphql/tests/schema/issues/162.test.ts index c1ba32fa0f..7437c84f7f 100644 --- a/packages/graphql/tests/schema/issues/162.test.ts +++ b/packages/graphql/tests/schema/issues/162.test.ts @@ -113,13 +113,13 @@ describe("162", () => { type Query { tigerJawLevel2Part1s(limit: Int, offset: Int, options: TigerJawLevel2Part1Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [TigerJawLevel2Part1Sort!], where: TigerJawLevel2Part1Where): [TigerJawLevel2Part1!]! - tigerJawLevel2Part1sAggregate(where: TigerJawLevel2Part1Where): TigerJawLevel2Part1AggregateSelection! + tigerJawLevel2Part1sAggregate(where: TigerJawLevel2Part1Where): TigerJawLevel2Part1AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"tigerJawLevel2Part1sConnection\\\\\\"\\") tigerJawLevel2Part1sConnection(after: String, first: Int, sort: [TigerJawLevel2Part1Sort!], where: TigerJawLevel2Part1Where): TigerJawLevel2Part1sConnection! tigerJawLevel2s(limit: Int, offset: Int, options: TigerJawLevel2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [TigerJawLevel2Sort!], where: TigerJawLevel2Where): [TigerJawLevel2!]! - tigerJawLevel2sAggregate(where: TigerJawLevel2Where): TigerJawLevel2AggregateSelection! + tigerJawLevel2sAggregate(where: TigerJawLevel2Where): TigerJawLevel2AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"tigerJawLevel2sConnection\\\\\\"\\") tigerJawLevel2sConnection(after: String, first: Int, sort: [TigerJawLevel2Sort!], where: TigerJawLevel2Where): TigerJawLevel2sConnection! tigers(limit: Int, offset: Int, options: TigerOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [TigerSort!], where: TigerWhere): [Tiger!]! - tigersAggregate(where: TigerWhere): TigerAggregateSelection! + tigersAggregate(where: TigerWhere): TigerAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"tigersConnection\\\\\\"\\") tigersConnection(after: String, first: Int, sort: [TigerSort!], where: TigerWhere): TigersConnection! } diff --git a/packages/graphql/tests/schema/issues/200.test.ts b/packages/graphql/tests/schema/issues/200.test.ts index b9284c414d..c7b2b2f393 100644 --- a/packages/graphql/tests/schema/issues/200.test.ts +++ b/packages/graphql/tests/schema/issues/200.test.ts @@ -182,7 +182,7 @@ describe("200", () => { type Query { categories(limit: Int, offset: Int, options: CategoryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [CategorySort!], where: CategoryWhere): [Category!]! - categoriesAggregate(where: CategoryWhere): CategoryAggregateSelection! + categoriesAggregate(where: CategoryWhere): CategoryAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"categoriesConnection\\\\\\"\\") categoriesConnection(after: String, first: Int, sort: [CategorySort!], where: CategoryWhere): CategoriesConnection! } diff --git a/packages/graphql/tests/schema/issues/2187.test.ts b/packages/graphql/tests/schema/issues/2187.test.ts index 7844ae7ff3..4a60ac060a 100644 --- a/packages/graphql/tests/schema/issues/2187.test.ts +++ b/packages/graphql/tests/schema/issues/2187.test.ts @@ -621,10 +621,10 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { type Query { genres(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\"\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/issues/2377.test.ts b/packages/graphql/tests/schema/issues/2377.test.ts index 20b63bf677..76c2219d33 100644 --- a/packages/graphql/tests/schema/issues/2377.test.ts +++ b/packages/graphql/tests/schema/issues/2377.test.ts @@ -140,10 +140,10 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { type Query { resourceEntities(limit: Int, offset: Int, options: ResourceEntityOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ResourceEntitySort!], where: ResourceEntityWhere): [ResourceEntity!]! - resourceEntitiesAggregate(where: ResourceEntityWhere): ResourceEntityAggregateSelection! + resourceEntitiesAggregate(where: ResourceEntityWhere): ResourceEntityAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"resourceEntitiesConnection\\\\\\"\\") resourceEntitiesConnection(after: String, first: Int, sort: [ResourceEntitySort!], where: ResourceEntityWhere): ResourceEntitiesConnection! resources(limit: Int, offset: Int, options: ResourceOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ResourceSort!], where: ResourceWhere): [Resource!]! - resourcesAggregate(where: ResourceWhere): ResourceAggregateSelection! + resourcesAggregate(where: ResourceWhere): ResourceAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"resourcesConnection\\\\\\"\\") resourcesConnection(after: String, first: Int, sort: [ResourceSort!], where: ResourceWhere): ResourcesConnection! } diff --git a/packages/graphql/tests/schema/issues/2969.test.ts b/packages/graphql/tests/schema/issues/2969.test.ts index 39b326d367..0a67146e58 100644 --- a/packages/graphql/tests/schema/issues/2969.test.ts +++ b/packages/graphql/tests/schema/issues/2969.test.ts @@ -303,10 +303,10 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { type Query { posts(limit: Int, offset: Int, options: PostOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! + postsAggregate(where: PostWhere): PostAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\"\\") postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! + usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\"\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } diff --git a/packages/graphql/tests/schema/issues/2981.test.ts b/packages/graphql/tests/schema/issues/2981.test.ts index 3fb8b0436e..3bac9afaf1 100644 --- a/packages/graphql/tests/schema/issues/2981.test.ts +++ b/packages/graphql/tests/schema/issues/2981.test.ts @@ -769,14 +769,14 @@ describe("https://github.com/neo4j/graphql/issues/2981", () => { type Query { bookTitleEns(limit: Int, offset: Int, options: BookTitle_ENOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [BookTitle_ENSort!], where: BookTitle_ENWhere): [BookTitle_EN!]! - bookTitleEnsAggregate(where: BookTitle_ENWhere): BookTitle_ENAggregateSelection! + bookTitleEnsAggregate(where: BookTitle_ENWhere): BookTitle_ENAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"bookTitleEnsConnection\\\\\\"\\") bookTitleEnsConnection(after: String, first: Int, sort: [BookTitle_ENSort!], where: BookTitle_ENWhere): BookTitleEnsConnection! bookTitleSvs(limit: Int, offset: Int, options: BookTitle_SVOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [BookTitle_SVSort!], where: BookTitle_SVWhere): [BookTitle_SV!]! - bookTitleSvsAggregate(where: BookTitle_SVWhere): BookTitle_SVAggregateSelection! + bookTitleSvsAggregate(where: BookTitle_SVWhere): BookTitle_SVAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"bookTitleSvsConnection\\\\\\"\\") bookTitleSvsConnection(after: String, first: Int, sort: [BookTitle_SVSort!], where: BookTitle_SVWhere): BookTitleSvsConnection! bookTitles(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: BookTitleWhere): [BookTitle!]! books(limit: Int, offset: Int, options: BookOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [BookSort!], where: BookWhere): [Book!]! - booksAggregate(where: BookWhere): BookAggregateSelection! + booksAggregate(where: BookWhere): BookAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"booksConnection\\\\\\"\\") booksConnection(after: String, first: Int, sort: [BookSort!], where: BookWhere): BooksConnection! } diff --git a/packages/graphql/tests/schema/issues/2993.test.ts b/packages/graphql/tests/schema/issues/2993.test.ts index 9bc0f7ad11..3108dc9c12 100644 --- a/packages/graphql/tests/schema/issues/2993.test.ts +++ b/packages/graphql/tests/schema/issues/2993.test.ts @@ -235,10 +235,10 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { type Query { profiles(limit: Int, offset: Int, options: ProfileOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProfileSort!], where: ProfileWhere): [Profile!]! - profilesAggregate(where: ProfileWhere): ProfileAggregateSelection! + profilesAggregate(where: ProfileWhere): ProfileAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"profilesConnection\\\\\\"\\") profilesConnection(after: String, first: Int, sort: [ProfileSort!], where: ProfileWhere): ProfilesConnection! users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! + usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\"\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } diff --git a/packages/graphql/tests/schema/issues/3428.test.ts b/packages/graphql/tests/schema/issues/3428.test.ts index 7713de24e3..2478eeaa65 100644 --- a/packages/graphql/tests/schema/issues/3428.test.ts +++ b/packages/graphql/tests/schema/issues/3428.test.ts @@ -342,10 +342,10 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -732,14 +732,14 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! personOnes(limit: Int, offset: Int, options: PersonOneOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! + personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\"\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, options: PersonTwoOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! + personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\"\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } diff --git a/packages/graphql/tests/schema/issues/3439.test.ts b/packages/graphql/tests/schema/issues/3439.test.ts index 9813fd03b3..2d5def3919 100644 --- a/packages/graphql/tests/schema/issues/3439.test.ts +++ b/packages/graphql/tests/schema/issues/3439.test.ts @@ -818,19 +818,19 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { type Query { genres(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\"\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! iNodes(limit: Int, offset: Int, options: INodeOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [INodeSort!], where: INodeWhere): [INode!]! - iNodesAggregate(where: INodeWhere): INodeAggregateSelection! + iNodesAggregate(where: INodeWhere): INodeAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"iNodesConnection\\\\\\"\\") iNodesConnection(after: String, first: Int, sort: [INodeSort!], where: INodeWhere): INodesConnection! iProducts(limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! - iProductsAggregate(where: IProductWhere): IProductAggregateSelection! + iProductsAggregate(where: IProductWhere): IProductAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"iProductsConnection\\\\\\"\\") iProductsConnection(after: String, first: Int, sort: [IProductSort!], where: IProductWhere): IProductsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -1861,16 +1861,16 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { type Query { genres(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\"\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! iProducts(limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! - iProductsAggregate(where: IProductWhere): IProductAggregateSelection! + iProductsAggregate(where: IProductWhere): IProductAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"iProductsConnection\\\\\\"\\") iProductsConnection(after: String, first: Int, sort: [IProductSort!], where: IProductWhere): IProductsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -3153,16 +3153,16 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { type Query { genres(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\"\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! iProducts(limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! - iProductsAggregate(where: IProductWhere): IProductAggregateSelection! + iProductsAggregate(where: IProductWhere): IProductAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"iProductsConnection\\\\\\"\\") iProductsConnection(after: String, first: Int, sort: [IProductSort!], where: IProductWhere): IProductsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -4501,19 +4501,19 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { type Query { genres(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\"\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! iProducts(limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! - iProductsAggregate(where: IProductWhere): IProductAggregateSelection! + iProductsAggregate(where: IProductWhere): IProductAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"iProductsConnection\\\\\\"\\") iProductsConnection(after: String, first: Int, sort: [IProductSort!], where: IProductWhere): IProductsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! ratings(limit: Int, offset: Int, options: RatingOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [RatingSort!], where: RatingWhere): [Rating!]! - ratingsAggregate(where: RatingWhere): RatingAggregateSelection! + ratingsAggregate(where: RatingWhere): RatingAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"ratingsConnection\\\\\\"\\") ratingsConnection(after: String, first: Int, sort: [RatingSort!], where: RatingWhere): RatingsConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! uGenres(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: UGenreWhere): [UGenre!]! } diff --git a/packages/graphql/tests/schema/issues/3537.test.ts b/packages/graphql/tests/schema/issues/3537.test.ts index 6bddfdeda6..ee2474f474 100644 --- a/packages/graphql/tests/schema/issues/3537.test.ts +++ b/packages/graphql/tests/schema/issues/3537.test.ts @@ -467,10 +467,10 @@ describe("Extending the schema in when using getSubgraphSchema", () => { type Query { _service: _Service! actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -810,10 +810,10 @@ describe("Extending the schema in when using getSubgraphSchema", () => { type Query { _service: _Service! actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/issues/3541.test.ts b/packages/graphql/tests/schema/issues/3541.test.ts index c28b9f3a62..a72d691e15 100644 --- a/packages/graphql/tests/schema/issues/3541.test.ts +++ b/packages/graphql/tests/schema/issues/3541.test.ts @@ -286,10 +286,10 @@ describe("Extending the schema in when using getSubgraphSchema", () => { _entities(representations: [_Any!]!): [_Entity]! _service: _Service! actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! @shareable - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @shareable + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @shareable @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! @shareable } @@ -665,7 +665,7 @@ describe("Extending the schema in when using getSubgraphSchema", () => { _entities(representations: [_Any!]!): [_Entity]! _service: _Service! actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! } diff --git a/packages/graphql/tests/schema/issues/3698.test.ts b/packages/graphql/tests/schema/issues/3698.test.ts index c31e6a3c42..ac2628ebcc 100644 --- a/packages/graphql/tests/schema/issues/3698.test.ts +++ b/packages/graphql/tests/schema/issues/3698.test.ts @@ -770,13 +770,13 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { type Query { genres(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\"\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! iProducts(limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! - iProductsAggregate(where: IProductWhere): IProductAggregateSelection! + iProductsAggregate(where: IProductWhere): IProductAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"iProductsConnection\\\\\\"\\") iProductsConnection(after: String, first: Int, sort: [IProductSort!], where: IProductWhere): IProductsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1659,13 +1659,13 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { type Query { genres(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\"\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! iProducts(limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! - iProductsAggregate(where: IProductWhere): IProductAggregateSelection! + iProductsAggregate(where: IProductWhere): IProductAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"iProductsConnection\\\\\\"\\") iProductsConnection(after: String, first: Int, sort: [IProductSort!], where: IProductWhere): IProductsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -2566,16 +2566,16 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { type Query { genres(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\"\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! iProducts(limit: Int, offset: Int, options: IProductOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [IProductSort!], where: IProductWhere): [IProduct!]! - iProductsAggregate(where: IProductWhere): IProductAggregateSelection! + iProductsAggregate(where: IProductWhere): IProductAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"iProductsConnection\\\\\\"\\") iProductsConnection(after: String, first: Int, sort: [IProductSort!], where: IProductWhere): IProductsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } diff --git a/packages/graphql/tests/schema/issues/3816.test.ts b/packages/graphql/tests/schema/issues/3816.test.ts index 4ef81f41f5..a45303f8bb 100644 --- a/packages/graphql/tests/schema/issues/3816.test.ts +++ b/packages/graphql/tests/schema/issues/3816.test.ts @@ -484,10 +484,10 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { type Query { genres(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\"\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -939,10 +939,10 @@ describe("https://github.com/neo4j/graphql/issues/3816", () => { type Query { genres(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\"\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/issues/3817.test.ts b/packages/graphql/tests/schema/issues/3817.test.ts index 875c98a3f6..de2d1bcc3e 100644 --- a/packages/graphql/tests/schema/issues/3817.test.ts +++ b/packages/graphql/tests/schema/issues/3817.test.ts @@ -406,7 +406,7 @@ describe("3817", () => { type Query { people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } diff --git a/packages/graphql/tests/schema/issues/4511.test.ts b/packages/graphql/tests/schema/issues/4511.test.ts index 6f8e97647d..f88d953113 100644 --- a/packages/graphql/tests/schema/issues/4511.test.ts +++ b/packages/graphql/tests/schema/issues/4511.test.ts @@ -743,19 +743,19 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { type Query { creatures(limit: Int, offset: Int, options: CreatureOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: CreatureWhere): [Creature!]! - creaturesAggregate(where: CreatureWhere): CreatureAggregateSelection! + creaturesAggregate(where: CreatureWhere): CreatureAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"creaturesConnection\\\\\\"\\") creaturesConnection(after: String, first: Int, where: CreatureWhere): CreaturesConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } diff --git a/packages/graphql/tests/schema/issues/4615.test.ts b/packages/graphql/tests/schema/issues/4615.test.ts index 746411ecc6..2c2198ee92 100644 --- a/packages/graphql/tests/schema/issues/4615.test.ts +++ b/packages/graphql/tests/schema/issues/4615.test.ts @@ -636,16 +636,16 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! shows(limit: Int, offset: Int, options: ShowOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ShowSort!], where: ShowWhere): [Show!]! - showsAggregate(where: ShowWhere): ShowAggregateSelection! + showsAggregate(where: ShowWhere): ShowAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"showsConnection\\\\\\"\\") showsConnection(after: String, first: Int, sort: [ShowSort!], where: ShowWhere): ShowsConnection! } diff --git a/packages/graphql/tests/schema/issues/5428.test.ts b/packages/graphql/tests/schema/issues/5428.test.ts index c0688a38e5..20b4403f1c 100644 --- a/packages/graphql/tests/schema/issues/5428.test.ts +++ b/packages/graphql/tests/schema/issues/5428.test.ts @@ -77,7 +77,7 @@ describe("https://github.com/neo4j/graphql/issues/5428", () => { type Query { test(limit: Int, offset: Int, options: TestOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [TestSort!], where: TestWhere): [Test!]! - testAggregate(where: TestWhere): TestAggregateSelection! + testAggregate(where: TestWhere): TestAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"testConnection\\\\\\"\\") testConnection(after: String, first: Int, sort: [TestSort!], where: TestWhere): TestConnection! } diff --git a/packages/graphql/tests/schema/issues/5631.test.ts b/packages/graphql/tests/schema/issues/5631.test.ts index 8c20badaf8..b4c14bff0e 100644 --- a/packages/graphql/tests/schema/issues/5631.test.ts +++ b/packages/graphql/tests/schema/issues/5631.test.ts @@ -231,10 +231,10 @@ describe("https://github.com/neo4j/graphql/issues/5631", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/issues/609.test.ts b/packages/graphql/tests/schema/issues/609.test.ts index e97e08fa3f..79ae9ef267 100644 --- a/packages/graphql/tests/schema/issues/609.test.ts +++ b/packages/graphql/tests/schema/issues/609.test.ts @@ -142,7 +142,7 @@ describe("609", () => { type Query { deprecateds(limit: Int, offset: Int, options: DeprecatedOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [DeprecatedSort!], where: DeprecatedWhere): [Deprecated!]! - deprecatedsAggregate(where: DeprecatedWhere): DeprecatedAggregateSelection! + deprecatedsAggregate(where: DeprecatedWhere): DeprecatedAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"deprecatedsConnection\\\\\\"\\") deprecatedsConnection(after: String, first: Int, sort: [DeprecatedSort!], where: DeprecatedWhere): DeprecatedsConnection! } diff --git a/packages/graphql/tests/schema/issues/872.test.ts b/packages/graphql/tests/schema/issues/872.test.ts index 70bb877990..19443f4eed 100644 --- a/packages/graphql/tests/schema/issues/872.test.ts +++ b/packages/graphql/tests/schema/issues/872.test.ts @@ -653,13 +653,13 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { type Query { actor2s(limit: Int, offset: Int, options: Actor2Options @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [Actor2Sort!], where: Actor2Where): [Actor2!]! - actor2sAggregate(where: Actor2Where): Actor2AggregateSelection! + actor2sAggregate(where: Actor2Where): Actor2AggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actor2sConnection\\\\\\"\\") actor2sConnection(after: String, first: Int, sort: [Actor2Sort!], where: Actor2Where): Actor2sConnection! actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/lowercase-type-names.test.ts b/packages/graphql/tests/schema/lowercase-type-names.test.ts index a984b0a242..db8b711ccb 100644 --- a/packages/graphql/tests/schema/lowercase-type-names.test.ts +++ b/packages/graphql/tests/schema/lowercase-type-names.test.ts @@ -124,10 +124,10 @@ describe("lower case type names", () => { type Query { actors(limit: Int, offset: Int, options: actorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [actorSort!], where: actorWhere): [actor!]! - actorsAggregate(where: actorWhere): actorAggregateSelection! + actorsAggregate(where: actorWhere): actorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [actorSort!], where: actorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: movieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [movieSort!], where: movieWhere): [movie!]! - moviesAggregate(where: movieWhere): movieAggregateSelection! + moviesAggregate(where: movieWhere): movieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [movieSort!], where: movieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/math.test.ts b/packages/graphql/tests/schema/math.test.ts index 0415cded33..da4b74299a 100644 --- a/packages/graphql/tests/schema/math.test.ts +++ b/packages/graphql/tests/schema/math.test.ts @@ -170,7 +170,7 @@ describe("Algebraic", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -351,7 +351,7 @@ describe("Algebraic", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -530,7 +530,7 @@ describe("Algebraic", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1085,10 +1085,10 @@ describe("Algebraic", () => { type Query { directors(limit: Int, offset: Int, options: DirectorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [DirectorSort!], where: DirectorWhere): [Director!]! - directorsAggregate(where: DirectorWhere): DirectorAggregateSelection! + directorsAggregate(where: DirectorWhere): DirectorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"directorsConnection\\\\\\"\\") directorsConnection(after: String, first: Int, sort: [DirectorSort!], where: DirectorWhere): DirectorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1729,13 +1729,13 @@ describe("Algebraic", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! } @@ -2389,10 +2389,10 @@ describe("Algebraic", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } 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 84c25eebcc..81b498e396 100644 --- a/packages/graphql/tests/schema/nested-aggregation-on-type.test.ts +++ b/packages/graphql/tests/schema/nested-aggregation-on-type.test.ts @@ -514,10 +514,10 @@ describe("nested aggregation on interface", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/null.test.ts b/packages/graphql/tests/schema/null.test.ts index 0d8193da81..11cc296357 100644 --- a/packages/graphql/tests/schema/null.test.ts +++ b/packages/graphql/tests/schema/null.test.ts @@ -342,7 +342,7 @@ describe("Null", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/pluralize-consistency.test.ts b/packages/graphql/tests/schema/pluralize-consistency.test.ts index fd5cc84244..7eedac0451 100644 --- a/packages/graphql/tests/schema/pluralize-consistency.test.ts +++ b/packages/graphql/tests/schema/pluralize-consistency.test.ts @@ -88,10 +88,10 @@ describe("Pluralize consistency", () => { type Query { superFriends(limit: Int, offset: Int, options: super_friendOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [super_friendSort!], where: super_friendWhere): [super_friend!]! - superFriendsAggregate(where: super_friendWhere): super_friendAggregateSelection! + superFriendsAggregate(where: super_friendWhere): super_friendAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"superFriendsConnection\\\\\\"\\") superFriendsConnection(after: String, first: Int, sort: [super_friendSort!], where: super_friendWhere): SuperFriendsConnection! superUsers(limit: Int, offset: Int, options: super_userOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [super_userSort!], where: super_userWhere): [super_user!]! - superUsersAggregate(where: super_userWhere): super_userAggregateSelection! + superUsersAggregate(where: super_userWhere): super_userAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"superUsersConnection\\\\\\"\\") superUsersConnection(after: String, first: Int, sort: [super_userSort!], where: super_userWhere): SuperUsersConnection! } diff --git a/packages/graphql/tests/schema/query-direction.test.ts b/packages/graphql/tests/schema/query-direction.test.ts index 0a1cfbae51..74109bdb1b 100644 --- a/packages/graphql/tests/schema/query-direction.test.ts +++ b/packages/graphql/tests/schema/query-direction.test.ts @@ -76,7 +76,7 @@ describe("Query Direction", () => { type Query { users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! + usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\"\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } @@ -382,7 +382,7 @@ describe("Query Direction", () => { type Query { users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! + usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\"\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } diff --git a/packages/graphql/tests/schema/remove-deprecated/aggregations.test.ts b/packages/graphql/tests/schema/remove-deprecated/aggregations.test.ts index fd9adc503a..1bcf926cf3 100644 --- a/packages/graphql/tests/schema/remove-deprecated/aggregations.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/aggregations.test.ts @@ -389,10 +389,10 @@ describe("Aggregations", () => { type Query { posts(limit: Int, offset: Int, options: PostOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! + postsAggregate(where: PostWhere): PostAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\"\\") postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! + usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\"\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } diff --git a/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts b/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts index e4614b5351..377304dc9a 100644 --- a/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts @@ -635,10 +635,10 @@ describe("Arrays Methods", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/remove-deprecated/comments.test.ts b/packages/graphql/tests/schema/remove-deprecated/comments.test.ts index 73a4a863f5..3fa86568cd 100644 --- a/packages/graphql/tests/schema/remove-deprecated/comments.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/comments.test.ts @@ -265,7 +265,7 @@ describe("Comments", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -644,10 +644,10 @@ describe("Comments", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1220,16 +1220,16 @@ describe("Comments", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -1740,10 +1740,10 @@ describe("Comments", () => { type Query { genres(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\"\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! searches(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: SearchWhere): [Search!]! } diff --git a/packages/graphql/tests/schema/remove-deprecated/connect-or-create.test.ts b/packages/graphql/tests/schema/remove-deprecated/connect-or-create.test.ts index bcffd61c81..926f95af34 100644 --- a/packages/graphql/tests/schema/remove-deprecated/connect-or-create.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/connect-or-create.test.ts @@ -396,10 +396,10 @@ describe("Connect Or Create", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts b/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts index c7a87f3e7b..a02c012703 100644 --- a/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts @@ -821,16 +821,16 @@ describe("Deprecated directed argument", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! genres(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\"\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! searches(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: SearchWhere): [Search!]! } diff --git a/packages/graphql/tests/schema/remove-deprecated/implicit-equality.test.ts b/packages/graphql/tests/schema/remove-deprecated/implicit-equality.test.ts index 18e3da8938..7ca0a21b6a 100644 --- a/packages/graphql/tests/schema/remove-deprecated/implicit-equality.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/implicit-equality.test.ts @@ -598,10 +598,10 @@ describe("Implicit Equality filters", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts b/packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts index e79043aa75..4e2187f545 100644 --- a/packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts @@ -613,10 +613,10 @@ describe("Implicit SET field", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts b/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts index 63ae23d658..dbbe1e7d15 100644 --- a/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts @@ -773,16 +773,16 @@ describe("Deprecated options argument", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\"\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! searches(limit: Int, offset: Int, where: SearchWhere): [Search!]! } diff --git a/packages/graphql/tests/schema/remove-deprecated/query-direction.test.ts b/packages/graphql/tests/schema/remove-deprecated/query-direction.test.ts index 945a9d3e67..41b2706767 100644 --- a/packages/graphql/tests/schema/remove-deprecated/query-direction.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/query-direction.test.ts @@ -77,7 +77,7 @@ describe("Query Direction", () => { type Query { users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! + usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\"\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } @@ -383,7 +383,7 @@ describe("Query Direction", () => { type Query { users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! + usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\"\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } @@ -689,7 +689,7 @@ describe("Query Direction", () => { type Query { users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! + usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\"\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } diff --git a/packages/graphql/tests/schema/remove-deprecated/typename_IN.test.ts b/packages/graphql/tests/schema/remove-deprecated/typename_IN.test.ts index a6fe109979..1856401d4e 100644 --- a/packages/graphql/tests/schema/remove-deprecated/typename_IN.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/typename_IN.test.ts @@ -268,13 +268,13 @@ describe("typename_IN", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } diff --git a/packages/graphql/tests/schema/scalar.test.ts b/packages/graphql/tests/schema/scalar.test.ts index aff6e9deb1..7d75afbc53 100644 --- a/packages/graphql/tests/schema/scalar.test.ts +++ b/packages/graphql/tests/schema/scalar.test.ts @@ -176,7 +176,7 @@ describe("Scalar", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/simple.test.ts b/packages/graphql/tests/schema/simple.test.ts index a28ae74c3d..888fa887b0 100644 --- a/packages/graphql/tests/schema/simple.test.ts +++ b/packages/graphql/tests/schema/simple.test.ts @@ -205,7 +205,7 @@ describe("Simple", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/string-comparators.test.ts b/packages/graphql/tests/schema/string-comparators.test.ts index 9fdfc686e0..9ef5f41000 100644 --- a/packages/graphql/tests/schema/string-comparators.test.ts +++ b/packages/graphql/tests/schema/string-comparators.test.ts @@ -158,7 +158,7 @@ describe("String Comparators", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -313,7 +313,7 @@ describe("String Comparators", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -479,7 +479,7 @@ describe("String Comparators", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1125,10 +1125,10 @@ describe("String Comparators", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/subscriptions.test.ts b/packages/graphql/tests/schema/subscriptions.test.ts index d1c718afbd..a1f482dbb0 100644 --- a/packages/graphql/tests/schema/subscriptions.test.ts +++ b/packages/graphql/tests/schema/subscriptions.test.ts @@ -530,10 +530,10 @@ describe("Subscriptions", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1215,10 +1215,10 @@ describe("Subscriptions", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1968,13 +1968,13 @@ describe("Subscriptions", () => { type Query { actors(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ActorWhere): [Actor!]! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! stars(limit: Int, offset: Int, options: StarOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: StarWhere): [Star!]! - starsAggregate(where: StarWhere): StarAggregateSelection! + starsAggregate(where: StarWhere): StarAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"starsConnection\\\\\\"\\") starsConnection(after: String, first: Int, where: StarWhere): StarsConnection! } @@ -2994,10 +2994,10 @@ describe("Subscriptions", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -3492,10 +3492,10 @@ describe("Subscriptions", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -3876,10 +3876,10 @@ describe("Subscriptions", () => { type Query { agreements(limit: Int, offset: Int, options: AgreementOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [AgreementSort!], where: AgreementWhere): [Agreement!]! - agreementsAggregate(where: AgreementWhere): AgreementAggregateSelection! + agreementsAggregate(where: AgreementWhere): AgreementAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"agreementsConnection\\\\\\"\\") agreementsConnection(after: String, first: Int, sort: [AgreementSort!], where: AgreementWhere): AgreementsConnection! users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! + usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\"\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } @@ -4710,13 +4710,13 @@ describe("Subscriptions", () => { type Query { actors(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: ActorWhere): [Actor!]! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! stars(limit: Int, offset: Int, options: StarOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: StarWhere): [Star!]! - starsAggregate(where: StarWhere): StarAggregateSelection! + starsAggregate(where: StarWhere): StarAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"starsConnection\\\\\\"\\") starsConnection(after: String, first: Int, where: StarWhere): StarsConnection! } @@ -5727,19 +5727,19 @@ describe("Subscriptions", () => { type Query { creatures(limit: Int, offset: Int, options: CreatureOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: CreatureWhere): [Creature!]! - creaturesAggregate(where: CreatureWhere): CreatureAggregateSelection! + creaturesAggregate(where: CreatureWhere): CreatureAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"creaturesConnection\\\\\\"\\") creaturesConnection(after: String, first: Int, where: CreatureWhere): CreaturesConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\"\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\"\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } diff --git a/packages/graphql/tests/schema/types/bigint.test.ts b/packages/graphql/tests/schema/types/bigint.test.ts index a7d1e4a2c2..c828ea4b6f 100644 --- a/packages/graphql/tests/schema/types/bigint.test.ts +++ b/packages/graphql/tests/schema/types/bigint.test.ts @@ -171,7 +171,7 @@ describe("Bigint", () => { type Query { files(limit: Int, offset: Int, options: FileOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [FileSort!], where: FileWhere): [File!]! - filesAggregate(where: FileWhere): FileAggregateSelection! + filesAggregate(where: FileWhere): FileAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"filesConnection\\\\\\"\\") filesConnection(after: String, first: Int, sort: [FileSort!], where: FileWhere): FilesConnection! } diff --git a/packages/graphql/tests/schema/types/date.test.ts b/packages/graphql/tests/schema/types/date.test.ts index cfd735e1e0..d32e1a2d7b 100644 --- a/packages/graphql/tests/schema/types/date.test.ts +++ b/packages/graphql/tests/schema/types/date.test.ts @@ -163,7 +163,7 @@ describe("Date", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/types/datetime.test.ts b/packages/graphql/tests/schema/types/datetime.test.ts index 93feab3193..49188e0c05 100644 --- a/packages/graphql/tests/schema/types/datetime.test.ts +++ b/packages/graphql/tests/schema/types/datetime.test.ts @@ -170,7 +170,7 @@ describe("Datetime", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/types/duration.test.ts b/packages/graphql/tests/schema/types/duration.test.ts index 5872970fd7..de602081d7 100644 --- a/packages/graphql/tests/schema/types/duration.test.ts +++ b/packages/graphql/tests/schema/types/duration.test.ts @@ -170,7 +170,7 @@ describe("Duration", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/types/localdatetime.test.ts b/packages/graphql/tests/schema/types/localdatetime.test.ts index ebf666ad52..0f70030f03 100644 --- a/packages/graphql/tests/schema/types/localdatetime.test.ts +++ b/packages/graphql/tests/schema/types/localdatetime.test.ts @@ -170,7 +170,7 @@ describe("Localdatetime", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/types/localtime.test.ts b/packages/graphql/tests/schema/types/localtime.test.ts index 9b239d86d7..8a34f3b7a1 100644 --- a/packages/graphql/tests/schema/types/localtime.test.ts +++ b/packages/graphql/tests/schema/types/localtime.test.ts @@ -172,7 +172,7 @@ describe("Localtime", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/types/point.test.ts b/packages/graphql/tests/schema/types/point.test.ts index 081b5d9146..1fd54a4977 100644 --- a/packages/graphql/tests/schema/types/point.test.ts +++ b/packages/graphql/tests/schema/types/point.test.ts @@ -167,7 +167,7 @@ describe("Point", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -339,7 +339,7 @@ describe("Point", () => { type Query { machines(limit: Int, offset: Int, options: MachineOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MachineSort!], where: MachineWhere): [Machine!]! - machinesAggregate(where: MachineWhere): MachineAggregateSelection! + machinesAggregate(where: MachineWhere): MachineAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"machinesConnection\\\\\\"\\") machinesConnection(after: String, first: Int, sort: [MachineSort!], where: MachineWhere): MachinesConnection! } @@ -491,7 +491,7 @@ describe("Point", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, where: MovieWhere): MoviesConnection! } @@ -635,7 +635,7 @@ describe("Point", () => { type Query { machines(limit: Int, offset: Int, options: MachineOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: MachineWhere): [Machine!]! - machinesAggregate(where: MachineWhere): MachineAggregateSelection! + machinesAggregate(where: MachineWhere): MachineAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"machinesConnection\\\\\\"\\") machinesConnection(after: String, first: Int, where: MachineWhere): MachinesConnection! } diff --git a/packages/graphql/tests/schema/types/time.test.ts b/packages/graphql/tests/schema/types/time.test.ts index aa1a1f7436..bdc6ee745b 100644 --- a/packages/graphql/tests/schema/types/time.test.ts +++ b/packages/graphql/tests/schema/types/time.test.ts @@ -162,7 +162,7 @@ describe("Time", () => { type Query { movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/union-interface-relationship.test.ts b/packages/graphql/tests/schema/union-interface-relationship.test.ts index a3c3f49ffe..5c92b6741b 100644 --- a/packages/graphql/tests/schema/union-interface-relationship.test.ts +++ b/packages/graphql/tests/schema/union-interface-relationship.test.ts @@ -1638,20 +1638,20 @@ describe("Union Interface Relationships", () => { type Query { actors(limit: Int, offset: Int, options: ActorOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! + actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\"\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! directors(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: DirectorWhere): [Director!]! influencers(limit: Int, offset: Int, options: InfluencerOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [InfluencerSort!], where: InfluencerWhere): [Influencer!]! - influencersAggregate(where: InfluencerWhere): InfluencerAggregateSelection! + influencersAggregate(where: InfluencerWhere): InfluencerAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"influencersConnection\\\\\\"\\") influencersConnection(after: String, first: Int, sort: [InfluencerSort!], where: InfluencerWhere): InfluencersConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, options: PersonOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! + peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\"\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! reviewers(limit: Int, offset: Int, options: ReviewerOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ReviewerSort!], where: ReviewerWhere): [Reviewer!]! - reviewersAggregate(where: ReviewerWhere): ReviewerAggregateSelection! + reviewersAggregate(where: ReviewerWhere): ReviewerAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"reviewersConnection\\\\\\"\\") reviewersConnection(after: String, first: Int, sort: [ReviewerSort!], where: ReviewerWhere): ReviewersConnection! } diff --git a/packages/graphql/tests/schema/unions.test.ts b/packages/graphql/tests/schema/unions.test.ts index 5e5a801e45..5d5f25a99c 100644 --- a/packages/graphql/tests/schema/unions.test.ts +++ b/packages/graphql/tests/schema/unions.test.ts @@ -405,10 +405,10 @@ describe("Unions", () => { type Query { genres(limit: Int, offset: Int, options: GenreOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! + genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\"\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! searches(limit: Int, offset: Int, options: QueryOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), where: SearchWhere): [Search!]! } diff --git a/packages/graphql/tests/schema/vector.test.ts b/packages/graphql/tests/schema/vector.test.ts index 0110505694..d27d5a4b5e 100644 --- a/packages/graphql/tests/schema/vector.test.ts +++ b/packages/graphql/tests/schema/vector.test.ts @@ -199,7 +199,7 @@ describe("@vector schema", () => { type Query { descriptionQuery(after: String, first: Int, sort: [MovieVectorSort!], vector: [Float!], where: MovieVectorWhere): MoviesVectorConnection! movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit the field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\"\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! titleQuery(after: String, first: Int, sort: [MovieVectorSort!], vector: [Float!], where: MovieVectorWhere): MoviesVectorConnection! } From 233dc7495644455889dfcb4125f891079309f93d Mon Sep 17 00:00:00 2001 From: angrykoala Date: Tue, 21 Jan 2025 17:38:31 +0000 Subject: [PATCH 07/10] Fix unit tests --- .../graphql/src/schema/pagination.test.ts | 3 ++ .../validation/schema-validation.test.ts | 36 ++++++++++++++----- 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/packages/graphql/src/schema/pagination.test.ts b/packages/graphql/src/schema/pagination.test.ts index 1fa3fc6a7a..e1ea378c27 100644 --- a/packages/graphql/src/schema/pagination.test.ts +++ b/packages/graphql/src/schema/pagination.test.ts @@ -47,6 +47,7 @@ describe("cursor-pagination", () => { selectionSet: undefined, }); expect(result).toStrictEqual({ + aggregate: {}, edges: arraySlice.map((edge, index) => ({ ...edge, cursor: offsetToCursor(index) })), pageInfo: { hasNextPage: false, @@ -68,6 +69,7 @@ describe("cursor-pagination", () => { selectionSet: undefined, }); expect(result).toStrictEqual({ + aggregate: {}, edges: arraySlice.map((edge, index) => ({ ...edge, cursor: offsetToCursor(index) })), pageInfo: { hasNextPage: false, @@ -88,6 +90,7 @@ describe("cursor-pagination", () => { selectionSet: undefined, }); expect(result).toStrictEqual({ + aggregate: {}, edges: arraySlice.map((edge, index) => ({ ...edge, cursor: offsetToCursor(index + 11) })), pageInfo: { hasNextPage: false, diff --git a/packages/graphql/src/schema/validation/schema-validation.test.ts b/packages/graphql/src/schema/validation/schema-validation.test.ts index 7461225ccc..268842e0f4 100644 --- a/packages/graphql/src/schema/validation/schema-validation.test.ts +++ b/packages/graphql/src/schema/validation/schema-validation.test.ts @@ -89,7 +89,9 @@ describe("schema validation", () => { `; const userDocument = gql` ${jwtType} - type User @node @authorization(filter: [{ where: { jwt: { thisClaimDoesNotExist: "something" } } }]) { + type User + @node + @authorization(filter: [{ where: { jwt: { thisClaimDoesNotExist: "something" } } }]) { id: ID! name: String! } @@ -727,7 +729,9 @@ describe("schema validation", () => { test("should validate directive argument name", () => { const userDocument = gql` - type User @node @subscriptionsAuthorization(wrongFilter: [{ where: { node: { id: "$jwt.sub" } } }]) { + type User + @node + @subscriptionsAuthorization(wrongFilter: [{ where: { node: { id: "$jwt.sub" } } }]) { id: ID! name: String! } @@ -1446,7 +1450,9 @@ describe("schema validation", () => { name: String! } - type Post @node @subscriptionsAuthorization(filter: [{ where: { node: { content: "$jwt.sub" } } }]) { + type Post + @node + @subscriptionsAuthorization(filter: [{ where: { node: { content: "$jwt.sub" } } }]) { content: String! author: User! @relationship(type: "HAS_AUTHOR", direction: OUT) } @@ -2391,7 +2397,11 @@ describe("schema validation", () => { const userDocument = gql` extend schema @link(url: "https://specs.apollo.dev/federation/v2.0", import: ["@shareable"]) - type User @node @shareable @authorization(wrongFilter: [{ where: { node: { id: "$jwt.sub" } } }]) @node { + type User + @node + @shareable + @authorization(wrongFilter: [{ where: { node: { id: "$jwt.sub" } } }]) + @node { id: ID! name: String! } @@ -2631,7 +2641,10 @@ describe("schema validation", () => { `; const userDocument = gql` ${jwtType} - type User @node @plural(value: "Users") @authentication(operations: [CREATE], jwt: { sub: "test" }) { + type User + @node + @plural(value: "Users") + @authentication(operations: [CREATE], jwt: { sub: "test" }) { id: ID! name: String! } @@ -3495,7 +3508,11 @@ describe("schema validation", () => { extend schema @link(url: "https://specs.apollo.dev/federation/v2.0", import: ["@shareable"]) ${jwtType} - type User @node @plural(value: "Users") @shareable @authentication(ops: [CREATE], jwt: { sub: "test" }) { + type User + @node + @plural(value: "Users") + @shareable + @authentication(ops: [CREATE], jwt: { sub: "test" }) { id: ID! name: String! } @@ -3580,11 +3597,13 @@ describe("schema validation", () => { }); const errors = getError(executeValidate); - expect(errors).toHaveLength(2); + expect(errors).toHaveLength(3); 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"); + expect(errors[2]).not.toBeInstanceOf(NoErrorThrownError); + expect(errors[2]).toHaveProperty("message", "Field cannot be named keanu"); }); }); @@ -3867,7 +3886,8 @@ describe("schema validation", () => { name: String! } - type Post @node + type Post + @node @authorization( filter: [{ where: { node: { author_NOT_A_QUANTIFIER: { name: "Simone" } } } }] ) { From a6e94867da3c7989fb4162bbb738506485859be6 Mon Sep 17 00:00:00 2001 From: angrykoala Date: Wed, 22 Jan 2025 10:45:07 +0000 Subject: [PATCH 08/10] Add deprecation flag --- .changeset/hot-windows-whisper.md | 20 + .changeset/thin-goats-begin.md | 25 + .../src/schema/make-augmented-schema.ts | 43 +- packages/graphql/src/types/index.ts | 1 + .../aggregate-operations.test.ts | 539 ++++++++++++++++++ ...ations.test.ts => id-aggregations.test.ts} | 2 +- 6 files changed, 610 insertions(+), 20 deletions(-) create mode 100644 .changeset/hot-windows-whisper.md create mode 100644 .changeset/thin-goats-begin.md create mode 100644 packages/graphql/tests/schema/remove-deprecated/aggregate-operations.test.ts rename packages/graphql/tests/schema/remove-deprecated/{aggregations.test.ts => id-aggregations.test.ts} (99%) diff --git a/.changeset/hot-windows-whisper.md b/.changeset/hot-windows-whisper.md new file mode 100644 index 0000000000..5dcff4768e --- /dev/null +++ b/.changeset/hot-windows-whisper.md @@ -0,0 +1,20 @@ +--- +"@neo4j/graphql": minor +--- + +Add aggregate fieldd in connection: + +```graphql +query { + moviesConnection { + aggregate { + node { + count + int { + longest + } + } + } + } +} +``` diff --git a/.changeset/thin-goats-begin.md b/.changeset/thin-goats-begin.md new file mode 100644 index 0000000000..23650cfe33 --- /dev/null +++ b/.changeset/thin-goats-begin.md @@ -0,0 +1,25 @@ +--- +"@neo4j/graphql": patch +--- + +Deprecated old aggregate operations: + +```graphql +query { + moviesAggregate { + count + rating { + min + } + } +} +``` + +These fields can be completely removed from the schema with the new flag `deprecatedAggregateOperations`: + +```js +const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { excludeDeprecatedFields: { deprecatedAggregateOperations: true } }, +}); +``` diff --git a/packages/graphql/src/schema/make-augmented-schema.ts b/packages/graphql/src/schema/make-augmented-schema.ts index e479df4e35..99621babfd 100644 --- a/packages/graphql/src/schema/make-augmented-schema.ts +++ b/packages/graphql/src/schema/make-augmented-schema.ts @@ -84,6 +84,7 @@ import { withObjectType } from "./generation/object-type"; import { withMutationResponseTypes } from "./generation/response-types"; import { withOptionsInputType } from "./generation/sort-and-options-input"; import { withUpdateInputType } from "./generation/update-input"; +import { shouldAddDeprecatedFields } from "./generation/utils"; import { withUniqueWhereInputType, withWhereInputType } from "./generation/where-input"; import getNodes from "./get-nodes"; import { getResolveAndSubscriptionMethods } from "./get-resolve-and-subscription-methods"; @@ -581,16 +582,17 @@ function generateObjectType({ features, }); - // TODO: remove with deprecated flag - composer.Query.addFields({ - [concreteEntityAdapter.operations.rootTypeFieldNames.aggregate]: aggregateResolver({ - entityAdapter: concreteEntityAdapter, - }), - }); - composer.Query.setFieldDirectives(concreteEntityAdapter.operations.rootTypeFieldNames.aggregate, [ - ...graphqlDirectivesToCompose(propagatedDirectives), - DEPRECATE_AGGREGATION(concreteEntityAdapter), - ]); + if (shouldAddDeprecatedFields(features, "deprecatedAggregateOperations")) { + composer.Query.addFields({ + [concreteEntityAdapter.operations.rootTypeFieldNames.aggregate]: aggregateResolver({ + entityAdapter: concreteEntityAdapter, + }), + }); + composer.Query.setFieldDirectives(concreteEntityAdapter.operations.rootTypeFieldNames.aggregate, [ + ...graphqlDirectivesToCompose(propagatedDirectives), + DEPRECATE_AGGREGATION(concreteEntityAdapter), + ]); + } } if (concreteEntityAdapter.isCreatable) { @@ -722,14 +724,17 @@ function generateInterfaceObjectType({ features, }); - composer.Query.addFields({ - [interfaceEntityAdapter.operations.rootTypeFieldNames.aggregate]: aggregateResolver({ - entityAdapter: interfaceEntityAdapter, - }), - }); - composer.Query.setFieldDirectives(interfaceEntityAdapter.operations.rootTypeFieldNames.aggregate, [ - ...graphqlDirectivesToCompose(propagatedDirectives), - DEPRECATE_AGGREGATION(interfaceEntityAdapter), - ]); + if (shouldAddDeprecatedFields(features, "deprecatedAggregateOperations")) { + composer.Query.addFields({ + [interfaceEntityAdapter.operations.rootTypeFieldNames.aggregate]: aggregateResolver({ + entityAdapter: interfaceEntityAdapter, + }), + }); + + composer.Query.setFieldDirectives(interfaceEntityAdapter.operations.rootTypeFieldNames.aggregate, [ + ...graphqlDirectivesToCompose(propagatedDirectives), + DEPRECATE_AGGREGATION(interfaceEntityAdapter), + ]); + } } } diff --git a/packages/graphql/src/types/index.ts b/packages/graphql/src/types/index.ts index 795c7e5b5c..27987946ec 100644 --- a/packages/graphql/src/types/index.ts +++ b/packages/graphql/src/types/index.ts @@ -455,6 +455,7 @@ export type Neo4jFeaturesSettings = { connectOrCreate?: boolean; idAggregations?: boolean; typename_IN?: boolean; + deprecatedAggregateOperations?: boolean; }; vector?: Neo4jVectorSettings; }; diff --git a/packages/graphql/tests/schema/remove-deprecated/aggregate-operations.test.ts b/packages/graphql/tests/schema/remove-deprecated/aggregate-operations.test.ts new file mode 100644 index 0000000000..5d0465f752 --- /dev/null +++ b/packages/graphql/tests/schema/remove-deprecated/aggregate-operations.test.ts @@ -0,0 +1,539 @@ +/* + * 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("Aggregate operations", () => { + test("should remove deprecated aggregate operations", async () => { + const typeDefs = /* GraphQL */ ` + type User @node { + someID: Int + someString: String + } + + type Post @node { + title: String + likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") + } + + type Likes @relationshipProperties { + someID: ID + someString: String + } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { excludeDeprecatedFields: { deprecatedAggregateOperations: true } }, + }); + 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 CreatePostsMutationResponse { + info: CreateInfo! + posts: [Post!]! + } + + type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! + } + + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" + type DeleteInfo { + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelection { + longest: ID + shortest: ID + } + + type IntAggregateSelection { + average: Float + max: Int + min: Int + sum: Int + } + + \\"\\"\\" + The edge properties for the following fields: + * Post.likes + \\"\\"\\" + type Likes { + someID: ID + someString: String + } + + input LikesAggregationWhereInput { + AND: [LikesAggregationWhereInput!] + NOT: LikesAggregationWhereInput + OR: [LikesAggregationWhereInput!] + someID_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + 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 + } + + input LikesCreateInput { + someID: ID + someString: String + } + + input LikesSort { + someID: SortDirection + someString: SortDirection + } + + input LikesUpdateInput { + someID: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + someID_SET: ID + someString: String @deprecated(reason: \\"Please use the explicit _SET field\\") + someString_SET: String + } + + input LikesWhere { + AND: [LikesWhere!] + NOT: LikesWhere + OR: [LikesWhere!] + someID: ID @deprecated(reason: \\"Please use the explicit _EQ version\\") + someID_CONTAINS: ID + someID_ENDS_WITH: ID + someID_EQ: ID + someID_IN: [ID] + someID_STARTS_WITH: ID + someString: String @deprecated(reason: \\"Please use the explicit _EQ version\\") + someString_CONTAINS: String + someString_ENDS_WITH: String + someString_EQ: String + someString_IN: [String] + someString_STARTS_WITH: String + } + + 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(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! + likesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: UserWhere): PostUserLikesAggregationSelection + likesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! + title: String + } + + type PostAggregate { + node: PostAggregateNode! + } + + type PostAggregateNode { + 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: Int @deprecated(reason: \\"Please use the explicit _EQ version\\") + count_EQ: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: LikesAggregationWhereInput + node: PostLikesNodeAggregationWhereInput + } + + input PostLikesConnectFieldInput { + edge: LikesCreateInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true @deprecated(reason: \\"The overwrite argument is deprecated and will be removed\\") + where: UserConnectWhere + } + + type PostLikesConnection { + edges: [PostLikesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PostLikesConnectionSort { + edge: LikesSort + node: UserSort + } + + input PostLikesConnectionWhere { + AND: [PostLikesConnectionWhere!] + NOT: PostLikesConnectionWhere + OR: [PostLikesConnectionWhere!] + edge: LikesWhere + 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!] + someID_AVERAGE_EQUAL: Float + someID_AVERAGE_GT: Float + someID_AVERAGE_GTE: Float + someID_AVERAGE_LT: Float + someID_AVERAGE_LTE: Float + someID_MAX_EQUAL: Int + someID_MAX_GT: Int + someID_MAX_GTE: Int + someID_MAX_LT: Int + someID_MAX_LTE: Int + someID_MIN_EQUAL: Int + someID_MIN_GT: Int + someID_MIN_GTE: Int + someID_MIN_LT: Int + someID_MIN_LTE: Int + someID_SUM_EQUAL: Int + someID_SUM_GT: Int + someID_SUM_GTE: Int + someID_SUM_LT: Int + someID_SUM_LTE: Int + 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 + } + + 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 + } + + input PostOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PostSort!] + } + + \\"\\"\\" + Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. + \\"\\"\\" + input PostSort { + title: SortDirection + } + + input PostUpdateInput { + likes: [PostLikesUpdateFieldInput!] + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String + } + + type PostUserLikesAggregationSelection { + count: Int! + edge: PostUserLikesEdgeAggregateSelection + node: PostUserLikesNodeAggregateSelection + } + + type PostUserLikesEdgeAggregateSelection { + someID: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someString: StringAggregateSelection! + } + + type PostUserLikesNodeAggregateSelection { + someID: IntAggregateSelection! + someString: StringAggregateSelection! + } + + input PostWhere { + AND: [PostWhere!] + NOT: PostWhere + OR: [PostWhere!] + likesAggregate: PostLikesAggregateInput + \\"\\"\\" + Return Posts where all of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_ALL: PostLikesConnectionWhere + \\"\\"\\" + Return Posts where none of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_NONE: PostLikesConnectionWhere + \\"\\"\\" + Return Posts where one of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_SINGLE: PostLikesConnectionWhere + \\"\\"\\" + Return Posts where some of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_SOME: PostLikesConnectionWhere + \\"\\"\\"Return Posts where all of the related Users match this filter\\"\\"\\" + likes_ALL: UserWhere + \\"\\"\\"Return Posts where none of the related Users match this filter\\"\\"\\" + likes_NONE: UserWhere + \\"\\"\\"Return Posts where one of the related Users match this filter\\"\\"\\" + likes_SINGLE: UserWhere + \\"\\"\\"Return Posts where some of the related Users match this filter\\"\\"\\" + likes_SOME: UserWhere + title: String @deprecated(reason: \\"Please use the explicit _EQ version\\") + title_CONTAINS: String + title_ENDS_WITH: String + title_EQ: String + title_IN: [String] + title_STARTS_WITH: String + } + + type PostsConnection { + aggregate: PostAggregate! + edges: [PostEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Query { + posts(limit: Int, offset: Int, options: PostOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PostSort!], where: PostWhere): [Post!]! + postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! + users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! + } + + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type StringAggregateSelection { + longest: String + shortest: String + } + + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" + type UpdateInfo { + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdatePostsMutationResponse { + info: UpdateInfo! + posts: [Post!]! + } + + type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! + } + + type User { + someID: Int + someString: String + } + + type UserAggregate { + node: UserAggregateNode! + } + + type UserAggregateNode { + count: Int! + someID: IntAggregateSelection! + someString: StringAggregateSelection! + } + + input UserConnectWhere { + node: UserWhere! + } + + input UserCreateInput { + someID: Int + someString: String + } + + type UserEdge { + cursor: String! + node: User! + } + + input UserOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [UserSort!] + } + + \\"\\"\\" + Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. + \\"\\"\\" + input UserSort { + someID: SortDirection + someString: SortDirection + } + + input UserUpdateInput { + someID: Int @deprecated(reason: \\"Please use the explicit _SET field\\") + someID_DECREMENT: Int + someID_INCREMENT: Int + someID_SET: Int + someString: String @deprecated(reason: \\"Please use the explicit _SET field\\") + someString_SET: String + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + someID: Int @deprecated(reason: \\"Please use the explicit _EQ version\\") + someID_EQ: Int + someID_GT: Int + someID_GTE: Int + someID_IN: [Int] + someID_LT: Int + someID_LTE: Int + someString: String @deprecated(reason: \\"Please use the explicit _EQ version\\") + someString_CONTAINS: String + someString_ENDS_WITH: String + someString_EQ: String + someString_IN: [String] + someString_STARTS_WITH: String + } + + type UsersConnection { + aggregate: UserAggregate! + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + }" + `); + }); +}); diff --git a/packages/graphql/tests/schema/remove-deprecated/aggregations.test.ts b/packages/graphql/tests/schema/remove-deprecated/id-aggregations.test.ts similarity index 99% rename from packages/graphql/tests/schema/remove-deprecated/aggregations.test.ts rename to packages/graphql/tests/schema/remove-deprecated/id-aggregations.test.ts index 1bcf926cf3..f200ddc8b9 100644 --- a/packages/graphql/tests/schema/remove-deprecated/aggregations.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/id-aggregations.test.ts @@ -21,7 +21,7 @@ import { printSchemaWithDirectives } from "@graphql-tools/utils"; import { lexicographicSortSchema } from "graphql/utilities"; import { Neo4jGraphQL } from "../../../src"; -describe("Aggregations", () => { +describe("Aggregations id", () => { test("should remove ID Aggregations", async () => { const typeDefs = /* GraphQL */ ` type User @node { From f0cc16728fcc6d9ba57e1640621736ebfdf94b76 Mon Sep 17 00:00:00 2001 From: angrykoala Date: Wed, 22 Jan 2025 11:50:51 +0000 Subject: [PATCH 09/10] Cleanup of aggregations inside connections code --- .../ast/fields/ConnectionAggregationField.ts | 16 +- .../ast/operations/ConnectionReadOperation.ts | 88 +++++---- .../CompositeConnectionReadOperation.ts | 77 ++++---- .../factory/Operations/AggregateFactory.ts | 2 - .../factory/Operations/ConnectionFactory.ts | 187 ++++++++++-------- 5 files changed, 203 insertions(+), 167 deletions(-) diff --git a/packages/graphql/src/translate/queryAST/ast/fields/ConnectionAggregationField.ts b/packages/graphql/src/translate/queryAST/ast/fields/ConnectionAggregationField.ts index 2147b5f2a4..a965957055 100644 --- a/packages/graphql/src/translate/queryAST/ast/fields/ConnectionAggregationField.ts +++ b/packages/graphql/src/translate/queryAST/ast/fields/ConnectionAggregationField.ts @@ -21,16 +21,14 @@ import Cypher from "@neo4j/cypher-builder"; import { QueryASTContext } from "../QueryASTContext"; import type { QueryASTNode } from "../QueryASTNode"; import type { AggregationOperation } from "../operations/AggregationOperation"; -import { CypherOperation } from "../operations/CypherOperation"; -import { CypherScalarOperation } from "../operations/CypherScalarOperation"; import type { CompositeAggregationOperation } from "../operations/composite/CompositeAggregationOperation"; -import { CompositeCypherOperation } from "../operations/composite/CompositeCypherOperation"; import { Field } from "./Field"; +/** An aggregate field inside connection */ export class ConnectionAggregationField extends Field { public operation: AggregationOperation | CompositeAggregationOperation; - public nodeAlias: string; + private nodeAlias: string; private projectionExpr: Cypher.Expr | undefined; @@ -65,14 +63,4 @@ export class ConnectionAggregationField extends Field { this.projectionExpr = result.projectionExpr; return result.clauses; } - - public isCypherField(): this is this & { - operation: CypherOperation | CypherScalarOperation | CompositeCypherOperation; - } { - return ( - this.operation instanceof CypherOperation || - this.operation instanceof CypherScalarOperation || - this.operation instanceof CompositeCypherOperation - ); - } } diff --git a/packages/graphql/src/translate/queryAST/ast/operations/ConnectionReadOperation.ts b/packages/graphql/src/translate/queryAST/ast/operations/ConnectionReadOperation.ts index 3e2d0f58f3..5c86d4a69a 100644 --- a/packages/graphql/src/translate/queryAST/ast/operations/ConnectionReadOperation.ts +++ b/packages/graphql/src/translate/queryAST/ast/operations/ConnectionReadOperation.ts @@ -44,7 +44,7 @@ export class ConnectionReadOperation extends Operation { public nodeFields: Field[] = []; public edgeFields: Field[] = []; // TODO: merge with attachedTo? - public aggregationField: ConnectionAggregationField | undefined; // TODO: multiple aggregations + private aggregationField: ConnectionAggregationField | undefined; // TODO: multiple aggregations public filters: Filter[] = []; protected pagination: Pagination | undefined; @@ -92,6 +92,12 @@ export class ConnectionReadOperation extends Operation { this.pagination = pagination; } + /** Sets the aggregation field and adds the needed filters */ + public setAggregationField(aggregationField: ConnectionAggregationField): void { + this.aggregationField = aggregationField; + this.aggregationField.operation.addFilters(...this.filters); + } + public getChildren(): QueryASTNode[] { const sortFields = this.sortFields.flatMap((s) => { return [...s.edge, ...s.node]; @@ -113,7 +119,7 @@ export class ConnectionReadOperation extends Operation { nestedContext: QueryASTContext, edgesVar: Cypher.Variable, totalCount: Cypher.Variable, - extraColumns?: Array<[Cypher.Expr, Cypher.Variable]> + extraColumns: Array<[Cypher.Expr, Cypher.Variable]> = [] ): Cypher.With { const nodeAndRelationshipMap = new Cypher.Map({ node: nestedContext.target, @@ -123,40 +129,15 @@ export class ConnectionReadOperation extends Operation { nodeAndRelationshipMap.set("relationship", nestedContext.relationship); } - return new Cypher.With([Cypher.collect(nodeAndRelationshipMap), edgesVar], ...(extraColumns ?? [])).with( + const extraColumnsVariables = extraColumns.map((c) => c[1]); + + return new Cypher.With([Cypher.collect(nodeAndRelationshipMap), edgesVar], ...extraColumns).with( edgesVar, [Cypher.size(edgesVar), totalCount], - ...(extraColumns ?? []).map((c) => c[1]) + ...extraColumnsVariables ); } - protected transpileAggregation(context: QueryASTContext): { - subqueries: Cypher.Clause[]; - fields: Array<[Cypher.Expr, Cypher.Variable]>; - returnMap: Record; - } { - const returnMap: Record = {}; - let extraFieldsSubqueries: Cypher.Clause[] = []; - let extraFields: Array<[Cypher.Expr, Cypher.Variable]> = []; - if (this.aggregationField) { - extraFieldsSubqueries = this.aggregationField.getSubqueries(context); - - const aggregationProjectionField = this.aggregationField.getProjectionField(); - - extraFields = Object.entries(aggregationProjectionField).map(([key, value]) => { - const variable = new Cypher.Variable(); - returnMap[key] = variable; - return [value, variable]; - }); - } - - return { - fields: extraFields, - subqueries: extraFieldsSubqueries, - returnMap, - }; - } - public transpile(context: QueryASTContext): OperationTranspileResult { if (!context.target) throw new Error(); @@ -183,9 +164,9 @@ export class ConnectionReadOperation extends Operation { const filtersSubqueries = [...authFilterSubqueries, ...normalFilterSubqueries]; const { - returnMap, - fields: extraFields, - subqueries: extraFieldsSubqueries, + projectionMap: aggregationProjection, + fields: aggregationFields, + subqueries: aggregationSubqueries, } = this.transpileAggregation(nestedContext); const edgesVar = new Cypher.NamedVariable("edges"); @@ -210,14 +191,14 @@ export class ConnectionReadOperation extends Operation { nestedContext, edgesVar, totalCount, - extraFields + aggregationFields ); const returnClause = new Cypher.Return([ new Cypher.Map({ edges: edgesProjectionVar, totalCount: totalCount, - ...returnMap, + ...aggregationProjection, }), context.returnVariable, ]); @@ -229,7 +210,7 @@ export class ConnectionReadOperation extends Operation { selectionClause, ...filtersSubqueries, withWhere, - ...extraFieldsSubqueries, + ...aggregationSubqueries, withCollectEdgesAndTotalCount, unwindAndProjectionSubquery, returnClause @@ -347,6 +328,39 @@ export class ConnectionReadOperation extends Operation { return projectionMap; } + private transpileAggregation(context: QueryASTContext): { + subqueries: Cypher.Clause[]; + fields: Array<[Cypher.Expr, Cypher.Variable]>; + projectionMap: Record; + } { + if (!this.aggregationField) { + return { + fields: [], + subqueries: [], + projectionMap: {}, + }; + } + const projectionMap: Record = {}; + + const subqueries = this.aggregationField.getSubqueries(context); + + const aggregationProjectionField = this.aggregationField.getProjectionField(); + + const fields: Array<[Cypher.Expr, Cypher.Variable]> = Object.entries(aggregationProjectionField).map( + ([key, value]) => { + const variable = new Cypher.Variable(); + projectionMap[key] = variable; + return [value, variable]; + } + ); + + return { + fields, + subqueries, + projectionMap, + }; + } + private generateSortAndPaginationClause(context: QueryASTContext): Cypher.With | undefined { const shouldGenerateSortWith = this.pagination || this.sortFields.length > 0; if (!shouldGenerateSortWith) { diff --git a/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeConnectionReadOperation.ts b/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeConnectionReadOperation.ts index 4cb12e6d56..ef5489a265 100644 --- a/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeConnectionReadOperation.ts +++ b/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeConnectionReadOperation.ts @@ -35,41 +35,13 @@ export class CompositeConnectionReadOperation extends Operation { protected sortFields: Array<{ node: Sort[]; edge: Sort[] }> = []; private pagination: Pagination | undefined; - public aggregationField: ConnectionAggregationField | undefined; // TODO: multiple aggregations + private aggregationField: ConnectionAggregationField | undefined; // TODO: multiple aggregations constructor(children: CompositeConnectionPartial[]) { super(); this.children = children; } - // NOTE: duplicate from ConnectionReadOperation - protected transpileAggregation(context: QueryASTContext): { - subqueries: Cypher.Clause[]; - fields: Array<[Cypher.Expr, Cypher.Variable]>; - returnMap: Record; - } { - const returnMap: Record = {}; - let extraFieldsSubqueries: Cypher.Clause[] = []; - let extraFields: Array<[Cypher.Expr, Cypher.Variable]> = []; - if (this.aggregationField) { - extraFieldsSubqueries = this.aggregationField.getSubqueries(context); - - const aggregationProjectionField = this.aggregationField.getProjectionField(); - - extraFields = Object.entries(aggregationProjectionField).map(([key, value]) => { - const variable = new Cypher.Variable(); - returnMap[key] = variable; - return [value, variable]; - }); - } - - return { - fields: extraFields, - subqueries: extraFieldsSubqueries, - returnMap, - }; - } - public transpile(context: QueryASTContext): OperationTranspileResult { const edgeVar = new Cypher.NamedVariable("edge"); const edgesVar = new Cypher.NamedVariable("edges"); @@ -126,15 +98,16 @@ export class CompositeConnectionReadOperation extends Operation { } const { - fields: extraFields, + fields: aggregateFields, subqueries: aggregateSubqueries, - returnMap: aggregateReturnMap, + projectionMap: aggregateReturnMap, } = this.transpileAggregation(context); - const subqueryWith = new Cypher.With([Cypher.collect(edgeVar), edgesVar], ...extraFields).with( + const aggregateVariables = aggregateFields.map((c) => c[1]); + const subqueryWith = new Cypher.With([Cypher.collect(edgeVar), edgesVar], ...aggregateFields).with( edgesVar, [Cypher.size(edgesVar), totalCount], - ...(extraFields ?? []).map((c) => c[1]) + ...aggregateVariables ); const returnClause = new Cypher.Return([ @@ -162,6 +135,10 @@ export class CompositeConnectionReadOperation extends Operation { this.pagination = pagination; } + public setAggregationField(aggregationField: ConnectionAggregationField): void { + this.aggregationField = aggregationField; + } + public getChildren(): QueryASTNode[] { const sortFields = this.sortFields.flatMap((s) => { return [...s.edge, ...s.node]; @@ -182,4 +159,38 @@ export class CompositeConnectionReadOperation extends Operation { return [...nodeFields, ...edgeFields]; }); } + + // NOTE: duplicate from ConnectionReadOperation + private transpileAggregation(context: QueryASTContext): { + subqueries: Cypher.Clause[]; + fields: Array<[Cypher.Expr, Cypher.Variable]>; + projectionMap: Record; + } { + if (!this.aggregationField) { + return { + fields: [], + subqueries: [], + projectionMap: {}, + }; + } + const projectionMap: Record = {}; + + const subqueries = this.aggregationField.getSubqueries(context); + + const aggregationProjectionField = this.aggregationField.getProjectionField(); + + const fields: Array<[Cypher.Expr, Cypher.Variable]> = Object.entries(aggregationProjectionField).map( + ([key, value]) => { + const variable = new Cypher.Variable(); + projectionMap[key] = variable; + return [value, variable]; + } + ); + + return { + fields, + subqueries, + projectionMap, + }; + } } diff --git a/packages/graphql/src/translate/queryAST/factory/Operations/AggregateFactory.ts b/packages/graphql/src/translate/queryAST/factory/Operations/AggregateFactory.ts index ca3a1f7875..c7e4db5b2c 100644 --- a/packages/graphql/src/translate/queryAST/factory/Operations/AggregateFactory.ts +++ b/packages/graphql/src/translate/queryAST/factory/Operations/AggregateFactory.ts @@ -138,7 +138,6 @@ export class AggregateFactory { } } else { if (isConcreteEntity(entity)) { - // HERE let selection: EntitySelection; // NOTE: If we introduce vector index aggregation, checking the phrase will cause a problem if (context.resolveTree.args.fulltext || context.resolveTree.args.phrase) { @@ -233,7 +232,6 @@ export class AggregateFactory { edge: ResolveTree | undefined; fields: Record; } { - // Handle new aggregation node inside connection let nodeFields: Record = {}; if (adapter instanceof ConcreteEntityAdapter) { nodeFields = resolveTree.fieldsByTypeName[adapter.operations.aggregateTypeNames.node] ?? {}; diff --git a/packages/graphql/src/translate/queryAST/factory/Operations/ConnectionFactory.ts b/packages/graphql/src/translate/queryAST/factory/Operations/ConnectionFactory.ts index 133e0fdbe0..ccb17b22b6 100644 --- a/packages/graphql/src/translate/queryAST/factory/Operations/ConnectionFactory.ts +++ b/packages/graphql/src/translate/queryAST/factory/Operations/ConnectionFactory.ts @@ -94,22 +94,20 @@ export class ConnectionFactory { directed, targetOverride: concreteEntity, }); - const { edges } = this.parseConnectionFields({ + resolveTreeEdgeFields = this.parseConnectionFields({ entityOrRel: relationship, target: concreteEntity, resolveTree, }); - resolveTreeEdgeFields = edges; } else { selection = new NodeSelection({ target: concreteEntity, }); - const { edges } = this.parseConnectionFields({ + resolveTreeEdgeFields = this.parseConnectionFields({ entityOrRel: concreteEntity, target: concreteEntity, resolveTree, }); - resolveTreeEdgeFields = edges; } const connectionPartial = new CompositeConnectionPartial({ @@ -131,43 +129,6 @@ export class ConnectionFactory { const compositeConnectionOp = new CompositeConnectionReadOperation(concreteConnectionOperations); - if (isInterfaceEntity(target)) { - const fields = resolveTree.fieldsByTypeName[target.operations.connectionFieldTypename]; - if (fields) { - const resolveTreeAggregate = findFieldsByNameInFieldsByTypeNameField(fields, "aggregate")[0]; - if (resolveTreeAggregate) { - const resolveTreeAggregateFields = - resolveTreeAggregate.fieldsByTypeName[target.operations.aggregateTypeNames.connection]; - - if (resolveTreeAggregateFields) { - // Maybe this should be using operationFactory instead - const nodeField = getResolveTreeByFieldName({ - fieldName: "node", - selection: resolveTreeAggregateFields, - }); - - if (nodeField) { - const typeNameNode = target.operations.aggregateTypeNames.node; - // Sugar syntax for aggregations. This allows to use normal aggregations in each composite field, by renaming the type name - nodeField.fieldsByTypeName[typeNameNode] = - nodeField.fieldsByTypeName[target.operations.aggregateTypeNames.node] ?? {}; - const aggregationOperation = this.aggregateFactory.createAggregationOperation({ - entityOrRel: relationship ?? target, - resolveTree: nodeField, - context, - }); - const aggregationField = new ConnectionAggregationField({ - alias: resolveTreeAggregate.name, // Alias is hanlded by graphql on top level - nodeAlias: nodeField.alias, - operation: aggregationOperation, - }); - compositeConnectionOp.aggregationField = aggregationField; - } - } - } - } - } - // These sort fields will be duplicated on nested "CompositeConnectionPartial" this.hydrateConnectionOperationsASTWithSort({ @@ -176,6 +137,22 @@ export class ConnectionFactory { operation: compositeConnectionOp, context, }); + + if (isInterfaceEntity(target)) { + const fields = resolveTree.fieldsByTypeName[target.operations.connectionFieldTypename]; + if (fields) { + const resolveTreeAggregate = findFieldsByNameInFieldsByTypeNameField(fields, "aggregate")[0]; + + this.hydrateConnectionOperationWithAggregation({ + target, + resolveTreeAggregate, + relationship, + context, + operation: compositeConnectionOp, + }); + } + } + return compositeConnectionOp; } @@ -207,19 +184,16 @@ export class ConnectionFactory { let selection: EntitySelection; let resolveTreeEdgeFields: Record; - let resolveTreeAggregate: ResolveTree | undefined; if (relationship) { selection = new RelationshipSelection({ relationship, directed: resolveTree.args.directed as boolean | undefined, }); - const { edges, aggregate } = this.parseConnectionFields({ + resolveTreeEdgeFields = this.parseConnectionFields({ entityOrRel: relationship, target, resolveTree, }); - resolveTreeEdgeFields = edges; - resolveTreeAggregate = aggregate; } else { if (context.resolveTree.args.fulltext || context.resolveTree.args.phrase) { selection = this.fulltextFactory.getFulltextSelection(target, context); @@ -228,51 +202,72 @@ export class ConnectionFactory { target, }); } - const { edges, aggregate } = this.parseConnectionFields({ + resolveTreeEdgeFields = this.parseConnectionFields({ entityOrRel: target, target, resolveTree, }); - resolveTreeEdgeFields = edges; - resolveTreeAggregate = aggregate; } const operation = new ConnectionReadOperation({ relationship, target, selection }); + + this.hydrateConnectionOperationAST({ + relationship, + target: target, + resolveTree, + context, + operation, + whereArgs: resolveTreeWhere, + resolveTreeEdgeFields, + }); + + const resolveTreeAggregate = this.parseAggregateFields({ + entityOrRel: relationship ?? target, + target, + resolveTree, + }); + this.hydrateConnectionOperationWithAggregation({ + target, + resolveTreeAggregate: resolveTreeAggregate[0], //TODO: suport for multiple aggregate fields + relationship, + context, + operation, + }); + + return operation; + } + + private hydrateConnectionOperationWithAggregation({ + target, + resolveTreeAggregate, + relationship, + context, + operation, + }: { + target: ConcreteEntityAdapter | InterfaceEntityAdapter; + resolveTreeAggregate: ResolveTree | undefined; + relationship: RelationshipAdapter | undefined; + context: Neo4jGraphQLTranslationContext; + operation: ConnectionReadOperation | CompositeConnectionReadOperation; + }) { const resolveTreeAggregateFields = resolveTreeAggregate?.fieldsByTypeName[target.operations.aggregateTypeNames.connection]; if (resolveTreeAggregate && resolveTreeAggregateFields) { const nodeField = getResolveTreeByFieldName({ fieldName: "node", selection: resolveTreeAggregateFields }); if (nodeField) { - // Maybe this should be using operationFactory instead const aggregationOperation = this.aggregateFactory.createAggregationOperation({ entityOrRel: relationship ?? target, resolveTree: nodeField, context, }); - const aggregationField = new ConnectionAggregationField({ alias: resolveTreeAggregate.name, // Alias is hanlded by graphql on top level nodeAlias: nodeField.alias, operation: aggregationOperation, }); - operation.aggregationField = aggregationField; + operation.setAggregationField(aggregationField); } } - - this.hydrateConnectionOperationAST({ - relationship, - target: target, - resolveTree, - context, - operation, - whereArgs: resolveTreeWhere, - resolveTreeEdgeFields, - }); - - if (operation.aggregationField) { - operation.aggregationField.operation.addFilters(...operation.filters); - } - return operation; } private hydrateConnectionOperationsASTWithSort< @@ -466,6 +461,23 @@ export class ConnectionFactory { return operation; } + private parseAggregateFields({ + target, + resolveTree, + entityOrRel, + }: { + entityOrRel: RelationshipAdapter | ConcreteEntityAdapter; + target: ConcreteEntityAdapter; + resolveTree: ResolveTree; + }): ResolveTree[] { + const resolveTreeConnectionFields = this.parseConnectionResolveTree({ + entityOrRel, + target, + resolveTree, + }); + return findFieldsByNameInFieldsByTypeNameField(resolveTreeConnectionFields, "aggregate"); + } + private parseConnectionFields({ target, resolveTree, @@ -474,7 +486,33 @@ export class ConnectionFactory { entityOrRel: RelationshipAdapter | ConcreteEntityAdapter; target: ConcreteEntityAdapter; resolveTree: ResolveTree; - }): { edges: Record; aggregate: ResolveTree | undefined } { + }): Record { + const resolveTreeConnectionFields = this.parseConnectionResolveTree({ + entityOrRel, + target, + resolveTree, + }); + + const entityInterfaces = getEntityInterfaces(target); + const edgeFieldsRaw = findFieldsByNameInFieldsByTypeNameField(resolveTreeConnectionFields, "edges"); + const interfacesEdgeFields = entityInterfaces.map((interfaceAdapter) => { + return getFieldsByTypeName(edgeFieldsRaw, `${interfaceAdapter.name}Edge`); + }); + + const concreteEdgeFields = getFieldsByTypeName(edgeFieldsRaw, entityOrRel.operations.relationshipFieldTypename); + + return mergeDeep([...interfacesEdgeFields, concreteEdgeFields]); + } + + private parseConnectionResolveTree({ + target, + resolveTree, + entityOrRel, + }: { + entityOrRel: RelationshipAdapter | ConcreteEntityAdapter; + target: ConcreteEntityAdapter; + resolveTree: ResolveTree; + }): Record { // Get interfaces of the entity const entityInterfaces = getEntityInterfaces(target); @@ -489,19 +527,6 @@ export class ConnectionFactory { ]), }; - const resolveTreeConnectionFields: Record = mergeDeep[]>([ - ...interfacesFields, - concreteProjectionFields, - ]); - - const edgeFieldsRaw = findFieldsByNameInFieldsByTypeNameField(resolveTreeConnectionFields, "edges"); - const aggregateFieldsRaw = findFieldsByNameInFieldsByTypeNameField(resolveTreeConnectionFields, "aggregate"); - const interfacesEdgeFields = entityInterfaces.map((interfaceAdapter) => { - return getFieldsByTypeName(edgeFieldsRaw, `${interfaceAdapter.name}Edge`); - }); - - const concreteEdgeFields = getFieldsByTypeName(edgeFieldsRaw, entityOrRel.operations.relationshipFieldTypename); - - return { edges: mergeDeep([...interfacesEdgeFields, concreteEdgeFields]), aggregate: aggregateFieldsRaw[0] }; + return mergeDeep[]>([...interfacesFields, concreteProjectionFields]); } } From 5d364151dbbb97c63a448f1ca3f24eb58ab7a2ce Mon Sep 17 00:00:00 2001 From: angrykoala Date: Wed, 22 Jan 2025 16:44:46 +0000 Subject: [PATCH 10/10] Test multiple aliased aggregations in the same connection --- .../ast/operations/ConnectionReadOperation.ts | 2 +- .../CompositeConnectionReadOperation.ts | 2 +- .../factory/Operations/ConnectionFactory.ts | 2 +- .../aggregations/top-level/alias.int.test.ts | 91 +++++++++++++++++++ 4 files changed, 94 insertions(+), 3 deletions(-) diff --git a/packages/graphql/src/translate/queryAST/ast/operations/ConnectionReadOperation.ts b/packages/graphql/src/translate/queryAST/ast/operations/ConnectionReadOperation.ts index 5c86d4a69a..123c6811f7 100644 --- a/packages/graphql/src/translate/queryAST/ast/operations/ConnectionReadOperation.ts +++ b/packages/graphql/src/translate/queryAST/ast/operations/ConnectionReadOperation.ts @@ -44,7 +44,7 @@ export class ConnectionReadOperation extends Operation { public nodeFields: Field[] = []; public edgeFields: Field[] = []; // TODO: merge with attachedTo? - private aggregationField: ConnectionAggregationField | undefined; // TODO: multiple aggregations + private aggregationField: ConnectionAggregationField | undefined; public filters: Filter[] = []; protected pagination: Pagination | undefined; diff --git a/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeConnectionReadOperation.ts b/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeConnectionReadOperation.ts index ef5489a265..fdbf343aab 100644 --- a/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeConnectionReadOperation.ts +++ b/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeConnectionReadOperation.ts @@ -35,7 +35,7 @@ export class CompositeConnectionReadOperation extends Operation { protected sortFields: Array<{ node: Sort[]; edge: Sort[] }> = []; private pagination: Pagination | undefined; - private aggregationField: ConnectionAggregationField | undefined; // TODO: multiple aggregations + private aggregationField: ConnectionAggregationField | undefined; constructor(children: CompositeConnectionPartial[]) { super(); diff --git a/packages/graphql/src/translate/queryAST/factory/Operations/ConnectionFactory.ts b/packages/graphql/src/translate/queryAST/factory/Operations/ConnectionFactory.ts index ccb17b22b6..81f789fe16 100644 --- a/packages/graphql/src/translate/queryAST/factory/Operations/ConnectionFactory.ts +++ b/packages/graphql/src/translate/queryAST/factory/Operations/ConnectionFactory.ts @@ -227,7 +227,7 @@ export class ConnectionFactory { }); this.hydrateConnectionOperationWithAggregation({ target, - resolveTreeAggregate: resolveTreeAggregate[0], //TODO: suport for multiple aggregate fields + resolveTreeAggregate: resolveTreeAggregate[0], relationship, context, operation, 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 4260585017..2a3f3489ae 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 @@ -125,4 +125,95 @@ describe("aggregations-top_level-alias", () => { }, }); }); + + test("using multiple aliased aggregate projections", async () => { + const typeDefs = ` + type ${typeMovie} @node { + testString: ID! + title: String! + imdbRating: Int! + } + `; + + const testString = generate({ + charset: "alphabetic", + readable: true, + }); + + const minDate = new Date(); + + const maxDate = new Date(); + maxDate.setDate(maxDate.getDate() + 1); + + await testHelper.initNeo4jGraphQL({ typeDefs }); + + await testHelper.executeCypher( + ` + CREATE (:${typeMovie} {testString: "${testString}", id: "1", title: "1", imdbRating: 1, createdAt: datetime("${minDate.toISOString()}")}) + CREATE (:${typeMovie} {testString: "${testString}", id: "22", title: "22", imdbRating: 2, createdAt: datetime()}) + CREATE (:${typeMovie} {testString: "${testString}", id: "333", title: "333", imdbRating: 3, createdAt: datetime()}) + CREATE (:${typeMovie} {testString: "${testString}", id: "4444", title: "4444", imdbRating: 4, createdAt: datetime("${maxDate.toISOString()}")}) + ` + ); + + const query = /* GraphQL */ ` + { + ${typeMovie.operations.connection}(where: { testString_EQ: "${testString}" }) { + aggr1: aggregate { + node { + count + title { + shortest: shortest + longest: longest + } + imdbRating: imdbRating { + min: min + max: max + average: average + } + } + } + aggr2: aggregate { + node { + _title: title { + shortest: shortest + longest: longest + } + } + } + } + } + `; + + const gqlResult = await testHelper.executeGraphQL(query); + + expect(gqlResult.errors).toBeUndefined(); + + expect(gqlResult.data).toEqual({ + [typeMovie.operations.connection]: { + aggr1: { + node: { + count: 4, + title: { + shortest: "1", + longest: "4444", + }, + imdbRating: { + min: 1, + max: 4, + average: 2.5, + }, + }, + }, + aggr2: { + node: { + _title: { + shortest: "1", + longest: "4444", + }, + }, + }, + }, + }); + }); });