diff --git a/.changeset/quick-eagles-join.md b/.changeset/quick-eagles-join.md new file mode 100644 index 0000000000..62a6a08649 --- /dev/null +++ b/.changeset/quick-eagles-join.md @@ -0,0 +1,5 @@ +--- +"@neo4j/graphql": major +--- + +Remove deprecated fields `*aggregate` in favor of the `aggregate` field in connections. Remove option `deprecatedAggregateOperations` from the `excludeDeprecatedFields` setting. diff --git a/packages/graphql/src/schema/create-relationship-fields/create-relationship-fields.ts b/packages/graphql/src/schema/create-relationship-fields/create-relationship-fields.ts index a2387bbea6..5a7fea3cb2 100644 --- a/packages/graphql/src/schema/create-relationship-fields/create-relationship-fields.ts +++ b/packages/graphql/src/schema/create-relationship-fields/create-relationship-fields.ts @@ -18,8 +18,7 @@ */ import { GraphQLNonNull, GraphQLString, type DirectiveNode } from "graphql"; -import type { Directive, InterfaceTypeComposer, SchemaComposer } from "graphql-compose"; -import { ObjectTypeComposer } from "graphql-compose"; +import { ObjectTypeComposer, type Directive, type InterfaceTypeComposer, type SchemaComposer } from "graphql-compose"; import { type ComplexityEstimatorHelper } from "../../classes/ComplexityEstimatorHelper"; import type { Subgraph } from "../../classes/Subgraph"; import { DEPRECATED } from "../../constants"; @@ -30,7 +29,6 @@ import { RelationshipAdapter } from "../../schema-model/relationship/model-adapt import { RelationshipDeclarationAdapter } from "../../schema-model/relationship/model-adapters/RelationshipDeclarationAdapter"; import type { Neo4jFeaturesSettings } from "../../types"; import { FieldAggregationComposer } from "../aggregations/field-aggregation-composer"; -import { DEPRECATE_NESTED_AGGREGATION } from "../constants"; import { augmentObjectOrInterfaceTypeWithConnectionField, augmentObjectOrInterfaceTypeWithRelationshipField, @@ -48,7 +46,6 @@ import { getRelationshipPropertiesTypeDescription, withObjectType } from "../gen import { withRelationInputType } from "../generation/relation-input"; import { withSortInputType } from "../generation/sort-and-options-input"; import { augmentUpdateInputTypeWithUpdateFieldInput, withUpdateInputType } from "../generation/update-input"; -import { shouldAddDeprecatedFields } from "../generation/utils"; import { withSourceWhereInputType, withWhereInputType } from "../generation/where-input"; import { graphqlDirectivesToCompose } from "../to-compose"; @@ -269,29 +266,7 @@ export function createRelationshipFields({ // make a new fn augmentObjectTypeWithAggregationField const fieldAggregationComposer = new FieldAggregationComposer(schemaComposer, subgraph); - const aggregationTypeObject = fieldAggregationComposer.createAggregationTypeObject( - relationshipAdapter, - features - ); - - const aggregationFieldsBaseArgs = { - where: relationshipTarget.operations.whereInputTypeName, - }; - - if (relationshipAdapter.aggregate) { - if (shouldAddDeprecatedFields(features, "deprecatedAggregateOperations")) { - composeNode.addFields({ - [relationshipAdapter.operations.aggregateFieldName]: { - type: aggregationTypeObject, - args: aggregationFieldsBaseArgs, - directives: - deprecatedDirectives.length > 0 - ? deprecatedDirectives - : [DEPRECATE_NESTED_AGGREGATION(relationshipAdapter)], - }, - }); - } - } + fieldAggregationComposer.createAggregationTypeObject(relationshipAdapter, features); } if (relationshipTarget instanceof ConcreteEntityAdapter) { diff --git a/packages/graphql/src/schema/make-augmented-schema.ts b/packages/graphql/src/schema/make-augmented-schema.ts index 5e48128919..6e4b764cb1 100644 --- a/packages/graphql/src/schema/make-augmented-schema.ts +++ b/packages/graphql/src/schema/make-augmented-schema.ts @@ -45,13 +45,13 @@ import { cypherResolver } from "./resolvers/field/cypher"; import { createResolver } from "./resolvers/mutation/create"; import { deleteResolver } from "./resolvers/mutation/delete"; import { updateResolver } from "./resolvers/mutation/update"; -import { aggregateResolver } from "./resolvers/query/aggregate"; import { findResolver } from "./resolvers/query/read"; import { rootConnectionResolver } from "./resolvers/query/root-connection"; import { attributeAdapterToComposeFields, graphqlDirectivesToCompose } from "./to-compose"; // GraphQL type imports import type { GraphQLToolsResolveMethods } from "graphql-compose/lib/SchemaComposer"; +import { type ComplexityEstimatorHelper } from "../classes/ComplexityEstimatorHelper"; import type { Subgraph } from "../classes/Subgraph"; import { SHAREABLE } from "../constants"; import { CreateInfo } from "../graphql/objects/CreateInfo"; @@ -72,7 +72,6 @@ import { RelationshipDeclarationAdapter } from "../schema-model/relationship/mod import type { CypherField, Neo4jFeaturesSettings } from "../types"; import { asArray, 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"; @@ -83,14 +82,12 @@ import { withInterfaceType } from "./generation/interface-type"; import { withObjectType } from "./generation/object-type"; import { withMutationResponseTypes } from "./generation/response-types"; 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"; import { filterInterfaceTypes } from "./make-augmented-schema/filter-interface-types"; import { getUserDefinedDirectives } from "./make-augmented-schema/user-defined-directives"; import { generateSubscriptionTypes } from "./subscriptions/generate-subscription-types"; -import { type ComplexityEstimatorHelper } from "../classes/ComplexityEstimatorHelper"; function definitionNodeHasName(x: DefinitionNode): x is DefinitionNode & { name: NameNode } { return "name" in x; @@ -322,12 +319,12 @@ function makeAugmentedSchema({ graphqlDirectivesToCompose(userDefinedDirectivesForUnion.get(unionEntityAdapter.name) || []) ); if (unionEntityAdapter.isReadable) { - complexityEstimatorHelper.registerField("Query", unionEntityAdapter.operations.rootTypeFieldNames.read) + complexityEstimatorHelper.registerField("Query", unionEntityAdapter.operations.rootTypeFieldNames.read); composer.Query.addFields({ [unionEntityAdapter.operations.rootTypeFieldNames.read]: findResolver({ entityAdapter: unionEntityAdapter, composer, - isLimitRequired: features?.limitRequired, + isLimitRequired: features?.limitRequired, }), }); } @@ -463,9 +460,9 @@ function makeAugmentedSchema({ } const generatedTypeDefs = composer.toSDL(); - + let parsedDoc = parse(generatedTypeDefs); - + const documentNames = new Set(parsedDoc.definitions.filter(definitionNodeHasName).map((x) => x.name.value)); const resolveMethods = getResolveAndSubscriptionMethods(composer); @@ -528,8 +525,12 @@ function makeAugmentedSchema({ parsedDoc = { ...parsedDoc, - definitions: getTransformedDefinitionNodesForAugmentedSchema({schemaExtensions, definitions: parsedDoc.definitions, complexityEstimatorHelper}), - } + definitions: getTransformedDefinitionNodesForAugmentedSchema({ + schemaExtensions, + definitions: parsedDoc.definitions, + complexityEstimatorHelper, + }), + }; return { nodes, @@ -539,66 +540,61 @@ function makeAugmentedSchema({ }; } -function getTransformedDefinitionNodesForAugmentedSchema({ - schemaExtensions, - definitions, - complexityEstimatorHelper, +function getTransformedDefinitionNodesForAugmentedSchema({ + schemaExtensions, + definitions, + complexityEstimatorHelper, }: { - schemaExtensions: SchemaExtensionNode | undefined; - definitions: readonly DefinitionNode[]; - complexityEstimatorHelper: ComplexityEstimatorHelper + schemaExtensions: SchemaExtensionNode | undefined; + definitions: readonly DefinitionNode[]; + complexityEstimatorHelper: ComplexityEstimatorHelper; }): DefinitionNode[] { - const definitionNodes: DefinitionNode[] = [] + const definitionNodes: DefinitionNode[] = []; // do not propagate Neo4jGraphQL directives on schema extensions - asArray(schemaExtensions).reduce( - (acc, schemaExtension: SchemaExtensionNode) => { - acc.push({ - kind: schemaExtension.kind, - loc: schemaExtension.loc, - operationTypes: schemaExtension.operationTypes, - directives: schemaExtension.directives?.filter( - (schemaDirective) => - !["query", "mutation", "subscription", "authentication"].includes(schemaDirective.name.value) - ), - }) - return acc; - }, definitionNodes) + asArray(schemaExtensions).reduce((acc, schemaExtension: SchemaExtensionNode) => { + acc.push({ + kind: schemaExtension.kind, + loc: schemaExtension.loc, + operationTypes: schemaExtension.operationTypes, + directives: schemaExtension.directives?.filter( + (schemaDirective) => + !["query", "mutation", "subscription", "authentication"].includes(schemaDirective.name.value) + ), + }); + return acc; + }, definitionNodes); // filter out some definition nodes // add FieldEstimator extensions for complexity calculation - const seen = {} + const seen = {}; definitions.reduce((acc, definition) => { if (shouldKeepDefinitionNode(definition, seen)) { - acc.push(complexityEstimatorHelper.hydrateDefinitionNodeWithComplexityExtensions(definition)) + acc.push(complexityEstimatorHelper.hydrateDefinitionNodeWithComplexityExtensions(definition)); } return acc; - }, definitionNodes) + }, definitionNodes); return definitionNodes; } function shouldKeepDefinitionNode(definition: DefinitionNode, seen: Record) { - // Filter out default scalars, they are not needed and can cause issues - if (definition.kind === Kind.SCALAR_TYPE_DEFINITION) { - if ( - [ - GraphQLBoolean.name, - GraphQLFloat.name, - GraphQLID.name, - GraphQLInt.name, - GraphQLString.name, - ].includes(definition.name.value) - ) { - return false; - } - } - if (!("name" in definition)) { - return true; - } - const n = definition.name?.value as string; - if (seen[n]) { - return false; - } - seen[n] = n; - return true; + // Filter out default scalars, they are not needed and can cause issues + if (definition.kind === Kind.SCALAR_TYPE_DEFINITION) { + if ( + [GraphQLBoolean.name, GraphQLFloat.name, GraphQLID.name, GraphQLInt.name, GraphQLString.name].includes( + definition.name.value + ) + ) { + return false; + } + } + if (!("name" in definition)) { + return true; + } + const n = definition.name?.value as string; + if (seen[n]) { + return false; + } + seen[n] = n; + return true; } export default makeAugmentedSchema; @@ -669,7 +665,7 @@ function generateObjectType({ ensureNonEmptyInput(composer, concreteEntityAdapter.operations.createInputTypeName); if (concreteEntityAdapter.isReadable) { - complexityEstimatorHelper.registerField("Query", concreteEntityAdapter.operations.rootTypeFieldNames.read) + complexityEstimatorHelper.registerField("Query", concreteEntityAdapter.operations.rootTypeFieldNames.read); composer.Query.addFields({ [concreteEntityAdapter.operations.rootTypeFieldNames.read]: findResolver({ entityAdapter: concreteEntityAdapter, @@ -682,8 +678,10 @@ function generateObjectType({ graphqlDirectivesToCompose(propagatedDirectives) ); - - complexityEstimatorHelper.registerField("Query", concreteEntityAdapter.operations.rootTypeFieldNames.connection) + complexityEstimatorHelper.registerField( + "Query", + concreteEntityAdapter.operations.rootTypeFieldNames.connection + ); composer.Query.addFields({ [concreteEntityAdapter.operations.rootTypeFieldNames.connection]: rootConnectionResolver({ composer, @@ -705,18 +703,6 @@ function generateObjectType({ composer, features, }); - - 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) { @@ -816,7 +802,7 @@ function generateInterfaceObjectType({ const propagatedDirectives = propagatedDirectivesForNode.get(interfaceEntityAdapter.name) || []; if (interfaceEntityAdapter.isReadable) { - complexityEstimatorHelper.registerField("Query", interfaceEntityAdapter.operations.rootTypeFieldNames.read) + complexityEstimatorHelper.registerField("Query", interfaceEntityAdapter.operations.rootTypeFieldNames.read); composer.Query.addFields({ [interfaceEntityAdapter.operations.rootTypeFieldNames.read]: findResolver({ entityAdapter: interfaceEntityAdapter, @@ -830,7 +816,10 @@ function generateInterfaceObjectType({ graphqlDirectivesToCompose(propagatedDirectives) ); - complexityEstimatorHelper.registerField("Query", interfaceEntityAdapter.operations.rootTypeFieldNames.connection) + complexityEstimatorHelper.registerField( + "Query", + interfaceEntityAdapter.operations.rootTypeFieldNames.connection + ); composer.Query.addFields({ [interfaceEntityAdapter.operations.rootTypeFieldNames.connection]: rootConnectionResolver({ composer, @@ -852,18 +841,5 @@ function generateInterfaceObjectType({ composer, features, }); - - 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/schema/resolvers/query/aggregate.ts b/packages/graphql/src/schema/resolvers/query/aggregate.ts deleted file mode 100644 index d11ee8bf5f..0000000000 --- a/packages/graphql/src/schema/resolvers/query/aggregate.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import type { 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"; - -export function aggregateResolver({ - entityAdapter, -}: { - entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter; -}) { - async function resolve(_root: any, _args: any, context: Neo4jGraphQLComposedContext, info: GraphQLResolveInfo) { - const resolveTree = getNeo4jResolveTree(info); - - (context as Neo4jGraphQLTranslationContext).resolveTree = resolveTree; - - const { cypher, params } = translateAggregate({ - context: context as Neo4jGraphQLTranslationContext, - entityAdapter: entityAdapter, - }); - - const executeResult = await execute({ - cypher, - params, - defaultAccessMode: "READ", - context, - info, - }); - - return Object.values(executeResult.records[0] || {})[0]; - } - - return { - type: `${entityAdapter.operations.aggregateTypeNames.selection}!`, - resolve, - args: { - where: entityAdapter.operations.whereInputTypeName, - }, - }; -} diff --git a/packages/graphql/src/translate/queryAST/ast/operations/AggregationOperation.ts b/packages/graphql/src/translate/queryAST/ast/operations/AggregationOperation.ts index 74431e0dbd..3d6d867cc8 100644 --- a/packages/graphql/src/translate/queryAST/ast/operations/AggregationOperation.ts +++ b/packages/graphql/src/translate/queryAST/ast/operations/AggregationOperation.ts @@ -48,8 +48,6 @@ export class AggregationOperation extends Operation { protected filters: Filter[] = []; - public isInConnectionField = false; // Used for compatibility with deprecated aggregations, this will always be true in 7.x - constructor({ entity, directed = true, @@ -102,21 +100,10 @@ export class AggregationOperation extends Operation { } const clauses = this.transpileAggregation(context); - const isTopLevel = !(this.entity instanceof RelationshipAdapter); - if (isTopLevel && !this.isInConnectionField) { - // This is to support deprecated aggregations - const clausesSubqueries = clauses.flatMap((sq) => new Cypher.Call(sq)); - - return { - clauses: clausesSubqueries, - projectionExpr: this.aggregationProjectionMap, - }; - } else { - return { - clauses, - projectionExpr: this.aggregationProjectionMap, - }; - } + return { + clauses, + projectionExpr: this.aggregationProjectionMap, + }; } protected getPredicates(queryASTContext: QueryASTContext): Cypher.Predicate | undefined { @@ -175,12 +162,7 @@ export class AggregationOperation extends Operation { const fieldSubqueries = this.fields.map((f) => { const returnVariable = new Cypher.Variable(); this.aggregationProjectionMap.set(f.getProjectionField(returnVariable)); - // if (this.isInConnectionField) { - // // Default fields are in node in connection translation - // nodeMap.set(f.getProjectionField(returnVariable)); - // } else { - // this.aggregationProjectionMap.set(f.getProjectionField(returnVariable)); - // } + return this.createSubquery(f, pattern, returnVariable, context); }); diff --git a/packages/graphql/src/translate/queryAST/ast/operations/ConnectionReadOperation.ts b/packages/graphql/src/translate/queryAST/ast/operations/ConnectionReadOperation.ts index 080b654328..5fb30751e5 100644 --- a/packages/graphql/src/translate/queryAST/ast/operations/ConnectionReadOperation.ts +++ b/packages/graphql/src/translate/queryAST/ast/operations/ConnectionReadOperation.ts @@ -95,7 +95,6 @@ export class ConnectionReadOperation extends Operation { /** 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[] { diff --git a/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeAggregationOperation.ts b/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeAggregationOperation.ts index fc737420cd..2170db752b 100644 --- a/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeAggregationOperation.ts +++ b/packages/graphql/src/translate/queryAST/ast/operations/composite/CompositeAggregationOperation.ts @@ -47,8 +47,6 @@ export class CompositeAggregationOperation extends Operation { private nodeMap = new Cypher.Map(); private edgeMap = new Cypher.Map(); - public isInConnectionField = false; // Used for compatibility with deprecated aggregations, this will always be true in 7.x - constructor({ compositeEntity, children, @@ -92,18 +90,8 @@ export class CompositeAggregationOperation extends Operation { }); const result = this.transpileAggregationOperation(newContext, false); - let subqueriesAggr: Cypher.Clause[]; - if (!this.isInConnectionField) { - // NOTE: This is for compatibility with deprecated aggregations - subqueriesAggr = result.clauses.map((clause) => { - return new Cypher.Call(clause); - }); - } else { - subqueriesAggr = result.clauses; - } - return { - clauses: subqueriesAggr, + clauses: result.clauses, projectionExpr: result.projectionExpr, }; } diff --git a/packages/graphql/src/translate/queryAST/factory/Operations/AggregateFactory.ts b/packages/graphql/src/translate/queryAST/factory/Operations/AggregateFactory.ts index ed2a17d0ae..3c36740e4d 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 { ConcreteEntityAdapter } from "../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; +import type { 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"; @@ -100,7 +100,7 @@ export class AggregateFactory { const nodeRawFields = { ...parsedProjectionFields.node?.fieldsByTypeName[ - entityOrRel.operations.getAggregationFieldTypename("node") + entityOrRel.operations.getAggregateFieldTypename("node") ], }; @@ -220,25 +220,8 @@ export class AggregateFactory { edge: ResolveTree | undefined; fields: Record; } { - let nodeFields: Record = {}; - if (adapter instanceof ConcreteEntityAdapter) { - nodeFields = { - ...(resolveTree.fieldsByTypeName[adapter.operations.aggregateTypeNames.node] ?? {}), - ...(resolveTree.fieldsByTypeName[adapter.operations.aggregateTypeNames.connection] ?? {}), - }; - } - if (adapter instanceof RelationshipAdapter) { - nodeFields = resolveTree.fieldsByTypeName[adapter.operations.getAggregationFieldTypename("node")] ?? {}; - } - if (adapter instanceof RelationshipAdapter) { - nodeFields = resolveTree.fieldsByTypeName[adapter.operations.getAggregationFieldTypename("node")] ?? {}; - } - const rawProjectionFields = { - // Handle deprecated aggregations - ...resolveTree.fieldsByTypeName[adapter.operations.getAggregationFieldTypename()], ...resolveTree.fieldsByTypeName[adapter.operations.getAggregateFieldTypename()], - ...nodeFields, }; return this.queryASTFactory.operationsFactory.splitConnectionFields(rawProjectionFields); } @@ -263,13 +246,13 @@ export class AggregateFactory { const edgeRawFields = { ...parsedProjectionFields.edge?.fieldsByTypeName[ - relationship.operations.getAggregationFieldTypename("edge") + relationship.operations.getAggregateFieldTypename("edge") ], }; const nodeRawFields = { ...parsedProjectionFields.node?.fieldsByTypeName[ - relationship.operations.getAggregationFieldTypename("node") + relationship.operations.getAggregateFieldTypename("node") ], }; diff --git a/packages/graphql/src/translate/queryAST/factory/Operations/ConnectionFactory.ts b/packages/graphql/src/translate/queryAST/factory/Operations/ConnectionFactory.ts index 8a9e765896..05a3cad327 100644 --- a/packages/graphql/src/translate/queryAST/factory/Operations/ConnectionFactory.ts +++ b/packages/graphql/src/translate/queryAST/factory/Operations/ConnectionFactory.ts @@ -266,8 +266,6 @@ export class ConnectionFactory { context, extraWhereArgs: whereArgs, }); - // NOTE: This will always be true on 7.x and this attribute should be removed - aggregationOperation.isInConnectionField = true; const aggregationField = new ConnectionAggregationField({ alias: resolveTreeAggregate.name, // Alias is hanlded by graphql on top level nodeAlias: "node", @@ -288,8 +286,6 @@ export class ConnectionFactory { extraWhereArgs: whereArgs, }); - // NOTE: This will always be true on 7.x and this attribute should be removed - aggregationOperation.isInConnectionField = true; const aggregationField = new ConnectionAggregationField({ alias: resolveTreeAggregate.name, // Alias is hanlded by graphql on top level nodeAlias: "node", diff --git a/packages/graphql/src/types/index.ts b/packages/graphql/src/types/index.ts index 49d43366b4..63a3375ea8 100644 --- a/packages/graphql/src/types/index.ts +++ b/packages/graphql/src/types/index.ts @@ -452,7 +452,6 @@ export type Neo4jFeaturesSettings = { aggregationFiltersOutsideConnection?: boolean relationshipFilters?: boolean; attributeFilters?: boolean; - deprecatedAggregateOperations?: boolean; }; vector?: Neo4jVectorSettings; limitRequired?: boolean; diff --git a/packages/graphql/tests/integration/aggregations/field-level/authorization/field-aggregation-authorization-where.int.test.ts b/packages/graphql/tests/integration/aggregations/field-level/authorization/field-aggregation-authorization-where.int.test.ts index da315f6449..5d2cdd2861 100644 --- a/packages/graphql/tests/integration/aggregations/field-level/authorization/field-aggregation-authorization-where.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/field-level/authorization/field-aggregation-authorization-where.int.test.ts @@ -75,8 +75,12 @@ describe(`Field Level Authorization Where Requests`, () => { test("authenticated query", async () => { const query = `query { ${typeMovie.plural} { - ${typeActor.plural}Aggregate { - count + ${typeActor.operations.connection} { + aggregate { + count { + nodes + } + } } } }`; @@ -84,16 +88,30 @@ describe(`Field Level Authorization Where Requests`, () => { const token = createBearerToken(secret, { sub: "1234" }); const gqlResult = await testHelper.executeGraphQLWithToken(query, token); expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0][`${typeActor.plural}Aggregate`]).toEqual({ - count: 1, + expect(gqlResult.data).toEqual({ + [typeMovie.plural]: [ + { + [typeActor.operations.connection]: { + aggregate: { + count: { + nodes: 1, + }, + }, + }, + }, + ], }); }); test("unauthenticated query", async () => { const query = `query { ${typeMovie.plural} { - ${typeActor.plural}Aggregate { - count + ${typeActor.operations.connection} { + aggregate { + count { + nodes + } + } } } }`; @@ -101,16 +119,20 @@ describe(`Field Level Authorization Where Requests`, () => { const gqlResult = await testHelper.executeGraphQL(query); expect(gqlResult.errors).toBeUndefined(); - expect(gqlResult.data as any).toEqual({ - [typeMovie.plural]: [{ [`${typeActor.plural}Aggregate`]: { count: 0 } }], + expect(gqlResult.data).toEqual({ + [typeMovie.plural]: [{ [typeActor.operations.connection]: { aggregate: { count: { nodes: 0 } } } }], }); }); test("authenticated query with wrong credentials", async () => { const query = `query { ${typeMovie.plural} { - ${typeActor.plural}Aggregate { - count + ${typeActor.operations.connection} { + aggregate { + count { + nodes + } + } } } }`; @@ -118,8 +140,8 @@ describe(`Field Level Authorization Where Requests`, () => { const invalidToken = createBearerToken(secret, { sub: "2222" }); const gqlResult = await testHelper.executeGraphQLWithToken(query, invalidToken); expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0][`${typeActor.plural}Aggregate`]).toEqual({ - count: 0, + expect(gqlResult.data).toEqual({ + [typeMovie.plural]: [{ [typeActor.operations.connection]: { aggregate: { count: { nodes: 0 } } } }], }); }); }); diff --git a/packages/graphql/tests/integration/aggregations/field-level/authorization/field-aggregation-authorization.int.test.ts b/packages/graphql/tests/integration/aggregations/field-level/authorization/field-aggregation-authorization.int.test.ts index a3db17a804..8eca18008f 100644 --- a/packages/graphql/tests/integration/aggregations/field-level/authorization/field-aggregation-authorization.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/field-level/authorization/field-aggregation-authorization.int.test.ts @@ -23,7 +23,7 @@ import { TestHelper } from "../../../../utils/tests-helper"; describe("Field Level Aggregations Auth", () => { const testCases = [ - { name: "count", selection: "count" }, + { name: "count", selection: "count { nodes }" }, { name: "string", selection: `node {name {longest, shortest}}` }, { name: "number", selection: `node {year {max, min, average}}` }, { name: "default", selection: `node { createdAt {max, min}}` }, @@ -88,8 +88,12 @@ describe("Field Level Aggregations Auth", () => { test("accepts authenticated requests to movie -> actorAggregate", async () => { const query = `query { ${typeMovie.plural} { - actorsAggregate { - count + actorsConnection { + aggregate { + count { + nodes + } + } } } }`; @@ -101,8 +105,10 @@ describe("Field Level Aggregations Auth", () => { test("accepts authenticated requests to actor -> movieAggregate", async () => { const query = `query { ${typeActor.plural} { - moviesAggregate { - ${selection} + moviesConnection { + aggregate { + ${selection} + } } } }`; @@ -114,8 +120,10 @@ describe("Field Level Aggregations Auth", () => { test("accepts unauthenticated requests to movie -> actorAggregate (only movie aggregations require authentication)", async () => { const query = `query { ${typeMovie.plural} { - actorsAggregate { - ${selection} + actorsConnection { + aggregate { + ${selection} + } } } }`; @@ -127,8 +135,10 @@ describe("Field Level Aggregations Auth", () => { test("rejects unauthenticated requests to actor -> movieAggregate", async () => { const query = `query { ${typeActor.plural} { - moviesAggregate { - ${selection} + moviesConnection { + aggregate { + ${selection} + } } } }`; @@ -194,8 +204,10 @@ describe("Field Level Aggregations Auth", () => { test("authenticated query", async () => { const query = `query { ${typeActor.plural} { - moviesAggregate { - ${selection} + moviesConnection { + aggregate { + ${selection} + } } } }`; @@ -208,8 +220,10 @@ describe("Field Level Aggregations Auth", () => { test("unauthenticated query", async () => { const query = `query { ${typeActor.plural} { - moviesAggregate { - ${selection} + moviesConnection { + aggregate { + ${selection} + } } } }`; @@ -221,8 +235,10 @@ describe("Field Level Aggregations Auth", () => { test("authenticated query with wrong credentials", async () => { const query = `query { ${typeActor.plural} { - moviesAggregate { - ${selection} + moviesConnection { + aggregate { + ${selection} + } } } }`; diff --git a/packages/graphql/tests/integration/aggregations/field-level/authorization/field-aggregation-field-authorization.int.test.ts b/packages/graphql/tests/integration/aggregations/field-level/authorization/field-aggregation-field-authorization.int.test.ts index bfc5232ab1..775038fe36 100644 --- a/packages/graphql/tests/integration/aggregations/field-level/authorization/field-aggregation-field-authorization.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/field-level/authorization/field-aggregation-field-authorization.int.test.ts @@ -94,10 +94,12 @@ describe("Field Level Aggregations Field Authorization", () => { const query = ` query { ${Actor.plural} { - actedInAggregate { - node { - title { - longest + actedInConnection { + aggregate { + node { + title { + longest + } } } } diff --git a/packages/graphql/tests/integration/aggregations/field-level/nested-field-level-aggregations.int.test.ts b/packages/graphql/tests/integration/aggregations/field-level/nested-field-level-aggregations.int.test.ts index e3ac15ebec..5dde282a9e 100644 --- a/packages/graphql/tests/integration/aggregations/field-level/nested-field-level-aggregations.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/field-level/nested-field-level-aggregations.int.test.ts @@ -70,8 +70,12 @@ describe("Nested Field Level Aggregations", () => { name movies: ${typeMovie.plural} { title - actorAggregate: ${typeActor.plural}Aggregate { - count + actorAggregate: ${typeActor.plural}Connection { + aggregate { + count { + nodes + } + } } } } @@ -84,11 +88,11 @@ describe("Nested Field Level Aggregations", () => { expect(movies).toHaveLength(2); expect(movies).toContainEqual({ title: "Terminator", - actorAggregate: { count: 2 }, + actorAggregate: { aggregate: { count: { nodes: 2 } } }, }); expect(movies).toContainEqual({ title: "Total Recall", - actorAggregate: { count: 1 }, + actorAggregate: { aggregate: { count: { nodes: 1 } } }, }); }); }); diff --git a/packages/graphql/tests/integration/aggregations/field-level/where/field-aggregation-where.int.test.ts b/packages/graphql/tests/integration/aggregations/field-level/where/field-aggregation-where.int.test.ts index 7ccdc4e909..97f476ed70 100644 --- a/packages/graphql/tests/integration/aggregations/field-level/where/field-aggregation-where.int.test.ts +++ b/packages/graphql/tests/integration/aggregations/field-level/where/field-aggregation-where.int.test.ts @@ -64,8 +64,12 @@ describe("Field Level Aggregations Where", () => { const query = /* GraphQL */ ` query { ${typeMovie.plural} { - actorsAggregate(where: {name: { eq: "Linda" }}) { - count + actorsConnection(where: { node: {name: { eq: "Linda" } }}) { + aggregate { + count { + nodes + } + } } } } @@ -74,8 +78,12 @@ describe("Field Level Aggregations Where", () => { const gqlResult = await testHelper.executeGraphQL(query); expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0].actorsAggregate).toEqual({ - count: 1, + expect((gqlResult as any).data[typeMovie.plural][0].actorsConnection).toEqual({ + aggregate: { + count: { + nodes: 1, + }, + }, }); }); @@ -83,8 +91,12 @@ describe("Field Level Aggregations Where", () => { const query = /* GraphQL */ ` query { ${typeMovie.plural} { - actorsAggregate(where: {OR: [{name: { eq: "Linda" }}, {name: { eq: "Arnold" }}]}) { - count + actorsConnection(where: {node: {OR: [{name: { eq: "Linda" }}, {name: { eq: "Arnold" }}]}}) { + aggregate { + count { + nodes + } + } } } } @@ -93,8 +105,12 @@ describe("Field Level Aggregations Where", () => { const gqlResult = await testHelper.executeGraphQL(query); expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0].actorsAggregate).toEqual({ - count: 2, + expect((gqlResult as any).data[typeMovie.plural][0].actorsConnection).toEqual({ + aggregate: { + count: { + nodes: 2, + }, + }, }); }); @@ -102,16 +118,24 @@ describe("Field Level Aggregations Where", () => { const query = /* GraphQL */ ` query { ${typeMovie.plural} { - actorsAggregate(where: { moviesConnection: { aggregate: { count: { nodes: { eq: 1 } } } }}) { - count + actorsConnection(where: { node: {moviesConnection: { aggregate: { count: { nodes: { eq: 1 } } } }}}) { + aggregate { + count { + nodes + } + } } } }`; const gqlResult = await testHelper.executeGraphQL(query); expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0].actorsAggregate).toEqual({ - count: 2, + expect((gqlResult as any).data[typeMovie.plural][0].actorsConnection).toEqual({ + aggregate: { + count: { + nodes: 2, + }, + }, }); }); @@ -120,16 +144,24 @@ describe("Field Level Aggregations Where", () => { const query = /* GraphQL */ ` query { ${typePerson.plural} { - moviesAggregate(where: { actorsConnection: { some: { node: { name: { eq: "Linda" } } } }}){ - count + moviesConnection(where: { node: { actorsConnection: { some: { node: { name: { eq: "Linda" } } } } }}){ + aggregate { + count { + nodes + } + } } } }`; const gqlResult = await testHelper.executeGraphQL(query); expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typePerson.plural][0].moviesAggregate).toEqual({ - count: 1, + expect((gqlResult as any).data[typePerson.plural][0].moviesConnection).toEqual({ + aggregate: { + count: { + nodes: 1, + }, + }, }); }); @@ -137,16 +169,24 @@ describe("Field Level Aggregations Where", () => { const query = /* GraphQL */ ` query { ${typePerson.plural} { - moviesAggregate(where: { actorsConnection: { some: { edge: { screentime: { gt: 10 } } } }}){ - count + moviesConnection(where: { node: { actorsConnection: { some: { edge: { screentime: { gt: 10 } } }} }}){ + aggregate { + count { + nodes + } + } } } }`; const gqlResult = await testHelper.executeGraphQL(query); expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typePerson.plural][0].moviesAggregate).toEqual({ - count: 1, + expect((gqlResult as any).data[typePerson.plural][0].moviesConnection).toEqual({ + aggregate: { + count: { + nodes: 1, + }, + }, }); }); @@ -154,16 +194,24 @@ describe("Field Level Aggregations Where", () => { const query = /* GraphQL */ ` query { ${typePerson.plural} { - moviesAggregate(where: { actorsConnection: { some: { node: { OR: [{ name: { eq: "Linda" } },{ name: { eq: "Arnold" } } ] } } }}){ - count + moviesConnection(where: { node: { actorsConnection: { some: { node: { OR: [{ name: { eq: "Linda" } },{ name: { eq: "Arnold" } } ] } }} }}){ + aggregate { + count { + nodes + } + } } } }`; const gqlResult = await testHelper.executeGraphQL(query); expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typePerson.plural][0].moviesAggregate).toEqual({ - count: 1, + expect((gqlResult as any).data[typePerson.plural][0].moviesConnection).toEqual({ + aggregate: { + count: { + nodes: 1, + }, + }, }); }); }); @@ -172,8 +220,12 @@ describe("Field Level Aggregations Where", () => { const query = /* GraphQL */ ` query { ${typeMovie.plural} { - actorsAggregate(where: {name: { in: ["Linda", "Arnold"] }}) { - count + actorsConnection(where: {node: {name: { in: ["Linda", "Arnold"] }}}) { + aggregate { + count { + nodes + } + } } } } @@ -182,8 +234,12 @@ describe("Field Level Aggregations Where", () => { const gqlResult = await testHelper.executeGraphQL(query); expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0].actorsAggregate).toEqual({ - count: 2, + expect((gqlResult as any).data[typeMovie.plural][0].actorsConnection).toEqual({ + aggregate: { + count: { + nodes: 2, + }, + }, }); }); @@ -191,8 +247,12 @@ describe("Field Level Aggregations Where", () => { const query = /* GraphQL */ ` query { ${typeMovie.plural} { - actorsAggregate(where: {age: { in: [40, 60, 37] }}) { - count + actorsConnection(where: {node: {age: { in: [40, 60, 37] }}}) { + aggregate { + count { + nodes + } + } } } } @@ -201,8 +261,12 @@ describe("Field Level Aggregations Where", () => { const gqlResult = await testHelper.executeGraphQL(query); expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0].actorsAggregate).toEqual({ - count: 1, + expect((gqlResult as any).data[typeMovie.plural][0].actorsConnection).toEqual({ + aggregate: { + count: { + nodes: 1, + }, + }, }); }); @@ -210,8 +274,12 @@ describe("Field Level Aggregations Where", () => { const query = /* GraphQL */ ` query { ${typeMovie.plural} { - actorsAggregate(where: {born: { gt: "2000-01-01" }}) { - count + actorsConnection(where: {node: {born: { gt: "2000-01-01" }}}) { + aggregate { + count { + nodes + } + } } } } @@ -220,8 +288,12 @@ describe("Field Level Aggregations Where", () => { const gqlResult = await testHelper.executeGraphQL(query); expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0].actorsAggregate).toEqual({ - count: 1, + expect((gqlResult as any).data[typeMovie.plural][0].actorsConnection).toEqual({ + aggregate: { + count: { + nodes: 1, + }, + }, }); }); }); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/field-level/authorization/field-aggregation-authorization-where.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/field-level/authorization/field-aggregation-authorization-where.int.test.ts deleted file mode 100644 index f5fda7dcb1..0000000000 --- a/packages/graphql/tests/integration/deprecations/aggregations/field-level/authorization/field-aggregation-authorization-where.int.test.ts +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { createBearerToken } from "../../../../../utils/create-bearer-token"; -import type { UniqueType } from "../../../../../utils/graphql-types"; -import { TestHelper } from "../../../../../utils/tests-helper"; - -describe(`Field Level Authorization Where Requests`, () => { - const testHelper = new TestHelper(); - - let typeMovie: UniqueType; - let typeActor: UniqueType; - let typeDefs: string; - const secret = "secret"; - - beforeEach(async () => { - typeMovie = testHelper.createUniqueType("Movie"); - typeActor = testHelper.createUniqueType("Actor"); - typeDefs = ` - type ${typeMovie.name} @node { - name: String - year: Int - createdAt: DateTime - ${typeActor.plural}: [${typeActor.name}!]! @relationship(type: "ACTED_IN", direction: IN) - } - - type ${typeActor.name} @node { - name: String - year: Int - createdAt: DateTime - testStr: String - ${typeMovie.plural}: [${typeMovie.name}!]! @relationship(type: "ACTED_IN", direction: OUT) - }`; - - await testHelper.executeCypher(` - CREATE (m:${typeMovie.name} - {name: "Terminator",year:1990,createdAt: datetime()}) - <-[:ACTED_IN]- - (:${typeActor.name} { name: "Arnold", year: 1970, createdAt: datetime(), testStr: "1234"}) - CREATE (m)<-[:ACTED_IN]-(:${typeActor.name} {name: "Linda", year:1985, createdAt: datetime(), testStr: "1235"})`); - - const extendedTypeDefs = `${typeDefs} - extend type ${typeActor.name} @authorization(filter: [{ operations: [AGGREGATE], where: { node: { testStr_EQ: "$jwt.sub" } } }])`; - - await testHelper.initNeo4jGraphQL({ - typeDefs: extendedTypeDefs, - features: { - authorization: { - key: secret, - }, - }, - }); - }); - - afterEach(async () => { - await testHelper.close(); - }); - - test("authenticated query", async () => { - const query = `query { - ${typeMovie.plural} { - ${typeActor.plural}Aggregate { - count - } - } - }`; - - const token = createBearerToken(secret, { sub: "1234" }); - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); - expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0][`${typeActor.plural}Aggregate`]).toEqual({ - count: 1, - }); - }); - - test("unauthenticated query", async () => { - const query = `query { - ${typeMovie.plural} { - ${typeActor.plural}Aggregate { - count - } - } - }`; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - expect(gqlResult.data as any).toEqual({ - [typeMovie.plural]: [{ [`${typeActor.plural}Aggregate`]: { count: 0 } }], - }); - }); - - test("authenticated query with wrong credentials", async () => { - const query = `query { - ${typeMovie.plural} { - ${typeActor.plural}Aggregate { - count - } - } - }`; - - const invalidToken = createBearerToken(secret, { sub: "2222" }); - const gqlResult = await testHelper.executeGraphQLWithToken(query, invalidToken); - expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0][`${typeActor.plural}Aggregate`]).toEqual({ - count: 0, - }); - }); -}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/field-level/authorization/field-aggregation-authorization.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/field-level/authorization/field-aggregation-authorization.int.test.ts deleted file mode 100644 index eb45673b0b..0000000000 --- a/packages/graphql/tests/integration/deprecations/aggregations/field-level/authorization/field-aggregation-authorization.int.test.ts +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { createBearerToken } from "../../../../../utils/create-bearer-token"; -import type { UniqueType } from "../../../../../utils/graphql-types"; -import { TestHelper } from "../../../../../utils/tests-helper"; - -describe("Field Level Aggregations Auth", () => { - const testCases = [ - { name: "count", selection: "count" }, - { name: "string", selection: `node {name {longest, shortest}}` }, - { name: "number", selection: `node {year {max, min, average}}` }, - { name: "default", selection: `node { createdAt {max, min}}` }, - ]; - - // eslint-disable-next-line @typescript-eslint/no-unused-vars - describe.each(testCases)(`isAuthenticated auth requests ~ $name`, ({ name, selection }) => { - let token: string; - const testHelper = new TestHelper(); - - let typeMovie: UniqueType; - let typeActor: UniqueType; - let typeDefs: string; - const secret = "secret"; - - beforeEach(async () => { - typeMovie = testHelper.createUniqueType("Movie"); - typeActor = testHelper.createUniqueType("Actor"); - typeDefs = ` - type ${typeMovie.name} @node { - name: String - year: Int - createdAt: DateTime - testId: String - ${typeActor.plural}: [${typeActor.name}!]! @relationship(type: "ACTED_IN", direction: IN) - } - - type ${typeActor.name} @node { - name: String - year: Int - createdAt: DateTime - ${typeMovie.plural}: [${typeMovie.name}!]! @relationship(type: "ACTED_IN", direction: OUT) - } - - extend type ${typeMovie.name} @authentication(operations: [AGGREGATE]) - `; - - await testHelper.executeCypher(` - CREATE (m:${typeMovie.name} - {name: "Terminator",testId: "1234",year:1990,createdAt: datetime()}) - <-[:ACTED_IN]- - (:${typeActor.name} { name: "Arnold", year: 1970, createdAt: datetime()}) - - CREATE (m)<-[:ACTED_IN]-(:${typeActor.name} {name: "Linda", year:1985, createdAt: datetime()})`); - - await testHelper.initNeo4jGraphQL({ - typeDefs: typeDefs, - features: { - authorization: { - key: "secret", - }, - }, - }); - - token = createBearerToken(secret); - }); - - afterEach(async () => { - await testHelper.close(); - }); - - test("accepts authenticated requests to movie -> actorAggregate", async () => { - const query = `query { - ${typeMovie.plural} { - ${typeActor.plural}Aggregate { - count - } - } - }`; - - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); - expect(gqlResult.errors).toBeUndefined(); - }); - - test("accepts authenticated requests to actor -> movieAggregate", async () => { - const query = `query { - ${typeActor.plural} { - ${typeMovie.plural}Aggregate { - ${selection} - } - } - }`; - - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); - expect(gqlResult.errors).toBeUndefined(); - }); - - test("accepts unauthenticated requests to movie -> actorAggregate (only movie aggregations require authentication)", async () => { - const query = `query { - ${typeMovie.plural} { - ${typeActor.plural}Aggregate { - ${selection} - } - } - }`; - - const gqlResult = await testHelper.executeGraphQL(query); - expect(gqlResult.errors).toBeUndefined(); - }); - - test("rejects unauthenticated requests to actor -> movieAggregate", async () => { - const query = `query { - ${typeActor.plural} { - ${typeMovie.plural}Aggregate { - ${selection} - } - } - }`; - - const gqlResult = await testHelper.executeGraphQL(query); - expect((gqlResult.errors as any[])[0].message).toBe("Unauthenticated"); - }); - }); - // eslint-disable-next-line @typescript-eslint/no-unused-vars - describe.each(testCases)(`allow requests ~ $name`, ({ name, selection }) => { - const testHelper = new TestHelper(); - - let typeMovie: UniqueType; - let typeActor: UniqueType; - let typeDefs: string; - const secret = "secret"; - - beforeEach(async () => { - typeMovie = testHelper.createUniqueType("Movie"); - typeActor = testHelper.createUniqueType("Actor"); - typeDefs = ` - type ${typeMovie.name} @node { - name: String - year: Int - createdAt: DateTime - testId: String - ${typeActor.plural}: [${typeActor.name}!]! @relationship(type: "ACTED_IN", direction: IN) - } - - type ${typeActor.name} @node { - name: String - year: Int - createdAt: DateTime - ${typeMovie.plural}: [${typeMovie.name}!]! @relationship(type: "ACTED_IN", direction: OUT) - } - - extend type ${typeMovie.name} - @authorization(validate: [{ operations: [AGGREGATE], when: [BEFORE], where: { node: { testId_EQ: "$jwt.sub" } } }]) - `; - - await testHelper.executeCypher(` - CREATE (m:${typeMovie.name} - {name: "Terminator",testId: "1234",year:1990,createdAt: datetime()}) - <-[:ACTED_IN]- - (:${typeActor.name} { name: "Arnold", year: 1970, createdAt: datetime()}) - - CREATE (m)<-[:ACTED_IN]-(:${typeActor.name} {name: "Linda", year:1985, createdAt: datetime()})`); - - await testHelper.initNeo4jGraphQL({ - typeDefs, - features: { - authorization: { - key: "secret", - }, - }, - }); - }); - - afterEach(async () => { - await testHelper.close(); - }); - - test("authenticated query", async () => { - const query = `query { - ${typeActor.plural} { - ${typeMovie.plural}Aggregate { - ${selection} - } - } - }`; - - const token = createBearerToken(secret, { sub: "1234" }); - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); - expect(gqlResult.errors).toBeUndefined(); - }); - - test("unauthenticated query", async () => { - const query = `query { - ${typeActor.plural} { - ${typeMovie.plural}Aggregate { - ${selection} - } - } - }`; - - const gqlResult = await testHelper.executeGraphQL(query); - expect((gqlResult.errors as any[])[0].message).toBe("Forbidden"); - }); - - test("authenticated query with wrong credentials", async () => { - const query = `query { - ${typeActor.plural} { - ${typeMovie.plural}Aggregate { - ${selection} - } - } - }`; - const invalidToken = createBearerToken(secret, { sub: "2222" }); - - const gqlResult = await testHelper.executeGraphQLWithToken(query, invalidToken); - expect((gqlResult.errors as any[])[0].message).toBe("Forbidden"); - }); - }); -}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/field-level/authorization/field-aggregation-field-authorization.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/field-level/authorization/field-aggregation-field-authorization.int.test.ts deleted file mode 100644 index 2691ad285a..0000000000 --- a/packages/graphql/tests/integration/deprecations/aggregations/field-level/authorization/field-aggregation-field-authorization.int.test.ts +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { createBearerToken } from "../../../../../utils/create-bearer-token"; -import type { UniqueType } from "../../../../../utils/graphql-types"; -import { TestHelper } from "../../../../../utils/tests-helper"; - -describe("Field Level Aggregations Field Authorization", () => { - const secret = "the-secret"; - - const testHelper = new TestHelper(); - - let Series: UniqueType; - let Actor: UniqueType; - - beforeAll(async () => { - Series = testHelper.createUniqueType("Series"); - Actor = testHelper.createUniqueType("Actor"); - - const typeDefs = ` - type ${Series} @node { - title: String! @authorization(validate: [{ where: { jwt: { roles_INCLUDES: "series_title_aggregator" } } }]) - cost: Float! - episodes: Int! - } - type ActedIn @relationshipProperties { - screenTime: Int! - } - type ${Actor} @node { - name: String! - actedIn: [${Series}!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") - } - type JWT @jwt { - roles: [String!]! - } - `; - - await testHelper.initNeo4jGraphQL({ - typeDefs, - features: { - authorization: { key: secret }, - }, - }); - - await testHelper.executeCypher(` - CREATE (a:${Actor} {name: "Keanu"})-[:ACTED_ON {screenTime: 10}]->(:${Series} {title: "Doctor Who", cost: 10.0, episodes: 5000}) - `); - }); - - afterAll(async () => { - await testHelper.close(); - }); - - test("fail title validation", async () => { - const query = ` - query { - ${Series.operations.aggregate} { - title { - longest - } - } - } - `; - - const token = createBearerToken(secret, { roles: ["movies-reader", "series-reader", "series-title-reader"] }); - - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); - - expect(gqlResult.errors).toBeDefined(); - expect((gqlResult.errors as any[])[0].message).toBe("Forbidden"); - }); - - test("fail title validation in nested query", async () => { - const query = ` - query { - ${Actor.plural} { - actedInAggregate { - node { - title { - longest - } - } - } - } - } - `; - - const token = createBearerToken(secret, { roles: ["movies-reader", "series-reader", "series-title-reader"] }); - - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); - - expect(gqlResult.errors).toBeDefined(); - expect((gqlResult.errors as any[])[0].message).toBe("Forbidden"); - }); -}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/field-level/authorization/field-aggregation-where-with-authorization.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/field-level/authorization/field-aggregation-where-with-authorization.int.test.ts deleted file mode 100644 index a1868aca66..0000000000 --- a/packages/graphql/tests/integration/deprecations/aggregations/field-level/authorization/field-aggregation-where-with-authorization.int.test.ts +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { createBearerToken } from "../../../../../utils/create-bearer-token"; -import type { UniqueType } from "../../../../../utils/graphql-types"; -import { TestHelper } from "../../../../../utils/tests-helper"; - -describe(`Field Level Authorization Where Requests`, () => { - let token: string; - const testHelper = new TestHelper(); - - let typeMovie: UniqueType; - let typeActor: UniqueType; - let typeDefs: string; - - const secret = "secret"; - - beforeAll(async () => { - typeMovie = testHelper.createUniqueType("Movie"); - typeActor = testHelper.createUniqueType("Actor"); - typeDefs = ` - type ${typeMovie.name} @node { - name: String - year: Int - createdAt: DateTime - ${typeActor.plural}: [${typeActor.name}!]! @relationship(type: "ACTED_IN", direction: IN) - } - - type ${typeActor.name} @node { - name: String - year: Int - createdAt: DateTime - testStr: String - ${typeMovie.plural}: [${typeMovie.name}!]! @relationship(type: "ACTED_IN", direction: OUT) - }`; - - await testHelper.executeCypher(` - CREATE (m:${typeMovie.name} - {name: "Terminator",year:1990,createdAt: datetime()}) - <-[:ACTED_IN]- - (:${typeActor.name} { name: "Arnold", year: 1970, createdAt: datetime(), testStr: "1234"}) - CREATE (m)<-[:ACTED_IN]-(:${typeActor.name} {name: "Linda", year:1985, createdAt: datetime(), testStr: "1235"})`); - - const extendedTypeDefs = `${typeDefs} - extend type ${typeActor.name} @authorization(filter: [{ operations: [AGGREGATE], where: { node: { testStr_EQ: "$jwt.sub" } } }])`; - - await testHelper.initNeo4jGraphQL({ - typeDefs: extendedTypeDefs, - features: { - authorization: { - key: "secret", - }, - }, - }); - - token = createBearerToken(secret, { - roles: [], - sub: "1234", - }); - }); - - afterAll(async () => { - await testHelper.close(); - }); - - test("authenticated query", async () => { - const query = `query { - ${typeMovie.plural} { - ${typeActor.plural}Aggregate(where: {year_GT: 10}) { - count - node { - year { - max - }, - name { - longest, - shortest - } - }, - } - } - }`; - - const gqlResult = await testHelper.executeGraphQLWithToken(query, token); - expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0][`${typeActor.plural}Aggregate`]).toEqual({ - count: 1, - node: { - year: { - max: 1970, - }, - name: { - longest: "Arnold", - shortest: "Arnold", - }, - }, - }); - }); -}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/field-level/field-level-aggregations-graphql-alias.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/field-level/field-level-aggregations-graphql-alias.int.test.ts deleted file mode 100644 index 9cbb762c2f..0000000000 --- a/packages/graphql/tests/integration/deprecations/aggregations/field-level/field-level-aggregations-graphql-alias.int.test.ts +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import type { UniqueType } from "../../../../utils/graphql-types"; -import { TestHelper } from "../../../../utils/tests-helper"; - -describe("Field Level Aggregations Graphql alias", () => { - const testHelper = new TestHelper(); - let typeDefs: string; - - let typeMovie: UniqueType; - let typeActor: UniqueType; - - beforeAll(async () => { - typeMovie = testHelper.createUniqueType("Movie"); - typeActor = testHelper.createUniqueType("Actor"); - - typeDefs = ` - type ${typeMovie.name} @node { - title: String - ${typeActor.plural}: [${typeActor.name}!]! @relationship(type: "ACTED_IN", direction: IN, properties:"ActedIn") - } - - type ${typeActor.name} @node { - name: String - age: Int - born: DateTime - ${typeMovie.plural}: [${typeMovie.name}!]! @relationship(type: "ACTED_IN", direction: OUT, properties:"ActedIn") - } - - type ActedIn @relationshipProperties { - screentime: Int - character: String - } - `; - - await testHelper.initNeo4jGraphQL({ typeDefs }); - - await testHelper.executeCypher(`CREATE (m:${typeMovie.name} { title: "Terminator"})<-[:ACTED_IN { screentime: 60, character: "Terminator" }]-(:${typeActor.name} { name: "Arnold", age: 54, born: datetime('1980-07-02')}) - CREATE (m)<-[:ACTED_IN { screentime: 120, character: "Sarah" }]-(:${typeActor.name} {name: "Linda", age:37, born: datetime('2000-02-02')})`); - }); - - afterAll(async () => { - await testHelper.close(); - }); - - test("Field Node Aggregation alias", async () => { - const query = ` - query { - films: ${typeMovie.plural} { - aggregation: ${typeActor.plural}Aggregate { - total: count - item: node { - firstName: name { - long: longest - } - yearsOld: age { - oldest: max - } - born { - youngest: max - } - } - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data.films[0].aggregation).toEqual({ - total: 2, - item: { - firstName: { - long: "Arnold", - }, - yearsOld: { - oldest: 54, - }, - born: { - youngest: "2000-02-02T00:00:00.000Z", - }, - }, - }); - }); - - test("Field Edge Aggregation alias", async () => { - const query = ` - query { - films: ${typeMovie.plural} { - aggregation: ${typeActor.plural}Aggregate { - relation: edge { - time: screentime { - longest: max - } - } - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data.films[0].aggregation).toEqual({ - relation: { - time: { - longest: 120, - }, - }, - }); - }); -}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/field-level/field-level-aggregations.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/field-level/field-level-aggregations.int.test.ts deleted file mode 100644 index ce1163b13c..0000000000 --- a/packages/graphql/tests/integration/deprecations/aggregations/field-level/field-level-aggregations.int.test.ts +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import type { UniqueType } from "../../../../utils/graphql-types"; -import { TestHelper } from "../../../../utils/tests-helper"; - -describe("Field Level Aggregations", () => { - const testHelper = new TestHelper(); - let typeDefs: string; - - let typeMovie: UniqueType; - let typeActor: UniqueType; - - beforeAll(async () => { - typeMovie = testHelper.createUniqueType("Movie"); - typeActor = testHelper.createUniqueType("Actor"); - - typeDefs = ` - type ${typeMovie.name} @node { - title: String - ${typeActor.plural}: [${typeActor.name}!]! @relationship(type: "ACTED_IN", direction: IN, properties:"ActedIn") - } - - type ${typeActor.name} @node { - name: String - age: Int - born: DateTime - ${typeMovie.plural}: [${typeMovie.name}!]! @relationship(type: "ACTED_IN", direction: OUT, properties:"ActedIn") - } - - type ActedIn @relationshipProperties { - screentime: Int - character: String - } - `; - - await testHelper.initNeo4jGraphQL({ typeDefs }); - - await testHelper.executeCypher(` - CREATE (m:${typeMovie.name} { title: "Terminator"}) - CREATE(m)<-[:ACTED_IN { screentime: 60, character: "Terminator" }]-(:${typeActor.name} { name: "Arnold", age: 54, born: datetime('1980-07-02')}) - CREATE (m)<-[:ACTED_IN { screentime: 120, character: "Sarah" }]-(:${typeActor.name} {name: "Linda", age:37, born: datetime('2000-02-02')}) - `); - }); - - afterAll(async () => { - await testHelper.close(); - }); - - test("count nodes", async () => { - const query = ` - query { - ${typeMovie.plural} { - ${typeActor.plural}Aggregate { - count - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0][`${typeActor.plural}Aggregate`]).toEqual({ - count: 2, - }); - }); - - describe("node aggregation", () => { - test("shortest and longest node string", async () => { - const query = ` - query { - ${typeMovie.plural} { - ${typeActor.plural}Aggregate { - node { - name { - longest - shortest - } - } - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0][`${typeActor.plural}Aggregate`]).toEqual({ - node: { - name: { - longest: "Arnold", - shortest: "Linda", - }, - }, - }); - }); - - test("max, min, sum and avg integers", async () => { - const query = ` - query { - ${typeMovie.plural} { - ${typeActor.plural}Aggregate { - node { - age { - max - min - average - sum - } - } - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0][`${typeActor.plural}Aggregate`]).toEqual({ - node: { - age: { - max: 54, - min: 37, - average: 45.5, - sum: 91, - }, - }, - }); - }); - - test("max and min in datetime", async () => { - const query = ` - query { - ${typeMovie.plural} { - ${typeActor.plural}Aggregate { - node { - born { - max - min - } - } - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0][`${typeActor.plural}Aggregate`]).toEqual({ - node: { - born: { - max: "2000-02-02T00:00:00.000Z", - min: "1980-07-02T00:00:00.000Z", - }, - }, - }); - }); - }); - - describe("edge aggregations", () => { - test("max, min and avg integers", async () => { - const query = ` - query { - ${typeMovie.plural} { - ${typeActor.plural}Aggregate { - edge { - screentime { - max - min - average - sum - } - } - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0][`${typeActor.plural}Aggregate`]).toEqual({ - edge: { - screentime: { - max: 120, - min: 60, - average: 90, - sum: 180, - }, - }, - }); - }); - - test("longest and shortest strings", async () => { - const query = ` - query { - ${typeMovie.plural} { - ${typeActor.plural}Aggregate { - edge { - character { - longest, - shortest - } - } - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0][`${typeActor.plural}Aggregate`]).toEqual({ - edge: { - character: { - longest: "Terminator", - shortest: "Sarah", - }, - }, - }); - }); - }); -}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/field-level/nested-field-level-aggregations.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/field-level/nested-field-level-aggregations.int.test.ts deleted file mode 100644 index 93dc58e626..0000000000 --- a/packages/graphql/tests/integration/deprecations/aggregations/field-level/nested-field-level-aggregations.int.test.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import type { UniqueType } from "../../../../utils/graphql-types"; -import { TestHelper } from "../../../../utils/tests-helper"; - -describe("Nested Field Level Aggregations", () => { - const testHelper = new TestHelper(); - let typeDefs: string; - - let typeMovie: UniqueType; - let typeActor: UniqueType; - - beforeAll(async () => { - typeMovie = testHelper.createUniqueType("Movie"); - typeActor = testHelper.createUniqueType("Actor"); - - typeDefs = ` - type ${typeMovie.name} @node { - title: String - ${typeActor.plural}: [${typeActor.name}!]! @relationship(type: "ACTED_IN", direction: IN, properties:"ActedIn") - } - - type ${typeActor.name} @node { - name: String - age: Int - born: DateTime - ${typeMovie.plural}: [${typeMovie.name}!]! @relationship(type: "ACTED_IN", direction: OUT, properties:"ActedIn") - } - - type ActedIn @relationshipProperties { - screentime: Int - character: String - } - `; - - await testHelper.initNeo4jGraphQL({ typeDefs }); - - await testHelper.executeCypher(` - CREATE (m:${typeMovie.name} { title: "Terminator"})<-[:ACTED_IN { screentime: 60, character: "Terminator" }]-(arnold:${typeActor.name} { name: "Arnold", age: 54, born: datetime('1980-07-02')}) - CREATE (m)<-[:ACTED_IN { screentime: 120, character: "Sarah" }]-(:${typeActor.name} {name: "Linda", age:37, born: datetime('2000-02-02')}) - CREATE (:${typeMovie.name} {title: "Total Recall"})<-[:ACTED_IN { screentime: 180, character: "Quaid" }]-(arnold) - `); - }); - - afterAll(async () => { - await testHelper.close(); - }); - - test("count actors in movies in actors", async () => { - const query = ` - query Query { - actors: ${typeActor.plural}(where: {name_EQ: "Arnold"}) { - name - movies: ${typeMovie.plural} { - title - actorAggregate: ${typeActor.plural}Aggregate { - count - } - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - expect(gqlResult.errors).toBeUndefined(); - const movies = (gqlResult.data as any)?.actors[0].movies; - expect(movies).toHaveLength(2); - expect(movies).toContainEqual({ - title: "Terminator", - actorAggregate: { count: 2 }, - }); - expect(movies).toContainEqual({ - title: "Total Recall", - actorAggregate: { count: 1 }, - }); - }); -}); diff --git a/packages/graphql/tests/integration/deprecations/aggregations/field-level/where/field-aggregation-where.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/field-level/where/field-aggregation-where.int.test.ts deleted file mode 100644 index ae6911e53f..0000000000 --- a/packages/graphql/tests/integration/deprecations/aggregations/field-level/where/field-aggregation-where.int.test.ts +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import type { UniqueType } from "../../../../../utils/graphql-types"; -import { TestHelper } from "../../../../../utils/tests-helper"; - -describe("Field Level Aggregations Where", () => { - const testHelper = new TestHelper(); - let typeDefs: string; - - let typeMovie: UniqueType; - let typePerson: UniqueType; - - beforeAll(async () => { - typeMovie = testHelper.createUniqueType("Movie"); - typePerson = testHelper.createUniqueType("Person"); - - typeDefs = /* GraphQL */ ` - type ${typeMovie.name} @node { - title: String - actors: [${typePerson.name}!]! @relationship(type: "ACTED_IN", direction: IN, properties:"ActedIn") - } - - type ${typePerson.name} @node { - name: String - age: Int - born: DateTime - movies: [${typeMovie.name}!]! @relationship(type: "ACTED_IN", direction: OUT, properties:"ActedIn") - } - - type ActedIn @relationshipProperties { - screentime: Int - character: String - } - `; - - await testHelper.initNeo4jGraphQL({ typeDefs }); - await testHelper.executeCypher(` - CREATE (m:${typeMovie.name} { title: "Terminator"})<-[:ACTED_IN { screentime: 60, character: "Terminator" }]-(:${typePerson.name} { name: "Arnold", age: 54, born: datetime('1980-07-02')}) - CREATE (m)<-[:ACTED_IN { screentime: 120, character: "Sarah" }]-(:${typePerson.name} {name: "Linda", age:37, born: datetime('2000-02-02')})`); - }); - - afterAll(async () => { - await testHelper.close(); - }); - - test("Count nodes where string equals", async () => { - const query = /* GraphQL */ ` - query { - ${typeMovie.plural} { - actorsAggregate(where: {name_EQ: "Linda"}) { - count - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0].actorsAggregate).toEqual({ - count: 1, - }); - }); - - test("Count nodes with OR query", async () => { - const query = /* GraphQL */ ` - query { - ${typeMovie.plural} { - actorsAggregate(where: {OR: [{name_EQ: "Linda"}, {name_EQ: "Arnold"}]}) { - count - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0].actorsAggregate).toEqual({ - count: 2, - }); - }); - - test("Count nodes with nested aggregation", async () => { - const query = /* GraphQL */ ` - query { - ${typeMovie.plural} { - actorsAggregate(where: {moviesAggregate: { count_EQ: 1}}) { - count - } - } - }`; - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0].actorsAggregate).toEqual({ - count: 2, - }); - }); - - describe("Using connections in where", () => { - test("Count nodes with where in connection node", async () => { - const query = /* GraphQL */ ` - query { - ${typePerson.plural} { - moviesAggregate(where:{actorsConnection_SOME: { node: { name_EQ: "Linda" } }}){ - count - } - } - }`; - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typePerson.plural][0].moviesAggregate).toEqual({ - count: 1, - }); - }); - - test("Count nodes with where in connection edge", async () => { - const query = /* GraphQL */ ` - query { - ${typePerson.plural} { - moviesAggregate(where:{actorsConnection_SOME: {edge: {screentime_GT: 10}}}){ - count - } - } - }`; - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typePerson.plural][0].moviesAggregate).toEqual({ - count: 1, - }); - }); - - test("Count nodes with where in connection node using OR", async () => { - const query = /* GraphQL */ ` - query { - ${typePerson.plural} { - moviesAggregate(where:{actorsConnection_SOME: {node: {OR: [{ name_EQ: "Linda" },{ name_EQ: "Arnold" } ]}}}){ - count - } - } - }`; - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typePerson.plural][0].moviesAggregate).toEqual({ - count: 1, - }); - }); - }); - - test("Count nodes with where using IN strings", async () => { - const query = /* GraphQL */ ` - query { - ${typeMovie.plural} { - actorsAggregate(where: {name_IN: ["Linda", "Arnold"]}) { - count - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0].actorsAggregate).toEqual({ - count: 2, - }); - }); - - test("Count nodes with where using IN ints", async () => { - const query = /* GraphQL */ ` - query { - ${typeMovie.plural} { - actorsAggregate(where: {age_IN: [40, 60, 37]}) { - count - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0].actorsAggregate).toEqual({ - count: 1, - }); - }); - - test("Count nodes with datetime filter", async () => { - const query = /* GraphQL */ ` - query { - ${typeMovie.plural} { - actorsAggregate(where: {born_GT: "2000-01-01"}) { - count - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0].actorsAggregate).toEqual({ - count: 1, - }); - }); -}); 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 deleted file mode 100644 index 99baf693c8..0000000000 --- a/packages/graphql/tests/integration/deprecations/aggregations/top-level/alias.int.test.ts +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { generate } from "randomstring"; -import type { UniqueType } from "../../../../utils/graphql-types"; -import { TestHelper } from "../../../../utils/tests-helper"; - -describe("aggregations-top_level-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 - _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, - _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/authorization.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/top-level/authorization.int.test.ts deleted file mode 100644 index 9730fcc4b7..0000000000 --- a/packages/graphql/tests/integration/deprecations/aggregations/top-level/authorization.int.test.ts +++ /dev/null @@ -1,517 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { generate } from "randomstring"; -import { 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 User = testHelper.createUniqueType("User"); - const Post = testHelper.createUniqueType("Post"); - 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_SINGLE: { id_EQ: "$jwt.sub" } } } }] - ) - `; - - const userId = generate({ - charset: "alphabetic", - }); - - const query = ` - { - ${Post.operations.aggregate} { - 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({ - [Post.operations.aggregate]: { - count: 1, - }, - }); - }); - - test("should throw when invalid allow when aggregating a Int field", async () => { - const Movie = testHelper.createUniqueType("Movie"); - const Person = testHelper.createUniqueType("Person"); - const typeDefs = /* GraphQL */ ` - type ${Movie} @node { - id: ID - director: [${Person}!]! @relationship(type: "DIRECTED", direction: IN) - imdbRatingInt: Int - @authorization(validate: [{ when: BEFORE, where: { node: { director_SINGLE: { id_EQ: "$jwt.sub" } } } }]) - } - - type ${Person} @node { - id: ID - } - `; - - const movieId = generate({ - charset: "alphabetic", - }); - - const userId = generate({ - charset: "alphabetic", - }); - - const query = ` - { - ${Movie.operations.aggregate}(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 Movie = testHelper.createUniqueType("Movie"); - const Person = testHelper.createUniqueType("Person"); - const typeDefs = /* GraphQL */ ` - type ${Movie} @node { - id: ID - director: [${Person}!]! @relationship(type: "DIRECTED", direction: IN) - someStr: String - @authorization(validate: [{ when: BEFORE, where: { node: { director_SINGLE: { id_EQ: "$jwt.sub" } } } }]) - } - - type ${Person} @node { - id: ID - } - `; - - const movieId = generate({ - charset: "alphabetic", - }); - - const userId = generate({ - charset: "alphabetic", - }); - - const query = ` - { - ${Movie.operations.aggregate}(where: {id_EQ: "${movieId}"}) { - someStr { - shortest - longest - } - } - } - `; - - await testHelper.initNeo4jGraphQL({ - typeDefs, - features: { - authorization: { - key: secret, - }, - }, - }); - - await testHelper.executeCypher(` - CREATE (:${Person} {id: "${userId}"})-[:DIRECTED]->(:${Movie} {id: "${movieId}", someStr: "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 Movie = testHelper.createUniqueType("Movie"); - const Person = testHelper.createUniqueType("Person"); - const typeDefs = /* GraphQL */ ` - type ${Movie} @node { - id: ID - director: [${Person}!]! @relationship(type: "DIRECTED", direction: IN) - someString: String - @authorization(validate: [{ when: BEFORE, where: { node: { director_SINGLE: { id_EQ: "$jwt.sub" } } } }]) - } - - type ${Person} @node { - id: ID - } - `; - - const movieId = generate({ - charset: "alphabetic", - }); - - const userId = generate({ - charset: "alphabetic", - }); - - const query = ` - { - ${Movie.operations.aggregate}(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 Movie = testHelper.createUniqueType("Movie"); - const Person = testHelper.createUniqueType("Person"); - const typeDefs = /* GraphQL */ ` - type ${Movie} @node { - id: ID - director: [${Person}!]! @relationship(type: "DIRECTED", direction: IN) - imdbRatingFloat: Float - @authorization(validate: [{ when: BEFORE, where: { node: { director_SINGLE: { id_EQ: "$jwt.sub" } } } }]) - } - - type ${Person} @node { - id: ID - } - `; - - const movieId = generate({ - charset: "alphabetic", - }); - - const userId = generate({ - charset: "alphabetic", - }); - - const query = ` - { - ${Movie.operations.aggregate}(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 Movie = testHelper.createUniqueType("Movie"); - const Person = testHelper.createUniqueType("Person"); - const typeDefs = /* GraphQL */ ` - type ${Movie} @node { - id: ID - director: [${Person}!]! @relationship(type: "DIRECTED", direction: IN) - imdbRatingBigInt: BigInt - @authorization(validate: [{ when: BEFORE, where: { node: { director_SINGLE: { id_EQ: "$jwt.sub" } } } }]) - } - - type ${Person} @node { - id: ID - } - `; - - const movieId = generate({ - charset: "alphabetic", - }); - - const userId = generate({ - charset: "alphabetic", - }); - - const query = ` - { - ${Movie.operations.aggregate}(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 Movie = testHelper.createUniqueType("Movie"); - const Person = testHelper.createUniqueType("Person"); - const typeDefs = /* GraphQL */ ` - type ${Movie} @node { - id: ID - director: [${Person}!]! @relationship(type: "DIRECTED", direction: IN) - createdAt: DateTime - @authorization(validate: [{ when: BEFORE, where: { node: { director_SINGLE: { id_EQ: "$jwt.sub" } } } }]) - } - - type ${Person} @node { - id: ID - } - `; - - const movieId = generate({ - charset: "alphabetic", - }); - - const userId = generate({ - charset: "alphabetic", - }); - - const query = ` - { - ${Movie.operations.aggregate}(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 Movie = testHelper.createUniqueType("Movie"); - const Person = testHelper.createUniqueType("Person"); - const typeDefs = /* GraphQL */ ` - type ${Movie} @node { - id: ID - director: [${Person}!]! @relationship(type: "DIRECTED", direction: IN) - screenTime: Duration - @authorization(validate: [{ when: BEFORE, where: { node: { director_SINGLE: { id_EQ: "$jwt.sub" } } } }]) - } - - type ${Person} @node { - id: ID - } - `; - - const movieId = generate({ - charset: "alphabetic", - }); - - const userId = generate({ - charset: "alphabetic", - }); - - const query = ` - { - ${Movie.operations.aggregate}(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 deleted file mode 100644 index 14d1275c9b..0000000000 --- a/packages/graphql/tests/integration/deprecations/aggregations/top-level/basic.int.test.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { 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, - }); - }); -}); 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 deleted file mode 100644 index 88e4bf6dd1..0000000000 --- a/packages/graphql/tests/integration/deprecations/aggregations/top-level/bigint.test.ts +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { generate } from "randomstring"; -import { 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 deleted file mode 100644 index d07818c53d..0000000000 --- a/packages/graphql/tests/integration/deprecations/aggregations/top-level/count.int.test.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { generate } from "randomstring"; -import { 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 deleted file mode 100644 index f93cf2f0de..0000000000 --- a/packages/graphql/tests/integration/deprecations/aggregations/top-level/datetime.int.test.ts +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { generate } from "randomstring"; -import type { UniqueType } from "../../../../utils/graphql-types"; -import { TestHelper } from "../../../../utils/tests-helper"; - -describe("aggregations-top_level-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 deleted file mode 100644 index d9f58e1007..0000000000 --- a/packages/graphql/tests/integration/deprecations/aggregations/top-level/duration.int.test.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import 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 deleted file mode 100644 index 86ed28826e..0000000000 --- a/packages/graphql/tests/integration/deprecations/aggregations/top-level/float.int.test.ts +++ /dev/null @@ -1,259 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { generate } from "randomstring"; -import type { UniqueType } from "../../../../utils/graphql-types"; -import { TestHelper } from "../../../../utils/tests-helper"; - -describe("aggregations-top_level-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/int.int.test.ts b/packages/graphql/tests/integration/deprecations/aggregations/top-level/int.int.test.ts deleted file mode 100644 index 4826a6abef..0000000000 --- a/packages/graphql/tests/integration/deprecations/aggregations/top-level/int.int.test.ts +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { generate } from "randomstring"; -import type { UniqueType } from "../../../../utils/graphql-types"; -import { TestHelper } from "../../../../utils/tests-helper"; - -describe("aggregations-top_level-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 deleted file mode 100644 index c6e0c56ff9..0000000000 --- a/packages/graphql/tests/integration/deprecations/aggregations/top-level/many.int.test.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { generate } from "randomstring"; -import type { UniqueType } from "../../../../utils/graphql-types"; -import { TestHelper } from "../../../../utils/tests-helper"; - -describe("aggregations-top_level-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}" }) { - 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({ - 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 deleted file mode 100644 index eb78bd86a1..0000000000 --- a/packages/graphql/tests/integration/deprecations/aggregations/top-level/string.int.test.ts +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { generate } from "randomstring"; -import type { UniqueType } from "../../../../utils/graphql-types"; -import { TestHelper } from "../../../../utils/tests-helper"; - -describe("aggregations-top_level-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], - }, - }); - }); -}); diff --git a/packages/graphql/tests/integration/deprecations/interfaces/aggregations/aggregation-interfaces-field-level.int.test.ts b/packages/graphql/tests/integration/deprecations/interfaces/aggregations/aggregation-interfaces-field-level.int.test.ts deleted file mode 100644 index 77bb50d0fe..0000000000 --- a/packages/graphql/tests/integration/deprecations/interfaces/aggregations/aggregation-interfaces-field-level.int.test.ts +++ /dev/null @@ -1,374 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { TestHelper } from "../../../../utils/tests-helper"; - -describe("Interface Field Level Aggregations", () => { - const testHelper = new TestHelper(); - let typeDefs: string; - - const Production = testHelper.createUniqueType("Production"); - const Movie = testHelper.createUniqueType("Movie"); - const Actor = testHelper.createUniqueType("Actor"); - const Series = testHelper.createUniqueType("Series"); - - beforeAll(async () => { - typeDefs = /* GraphQL */ ` - interface ${Production} { - title: String! - cost: Float! - } - - type ${Movie} implements ${Production} @node { - title: String! - cost: Float! - runtime: Int! - ${Actor.plural}: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") - } - - type ${Series} implements ${Production} @node { - title: String! - cost: Float! - episodes: Int! - } - - type ActedIn @relationshipProperties { - screenTime: Int! - } - - type ${Actor} @node { - name: String! - actedIn: [${Production}!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") - } - `; - - await testHelper.initNeo4jGraphQL({ typeDefs }); - - await testHelper.executeCypher(` - // Create Movies - CREATE (m1:${Movie} { title: "Movie One", cost: 10000000, runtime: 120 }) - CREATE (m2:${Movie} { title: "Movie Two", cost: 20000000, runtime: 90 }) - CREATE (m3:${Movie} { title: "Movie Three", cost: 12000000, runtime: 70 }) - - // Create Series - CREATE (s1:${Series} { title: "Series One", cost: 10000000, episodes: 10 }) - CREATE (s2:${Series} { title: "Series Two", cost: 20000000, episodes: 20 }) - CREATE (s3:${Series} { title: "Series Three", cost: 20000000, episodes: 15 }) - - // Create Actors - CREATE (a1:${Actor} { name: "Actor One" }) - CREATE (a2:${Actor} { name: "Actor Two" }) - - // Associate Actor 1 with Movies and Series - CREATE (a1)-[:ACTED_IN { screenTime: 100 }]->(m1) - CREATE (a1)-[:ACTED_IN { screenTime: 82 }]->(s1) - CREATE (a1)-[:ACTED_IN { screenTime: 20 }]->(m3) - CREATE (a1)-[:ACTED_IN { screenTime: 22 }]->(s3) - - // Associate Actor 2 with Movies and Series - CREATE (a2)-[:ACTED_IN { screenTime: 240 }]->(m2) - CREATE (a2)-[:ACTED_IN { screenTime: 728 }]->(s2) - CREATE (a2)-[:ACTED_IN { screenTime: 728 }]->(m3) - CREATE (a2)-[:ACTED_IN { screenTime: 88 }]->(s3) - `); - }); - - afterAll(async () => { - await testHelper.close(); - }); - - test("Count", async () => { - const query = /* GraphQL */ ` - { - ${Actor.plural} { - actedInAggregate { - count - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[Actor.plural][0][`actedInAggregate`]).toEqual({ - count: 4, - }); - - expect((gqlResult as any).data[Actor.plural]).toIncludeSameMembers([ - { - actedInAggregate: { - count: 4, - }, - }, - { - actedInAggregate: { - count: 4, - }, - }, - ]); - }); - - test("Min", async () => { - const query = /* GraphQL */ ` - { - ${Actor.plural} { - actedInAggregate { - node { - cost { - min - } - } - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - - expect((gqlResult as any).data[Actor.plural]).toIncludeSameMembers([ - { - actedInAggregate: { - node: { - cost: { - min: 10000000, - }, - }, - }, - }, - { - actedInAggregate: { - node: { - cost: { - min: 12000000, - }, - }, - }, - }, - ]); - }); - - test("Max", async () => { - const query = /* GraphQL */ ` - { - ${Actor.plural} { - actedInAggregate { - node { - cost { - max - } - } - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - - expect((gqlResult as any).data[Actor.plural]).toIncludeSameMembers([ - { - actedInAggregate: { - node: { - cost: { - max: 20000000, - }, - }, - }, - }, - { - actedInAggregate: { - node: { - cost: { - max: 20000000, - }, - }, - }, - }, - ]); - }); - - test("Sum", async () => { - const query = /* GraphQL */ ` - { - ${Actor.plural} { - actedInAggregate { - node { - cost { - sum - } - } - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - - expect((gqlResult as any).data[Actor.plural]).toIncludeSameMembers([ - { - actedInAggregate: { - node: { - cost: { - sum: 52000000, - }, - }, - }, - }, - { - actedInAggregate: { - node: { - cost: { - sum: 72000000, - }, - }, - }, - }, - ]); - }); - - test("Multiple aggregations", async () => { - const query = /* GraphQL */ ` - { - ${Actor.plural} { - actedInAggregate { - count - node { - cost { - min - max - average - sum - } - } - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - - expect((gqlResult as any).data[Actor.plural]).toIncludeSameMembers([ - { - actedInAggregate: { - count: 4, - node: { - cost: { - average: 13000000, - max: 20000000, - min: 10000000, - sum: 52000000, - }, - }, - }, - }, - { - actedInAggregate: { - count: 4, - node: { - cost: { - average: 18000000, - max: 20000000, - min: 12000000, - sum: 72000000, - }, - }, - }, - }, - ]); - }); - - // Edge aggregation - test("Edge Count", async () => { - const query = /* GraphQL */ ` - { - ${Actor.plural} { - actedInAggregate { - count - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - - expect((gqlResult as any).data[Actor.plural]).toIncludeSameMembers([ - { - actedInAggregate: { - count: 4, - }, - }, - { - actedInAggregate: { - count: 4, - }, - }, - ]); - }); - - test("Edge screenTime", async () => { - const query = /* GraphQL */ ` - { - ${Actor.plural} { - actedInAggregate { - edge { - screenTime { - sum - } - } - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - - expect((gqlResult as any).data[Actor.plural]).toIncludeSameMembers([ - { - actedInAggregate: { - edge: { - screenTime: { - sum: 224, - }, - }, - }, - }, - { - actedInAggregate: { - edge: { - screenTime: { - sum: 1784, - }, - }, - }, - }, - ]); - }); -}); 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 deleted file mode 100644 index 50a0a313f3..0000000000 --- a/packages/graphql/tests/integration/deprecations/interfaces/aggregations/aggregation-interfaces-top-level-with-auth.int.test.ts +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import type { 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 deleted file mode 100644 index ea30d9721d..0000000000 --- a/packages/graphql/tests/integration/deprecations/interfaces/aggregations/aggregation-interfaces-top-level.int.test.ts +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { 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/deprecations/issues/4615.int.test.ts b/packages/graphql/tests/integration/deprecations/issues/4615.int.test.ts deleted file mode 100644 index bd1efbbf82..0000000000 --- a/packages/graphql/tests/integration/deprecations/issues/4615.int.test.ts +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import type { UniqueType } from "../../../utils/graphql-types"; -import { TestHelper } from "../../../utils/tests-helper"; - -describe("https://github.com/neo4j/graphql/issues/4615", () => { - const testHelper = new TestHelper(); - - let Movie: UniqueType; - let Series: UniqueType; - let Actor: UniqueType; - - beforeAll(async () => { - Movie = testHelper.createUniqueType("Movie"); - Series = testHelper.createUniqueType("Series"); - Actor = testHelper.createUniqueType("Actor"); - - const typeDefs = /* GraphQL */ ` - interface Show { - title: String! - release: DateTime! - actors: [${Actor}!]! @declareRelationship - } - - type ${Movie} implements Show @node { - title: String! - runtime: Int - release: DateTime! - actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") - } - - type ${Series} implements Show @node { - title: String! - episodes: Int - release: DateTime! - actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") - } - - type ${Actor} @node { - name: String! - actedIn: [Show!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") - } - - type ActedIn @relationshipProperties { - screenTime: Int - } - `; - await testHelper.initNeo4jGraphQL({ - typeDefs, - }); - - await testHelper.executeCypher( - ` - // Create Movies - CREATE (m1:${Movie} { title: "The Movie One", cost: 10000000, runtime: 120, release: dateTime('2007-08-31T16:47+00:00') }) - CREATE (m2:${Movie} { title: "The Movie Two", cost: 20000000, runtime: 90, release: dateTime('2009-08-31T16:47+00:00') }) - CREATE (m3:${Movie} { title: "The Movie Three", cost: 12000000, runtime: 70, release: dateTime('2010-08-31T16:47+00:00') }) - - // Create Series - CREATE (s1:${Series} { title: "The Series One", cost: 10000000, episodes: 10, release: dateTime('2011-08-31T16:47+00:00') }) - CREATE (s2:${Series} { title: "The Series Two", cost: 20000000, episodes: 20, release: dateTime('2012-08-31T16:47+00:00') }) - CREATE (s3:${Series} { title: "The Series Three", cost: 20000000, episodes: 15, release: dateTime('2013-08-31T16:47+00:00') }) - - // Create Actors - CREATE (a1:${Actor} { name: "Actor One" }) - CREATE (a2:${Actor} { name: "Actor Two" }) - - // Associate Actor 1 with Movies and Series - CREATE (a1)-[:ACTED_IN { screenTime: 100 }]->(m1) - CREATE (a1)-[:ACTED_IN { screenTime: 82 }]->(s1) - CREATE (a1)-[:ACTED_IN { screenTime: 20 }]->(m3) - CREATE (a1)-[:ACTED_IN { screenTime: 22 }]->(s3) - - // Associate Actor 2 with Movies and Series - CREATE (a2)-[:ACTED_IN { screenTime: 240 }]->(m2) - CREATE (a2)-[:ACTED_IN { screenTime: 728 }]->(s2) - CREATE (a2)-[:ACTED_IN { screenTime: 728 }]->(m3) - CREATE (a2)-[:ACTED_IN { screenTime: 88 }]->(s3) - ` - ); - }); - - afterAll(async () => { - await testHelper.close(); - }); - - test("should return null aggregations - deprecated", async () => { - const query = /* GraphQL */ ` - query { - showsAggregate(where: { title_STARTS_WITH: "asdasdasd" }) { - title { - longest - } - release { - min - } - } - } - `; - - const response = await testHelper.executeGraphQL(query); - expect(response.errors).toBeFalsy(); - expect(response.data).toEqual({ - showsAggregate: { - title: { - longest: null, - }, - release: { - min: null, - }, - }, - }); - }); -}); diff --git a/packages/graphql/tests/integration/deprecations/issues/6005.test.ts b/packages/graphql/tests/integration/deprecations/issues/6005.test.ts deleted file mode 100644 index 78d5b0764e..0000000000 --- a/packages/graphql/tests/integration/deprecations/issues/6005.test.ts +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import type { UniqueType } from "../../../utils/graphql-types"; -import { TestHelper } from "../../../utils/tests-helper"; - -describe("https://github.com/neo4j/graphql/issues/6005", () => { - let Movie: UniqueType; - let Actor: UniqueType; - - const testHelper = new TestHelper(); - - beforeEach(async () => { - Movie = testHelper.createUniqueType("Movie"); - Actor = testHelper.createUniqueType("Actor"); - - const typeDefs = /* GraphQL */ ` - type ${Movie} @node { - title: String! - actors: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") - } - type ${Actor} @node { - name: String! - age: Int! - born: DateTime! - movies: [${Movie}!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn") - } - type ActedIn @relationshipProperties { - screentime: Int! - character: String! - } - `; - - await testHelper.initNeo4jGraphQL({ typeDefs }); - await testHelper.executeCypher(` - CREATE (m:${Movie} { title: "Terminator"}) - CREATE (m)<-[:ACTED_IN { screentime: 60, character: "Terminator" }]-(arnold:${Actor} { name: "Arnold", age: 54, born: datetime('1980-07-02')}) - CREATE (m)<-[:ACTED_IN { screentime: 120, character: "Sarah" }]-(:${Actor} {name: "Linda", age: 37, born: datetime('2000-02-02')}) - CREATE (m)<-[:ACTED_IN { screentime: 120, character: "Another Character" }]-(:${Actor} {name: "Another actor", age: 37, born: datetime('2000-02-02')}) - CREATE (m)<-[:ACTED_IN { screentime: 10, character: "Future Terminator" }]-(arnold) - `); - }); - - afterEach(async () => { - await testHelper.close(); - }); - - test("should filter movies by actors count with duplicate results", async () => { - const query = /* GraphQL */ ` - query { - ${Movie.plural}(where: { actorsAggregate: { count: { eq: 4 } } }) { - title - } - } - `; - - const result = await testHelper.executeGraphQL(query); - expect(result.errors).toBeUndefined(); - expect(result.data).toEqual({ - [Movie.plural]: [ - { - title: "Terminator", - }, - ], - }); - }); - - test("should filter movies by actors count with duplicate results at the field-level", async () => { - const query = /* GraphQL */ ` - query { - ${Actor.plural} { - name - movies(where: { actorsAggregate: { count: { eq: 4 } } }) { - title - } - } - } - `; - - const result = await testHelper.executeGraphQL(query); - expect(result.errors).toBeUndefined(); - expect(result.data).toEqual({ - [Actor.plural]: expect.toIncludeSameMembers([ - { name: "Arnold", movies: [{ title: "Terminator" }] }, - { name: "Linda", movies: [{ title: "Terminator" }] }, - { name: "Another actor", movies: [{ title: "Terminator" }] }, - ]), - }); - }); - - test("should filter movies by related movies count with duplicate results, double nested", async () => { - const query = /* GraphQL */ ` - query { - ${Movie.plural}(where: { actors: { all: { moviesAggregate: { count: { eq: 1 } } } } }) { - title - } - } - `; - - const result = await testHelper.executeGraphQL(query); - expect(result.errors).toBeUndefined(); - expect(result.data).toEqual({ - [Movie.plural]: expect.toBeArrayOfSize(0), - }); - }); -}); diff --git a/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-aggregation.test.ts b/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-aggregation.test.ts index 8061816261..2856c9425e 100644 --- a/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-aggregation.test.ts +++ b/packages/graphql/tests/integration/directives/cypher/filtering/cypher-filtering-aggregation.test.ts @@ -63,9 +63,13 @@ describe("cypher directive filtering - Aggregation", () => { const query = /* GraphQL */ ` query { - ${Movie.operations.aggregate}(where: { custom_field_STARTS_WITH: "he" }) { - title { - shortest + ${Movie.operations.connection}(where: { custom_field_STARTS_WITH: "he" }) { + aggregate { + node { + title { + shortest + } + } } } } @@ -75,9 +79,13 @@ describe("cypher directive filtering - Aggregation", () => { expect(gqlResult.errors).toBeFalsy(); expect(gqlResult?.data).toEqual({ - [Movie.operations.aggregate]: { - title: { - shortest: "The Matrix", + [Movie.operations.connection]: { + aggregate: { + node: { + title: { + shortest: "The Matrix", + }, + }, }, }, }); @@ -114,9 +122,13 @@ describe("cypher directive filtering - Aggregation", () => { const query = /* GraphQL */ ` query { - ${Movie.operations.aggregate}(where: { custom_field_GT: 0 }) { - title { - longest + ${Movie.operations.connection}(where: { custom_field_GT: 0 }) { + aggregate { + node { + title { + longest + } + } } } } @@ -126,9 +138,13 @@ describe("cypher directive filtering - Aggregation", () => { expect(gqlResult.errors).toBeFalsy(); expect(gqlResult?.data).toEqual({ - [Movie.operations.aggregate]: { - title: { - longest: "The Matrix", + [Movie.operations.connection]: { + aggregate: { + node: { + title: { + longest: "The Matrix", + }, + }, }, }, }); @@ -165,9 +181,13 @@ describe("cypher directive filtering - Aggregation", () => { const query = /* GraphQL */ ` query { - ${Movie.operations.aggregate}(where: { custom_field_CONTAINS: "es" }) { - released { - max + ${Movie.operations.connection}(where: { custom_field_CONTAINS: "es" }) { + aggregate { + node { + released { + max + } + } } } } @@ -177,9 +197,13 @@ describe("cypher directive filtering - Aggregation", () => { expect(gqlResult.errors).toBeFalsy(); expect(gqlResult?.data).toEqual({ - [Movie.operations.aggregate]: { - released: { - max: 2003, + [Movie.operations.connection]: { + aggregate: { + node: { + released: { + max: 2003, + }, + }, }, }, }); @@ -216,9 +240,13 @@ describe("cypher directive filtering - Aggregation", () => { const query = /* GraphQL */ ` query { - ${Movie.operations.aggregate}(where: { custom_field_GT: 0 }) { - released { - min + ${Movie.operations.connection}(where: { custom_field_GT: 0 }) { + aggregate { + node { + released { + min + } + } } } } @@ -228,9 +256,13 @@ describe("cypher directive filtering - Aggregation", () => { expect(gqlResult.errors).toBeFalsy(); expect(gqlResult?.data).toEqual({ - [Movie.operations.aggregate]: { - released: { - min: 1999, + [Movie.operations.connection]: { + aggregate: { + node: { + released: { + min: 1999, + }, + }, }, }, }); @@ -267,9 +299,13 @@ describe("cypher directive filtering - Aggregation", () => { const query = /* GraphQL */ ` query { - ${Movie.operations.aggregate}(where: { custom_field_INCLUDES: 1 }) { - title { - shortest + ${Movie.operations.connection}(where: { custom_field_INCLUDES: 1 }) { + aggregate { + node { + title { + shortest + } + } } } } @@ -279,9 +315,13 @@ describe("cypher directive filtering - Aggregation", () => { expect(gqlResult.errors).toBeFalsy(); expect(gqlResult?.data).toEqual({ - [Movie.operations.aggregate]: { - title: { - shortest: "The Matrix", + [Movie.operations.connection]: { + aggregate: { + node: { + title: { + shortest: "The Matrix", + }, + }, }, }, }); @@ -318,9 +358,13 @@ describe("cypher directive filtering - Aggregation", () => { const query = /* GraphQL */ ` query { - ${Movie.operations.aggregate}(where: { custom_field_INCLUDES: "c" }) { - title { - shortest + ${Movie.operations.connection}(where: { custom_field_INCLUDES: "c" }) { + aggregate { + node { + title { + shortest + } + } } } } @@ -330,9 +374,13 @@ describe("cypher directive filtering - Aggregation", () => { expect(gqlResult.errors).toBeFalsy(); expect(gqlResult?.data).toEqual({ - [Movie.operations.aggregate]: { - title: { - shortest: "The Matrix", + [Movie.operations.connection]: { + aggregate: { + node: { + title: { + shortest: "The Matrix", + }, + }, }, }, }); diff --git a/packages/graphql/tests/integration/filtering/typename-in.int.test.ts b/packages/graphql/tests/integration/filtering/typename-in.int.test.ts index 11ae33d414..802d2acdf5 100644 --- a/packages/graphql/tests/integration/filtering/typename-in.int.test.ts +++ b/packages/graphql/tests/integration/filtering/typename-in.int.test.ts @@ -146,11 +146,15 @@ describe("typename_IN", () => { }); }); - test("aggregation", async () => { + test.skip("aggregation", async () => { const query = ` { - productionsAggregate(where: { OR: [ { typename: [${Movie.name}, ${Series.name}] } { typename: [${Cartoon.name}] } ] }) { - count + productionsConnection(where: { OR: [ { typename: [${Movie.name}, ${Series.name}] } { typename: [${Cartoon.name}] } ] }) { + aggregate { + count { + nodes + } + } } } `; @@ -158,18 +162,24 @@ describe("typename_IN", () => { const queryResult = await testHelper.executeGraphQL(query); expect(queryResult.errors).toBeUndefined(); expect(queryResult.data).toEqual({ - productionsAggregate: { - count: 3, + productionsConnection: { + count: { + nodes: 3, + }, }, }); }); - test("nested aggregation", async () => { + test.skip("nested aggregation", async () => { const query = ` { ${Actor.plural} { - actedInAggregate(where: { NOT: { typename: [${Movie.name}, ${Series.name}] } }) { - count + actedInConnection(where: { NOT: { typename: [${Movie.name}, ${Series.name}] } }) { + aggegate { + count { + nodes + } + } } } } @@ -180,8 +190,10 @@ describe("typename_IN", () => { expect(queryResult.data).toEqual({ [Actor.plural]: expect.arrayContaining([ { - actedInAggregate: { - count: 1, + actedInConnection: { + count: { + nodes: 1, + }, }, }, ]), diff --git a/packages/graphql/tests/integration/interfaces/aggegations/aggregation-interfaces-field-level-with-auth.int.test.ts b/packages/graphql/tests/integration/interfaces/aggegations/aggregation-interfaces-field-level-with-auth.int.test.ts index de1e96725c..f63e46aef6 100644 --- a/packages/graphql/tests/integration/interfaces/aggegations/aggregation-interfaces-field-level-with-auth.int.test.ts +++ b/packages/graphql/tests/integration/interfaces/aggegations/aggregation-interfaces-field-level-with-auth.int.test.ts @@ -109,8 +109,12 @@ describe("Interface Field Level Aggregations with authorization", () => { const query = /* GraphQL */ ` { ${Actor.plural} { - actedInAggregate { - count + actedInConnection { + aggregate { + count { + nodes + } + } } } } @@ -120,19 +124,24 @@ describe("Interface Field Level Aggregations with authorization", () => { const gqlResult = await testHelper.executeGraphQLWithToken(query, token); expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[Actor.plural][0][`actedInAggregate`]).toEqual({ - count: 4, - }); expect((gqlResult as any).data[Actor.plural]).toIncludeSameMembers([ { - actedInAggregate: { - count: 4, + actedInConnection: { + aggregate: { + count: { + nodes: 4, + }, + }, }, }, { - actedInAggregate: { - count: 4, + actedInConnection: { + aggregate: { + count: { + nodes: 4, + }, + }, }, }, ]); @@ -142,8 +151,12 @@ describe("Interface Field Level Aggregations with authorization", () => { const query = /* GraphQL */ ` { ${Actor.plural} { - actedInAggregate { - count + actedInConnection { + aggregate { + count { + nodes + } + } } } } @@ -161,10 +174,12 @@ describe("Interface Field Level Aggregations with authorization", () => { const query = /* GraphQL */ ` { ${Actor.plural} { - actedInAggregate { - node { - cost { - min + actedInConnection { + aggregate { + node { + cost { + min + } } } } @@ -179,19 +194,23 @@ describe("Interface Field Level Aggregations with authorization", () => { expect((gqlResult as any).data[Actor.plural]).toIncludeSameMembers([ { - actedInAggregate: { - node: { - cost: { - min: 10000000, + actedInConnection: { + aggregate: { + node: { + cost: { + min: 10000000, + }, }, }, }, }, { - actedInAggregate: { - node: { - cost: { - min: 12000000, + actedInConnection: { + aggregate: { + node: { + cost: { + min: 12000000, + }, }, }, }, @@ -203,10 +222,12 @@ describe("Interface Field Level Aggregations with authorization", () => { const query = /* GraphQL */ ` { ${Actor.plural} { - actedInAggregate { - node { - cost { - min + actedInConnection { + aggregate { + node { + cost { + min + } } } } @@ -226,10 +247,12 @@ describe("Interface Field Level Aggregations with authorization", () => { const query = /* GraphQL */ ` { ${Actor.plural} { - actedInAggregate { - node { - cost { - max + actedInConnection { + aggregate { + node { + cost { + max + } } } } @@ -244,19 +267,23 @@ describe("Interface Field Level Aggregations with authorization", () => { expect((gqlResult as any).data[Actor.plural]).toIncludeSameMembers([ { - actedInAggregate: { - node: { - cost: { - max: 20000000, + actedInConnection: { + aggregate: { + node: { + cost: { + max: 20000000, + }, }, }, }, }, { - actedInAggregate: { - node: { - cost: { - max: 20000000, + actedInConnection: { + aggregate: { + node: { + cost: { + max: 20000000, + }, }, }, }, @@ -268,10 +295,12 @@ describe("Interface Field Level Aggregations with authorization", () => { const query = /* GraphQL */ ` { ${Actor.plural} { - actedInAggregate { - node { - cost { - max + actedInConnection { + aggregate { + node { + cost { + max + } } } } @@ -291,10 +320,12 @@ describe("Interface Field Level Aggregations with authorization", () => { const query = /* GraphQL */ ` { ${Actor.plural} { - actedInAggregate { - node { - cost { - sum + actedInConnection { + aggregate { + node { + cost { + sum + } } } } @@ -309,19 +340,23 @@ describe("Interface Field Level Aggregations with authorization", () => { expect((gqlResult as any).data[Actor.plural]).toIncludeSameMembers([ { - actedInAggregate: { - node: { - cost: { - sum: 52000000, + actedInConnection: { + aggregate: { + node: { + cost: { + sum: 52000000, + }, }, }, }, }, { - actedInAggregate: { - node: { - cost: { - sum: 72000000, + actedInConnection: { + aggregate: { + node: { + cost: { + sum: 72000000, + }, }, }, }, @@ -333,10 +368,12 @@ describe("Interface Field Level Aggregations with authorization", () => { const query = /* GraphQL */ ` { ${Actor.plural} { - actedInAggregate { - node { - cost { - sum + actedInConnection { + aggregate { + node { + cost { + sum + } } } } @@ -356,14 +393,18 @@ describe("Interface Field Level Aggregations with authorization", () => { const query = /* GraphQL */ ` { ${Actor.plural} { - actedInAggregate { - count - node { - cost { - min - max - average - sum + actedInConnection { + aggregate { + count { + nodes + } + node { + cost { + min + max + average + sum + } } } } @@ -378,27 +419,31 @@ describe("Interface Field Level Aggregations with authorization", () => { expect((gqlResult as any).data[Actor.plural]).toIncludeSameMembers([ { - actedInAggregate: { - count: 4, - node: { - cost: { - average: 13000000, - max: 20000000, - min: 10000000, - sum: 52000000, + actedInConnection: { + aggregate: { + count: { nodes: 4 }, + node: { + cost: { + average: 13000000, + max: 20000000, + min: 10000000, + sum: 52000000, + }, }, }, }, }, { - actedInAggregate: { - count: 4, - node: { - cost: { - average: 18000000, - max: 20000000, - min: 12000000, - sum: 72000000, + actedInConnection: { + aggregate: { + count: { nodes: 4 }, + node: { + cost: { + average: 18000000, + max: 20000000, + min: 12000000, + sum: 72000000, + }, }, }, }, @@ -410,14 +455,18 @@ describe("Interface Field Level Aggregations with authorization", () => { const query = /* GraphQL */ ` { ${Actor.plural} { - actedInAggregate { - count - node { - cost { - min - max - average - sum + actedInConnection { + aggregate { + count { + nodes + } + node { + cost { + min + max + average + sum + } } } } @@ -438,8 +487,12 @@ describe("Interface Field Level Aggregations with authorization", () => { const query = /* GraphQL */ ` { ${Actor.plural} { - actedInAggregate { - count + actedInConnection { + aggregate { + count { + nodes + } + } } } } @@ -452,13 +505,21 @@ describe("Interface Field Level Aggregations with authorization", () => { expect((gqlResult as any).data[Actor.plural]).toIncludeSameMembers([ { - actedInAggregate: { - count: 4, + actedInConnection: { + aggregate: { + count: { + nodes: 4, + }, + }, }, }, { - actedInAggregate: { - count: 4, + actedInConnection: { + aggregate: { + count: { + nodes: 4, + }, + }, }, }, ]); @@ -468,8 +529,12 @@ describe("Interface Field Level Aggregations with authorization", () => { const query = /* GraphQL */ ` { ${Actor.plural} { - actedInAggregate { - count + actedInConnection { + aggregate { + count { + nodes + } + } } } } @@ -487,10 +552,12 @@ describe("Interface Field Level Aggregations with authorization", () => { const query = /* GraphQL */ ` { ${Actor.plural} { - actedInAggregate { - edge { - screenTime { - sum + actedInConnection { + aggregate { + edge { + screenTime { + sum + } } } } @@ -505,19 +572,23 @@ describe("Interface Field Level Aggregations with authorization", () => { expect((gqlResult as any).data[Actor.plural]).toIncludeSameMembers([ { - actedInAggregate: { - edge: { - screenTime: { - sum: 224, + actedInConnection: { + aggregate: { + edge: { + screenTime: { + sum: 224, + }, }, }, }, }, { - actedInAggregate: { - edge: { - screenTime: { - sum: 1784, + actedInConnection: { + aggregate: { + edge: { + screenTime: { + sum: 1784, + }, }, }, }, @@ -529,10 +600,12 @@ describe("Interface Field Level Aggregations with authorization", () => { const query = /* GraphQL */ ` { ${Actor.plural} { - actedInAggregate { - edge { - screenTime { - sum + actedInConnection { + aggregate { + edge { + screenTime { + sum + } } } } diff --git a/packages/graphql/tests/integration/interfaces/aggegations/aggregation-interfaces-field-level.int.test.ts b/packages/graphql/tests/integration/interfaces/aggegations/aggregation-interfaces-field-level.int.test.ts index d241766207..f00ab1f6b9 100644 --- a/packages/graphql/tests/integration/interfaces/aggegations/aggregation-interfaces-field-level.int.test.ts +++ b/packages/graphql/tests/integration/interfaces/aggegations/aggregation-interfaces-field-level.int.test.ts @@ -92,38 +92,6 @@ describe("Interface Field Level Aggregations", () => { await testHelper.close(); }); - test("Count - deprecated", async () => { - const query = /* GraphQL */ ` - { - ${Actor.plural} { - actedInAggregate { - count - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[Actor.plural][0][`actedInAggregate`]).toEqual({ - count: 4, - }); - - expect((gqlResult as any).data[Actor.plural]).toIncludeSameMembers([ - { - actedInAggregate: { - count: 4, - }, - }, - { - actedInAggregate: { - count: 4, - }, - }, - ]); - }); - test("Min", async () => { const query = /* GraphQL */ ` { @@ -329,36 +297,6 @@ describe("Interface Field Level Aggregations", () => { }); }); - // Edge aggregation - test("Edge Count - deprecated", async () => { - const query = /* GraphQL */ ` - { - ${Actor.plural} { - actedInAggregate { - count - } - } - } - `; - - const gqlResult = await testHelper.executeGraphQL(query); - - expect(gqlResult.errors).toBeUndefined(); - - expect((gqlResult as any).data[Actor.plural]).toIncludeSameMembers([ - { - actedInAggregate: { - count: 4, - }, - }, - { - actedInAggregate: { - count: 4, - }, - }, - ]); - }); - test("Edge sum", async () => { const query = /* GraphQL */ ` diff --git a/packages/graphql/tests/integration/interfaces/aggegations/filter-aggregation-interfaces-field-level-with-auth.int.test.ts b/packages/graphql/tests/integration/interfaces/aggegations/filter-aggregation-interfaces-field-level-with-auth.int.test.ts index 9ae9c9d4e4..4da7ec6bc8 100644 --- a/packages/graphql/tests/integration/interfaces/aggegations/filter-aggregation-interfaces-field-level-with-auth.int.test.ts +++ b/packages/graphql/tests/integration/interfaces/aggegations/filter-aggregation-interfaces-field-level-with-auth.int.test.ts @@ -47,7 +47,7 @@ describe("Field-level filter interface query fields with authorization", () => { title: String! cost: Float! runtime: Int! - ${Actor.plural}: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") + actedIn: [${Actor}!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn") } type ${Series} implements ${Production} @authorization(validate: [{ where: { jwt: { roles_INCLUDES: "series-reader" } } }]) @node { @@ -110,10 +110,12 @@ describe("Field-level filter interface query fields with authorization", () => { const query = /* GraphQL */ ` query { ${Actor.plural} { - actedInAggregate(where: { title_STARTS_WITH: "The" }) { - node { - title { - longest + actedInConnection(where: { node: { title_STARTS_WITH: "The" } }) { + aggregate { + node { + title { + longest + } } } } @@ -126,8 +128,14 @@ describe("Field-level filter interface query fields with authorization", () => { const queryResult = await testHelper.executeGraphQLWithToken(query, token); expect(queryResult.errors).toBeUndefined(); expect((queryResult as any).data[Actor.plural]).toIncludeSameMembers([ - { actedInAggregate: { node: { title: { longest: "The Series Three" } } }, name: "Actor One" }, - { actedInAggregate: { node: { title: { longest: "The Series Three" } } }, name: "Actor Two" }, + { + actedInConnection: { aggregate: { node: { title: { longest: "The Series Three" } } } }, + name: "Actor One", + }, + { + actedInConnection: { aggregate: { node: { title: { longest: "The Series Three" } } } }, + name: "Actor Two", + }, ]); }); @@ -135,10 +143,12 @@ describe("Field-level filter interface query fields with authorization", () => { const query = /* GraphQL */ ` query { ${Actor.plural} { - actedInAggregate(where: { title_STARTS_WITH: "The" }) { - node { - title { - longest + actedInConnection(where: { node: { title_STARTS_WITH: "The" } }) { + aggregate { + node { + title { + longest + } } } } @@ -158,10 +168,12 @@ describe("Field-level filter interface query fields with authorization", () => { const query = /* GraphQL */ ` query { ${Actor.plural} { - actedInAggregate(where: { title_STARTS_WITH: "The" }) { - node { - title { - longest + actedInConnection(where: { node: { title_STARTS_WITH: "The" } }) { + aggregate { + node { + title { + longest + } } } } diff --git a/packages/graphql/tests/integration/interfaces/aggegations/filter-aggregation-interfaces-field-level.int.test.ts b/packages/graphql/tests/integration/interfaces/aggegations/filter-aggregation-interfaces-field-level.int.test.ts index 578a54c31e..00566825cb 100644 --- a/packages/graphql/tests/integration/interfaces/aggegations/filter-aggregation-interfaces-field-level.int.test.ts +++ b/packages/graphql/tests/integration/interfaces/aggegations/filter-aggregation-interfaces-field-level.int.test.ts @@ -102,17 +102,19 @@ describe("Field-level filter interface query fields", () => { const query = /* GraphQL */ ` query { ${Actor.plural} { - actedInAggregate(where: { title_STARTS_WITH: "The" }) { - edge { - screenTime { - min - max + actedInConnection(where: { node: {title_STARTS_WITH: "The" } }) { + aggregate { + edge { + screenTime { + min + max + } } - } - node { - title { - longest - shortest + node { + title { + longest + shortest + } } } } @@ -126,34 +128,38 @@ describe("Field-level filter interface query fields", () => { expect(queryResult.errors).toBeUndefined(); expect((queryResult as any).data[Actor.plural]).toIncludeSameMembers([ { - actedInAggregate: { - edge: { - screenTime: { - max: 100, - min: 20, + actedInConnection: { + aggregate: { + edge: { + screenTime: { + max: 100, + min: 20, + }, }, - }, - node: { - title: { - longest: "The Series Three", - shortest: "The Movie One", + node: { + title: { + longest: "The Series Three", + shortest: "The Movie One", + }, }, }, }, name: "Actor One", }, { - actedInAggregate: { - edge: { - screenTime: { - max: 728, - min: 88, + actedInConnection: { + aggregate: { + edge: { + screenTime: { + max: 728, + min: 88, + }, }, - }, - node: { - title: { - longest: "The Series Three", - shortest: "The Movie Two", + node: { + title: { + longest: "The Series Three", + shortest: "The Movie Two", + }, }, }, }, @@ -166,17 +172,19 @@ describe("Field-level filter interface query fields", () => { const query = /* GraphQL */ ` query { ${Actor.plural} { - actedInAggregate(where: { AND: [{title_STARTS_WITH: "The"}, {NOT: {title_CONTAINS: "Series"}}] }) { - edge { - screenTime { - min - max + actedInConnection(where: { node: { AND: [{title_STARTS_WITH: "The"}, {NOT: {title_CONTAINS: "Series"}}] }}) { + aggregate { + edge { + screenTime { + min + max + } } - } - node { - title { - longest - shortest + node { + title { + longest + shortest + } } } } @@ -190,34 +198,38 @@ describe("Field-level filter interface query fields", () => { expect(queryResult.errors).toBeUndefined(); expect((queryResult as any).data[Actor.plural]).toIncludeSameMembers([ { - actedInAggregate: { - edge: { - screenTime: { - max: 100, - min: 20, + actedInConnection: { + aggregate: { + edge: { + screenTime: { + max: 100, + min: 20, + }, }, - }, - node: { - title: { - longest: "The Movie Three", - shortest: "The Movie One", + node: { + title: { + longest: "The Movie Three", + shortest: "The Movie One", + }, }, }, }, name: "Actor One", }, { - actedInAggregate: { - edge: { - screenTime: { - max: 728, - min: 240, + actedInConnection: { + aggregate: { + edge: { + screenTime: { + max: 728, + min: 240, + }, }, - }, - node: { - title: { - longest: "The Movie Three", - shortest: "The Movie Two", + node: { + title: { + longest: "The Movie Three", + shortest: "The Movie Two", + }, }, }, }, diff --git a/packages/graphql/tests/integration/interfaces/aggegations/filter-aggregation-interfaces-top-level-with-auth.int.test.ts b/packages/graphql/tests/integration/interfaces/aggegations/filter-aggregation-interfaces-top-level-with-auth.int.test.ts index 04da8b4ef7..6cc4dc82bf 100644 --- a/packages/graphql/tests/integration/interfaces/aggegations/filter-aggregation-interfaces-top-level-with-auth.int.test.ts +++ b/packages/graphql/tests/integration/interfaces/aggegations/filter-aggregation-interfaces-top-level-with-auth.int.test.ts @@ -109,9 +109,13 @@ describe("Top-level filter interface query fields with authorization", () => { test("aggregation with auth should succeed", async () => { const query = /* GraphQL */ ` query { - ${Production.operations.aggregate} (where: { title_STARTS_WITH: "The" }) { - title { - longest + ${Production.operations.connection} (where: { title_STARTS_WITH: "The" }) { + aggregate { + node { + title { + longest + } + } } } } @@ -120,15 +124,29 @@ describe("Top-level filter interface query fields with authorization", () => { const token = createBearerToken(secret, { roles: ["movies-reader", "series-reader"] }); const queryResult = await testHelper.executeGraphQLWithToken(query, token); expect(queryResult.errors).toBeUndefined(); - expect((queryResult as any).data[Production.operations.aggregate]["title"]["longest"]).toBe("The Series Three"); + expect(queryResult.data).toEqual({ + [Production.operations.connection]: { + aggregate: { + node: { + title: { + longest: "The Series Three", + }, + }, + }, + }, + }); }); test("aggregation with auth should fail", async () => { const query = /* GraphQL */ ` query { - ${Production.operations.aggregate} (where: { title_STARTS_WITH: "The" }) { - title { - longest + ${Production.operations.connection} (where: { title_STARTS_WITH: "The" }) { + aggregate { + node { + title { + longest + } + } } } } diff --git a/packages/graphql/tests/integration/interfaces/aggegations/filter-aggregation-interfaces-top-level.int.test.ts b/packages/graphql/tests/integration/interfaces/aggegations/filter-aggregation-interfaces-top-level.int.test.ts index f7391a4eac..6f99505052 100644 --- a/packages/graphql/tests/integration/interfaces/aggegations/filter-aggregation-interfaces-top-level.int.test.ts +++ b/packages/graphql/tests/integration/interfaces/aggegations/filter-aggregation-interfaces-top-level.int.test.ts @@ -69,8 +69,12 @@ describe("Top-level filter interface query fields", () => { test("top level count", async () => { const query = ` query { - productionsAggregate(where: { title_EQ: "The Show" }) { - count + productionsConnection(where: { title_EQ: "The Show" }) { + aggregate { + count { + nodes + } + } } } `; @@ -79,8 +83,12 @@ describe("Top-level filter interface query fields", () => { const queryResult = await testHelper.executeGraphQLWithToken(query, token); expect(queryResult.errors).toBeUndefined(); expect(queryResult.data).toEqual({ - productionsAggregate: { - count: 1, + productionsConnection: { + aggregate: { + count: { + nodes: 1, + }, + }, }, }); }); @@ -88,8 +96,12 @@ describe("Top-level filter interface query fields", () => { test("top level count with logical operator", async () => { const query = ` query { - productionsAggregate(where: { OR: [{title_EQ: "The Show"}, {title_EQ: "A Movie"}] }) { - count + productionsConnection(where: { OR: [{title_EQ: "The Show"}, {title_EQ: "A Movie"}] }) { + aggregate { + count { + nodes + } + } } } `; @@ -98,8 +110,12 @@ describe("Top-level filter interface query fields", () => { const queryResult = await testHelper.executeGraphQLWithToken(query, token); expect(queryResult.errors).toBeUndefined(); expect(queryResult.data).toEqual({ - productionsAggregate: { - count: 2, + productionsConnection: { + aggregate: { + count: { + nodes: 2, + }, + }, }, }); }); @@ -107,11 +123,17 @@ describe("Top-level filter interface query fields", () => { test("top level count and string fields", async () => { const query = ` query { - productionsAggregate(where: { title_STARTS_WITH: "The" }) { - count - title { - longest - shortest + productionsConnection(where: { title_STARTS_WITH: "The" }) { + aggregate { + count { + nodes + } + node { + title { + longest + shortest + } + } } } } @@ -121,11 +143,17 @@ describe("Top-level filter interface query fields", () => { const queryResult = await testHelper.executeGraphQLWithToken(query, token); expect(queryResult.errors).toBeUndefined(); expect(queryResult.data).toEqual({ - productionsAggregate: { - count: 2, - title: { - longest: "The Matrix is a very interesting movie: The Documentary", - shortest: "The Show", + productionsConnection: { + aggregate: { + count: { + nodes: 2, + }, + node: { + title: { + longest: "The Matrix is a very interesting movie: The Documentary", + shortest: "The Show", + }, + }, }, }, }); diff --git a/packages/graphql/tests/integration/issues/1320.int.test.ts b/packages/graphql/tests/integration/issues/1320.int.test.ts index c107416d60..48cdd4f695 100644 --- a/packages/graphql/tests/integration/issues/1320.int.test.ts +++ b/packages/graphql/tests/integration/issues/1320.int.test.ts @@ -73,16 +73,24 @@ describe("https://github.com/neo4j/graphql/issues/1320", () => { const query = ` query getAggreationOnTeams { stats: ${teamType.plural} { - accepted: ownsRisksAggregate( - where: { mitigationState_INCLUDES: Accepted } + accepted: ownsRisksConnection( + where: { node: { mitigationState: { includes: Accepted } } } ) { - count + aggregate { + count { + nodes + } + } } - identified: ownsRisksAggregate( - where: { mitigationState_INCLUDES: Identified } + identified: ownsRisksConnection( + where: { node: { mitigationState: { includes: Identified } } } ) { - count + aggregate { + count { + nodes + } + } } } } @@ -90,18 +98,25 @@ describe("https://github.com/neo4j/graphql/issues/1320", () => { const res = await testHelper.executeGraphQL(query); expect(res.errors).toBeUndefined(); - const expectedReturn = { + expect(res.data).toEqual({ stats: [ { accepted: { - count: 1, + aggregate: { + count: { + nodes: 1, + }, + }, }, identified: { - count: 0, + aggregate: { + count: { + nodes: 0, + }, + }, }, }, ], - }; - expect(res.data).toEqual(expectedReturn); + }); }); }); diff --git a/packages/graphql/tests/integration/issues/1933.int.test.ts b/packages/graphql/tests/integration/issues/1933.int.test.ts index 1ee25ad404..4f42809326 100644 --- a/packages/graphql/tests/integration/issues/1933.int.test.ts +++ b/packages/graphql/tests/integration/issues/1933.int.test.ts @@ -78,14 +78,18 @@ describe("https://github.com/neo4j/graphql/issues/1933", () => { employeeId firstName lastName - projectsAggregate { - count - edge { - allocation { - max - min - average - sum + projectsConnection { + aggregate { + count { + nodes + } + edge { + allocation { + max + min + average + sum + } } } } @@ -106,14 +110,18 @@ describe("https://github.com/neo4j/graphql/issues/1933", () => { employeeId firstName lastName - projectsAggregate { - count - edge { - allocation { - max - min - average - sum + projectsConnection { + aggregate { + count { + nodes + } + edge { + allocation { + max + min + average + sum + } } } } @@ -129,7 +137,12 @@ describe("https://github.com/neo4j/graphql/issues/1933", () => { employeeId: "3332", firstName: "Emp2", lastName: "EmpLast2", - projectsAggregate: { count: 2, edge: { allocation: { average: 25, max: 30, min: 20, sum: 50 } } }, + projectsConnection: { + aggregate: { + count: { nodes: 2 }, + edge: { allocation: { average: 25, max: 30, min: 20, sum: 50 } }, + }, + }, }, ]); }); diff --git a/packages/graphql/tests/integration/issues/2388.int.test.ts b/packages/graphql/tests/integration/issues/2388.int.test.ts index 32e44ef8b5..e7d77836fc 100644 --- a/packages/graphql/tests/integration/issues/2388.int.test.ts +++ b/packages/graphql/tests/integration/issues/2388.int.test.ts @@ -92,8 +92,12 @@ describe("https://github.com/neo4j/graphql/issues/2388", () => { const query = ` query PartByNumber { ${Part.plural} { - partUsagesAggregate(where: { partAddress_SOME: { id_EQ: "123" } }) { - count + partUsagesConnection(where: { node: { partAddress: { some: { id: {eq: "123" } } } } }) { + aggregate { + count { + nodes + } + } } } } @@ -106,8 +110,12 @@ describe("https://github.com/neo4j/graphql/issues/2388", () => { expect(result.data).toEqual({ [Part.plural]: [ { - partUsagesAggregate: { - count: 1, + partUsagesConnection: { + aggregate: { + count: { + nodes: 1, + }, + }, }, }, ], diff --git a/packages/graphql/tests/integration/issues/2652.int.test.ts b/packages/graphql/tests/integration/issues/2652.int.test.ts index 265c7a4b64..59b429a513 100644 --- a/packages/graphql/tests/integration/issues/2652.int.test.ts +++ b/packages/graphql/tests/integration/issues/2652.int.test.ts @@ -55,12 +55,16 @@ describe("https://github.com/neo4j/graphql/issues/2652", () => { const query = ` query ReviewsAggregate { ${Location.plural} { - reviewsAggregate { - count - node { - rating { - average + reviewsConnection { + aggregate { + count { + nodes } + node { + rating { + average + } + } } } } diff --git a/packages/graphql/tests/integration/issues/2669.int.test.ts b/packages/graphql/tests/integration/issues/2669.int.test.ts index d237bf0eaf..dd21b32fd6 100644 --- a/packages/graphql/tests/integration/issues/2669.int.test.ts +++ b/packages/graphql/tests/integration/issues/2669.int.test.ts @@ -61,10 +61,12 @@ describe("https://github.com/neo4j/graphql/issues/2669", () => { const query = ` query { ${typeMovie.plural} { - actorsAggregate { - node { - myName { - shortest + actorsConnection { + aggregate { + node { + myName { + shortest + } } } } @@ -75,12 +77,20 @@ describe("https://github.com/neo4j/graphql/issues/2669", () => { const gqlResult = await testHelper.executeGraphQL(query); expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0].actorsAggregate).toEqual({ - node: { - myName: { - shortest: "Linda", + expect(gqlResult.data).toEqual({ + [typeMovie.plural]: [ + { + actorsConnection: { + aggregate: { + node: { + myName: { + shortest: "Linda", + }, + }, + }, + }, }, - }, + ], }); }); @@ -88,10 +98,12 @@ describe("https://github.com/neo4j/graphql/issues/2669", () => { const query = ` query { ${typeMovie.plural} { - actorsAggregate { - edge { - time { - max + actorsConnection { + aggregate { + edge { + time { + max + } } } } @@ -102,12 +114,20 @@ describe("https://github.com/neo4j/graphql/issues/2669", () => { const gqlResult = await testHelper.executeGraphQL(query); expect(gqlResult.errors).toBeUndefined(); - expect((gqlResult as any).data[typeMovie.plural][0].actorsAggregate).toEqual({ - edge: { - time: { - max: 120, + expect(gqlResult.data).toEqual({ + [typeMovie.plural]: [ + { + actorsConnection: { + aggregate: { + edge: { + time: { + max: 120, + }, + }, + }, + }, }, - }, + ], }); }); }); diff --git a/packages/graphql/tests/integration/issues/2982.int.test.ts b/packages/graphql/tests/integration/issues/2982.int.test.ts index dba9579e90..821a27fd69 100644 --- a/packages/graphql/tests/integration/issues/2982.int.test.ts +++ b/packages/graphql/tests/integration/issues/2982.int.test.ts @@ -68,8 +68,12 @@ describe("https://github.com/neo4j/graphql/issues/2982", () => { ${User.plural} { ${Post.plural} { ... on ${BlogArticle} { - ${Comment.operations.aggregate} { - count + ${Comment.operations.connection} { + aggregate { + count { + nodes + } + } } } } @@ -94,7 +98,9 @@ describe("https://github.com/neo4j/graphql/issues/2982", () => { expect(result.errors).toBeFalsy(); expect(result.data).toEqual({ - [User.plural]: [{ [Post.plural]: [{ [Comment.operations.aggregate]: { count: 0 } }] }], + [User.plural]: [ + { [Post.plural]: [{ [Comment.operations.connection]: { aggregate: { count: { nodes: 0 } } } }] }, + ], }); }); }); diff --git a/packages/graphql/tests/integration/issues/4115.int.test.ts b/packages/graphql/tests/integration/issues/4115.int.test.ts index b8ca66e5a4..97d3915938 100644 --- a/packages/graphql/tests/integration/issues/4115.int.test.ts +++ b/packages/graphql/tests/integration/issues/4115.int.test.ts @@ -106,8 +106,12 @@ describe("https://github.com/neo4j/graphql/issues/4115", () => { query Family { ${Family.plural} { id - membersAggregate { - count + membersConnection { + aggregate { + count { + nodes + } + } } } } @@ -121,14 +125,22 @@ describe("https://github.com/neo4j/graphql/issues/4115", () => { expect((result.data as any)[Family.plural]).toIncludeSameMembers([ { id: "family1", - membersAggregate: { - count: 0, + membersConnection: { + aggregate: { + count: { + nodes: 0, + }, + }, }, }, { id: "family2", - membersAggregate: { - count: 1, + membersConnection: { + aggregate: { + count: { + nodes: 1, + }, + }, }, }, ]); @@ -139,8 +151,12 @@ describe("https://github.com/neo4j/graphql/issues/4115", () => { query Family { ${Family.plural} { id - membersAggregate { - count + membersConnection { + aggregate { + count { + nodes + } + } } } } @@ -154,14 +170,22 @@ describe("https://github.com/neo4j/graphql/issues/4115", () => { expect((result.data as any)[Family.plural]).toIncludeSameMembers([ { id: "family1", - membersAggregate: { - count: 0, + membersConnection: { + aggregate: { + count: { + nodes: 0, + }, + }, }, }, { id: "family2", - membersAggregate: { - count: 0, + membersConnection: { + aggregate: { + count: { + nodes: 0, + }, + }, }, }, ]); diff --git a/packages/graphql/tests/integration/issues/413.int.test.ts b/packages/graphql/tests/integration/issues/413.int.test.ts index 7012603e61..b9fdf7059a 100644 --- a/packages/graphql/tests/integration/issues/413.int.test.ts +++ b/packages/graphql/tests/integration/issues/413.int.test.ts @@ -71,8 +71,12 @@ describe("https://github.com/neo4j/graphql/issues/413", () => { const query = ` query { - ${JobPlan.operations.aggregate}(where: {tenantID_EQ: "${tenantID}"}) { - count + ${JobPlan.operations.connection}(where: {tenantID_EQ: "${tenantID}"}) { + aggregate { + count { + nodes + } + } } } `; @@ -94,8 +98,14 @@ describe("https://github.com/neo4j/graphql/issues/413", () => { expect(result.errors).toBeFalsy(); - expect(result.data as any).toEqual({ - [JobPlan.operations.aggregate]: { count: 3 }, + expect(result.data).toEqual({ + [JobPlan.operations.connection]: { + aggregate: { + count: { + nodes: 3, + }, + }, + }, }); }); }); diff --git a/packages/graphql/tests/integration/issues/4477.int.test.ts b/packages/graphql/tests/integration/issues/4477.int.test.ts index 66fa674361..8876e88797 100644 --- a/packages/graphql/tests/integration/issues/4477.int.test.ts +++ b/packages/graphql/tests/integration/issues/4477.int.test.ts @@ -84,8 +84,12 @@ describe("https://github.com/neo4j/graphql/issues/4477", () => { ${Brand.plural} { name services(where: { collectionAggregate: { count_EQ: 1 } }) { - collectionAggregate { - count + collectionConnection { + aggregate { + count { + nodes + } + } } } } @@ -101,13 +105,21 @@ describe("https://github.com/neo4j/graphql/issues/4477", () => { name: "brand1", services: [ { - collectionAggregate: { - count: 1, + collectionConnection: { + aggregate: { + count: { + nodes: 1, + }, + }, }, }, { - collectionAggregate: { - count: 1, + collectionConnection: { + aggregate: { + count: { + nodes: 1, + }, + }, }, }, ], @@ -116,8 +128,12 @@ describe("https://github.com/neo4j/graphql/issues/4477", () => { name: "brand2", services: [ { - collectionAggregate: { - count: 1, + collectionConnection: { + aggregate: { + count: { + nodes: 1, + }, + }, }, }, ], diff --git a/packages/graphql/tests/integration/issues/4759.int.test.ts b/packages/graphql/tests/integration/issues/4759.int.test.ts index 71bb20850f..adb38423c7 100644 --- a/packages/graphql/tests/integration/issues/4759.int.test.ts +++ b/packages/graphql/tests/integration/issues/4759.int.test.ts @@ -63,8 +63,12 @@ describe("https://github.com/neo4j/graphql/issues/4759", () => { ${Node1.plural} { uuid name - nodesAggregate(where: { active_EQ: true }) { - count + nodesConnection(where: { node: {active: { eq: true } } }) { + aggregate { + count { + nodes + } + } } } } @@ -77,15 +81,19 @@ describe("https://github.com/neo4j/graphql/issues/4759", () => { { uuid: "id0", name: "name0", - nodesAggregate: { - count: 0, + nodesConnection: { + aggregate: { + count: { nodes: 0 }, + }, }, }, { uuid: "id1", name: "name1", - nodesAggregate: { - count: 2, + nodesConnection: { + aggregate: { + count: { nodes: 2 }, + }, }, }, ]), @@ -98,8 +106,12 @@ describe("https://github.com/neo4j/graphql/issues/4759", () => { ${Node1.plural} { uuid name - activeNodes: nodesAggregate(where: { active_EQ: true }) { - count + activeNodes: nodesConnection(where: {node: { active: {eq: true } } }) { + aggregate { + count { + nodes + } + } } } } @@ -113,14 +125,18 @@ describe("https://github.com/neo4j/graphql/issues/4759", () => { uuid: "id0", name: "name0", activeNodes: { - count: 0, + aggregate: { + count: { nodes: 0 }, + }, }, }, { uuid: "id1", name: "name1", activeNodes: { - count: 2, + aggregate: { + count: { nodes: 2 }, + }, }, }, ]), diff --git a/packages/graphql/tests/integration/issues/594.int.test.ts b/packages/graphql/tests/integration/issues/594.int.test.ts index 9bdc447b2f..3fc3655360 100644 --- a/packages/graphql/tests/integration/issues/594.int.test.ts +++ b/packages/graphql/tests/integration/issues/594.int.test.ts @@ -57,10 +57,12 @@ describe("https://github.com/neo4j/graphql/issues/594", () => { const query = ` query { ${typeMovie.plural} { - actorsAggregate { - node { + actorsConnection { + aggregate { + node { nickname { shortest + } } } } @@ -73,8 +75,8 @@ describe("https://github.com/neo4j/graphql/issues/594", () => { expect(gqlResult.errors).toBeUndefined(); expect(gqlResult.data[typeMovie.plural]).toEqual( expect.toIncludeSameMembers([ - { actorsAggregate: { node: { nickname: { shortest: "SName" } } } }, - { actorsAggregate: { node: { nickname: { shortest: null } } } }, + { actorsConnection: { aggregate: { node: { nickname: { shortest: "SName" } } } } }, + { actorsConnection: { aggregate: { node: { nickname: { shortest: null } } } } }, ]) ); }); @@ -82,9 +84,13 @@ describe("https://github.com/neo4j/graphql/issues/594", () => { test("should support nullable fields in aggregations", async () => { const query = ` query { - ${typePerson.plural}Aggregate { - surname { - shortest + ${typePerson.plural}Connection { + aggregate { + node { + surname { + shortest + } + } } } } @@ -93,6 +99,8 @@ describe("https://github.com/neo4j/graphql/issues/594", () => { const gqlResult: any = await testHelper.executeGraphQL(query); expect(gqlResult.errors).toBeUndefined(); - expect(gqlResult.data[`${typePerson.plural}Aggregate`]).toEqual({ surname: { shortest: null } }); + expect(gqlResult.data[`${typePerson.plural}Connection`]).toEqual({ + aggregate: { node: { surname: { shortest: null } } }, + }); }); }); diff --git a/packages/graphql/tests/schema/aggregations.test.ts b/packages/graphql/tests/schema/aggregations.test.ts index 423ef566b5..82c481f681 100644 --- a/packages/graphql/tests/schema/aggregations.test.ts +++ b/packages/graphql/tests/schema/aggregations.test.ts @@ -291,20 +291,6 @@ describe("Aggregations", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - createdAt: DateTimeAggregateSelection! - imdbRating: FloatAggregateSelection! - isbn: StringAggregateSelection! - screenTime: DurationAggregateSelection! - someBigInt: BigIntAggregateSelection! - someInt: IntAggregateSelection! - someLocalDateTime: LocalDateTimeAggregateSelection! - someLocalTime: LocalTimeAggregateSelection! - someTime: TimeAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { createdAt: DateTime id: ID @@ -477,7 +463,6 @@ describe("Aggregations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1179,7 +1164,6 @@ describe("Aggregations", () => { type Post { likes(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - likesAggregate(where: UserWhere): PostUserLikesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"likesConnection\\\\\\" instead\\") likesConnection(after: String, first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! someID: ID title: String @@ -1194,11 +1178,6 @@ describe("Aggregations", () => { title: StringAggregateSelection! } - type PostAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input PostCreateInput { likes: PostLikesFieldInput someID: ID @@ -1488,12 +1467,6 @@ describe("Aggregations", () => { node: PostUserLikesNodeAggregateSelection } - type PostUserLikesAggregationSelection { - count: Int! - edge: PostUserLikesEdgeAggregateSelection - node: PostUserLikesNodeAggregateSelection - } - type PostUserLikesEdgeAggregateSelection { someBigInt: BigIntAggregateSelection! someDateTime: DateTimeAggregateSelection! @@ -1572,10 +1545,8 @@ describe("Aggregations", () => { type Query { posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\" instead\\") postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\" instead\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } @@ -1692,19 +1663,6 @@ describe("Aggregations", () => { someTime: TimeAggregateSelection! } - type UserAggregateSelection { - count: Int! - someBigInt: BigIntAggregateSelection! - someDateTime: DateTimeAggregateSelection! - someDuration: DurationAggregateSelection! - someFloat: FloatAggregateSelection! - someInt: IntAggregateSelection! - someLocalDateTime: LocalDateTimeAggregateSelection! - someLocalTime: LocalTimeAggregateSelection! - someString: StringAggregateSelection! - someTime: TimeAggregateSelection! - } - input UserConnectWhere { node: UserWhere! } @@ -2445,7 +2403,6 @@ describe("Aggregations", () => { type Post { likes(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - likesAggregate(where: UserWhere): PostUserLikesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"likesConnection\\\\\\" instead\\") likesConnection(after: String, first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! title: String } @@ -2459,11 +2416,6 @@ describe("Aggregations", () => { title: StringAggregateSelection! } - type PostAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input PostCreateInput { likes: PostLikesFieldInput title: String @@ -2746,11 +2698,6 @@ describe("Aggregations", () => { node: PostUserLikesNodeAggregateSelection } - type PostUserLikesAggregationSelection { - count: Int! - node: PostUserLikesNodeAggregateSelection - } - type PostUserLikesNodeAggregateSelection { someBigInt: BigIntAggregateSelection! someDateTime: DateTimeAggregateSelection! @@ -2811,10 +2758,8 @@ describe("Aggregations", () => { type Query { posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\" instead\\") postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\" instead\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } @@ -2943,19 +2888,6 @@ describe("Aggregations", () => { someTime: TimeAggregateSelection! } - type UserAggregateSelection { - count: Int! - someBigInt: BigIntAggregateSelection! - someDateTime: DateTimeAggregateSelection! - someDuration: DurationAggregateSelection! - someFloat: FloatAggregateSelection! - someInt: IntAggregateSelection! - someLocalDateTime: LocalDateTimeAggregateSelection! - someLocalTime: LocalTimeAggregateSelection! - someString: StringAggregateSelection! - someTime: TimeAggregateSelection! - } - input UserConnectWhere { node: UserWhere! } diff --git a/packages/graphql/tests/schema/array-methods.test.ts b/packages/graphql/tests/schema/array-methods.test.ts index 875fd6abb9..7839a3707a 100644 --- a/packages/graphql/tests/schema/array-methods.test.ts +++ b/packages/graphql/tests/schema/array-methods.test.ts @@ -85,7 +85,6 @@ describe("Arrays Methods", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String } @@ -236,11 +235,6 @@ describe("Arrays Methods", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { actedIn: [ActorActedInConnectFieldInput!] } @@ -272,11 +266,6 @@ describe("Arrays Methods", () => { node: ActorMovieActedInNodeAggregateSelection } - type ActorMovieActedInAggregationSelection { - count: Int! - node: ActorMovieActedInNodeAggregateSelection - } - type ActorMovieActedInNodeAggregateSelection { averageRating: FloatAggregateSelection! } @@ -464,7 +453,6 @@ describe("Arrays Methods", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float! id: ID! @@ -476,11 +464,6 @@ describe("Arrays Methods", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -624,11 +607,6 @@ describe("Arrays Methods", () => { averageRating: FloatAggregateSelection! } - type MovieAggregateSelection { - averageRating: FloatAggregateSelection! - count: Int! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -767,10 +745,8 @@ describe("Arrays Methods", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 5bfcdbec49..b7a66c0f6d 100644 --- a/packages/graphql/tests/schema/arrays.test.ts +++ b/packages/graphql/tests/schema/arrays.test.ts @@ -133,11 +133,6 @@ describe("Arrays", () => { averageRating: FloatAggregateSelection! } - type MovieAggregateSelection { - averageRating: FloatAggregateSelection! - count: Int! - } - input MovieCreateInput { averageRating: Float! id: ID! @@ -217,7 +212,6 @@ describe("Arrays", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 43d934175d..372da63b64 100644 --- a/packages/graphql/tests/schema/authorization.test.ts +++ b/packages/graphql/tests/schema/authorization.test.ts @@ -140,7 +140,6 @@ describe("Authorization", () => { type Post { author(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - authorAggregate(where: UserWhere): PostUserAuthorAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"authorConnection\\\\\\" instead\\") authorConnection(after: String, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! id: ID! name: String! @@ -155,11 +154,6 @@ describe("Authorization", () => { name: StringAggregateSelection! } - type PostAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PostAuthorAggregateInput { AND: [PostAuthorAggregateInput!] NOT: PostAuthorAggregateInput @@ -320,11 +314,6 @@ describe("Authorization", () => { node: PostUserAuthorNodeAggregateSelection } - type PostUserAuthorAggregationSelection { - count: Int! - node: PostUserAuthorNodeAggregateSelection - } - type PostUserAuthorNodeAggregateSelection { name: StringAggregateSelection! } @@ -383,10 +372,8 @@ describe("Authorization", () => { type Query { posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\" instead\\") postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\" instead\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } @@ -448,7 +435,6 @@ describe("Authorization", () => { id: ID! name: String! posts(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - postsAggregate(where: UserWhere): UserUserPostsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\" instead\\") postsConnection(after: String, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! } @@ -461,11 +447,6 @@ describe("Authorization", () => { name: StringAggregateSelection! } - type UserAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input UserConnectInput { posts: [UserPostsConnectFieldInput!] } @@ -649,11 +630,6 @@ describe("Authorization", () => { node: UserUserPostsNodeAggregateSelection } - type UserUserPostsAggregationSelection { - count: Int! - node: UserUserPostsNodeAggregateSelection - } - type UserUserPostsNodeAggregateSelection { name: StringAggregateSelection! } diff --git a/packages/graphql/tests/schema/comments.test.ts b/packages/graphql/tests/schema/comments.test.ts index f43ccc6c0b..80377c2b39 100644 --- a/packages/graphql/tests/schema/comments.test.ts +++ b/packages/graphql/tests/schema/comments.test.ts @@ -223,12 +223,6 @@ describe("Comments", () => { averageRating: FloatAggregateSelection! } - type MovieAggregateSelection { - actorCount: IntAggregateSelection! - averageRating: FloatAggregateSelection! - count: Int! - } - input MovieCreateInput { actorCount: Int averageRating: Float @@ -333,7 +327,6 @@ describe("Comments", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -397,11 +390,6 @@ describe("Comments", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectWhere { node: ActorWhere! } @@ -534,7 +522,6 @@ describe("Comments", () => { type Movie { \\"\\"\\"Actors in Movie\\"\\"\\" actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -544,11 +531,6 @@ describe("Comments", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -678,10 +660,6 @@ describe("Comments", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { actors: MovieActorsFieldInput id: ID @@ -774,10 +752,8 @@ describe("Comments", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -938,7 +914,6 @@ describe("Comments", () => { type Actor { \\"\\"\\"Acted in Production\\"\\"\\" actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -1083,11 +1058,6 @@ describe("Comments", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { actedIn: ActorActedInFieldInput name: String! @@ -1108,12 +1078,6 @@ describe("Comments", () => { node: ActorProductionActedInNodeAggregateSelection } - type ActorProductionActedInAggregationSelection { - count: Int! - edge: ActorProductionActedInEdgeAggregateSelection - node: ActorProductionActedInNodeAggregateSelection - } - type ActorProductionActedInEdgeAggregateSelection { screenTime: IntAggregateSelection! } @@ -1283,12 +1247,6 @@ describe("Comments", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - runtime: IntAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { runtime: Int! title: String! @@ -1375,11 +1333,6 @@ describe("Comments", () => { title: StringAggregateSelection! } - type ProductionAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input ProductionConnectWhere { node: ProductionWhere! } @@ -1444,16 +1397,12 @@ describe("Comments", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\" instead\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -1472,12 +1421,6 @@ describe("Comments", () => { title: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - episodes: IntAggregateSelection! - title: StringAggregateSelection! - } - type SeriesConnection { aggregate: SeriesAggregate! edges: [SeriesEdge!]! @@ -1653,10 +1596,6 @@ describe("Comments", () => { count: Count! } - type GenreAggregateSelection { - count: Int! - } - input GenreConnectWhere { node: GenreWhere! } @@ -1726,10 +1665,6 @@ describe("Comments", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieConnectInput { search: MovieSearchConnectInput } @@ -1978,10 +1913,8 @@ describe("Comments", () => { type Query { genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\" instead\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! searches(limit: Int, offset: Int, where: SearchWhere): [Search!]! } diff --git a/packages/graphql/tests/schema/connections/enums.test.ts b/packages/graphql/tests/schema/connections/enums.test.ts index b50f13bede..b8309877d4 100644 --- a/packages/graphql/tests/schema/connections/enums.test.ts +++ b/packages/graphql/tests/schema/connections/enums.test.ts @@ -86,7 +86,6 @@ describe("Enums", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String! } @@ -100,11 +99,6 @@ describe("Enums", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -136,11 +130,6 @@ describe("Enums", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -407,7 +396,6 @@ describe("Enums", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String! } @@ -417,11 +405,6 @@ describe("Enums", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -565,11 +548,6 @@ describe("Enums", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -685,10 +663,8 @@ describe("Enums", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 f371096d21..23c8d578cb 100644 --- a/packages/graphql/tests/schema/connections/interfaces.test.ts +++ b/packages/graphql/tests/schema/connections/interfaces.test.ts @@ -104,10 +104,6 @@ describe("Connection with interfaces", () => { count: Count! } - type CreatureAggregateSelection { - count: Int! - } - input CreatureConnectInput { movies: [CreatureMoviesConnectFieldInput!] } @@ -360,7 +356,6 @@ describe("Connection with interfaces", () => { type Movie implements Production { director(limit: Int, offset: Int, sort: [CreatureSort!], where: CreatureWhere): [Creature!]! - directorAggregate(where: CreatureWhere): MovieCreatureDirectorAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"directorConnection\\\\\\" instead\\") directorConnection(after: String, first: Int, sort: [ProductionDirectorConnectionSort!], where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! id: ID title: String! @@ -375,21 +370,12 @@ describe("Connection with interfaces", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieCreateInput { director: MovieDirectorFieldInput id: ID title: String! } - type MovieCreatureDirectorAggregationSelection { - count: Int! - } - input MovieDeleteInput { director: [MovieDirectorDeleteFieldInput!] } @@ -576,7 +562,6 @@ describe("Connection with interfaces", () => { type Person implements Creature { id: ID movies(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - moviesAggregate(where: ProductionWhere): PersonProductionMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! } @@ -584,10 +569,6 @@ describe("Connection with interfaces", () => { count: Count! } - type PersonAggregateSelection { - count: Int! - } - input PersonCreateInput { id: ID movies: PersonMoviesFieldInput @@ -681,10 +662,6 @@ describe("Connection with interfaces", () => { where: CreatureMoviesConnectionWhere } - type PersonProductionMoviesAggregationSelection { - count: Int! - } - \\"\\"\\" Fields to sort People by. The order in which sorts are applied is not guaranteed when specifying many fields in one PersonSort object. \\"\\"\\" @@ -747,10 +724,6 @@ describe("Connection with interfaces", () => { count: Count! } - type ProductionAggregateSelection { - count: Int! - } - input ProductionConnectInput { director: [ProductionDirectorConnectFieldInput!] } @@ -959,25 +932,19 @@ describe("Connection with interfaces", () => { type Query { creatures(limit: Int, offset: Int, sort: [CreatureSort!], where: CreatureWhere): [Creature!]! - creaturesAggregate(where: CreatureWhere): CreatureAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"creaturesConnection\\\\\\" instead\\") creaturesConnection(after: String, first: Int, sort: [CreatureSort!], where: CreatureWhere): CreaturesConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\" instead\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } type Series implements Production { director(limit: Int, offset: Int, sort: [CreatureSort!], where: CreatureWhere): [Creature!]! - directorAggregate(where: CreatureWhere): SeriesCreatureDirectorAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"directorConnection\\\\\\" instead\\") directorConnection(after: String, first: Int, sort: [ProductionDirectorConnectionSort!], where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! episode: Int! id: ID @@ -994,12 +961,6 @@ describe("Connection with interfaces", () => { title: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - episode: IntAggregateSelection! - title: StringAggregateSelection! - } - type SeriesConnection { aggregate: SeriesAggregate! edges: [SeriesEdge!]! @@ -1014,10 +975,6 @@ describe("Connection with interfaces", () => { title: String! } - type SeriesCreatureDirectorAggregationSelection { - count: Int! - } - input SeriesDeleteInput { director: [SeriesDirectorDeleteFieldInput!] } diff --git a/packages/graphql/tests/schema/connections/sort.test.ts b/packages/graphql/tests/schema/connections/sort.test.ts index 9500083b82..eac5281fa4 100644 --- a/packages/graphql/tests/schema/connections/sort.test.ts +++ b/packages/graphql/tests/schema/connections/sort.test.ts @@ -115,7 +115,6 @@ describe("Sort", () => { type Node1 { property: String! relatedTo(limit: Int, offset: Int, where: Node2Where): [Node2!]! - relatedToAggregate(where: Node2Where): Node1Node2RelatedToAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"relatedToConnection\\\\\\" instead\\") relatedToConnection(after: String, first: Int, where: Node1RelatedToConnectionWhere): Node1RelatedToConnection! } @@ -128,11 +127,6 @@ describe("Sort", () => { property: StringAggregateSelection! } - type Node1AggregateSelection { - count: Int! - property: StringAggregateSelection! - } - input Node1ConnectInput { relatedTo: [Node1RelatedToConnectFieldInput!] } @@ -163,10 +157,6 @@ describe("Sort", () => { count: CountConnection! } - type Node1Node2RelatedToAggregationSelection { - count: Int! - } - input Node1RelatedToAggregateInput { AND: [Node1RelatedToAggregateInput!] NOT: Node1RelatedToAggregateInput @@ -337,7 +327,6 @@ describe("Sort", () => { type Node2 { relatedTo(limit: Int, offset: Int, sort: [Node1Sort!], where: Node1Where): [Node1!]! - relatedToAggregate(where: Node1Where): Node2Node1RelatedToAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"relatedToConnection\\\\\\" instead\\") relatedToConnection(after: String, first: Int, sort: [Node2RelatedToConnectionSort!], where: Node2RelatedToConnectionWhere): Node2RelatedToConnection! } @@ -345,10 +334,6 @@ describe("Sort", () => { count: Count! } - type Node2AggregateSelection { - count: Int! - } - input Node2ConnectInput { relatedTo: [Node2RelatedToConnectFieldInput!] } @@ -379,11 +364,6 @@ describe("Sort", () => { node: Node2Node1RelatedToNodeAggregateSelection } - type Node2Node1RelatedToAggregationSelection { - count: Int! - node: Node2Node1RelatedToNodeAggregateSelection - } - type Node2Node1RelatedToNodeAggregateSelection { property: StringAggregateSelection! } @@ -579,10 +559,8 @@ describe("Sort", () => { type Query { node1s(limit: Int, offset: Int, sort: [Node1Sort!], where: Node1Where): [Node1!]! - node1sAggregate(where: Node1Where): Node1AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"node1sConnection\\\\\\" instead\\") node1sConnection(after: String, first: Int, sort: [Node1Sort!], where: Node1Where): Node1sConnection! node2s(limit: Int, offset: Int, where: Node2Where): [Node2!]! - node2sAggregate(where: Node2Where): Node2AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"node2sConnection\\\\\\" instead\\") 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 7c0c56c116..3b9b873f66 100644 --- a/packages/graphql/tests/schema/connections/unions.test.ts +++ b/packages/graphql/tests/schema/connections/unions.test.ts @@ -70,11 +70,6 @@ describe("Unions", () => { name: StringAggregateSelection! } - type AuthorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input AuthorConnectInput { publications: AuthorPublicationsConnectInput } @@ -337,7 +332,6 @@ describe("Unions", () => { type Book { author(limit: Int, offset: Int, sort: [AuthorSort!], where: AuthorWhere): [Author!]! - authorAggregate(where: AuthorWhere): BookAuthorAuthorAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"authorConnection\\\\\\" instead\\") authorConnection(after: String, first: Int, sort: [BookAuthorConnectionSort!], where: BookAuthorConnectionWhere): BookAuthorConnection! title: String! } @@ -351,11 +345,6 @@ describe("Unions", () => { title: StringAggregateSelection! } - type BookAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input BookAuthorAggregateInput { AND: [BookAuthorAggregateInput!] NOT: BookAuthorAggregateInput @@ -376,12 +365,6 @@ describe("Unions", () => { node: BookAuthorAuthorNodeAggregateSelection } - type BookAuthorAuthorAggregationSelection { - count: Int! - edge: BookAuthorAuthorEdgeAggregateSelection - node: BookAuthorAuthorNodeAggregateSelection - } - type BookAuthorAuthorEdgeAggregateSelection { words: IntAggregateSelection! } @@ -682,7 +665,6 @@ describe("Unions", () => { type Journal { author(limit: Int, offset: Int, sort: [AuthorSort!], where: AuthorWhere): [Author!]! - authorAggregate(where: AuthorWhere): JournalAuthorAuthorAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"authorConnection\\\\\\" instead\\") authorConnection(after: String, first: Int, sort: [JournalAuthorConnectionSort!], where: JournalAuthorConnectionWhere): JournalAuthorConnection! subject: String! } @@ -696,11 +678,6 @@ describe("Unions", () => { subject: StringAggregateSelection! } - type JournalAggregateSelection { - count: Int! - subject: StringAggregateSelection! - } - input JournalAuthorAggregateInput { AND: [JournalAuthorAggregateInput!] NOT: JournalAuthorAggregateInput @@ -721,12 +698,6 @@ describe("Unions", () => { node: JournalAuthorAuthorNodeAggregateSelection } - type JournalAuthorAuthorAggregationSelection { - count: Int! - edge: JournalAuthorAuthorEdgeAggregateSelection - node: JournalAuthorAuthorNodeAggregateSelection - } - type JournalAuthorAuthorEdgeAggregateSelection { words: IntAggregateSelection! } @@ -980,13 +951,10 @@ describe("Unions", () => { type Query { authors(limit: Int, offset: Int, sort: [AuthorSort!], where: AuthorWhere): [Author!]! - authorsAggregate(where: AuthorWhere): AuthorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"authorsConnection\\\\\\" instead\\") authorsConnection(after: String, first: Int, sort: [AuthorSort!], where: AuthorWhere): AuthorsConnection! books(limit: Int, offset: Int, sort: [BookSort!], where: BookWhere): [Book!]! - booksAggregate(where: BookWhere): BookAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"booksConnection\\\\\\" instead\\") booksConnection(after: String, first: Int, sort: [BookSort!], where: BookWhere): BooksConnection! journals(limit: Int, offset: Int, sort: [JournalSort!], where: JournalWhere): [Journal!]! - journalsAggregate(where: JournalWhere): JournalAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"journalsConnection\\\\\\" instead\\") journalsConnection(after: String, first: Int, sort: [JournalSort!], where: JournalWhere): JournalsConnection! publications(limit: Int, offset: Int, where: PublicationWhere): [Publication!]! } diff --git a/packages/graphql/tests/schema/custom-mutations.test.ts b/packages/graphql/tests/schema/custom-mutations.test.ts index c10a10c975..aa36826276 100644 --- a/packages/graphql/tests/schema/custom-mutations.test.ts +++ b/packages/graphql/tests/schema/custom-mutations.test.ts @@ -109,10 +109,6 @@ describe("Custom-mutations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -171,7 +167,6 @@ describe("Custom-mutations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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/deprecated/filterable-deprecated.test.ts b/packages/graphql/tests/schema/deprecated/filterable-deprecated.test.ts index ae9cd193ec..6ea28b1fa9 100644 --- a/packages/graphql/tests/schema/deprecated/filterable-deprecated.test.ts +++ b/packages/graphql/tests/schema/deprecated/filterable-deprecated.test.ts @@ -901,7 +901,6 @@ describe("@filterable directive - deprecated", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -917,12 +916,6 @@ describe("@filterable directive - deprecated", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -972,11 +965,6 @@ describe("@filterable directive - deprecated", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -1255,7 +1243,6 @@ describe("@filterable directive - deprecated", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -1265,11 +1252,6 @@ describe("@filterable directive - deprecated", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { password: StringAggregateSelection! username: StringAggregateSelection! @@ -1424,11 +1406,6 @@ describe("@filterable directive - deprecated", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -1579,10 +1556,8 @@ describe("@filterable directive - deprecated", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1681,7 +1656,6 @@ describe("@filterable directive - deprecated", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -1697,12 +1671,6 @@ describe("@filterable directive - deprecated", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -1752,11 +1720,6 @@ describe("@filterable directive - deprecated", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -2059,7 +2022,6 @@ describe("@filterable directive - deprecated", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -2069,11 +2031,6 @@ describe("@filterable directive - deprecated", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { password: StringAggregateSelection! username: StringAggregateSelection! @@ -2228,11 +2185,6 @@ describe("@filterable directive - deprecated", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -2383,10 +2335,8 @@ describe("@filterable directive - deprecated", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -2485,7 +2435,6 @@ describe("@filterable directive - deprecated", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -2501,12 +2450,6 @@ describe("@filterable directive - deprecated", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -2556,11 +2499,6 @@ describe("@filterable directive - deprecated", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -2863,7 +2801,6 @@ describe("@filterable directive - deprecated", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -2873,11 +2810,6 @@ describe("@filterable directive - deprecated", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { password: StringAggregateSelection! username: StringAggregateSelection! @@ -3032,11 +2964,6 @@ describe("@filterable directive - deprecated", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -3169,10 +3096,8 @@ describe("@filterable directive - deprecated", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -3274,7 +3199,6 @@ describe("@filterable directive - deprecated", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -3290,12 +3214,6 @@ describe("@filterable directive - deprecated", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -3345,11 +3263,6 @@ describe("@filterable directive - deprecated", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -3652,7 +3565,6 @@ describe("@filterable directive - deprecated", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -3662,11 +3574,6 @@ describe("@filterable directive - deprecated", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { password: StringAggregateSelection! username: StringAggregateSelection! @@ -3760,11 +3667,6 @@ describe("@filterable directive - deprecated", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -3914,10 +3816,8 @@ describe("@filterable directive - deprecated", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -4018,7 +3918,6 @@ describe("@filterable directive - deprecated", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -4034,12 +3933,6 @@ describe("@filterable directive - deprecated", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -4089,11 +3982,6 @@ describe("@filterable directive - deprecated", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -4396,7 +4284,6 @@ describe("@filterable directive - deprecated", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -4406,11 +4293,6 @@ describe("@filterable directive - deprecated", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { password: StringAggregateSelection! username: StringAggregateSelection! @@ -4565,11 +4447,6 @@ describe("@filterable directive - deprecated", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -4720,10 +4597,8 @@ describe("@filterable directive - deprecated", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -4824,7 +4699,6 @@ describe("@filterable directive - deprecated", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -4840,12 +4714,6 @@ describe("@filterable directive - deprecated", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -4895,11 +4763,6 @@ describe("@filterable directive - deprecated", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -5191,7 +5054,6 @@ describe("@filterable directive - deprecated", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -5201,11 +5063,6 @@ describe("@filterable directive - deprecated", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { password: StringAggregateSelection! username: StringAggregateSelection! @@ -5344,11 +5201,6 @@ describe("@filterable directive - deprecated", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -5474,10 +5326,8 @@ describe("@filterable directive - deprecated", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -5578,7 +5428,6 @@ describe("@filterable directive - deprecated", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -5594,12 +5443,6 @@ describe("@filterable directive - deprecated", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -5649,11 +5492,6 @@ describe("@filterable directive - deprecated", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -5956,7 +5794,6 @@ describe("@filterable directive - deprecated", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -5966,11 +5803,6 @@ describe("@filterable directive - deprecated", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { password: StringAggregateSelection! username: StringAggregateSelection! @@ -6064,11 +5896,6 @@ describe("@filterable directive - deprecated", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -6218,10 +6045,8 @@ describe("@filterable directive - deprecated", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -6327,7 +6152,6 @@ describe("@filterable directive - deprecated", () => { type Actor implements Person { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -6343,12 +6167,6 @@ describe("@filterable directive - deprecated", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorCreateInput { movies: ActorMoviesFieldInput password: String! @@ -6386,11 +6204,6 @@ describe("@filterable directive - deprecated", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -6682,7 +6495,6 @@ describe("@filterable directive - deprecated", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -6772,11 +6584,6 @@ describe("@filterable directive - deprecated", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -6824,11 +6631,6 @@ describe("@filterable directive - deprecated", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { username: StringAggregateSelection! } @@ -6958,11 +6760,6 @@ describe("@filterable directive - deprecated", () => { username: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - username: StringAggregateSelection! - } - input PersonConnectWhere { node: PersonWhere! } @@ -7018,13 +6815,10 @@ describe("@filterable directive - deprecated", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -7130,7 +6924,6 @@ describe("@filterable directive - deprecated", () => { type Actor implements Person { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -7146,12 +6939,6 @@ describe("@filterable directive - deprecated", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorCreateInput { movies: ActorMoviesFieldInput password: String! @@ -7189,11 +6976,6 @@ describe("@filterable directive - deprecated", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -7485,7 +7267,6 @@ describe("@filterable directive - deprecated", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -7620,11 +7401,6 @@ describe("@filterable directive - deprecated", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -7672,11 +7448,6 @@ describe("@filterable directive - deprecated", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { username: StringAggregateSelection! } @@ -7807,11 +7578,6 @@ describe("@filterable directive - deprecated", () => { username: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - username: StringAggregateSelection! - } - input PersonConnectWhere { node: PersonWhere! } @@ -7867,13 +7633,10 @@ describe("@filterable directive - deprecated", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -7979,7 +7742,6 @@ describe("@filterable directive - deprecated", () => { type Actor implements Person { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -7995,12 +7757,6 @@ describe("@filterable directive - deprecated", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorCreateInput { movies: ActorMoviesFieldInput password: String! @@ -8038,11 +7794,6 @@ describe("@filterable directive - deprecated", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -8334,7 +8085,6 @@ describe("@filterable directive - deprecated", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -8424,11 +8174,6 @@ describe("@filterable directive - deprecated", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -8476,11 +8221,6 @@ describe("@filterable directive - deprecated", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { username: StringAggregateSelection! } @@ -8610,11 +8350,6 @@ describe("@filterable directive - deprecated", () => { username: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - username: StringAggregateSelection! - } - input PersonConnectWhere { node: PersonWhere! } @@ -8670,13 +8405,10 @@ describe("@filterable directive - deprecated", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -8786,7 +8518,6 @@ describe("@filterable directive - deprecated", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -8802,12 +8533,6 @@ describe("@filterable directive - deprecated", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -8857,11 +8582,6 @@ describe("@filterable directive - deprecated", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -9085,7 +8805,6 @@ describe("@filterable directive - deprecated", () => { type Appearance { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): AppearanceMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! password: String! username: String! @@ -9101,12 +8820,6 @@ describe("@filterable directive - deprecated", () => { username: StringAggregateSelection! } - type AppearanceAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input AppearanceConnectInput { movies: [AppearanceMoviesConnectFieldInput!] } @@ -9156,11 +8869,6 @@ describe("@filterable directive - deprecated", () => { node: AppearanceMovieMoviesNodeAggregateSelection } - type AppearanceMovieMoviesAggregationSelection { - count: Int! - node: AppearanceMovieMoviesNodeAggregateSelection - } - type AppearanceMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -9620,11 +9328,6 @@ describe("@filterable directive - deprecated", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: MovieActorsConnectInput } @@ -9795,13 +9498,10 @@ describe("@filterable directive - deprecated", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! appearances(limit: Int, offset: Int, sort: [AppearanceSort!], where: AppearanceWhere): [Appearance!]! - appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"appearancesConnection\\\\\\" instead\\") appearancesConnection(after: String, first: Int, sort: [AppearanceSort!], where: AppearanceWhere): AppearancesConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, where: PersonWhere): [Person!]! } @@ -9920,7 +9620,6 @@ describe("@filterable directive - deprecated", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -9936,12 +9635,6 @@ describe("@filterable directive - deprecated", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -9991,11 +9684,6 @@ describe("@filterable directive - deprecated", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -10219,7 +9907,6 @@ describe("@filterable directive - deprecated", () => { type Appearance { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): AppearanceMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! password: String! username: String! @@ -10235,12 +9922,6 @@ describe("@filterable directive - deprecated", () => { username: StringAggregateSelection! } - type AppearanceAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input AppearanceConnectInput { movies: [AppearanceMoviesConnectFieldInput!] } @@ -10290,11 +9971,6 @@ describe("@filterable directive - deprecated", () => { node: AppearanceMovieMoviesNodeAggregateSelection } - type AppearanceMovieMoviesAggregationSelection { - count: Int! - node: AppearanceMovieMoviesNodeAggregateSelection - } - type AppearanceMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -10754,11 +10430,6 @@ describe("@filterable directive - deprecated", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: MovieActorsConnectInput } @@ -10929,13 +10600,10 @@ describe("@filterable directive - deprecated", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! appearances(limit: Int, offset: Int, sort: [AppearanceSort!], where: AppearanceWhere): [Appearance!]! - appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"appearancesConnection\\\\\\" instead\\") appearancesConnection(after: String, first: Int, sort: [AppearanceSort!], where: AppearanceWhere): AppearancesConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, where: PersonWhere): [Person!]! } @@ -11054,7 +10722,6 @@ describe("@filterable directive - deprecated", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -11070,12 +10737,6 @@ describe("@filterable directive - deprecated", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -11125,11 +10786,6 @@ describe("@filterable directive - deprecated", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -11353,7 +11009,6 @@ describe("@filterable directive - deprecated", () => { type Appearance { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): AppearanceMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! password: String! username: String! @@ -11369,12 +11024,6 @@ describe("@filterable directive - deprecated", () => { username: StringAggregateSelection! } - type AppearanceAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input AppearanceConnectInput { movies: [AppearanceMoviesConnectFieldInput!] } @@ -11424,11 +11073,6 @@ describe("@filterable directive - deprecated", () => { node: AppearanceMovieMoviesNodeAggregateSelection } - type AppearanceMovieMoviesAggregationSelection { - count: Int! - node: AppearanceMovieMoviesNodeAggregateSelection - } - type AppearanceMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -11888,11 +11532,6 @@ describe("@filterable directive - deprecated", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: MovieActorsConnectInput } @@ -12063,13 +11702,10 @@ describe("@filterable directive - deprecated", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! appearances(limit: Int, offset: Int, sort: [AppearanceSort!], where: AppearanceWhere): [Appearance!]! - appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"appearancesConnection\\\\\\" instead\\") appearancesConnection(after: String, first: Int, sort: [AppearanceSort!], where: AppearanceWhere): AppearancesConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, where: PersonWhere): [Person!]! } diff --git a/packages/graphql/tests/schema/directive-preserve.test.ts b/packages/graphql/tests/schema/directive-preserve.test.ts index 9ff84cf397..fedc868bda 100644 --- a/packages/graphql/tests/schema/directive-preserve.test.ts +++ b/packages/graphql/tests/schema/directive-preserve.test.ts @@ -93,10 +93,6 @@ describe("Directive-preserve", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -153,7 +149,6 @@ describe("Directive-preserve", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -281,7 +276,6 @@ describe("Directive-preserve", () => { type Genre { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): GenreMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! name: String } @@ -295,11 +289,6 @@ describe("Directive-preserve", () => { name: StringAggregateSelection! } - type GenreAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input GenreConnectInput { movies: [GenreMoviesConnectFieldInput!] } @@ -331,11 +320,6 @@ describe("Directive-preserve", () => { node: GenreMovieMoviesNodeAggregateSelection } - type GenreMovieMoviesAggregationSelection { - count: Int! - node: GenreMovieMoviesNodeAggregateSelection - } - type GenreMovieMoviesNodeAggregateSelection { imdbRating: FloatAggregateSelection! title: StringAggregateSelection! @@ -612,7 +596,6 @@ describe("Directive-preserve", () => { type Movie { genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! @deprecated(reason: \\"Do not use\\") - genresAggregate(where: GenreWhere): MovieGenreGenresAggregationSelection @deprecated(reason: \\"Do not use\\") genresConnection(after: String, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! @deprecated(reason: \\"Do not use\\") imdbRating: Float title: String @@ -630,13 +613,6 @@ describe("Directive-preserve", () => { year: IntAggregateSelection! } - type MovieAggregateSelection { - count: Int! - imdbRating: FloatAggregateSelection! - title: StringAggregateSelection! - year: IntAggregateSelection! - } - input MovieConnectInput { genres: [MovieGenresConnectFieldInput!] @deprecated(reason: \\"Do not use\\") } @@ -670,11 +646,6 @@ describe("Directive-preserve", () => { node: MovieGenreGenresNodeAggregateSelection } - type MovieGenreGenresAggregationSelection { - count: Int! - node: MovieGenreGenresNodeAggregateSelection - } - type MovieGenreGenresNodeAggregateSelection { name: StringAggregateSelection! } @@ -918,10 +889,8 @@ describe("Directive-preserve", () => { type Query { genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\" instead\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1088,7 +1057,6 @@ describe("Directive-preserve", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -1236,11 +1204,6 @@ describe("Directive-preserve", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { actedIn: [ActorActedInConnectFieldInput!] } @@ -1273,12 +1236,6 @@ describe("Directive-preserve", () => { node: ActorProductionActedInNodeAggregateSelection } - type ActorProductionActedInAggregationSelection { - count: Int! - edge: ActorProductionActedInEdgeAggregateSelection - node: ActorProductionActedInNodeAggregateSelection - } - type ActorProductionActedInEdgeAggregateSelection { role: StringAggregateSelection! } @@ -1438,26 +1395,11 @@ describe("Directive-preserve", () => { type Movie implements Production { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") actorsConnection(after: String, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! @deprecated(reason: \\"Do not use\\") runtime: Int! title: String! } - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsEdgeAggregateSelection { - role: StringAggregateSelection! - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelection! - } - input MovieActorsAggregateInput { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput @@ -1566,12 +1508,6 @@ describe("Directive-preserve", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - runtime: IntAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { actors: MovieActorsFieldInput @deprecated(reason: \\"Do not use\\") runtime: Int! @@ -1868,11 +1804,6 @@ describe("Directive-preserve", () => { title: StringAggregateSelection! } - type ProductionAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input ProductionConnectInput { actors: [ProductionActorsConnectFieldInput!] } @@ -1977,41 +1908,22 @@ describe("Directive-preserve", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\" instead\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } type Series implements Production { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): SeriesActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! episodes: Int! title: String! } - type SeriesActorActorsAggregationSelection { - count: Int! - edge: SeriesActorActorsEdgeAggregateSelection - node: SeriesActorActorsNodeAggregateSelection - } - - type SeriesActorActorsEdgeAggregateSelection { - role: StringAggregateSelection! - } - - type SeriesActorActorsNodeAggregateSelection { - name: StringAggregateSelection! - } - input SeriesActorsAggregateInput { AND: [SeriesActorsAggregateInput!] NOT: SeriesActorsAggregateInput @@ -2120,12 +2032,6 @@ describe("Directive-preserve", () => { title: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - episodes: IntAggregateSelection! - title: StringAggregateSelection! - } - type SeriesConnection { aggregate: SeriesAggregate! edges: [SeriesEdge!]! @@ -2381,7 +2287,6 @@ describe("Directive-preserve", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -2526,11 +2431,6 @@ describe("Directive-preserve", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { actedIn: [ActorActedInConnectFieldInput!] } @@ -2563,12 +2463,6 @@ describe("Directive-preserve", () => { node: ActorProductionActedInNodeAggregateSelection } - type ActorProductionActedInAggregationSelection { - count: Int! - edge: ActorProductionActedInEdgeAggregateSelection - node: ActorProductionActedInNodeAggregateSelection - } - type ActorProductionActedInEdgeAggregateSelection { role: StringAggregateSelection! } @@ -2728,7 +2622,6 @@ describe("Directive-preserve", () => { type Movie implements Production { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! @deprecated(reason: \\"Do not use\\") - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Do not use\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! @deprecated(reason: \\"Do not use\\") runtime: Int! title: String! @@ -2740,12 +2633,6 @@ describe("Directive-preserve", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsEdgeAggregateSelection { role: StringAggregateSelection! } @@ -2896,12 +2783,6 @@ describe("Directive-preserve", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - runtime: IntAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { actors: MovieActorsFieldInput @deprecated(reason: \\"Do not use\\") runtime: Int! @@ -3022,11 +2903,6 @@ describe("Directive-preserve", () => { title: StringAggregateSelection! } - type ProductionAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input ProductionConnectWhere { node: ProductionWhere! } @@ -3091,22 +2967,17 @@ describe("Directive-preserve", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\" instead\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } type Series implements Production { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): SeriesActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [SeriesActorsConnectionSort!], where: SeriesActorsConnectionWhere): SeriesActorsConnection! episodes: Int! title: String! @@ -3118,12 +2989,6 @@ describe("Directive-preserve", () => { node: SeriesActorActorsNodeAggregateSelection } - type SeriesActorActorsAggregationSelection { - count: Int! - edge: SeriesActorActorsEdgeAggregateSelection - node: SeriesActorActorsNodeAggregateSelection - } - type SeriesActorActorsEdgeAggregateSelection { role: StringAggregateSelection! } @@ -3276,12 +3141,6 @@ describe("Directive-preserve", () => { title: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - episodes: IntAggregateSelection! - title: StringAggregateSelection! - } - type SeriesConnection { aggregate: SeriesAggregate! edges: [SeriesEdge!]! @@ -3525,7 +3384,6 @@ describe("Directive-preserve", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -3670,11 +3528,6 @@ describe("Directive-preserve", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { actedIn: [ActorActedInConnectFieldInput!] } @@ -3707,12 +3560,6 @@ describe("Directive-preserve", () => { node: ActorProductionActedInNodeAggregateSelection } - type ActorProductionActedInAggregationSelection { - count: Int! - edge: ActorProductionActedInEdgeAggregateSelection - node: ActorProductionActedInNodeAggregateSelection - } - type ActorProductionActedInEdgeAggregateSelection { role: StringAggregateSelection! } @@ -3872,7 +3719,6 @@ describe("Directive-preserve", () => { type Movie implements Production { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! runtime: Int! title: String! @@ -3884,12 +3730,6 @@ describe("Directive-preserve", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsEdgeAggregateSelection { role: StringAggregateSelection! } @@ -4040,12 +3880,6 @@ describe("Directive-preserve", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - runtime: IntAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { actors: MovieActorsFieldInput runtime: Int! @@ -4166,11 +4000,6 @@ describe("Directive-preserve", () => { title: StringAggregateSelection! } - type ProductionAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input ProductionConnectWhere { node: ProductionWhere! } @@ -4235,22 +4064,17 @@ describe("Directive-preserve", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\" instead\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } type Series implements Production { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): SeriesActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [SeriesActorsConnectionSort!], where: SeriesActorsConnectionWhere): SeriesActorsConnection! episodes: Int! title: String! @@ -4262,12 +4086,6 @@ describe("Directive-preserve", () => { node: SeriesActorActorsNodeAggregateSelection } - type SeriesActorActorsAggregationSelection { - count: Int! - edge: SeriesActorActorsEdgeAggregateSelection - node: SeriesActorActorsNodeAggregateSelection - } - type SeriesActorActorsEdgeAggregateSelection { role: StringAggregateSelection! } @@ -4420,12 +4238,6 @@ describe("Directive-preserve", () => { title: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - episodes: IntAggregateSelection! - title: StringAggregateSelection! - } - type SeriesConnection { aggregate: SeriesAggregate! edges: [SeriesEdge!]! @@ -4605,7 +4417,6 @@ describe("Directive-preserve", () => { type Blog { posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): BlogPostPostsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\" instead\\") postsConnection(after: String, first: Int, sort: [BlogPostsConnectionSort!], where: BlogPostsConnectionWhere): BlogPostsConnection! title: String } @@ -4619,11 +4430,6 @@ describe("Directive-preserve", () => { title: StringAggregateSelection! } - type BlogAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input BlogConnectInput { posts: [BlogPostsConnectFieldInput!] } @@ -4655,11 +4461,6 @@ describe("Directive-preserve", () => { node: BlogPostPostsNodeAggregateSelection } - type BlogPostPostsAggregationSelection { - count: Int! - node: BlogPostPostsNodeAggregateSelection - } - type BlogPostPostsNodeAggregateSelection { content: StringAggregateSelection! } @@ -4960,11 +4761,6 @@ describe("Directive-preserve", () => { content: StringAggregateSelection! } - type PostAggregateSelection { - content: StringAggregateSelection! - count: Int! - } - input PostConnectWhere { node: PostWhere! } @@ -5022,14 +4818,11 @@ describe("Directive-preserve", () => { type Query { blogs(limit: Int, offset: Int, sort: [BlogSort!], where: BlogWhere): [Blog!]! - blogsAggregate(where: BlogWhere): BlogAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"blogsConnection\\\\\\" instead\\") blogsConnection(after: String, first: Int, sort: [BlogSort!], where: BlogWhere): BlogsConnection! contents(limit: Int, offset: Int, where: ContentWhere): [Content!]! posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\" instead\\") postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\" instead\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } @@ -5107,11 +4900,6 @@ describe("Directive-preserve", () => { name: StringAggregateSelection! } - type UserAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input UserContentBlogConnectFieldInput { connect: [BlogConnectInput!] where: BlogConnectWhere diff --git a/packages/graphql/tests/schema/directives/alias.test.ts b/packages/graphql/tests/schema/directives/alias.test.ts index 0105b73307..54afe39cd5 100644 --- a/packages/graphql/tests/schema/directives/alias.test.ts +++ b/packages/graphql/tests/schema/directives/alias.test.ts @@ -52,7 +52,6 @@ describe("Alias", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! city: String name: String! @@ -310,12 +309,6 @@ describe("Alias", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - city: StringAggregateSelection! - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { actedIn: ActorActedInFieldInput city: String @@ -337,12 +330,6 @@ describe("Alias", () => { node: ActorMovieActedInNodeAggregateSelection } - type ActorMovieActedInAggregationSelection { - count: Int! - edge: ActorMovieActedInEdgeAggregateSelection - node: ActorMovieActedInNodeAggregateSelection - } - type ActorMovieActedInEdgeAggregateSelection { character: StringAggregateSelection! screenTime: IntAggregateSelection! @@ -542,12 +529,6 @@ describe("Alias", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - rating: FloatAggregateSelection! - title: StringAggregateSelection! - } - input MovieConnectWhere { node: MovieWhere! } @@ -637,10 +618,8 @@ describe("Alias", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 c291be4dfd..e671454c75 100644 --- a/packages/graphql/tests/schema/directives/autogenerate.test.ts +++ b/packages/graphql/tests/schema/directives/autogenerate.test.ts @@ -87,11 +87,6 @@ describe("Autogenerate", () => { name: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input MovieCreateInput { name: String! } @@ -155,7 +150,6 @@ describe("Autogenerate", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 48d0fca6f6..018caf6cc0 100644 --- a/packages/graphql/tests/schema/directives/customResolver.test.ts +++ b/packages/graphql/tests/schema/directives/customResolver.test.ts @@ -109,10 +109,8 @@ describe("@customResolver directive", () => { type Query { userInterfaces(limit: Int, offset: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): [UserInterface!]! - userInterfacesAggregate(where: UserInterfaceWhere): UserInterfaceAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"userInterfacesConnection\\\\\\" instead\\") userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): UserInterfacesConnection! users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\" instead\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } @@ -176,12 +174,6 @@ describe("@customResolver directive", () => { username: StringAggregateSelection! } - type UserAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input UserCreateInput { id: ID! password: String! @@ -206,11 +198,6 @@ describe("@customResolver directive", () => { customResolver: StringAggregateSelection! } - type UserInterfaceAggregateSelection { - count: Int! - customResolver: StringAggregateSelection! - } - type UserInterfaceEdge { cursor: String! node: UserInterface! diff --git a/packages/graphql/tests/schema/directives/cypher.test.ts b/packages/graphql/tests/schema/directives/cypher.test.ts index c26c47da0e..d05300f7ff 100644 --- a/packages/graphql/tests/schema/directives/cypher.test.ts +++ b/packages/graphql/tests/schema/directives/cypher.test.ts @@ -154,11 +154,6 @@ describe("Cypher", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { name: String } @@ -505,10 +500,6 @@ describe("Cypher", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -770,10 +761,8 @@ describe("Cypher", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -900,10 +889,6 @@ describe("Cypher", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { \\"\\"\\" Appears because this input type would be empty otherwise because this type is composed of just generated and/or relationship properties. See https://neo4j.com/docs/graphql-manual/current/troubleshooting/faqs/ @@ -955,7 +940,6 @@ describe("Cypher", () => { type Query { movies(limit: Int, offset: Int, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, where: MovieWhere): MoviesConnection! } @@ -1031,10 +1015,6 @@ describe("Cypher", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { \\"\\"\\" Appears because this input type would be empty otherwise because this type is composed of just generated and/or relationship properties. See https://neo4j.com/docs/graphql-manual/current/troubleshooting/faqs/ @@ -1090,7 +1070,6 @@ describe("Cypher", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1173,11 +1152,6 @@ describe("Cypher", () => { title: StringAggregateSelection! } - type BlogAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input BlogCreateInput { title: String } @@ -1291,11 +1265,6 @@ describe("Cypher", () => { content: StringAggregateSelection! } - type PostAggregateSelection { - content: StringAggregateSelection! - count: Int! - } - input PostCreateInput { content: String } @@ -1349,11 +1318,9 @@ describe("Cypher", () => { type Query { blogs(limit: Int, offset: Int, sort: [BlogSort!], where: BlogWhere): [Blog!]! - blogsAggregate(where: BlogWhere): BlogAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"blogsConnection\\\\\\" instead\\") blogsConnection(after: String, first: Int, sort: [BlogSort!], where: BlogWhere): BlogsConnection! contents(limit: Int, offset: Int, where: ContentWhere): [Content!]! posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\" instead\\") postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! } @@ -1478,11 +1445,6 @@ describe("Cypher", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { name: String } @@ -1579,10 +1541,6 @@ describe("Cypher", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { \\"\\"\\" Appears because this input type would be empty otherwise because this type is composed of just generated and/or relationship properties. See https://neo4j.com/docs/graphql-manual/current/troubleshooting/faqs/ @@ -1658,10 +1616,6 @@ describe("Cypher", () => { count: Count! } - type ProductionAggregateSelection { - count: Int! - } - type ProductionEdge { cursor: String! node: Production! @@ -1687,13 +1641,10 @@ describe("Cypher", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\" instead\\") productionsConnection(after: String, first: Int, where: ProductionWhere): ProductionsConnection! } @@ -1813,11 +1764,6 @@ describe("Cypher", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { name: String } @@ -1914,10 +1860,6 @@ describe("Cypher", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { \\"\\"\\" Appears because this input type would be empty otherwise because this type is composed of just generated and/or relationship properties. See https://neo4j.com/docs/graphql-manual/current/troubleshooting/faqs/ @@ -1986,10 +1928,8 @@ describe("Cypher", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, where: MovieWhere): MoviesConnection! } @@ -2092,11 +2032,6 @@ describe("Cypher", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { name: String } @@ -2208,10 +2143,6 @@ describe("Cypher", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -2271,10 +2202,8 @@ describe("Cypher", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -2391,11 +2320,6 @@ describe("Cypher", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieCreateInput { title: String } @@ -2495,7 +2419,6 @@ describe("Cypher", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 9d25ef5a58..a79f9d7eba 100644 --- a/packages/graphql/tests/schema/directives/default.test.ts +++ b/packages/graphql/tests/schema/directives/default.test.ts @@ -212,10 +212,8 @@ describe("@default directive", () => { type Query { userInterfaces(limit: Int, offset: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): [UserInterface!]! - userInterfacesAggregate(where: UserInterfaceWhere): UserInterfaceAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"userInterfacesConnection\\\\\\" instead\\") userInterfacesConnection(after: String, first: Int, sort: [UserInterfaceSort!], where: UserInterfaceWhere): UserInterfacesConnection! users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\" instead\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } @@ -287,16 +285,6 @@ describe("@default directive", () => { verifiedDate: DateTimeAggregateSelection! } - type UserAggregateSelection { - count: Int! - fromInterface: StringAggregateSelection! - name: StringAggregateSelection! - numberOfFriends: IntAggregateSelection! - rating: FloatAggregateSelection! - toBeOverridden: StringAggregateSelection! - verifiedDate: DateTimeAggregateSelection! - } - input UserCreateInput { fromInterface: String! = \\"Interface default value\\" id: ID! = \\"00000000-00000000-00000000-00000000\\" @@ -329,12 +317,6 @@ describe("@default directive", () => { toBeOverridden: StringAggregateSelection! } - type UserInterfaceAggregateSelection { - count: Int! - fromInterface: StringAggregateSelection! - toBeOverridden: StringAggregateSelection! - } - type UserInterfaceEdge { cursor: String! node: UserInterface! diff --git a/packages/graphql/tests/schema/directives/filterable.test.ts b/packages/graphql/tests/schema/directives/filterable.test.ts index fa5fed2085..ee9ccf2b67 100644 --- a/packages/graphql/tests/schema/directives/filterable.test.ts +++ b/packages/graphql/tests/schema/directives/filterable.test.ts @@ -765,7 +765,6 @@ describe("@filterable directive", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -781,12 +780,6 @@ describe("@filterable directive", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -836,11 +829,6 @@ describe("@filterable directive", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -1106,7 +1094,6 @@ describe("@filterable directive", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -1116,11 +1103,6 @@ describe("@filterable directive", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { password: StringAggregateSelection! username: StringAggregateSelection! @@ -1262,11 +1244,6 @@ describe("@filterable directive", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -1416,10 +1393,8 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1521,7 +1496,6 @@ describe("@filterable directive", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -1537,12 +1511,6 @@ describe("@filterable directive", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -1592,11 +1560,6 @@ describe("@filterable directive", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -1885,7 +1848,6 @@ describe("@filterable directive", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -1895,11 +1857,6 @@ describe("@filterable directive", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { password: StringAggregateSelection! username: StringAggregateSelection! @@ -2041,11 +1998,6 @@ describe("@filterable directive", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -2195,10 +2147,8 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -2300,7 +2250,6 @@ describe("@filterable directive", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -2316,12 +2265,6 @@ describe("@filterable directive", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -2371,11 +2314,6 @@ describe("@filterable directive", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -2664,7 +2602,6 @@ describe("@filterable directive", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -2674,11 +2611,6 @@ describe("@filterable directive", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { password: StringAggregateSelection! username: StringAggregateSelection! @@ -2820,11 +2752,6 @@ describe("@filterable directive", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -2956,10 +2883,8 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -3064,7 +2989,6 @@ describe("@filterable directive", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -3080,12 +3004,6 @@ describe("@filterable directive", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -3135,11 +3053,6 @@ describe("@filterable directive", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -3428,7 +3341,6 @@ describe("@filterable directive", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -3438,11 +3350,6 @@ describe("@filterable directive", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { password: StringAggregateSelection! username: StringAggregateSelection! @@ -3536,11 +3443,6 @@ describe("@filterable directive", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -3690,10 +3592,8 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -3797,7 +3697,6 @@ describe("@filterable directive", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -3813,12 +3712,6 @@ describe("@filterable directive", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -3868,11 +3761,6 @@ describe("@filterable directive", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -4161,7 +4049,6 @@ describe("@filterable directive", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -4171,11 +4058,6 @@ describe("@filterable directive", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { password: StringAggregateSelection! username: StringAggregateSelection! @@ -4317,11 +4199,6 @@ describe("@filterable directive", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -4471,10 +4348,8 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -4578,7 +4453,6 @@ describe("@filterable directive", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -4594,12 +4468,6 @@ describe("@filterable directive", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -4649,11 +4517,6 @@ describe("@filterable directive", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -4931,7 +4794,6 @@ describe("@filterable directive", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -4941,11 +4803,6 @@ describe("@filterable directive", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { password: StringAggregateSelection! username: StringAggregateSelection! @@ -5071,11 +4928,6 @@ describe("@filterable directive", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -5200,10 +5052,8 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -5307,7 +5157,6 @@ describe("@filterable directive", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -5323,12 +5172,6 @@ describe("@filterable directive", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -5378,11 +5221,6 @@ describe("@filterable directive", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -5671,7 +5509,6 @@ describe("@filterable directive", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -5681,11 +5518,6 @@ describe("@filterable directive", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { password: StringAggregateSelection! username: StringAggregateSelection! @@ -5779,11 +5611,6 @@ describe("@filterable directive", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -5933,10 +5760,8 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -6045,7 +5870,6 @@ describe("@filterable directive", () => { type Actor implements Person { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -6061,12 +5885,6 @@ describe("@filterable directive", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorCreateInput { movies: ActorMoviesFieldInput password: String! @@ -6104,11 +5922,6 @@ describe("@filterable directive", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -6386,7 +6199,6 @@ describe("@filterable directive", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -6476,11 +6288,6 @@ describe("@filterable directive", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -6528,11 +6335,6 @@ describe("@filterable directive", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { username: StringAggregateSelection! } @@ -6662,11 +6464,6 @@ describe("@filterable directive", () => { username: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - username: StringAggregateSelection! - } - input PersonConnectWhere { node: PersonWhere! } @@ -6722,13 +6519,10 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -6837,7 +6631,6 @@ describe("@filterable directive", () => { type Actor implements Person { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -6853,12 +6646,6 @@ describe("@filterable directive", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorCreateInput { movies: ActorMoviesFieldInput password: String! @@ -6896,11 +6683,6 @@ describe("@filterable directive", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -7178,7 +6960,6 @@ describe("@filterable directive", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -7300,11 +7081,6 @@ describe("@filterable directive", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -7352,11 +7128,6 @@ describe("@filterable directive", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { username: StringAggregateSelection! } @@ -7486,11 +7257,6 @@ describe("@filterable directive", () => { username: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - username: StringAggregateSelection! - } - input PersonConnectWhere { node: PersonWhere! } @@ -7546,13 +7312,10 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -7661,7 +7424,6 @@ describe("@filterable directive", () => { type Actor implements Person { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -7677,12 +7439,6 @@ describe("@filterable directive", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorCreateInput { movies: ActorMoviesFieldInput password: String! @@ -7720,11 +7476,6 @@ describe("@filterable directive", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -8002,7 +7753,6 @@ describe("@filterable directive", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -8092,11 +7842,6 @@ describe("@filterable directive", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -8144,11 +7889,6 @@ describe("@filterable directive", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { username: StringAggregateSelection! } @@ -8278,11 +8018,6 @@ describe("@filterable directive", () => { username: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - username: StringAggregateSelection! - } - input PersonConnectWhere { node: PersonWhere! } @@ -8338,13 +8073,10 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -8457,7 +8189,6 @@ describe("@filterable directive", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -8473,12 +8204,6 @@ describe("@filterable directive", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -8528,11 +8253,6 @@ describe("@filterable directive", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -8742,7 +8462,6 @@ describe("@filterable directive", () => { type Appearance { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): AppearanceMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! password: String! username: String! @@ -8758,12 +8477,6 @@ describe("@filterable directive", () => { username: StringAggregateSelection! } - type AppearanceAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input AppearanceConnectInput { movies: [AppearanceMoviesConnectFieldInput!] } @@ -8813,11 +8526,6 @@ describe("@filterable directive", () => { node: AppearanceMovieMoviesNodeAggregateSelection } - type AppearanceMovieMoviesAggregationSelection { - count: Int! - node: AppearanceMovieMoviesNodeAggregateSelection - } - type AppearanceMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -9263,11 +8971,6 @@ describe("@filterable directive", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: MovieActorsConnectInput } @@ -9438,13 +9141,10 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! appearances(limit: Int, offset: Int, sort: [AppearanceSort!], where: AppearanceWhere): [Appearance!]! - appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"appearancesConnection\\\\\\" instead\\") appearancesConnection(after: String, first: Int, sort: [AppearanceSort!], where: AppearanceWhere): AppearancesConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, where: PersonWhere): [Person!]! } @@ -9566,7 +9266,6 @@ describe("@filterable directive", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -9582,12 +9281,6 @@ describe("@filterable directive", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -9637,11 +9330,6 @@ describe("@filterable directive", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -9851,7 +9539,6 @@ describe("@filterable directive", () => { type Appearance { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): AppearanceMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! password: String! username: String! @@ -9867,12 +9554,6 @@ describe("@filterable directive", () => { username: StringAggregateSelection! } - type AppearanceAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input AppearanceConnectInput { movies: [AppearanceMoviesConnectFieldInput!] } @@ -9922,11 +9603,6 @@ describe("@filterable directive", () => { node: AppearanceMovieMoviesNodeAggregateSelection } - type AppearanceMovieMoviesAggregationSelection { - count: Int! - node: AppearanceMovieMoviesNodeAggregateSelection - } - type AppearanceMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -10372,11 +10048,6 @@ describe("@filterable directive", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: MovieActorsConnectInput } @@ -10547,13 +10218,10 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! appearances(limit: Int, offset: Int, sort: [AppearanceSort!], where: AppearanceWhere): [Appearance!]! - appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"appearancesConnection\\\\\\" instead\\") appearancesConnection(after: String, first: Int, sort: [AppearanceSort!], where: AppearanceWhere): AppearancesConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, where: PersonWhere): [Person!]! } @@ -10675,7 +10343,6 @@ describe("@filterable directive", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! password: String! username: String! @@ -10691,12 +10358,6 @@ describe("@filterable directive", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -10746,11 +10407,6 @@ describe("@filterable directive", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -10960,7 +10616,6 @@ describe("@filterable directive", () => { type Appearance { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): AppearanceMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [AppearanceMoviesConnectionSort!], where: AppearanceMoviesConnectionWhere): AppearanceMoviesConnection! password: String! username: String! @@ -10976,12 +10631,6 @@ describe("@filterable directive", () => { username: StringAggregateSelection! } - type AppearanceAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input AppearanceConnectInput { movies: [AppearanceMoviesConnectFieldInput!] } @@ -11031,11 +10680,6 @@ describe("@filterable directive", () => { node: AppearanceMovieMoviesNodeAggregateSelection } - type AppearanceMovieMoviesAggregationSelection { - count: Int! - node: AppearanceMovieMoviesNodeAggregateSelection - } - type AppearanceMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -11481,11 +11125,6 @@ describe("@filterable directive", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: MovieActorsConnectInput } @@ -11656,13 +11295,10 @@ describe("@filterable directive", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! appearances(limit: Int, offset: Int, sort: [AppearanceSort!], where: AppearanceWhere): [Appearance!]! - appearancesAggregate(where: AppearanceWhere): AppearanceAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"appearancesConnection\\\\\\" instead\\") appearancesConnection(after: String, first: Int, sort: [AppearanceSort!], where: AppearanceWhere): AppearancesConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, where: PersonWhere): [Person!]! } diff --git a/packages/graphql/tests/schema/directives/node.test.ts b/packages/graphql/tests/schema/directives/node.test.ts index 4973643b4c..15f8590722 100644 --- a/packages/graphql/tests/schema/directives/node.test.ts +++ b/packages/graphql/tests/schema/directives/node.test.ts @@ -54,11 +54,6 @@ describe("@node", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { name: String } @@ -140,7 +135,6 @@ describe("@node", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! } @@ -228,11 +222,6 @@ describe("@node", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { name: String } @@ -333,11 +322,6 @@ describe("@node", () => { name: StringAggregateSelection! } - type ProductionAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - type ProductionEdge { cursor: String! node: Production! @@ -376,13 +360,10 @@ describe("@node", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\" instead\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -399,11 +380,6 @@ describe("@node", () => { name: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - type SeriesConnection { aggregate: SeriesAggregate! edges: [SeriesEdge!]! @@ -530,11 +506,6 @@ describe("@node", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { name: String } @@ -634,11 +605,9 @@ describe("@node", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! productions(limit: Int, offset: Int, where: ProductionWhere): [Production!]! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -655,11 +624,6 @@ describe("@node", () => { name: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - type SeriesConnection { aggregate: SeriesAggregate! edges: [SeriesEdge!]! diff --git a/packages/graphql/tests/schema/directives/plural.test.ts b/packages/graphql/tests/schema/directives/plural.test.ts index b7386b3e39..9159c6dbb3 100644 --- a/packages/graphql/tests/schema/directives/plural.test.ts +++ b/packages/graphql/tests/schema/directives/plural.test.ts @@ -83,7 +83,6 @@ describe("Plural option", () => { type Query { techs(limit: Int, offset: Int, sort: [TechSort!], where: TechWhere): [Tech!]! - techsAggregate(where: TechWhere): TechAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"techsConnection\\\\\\" instead\\") techsConnection(after: String, first: Int, sort: [TechSort!], where: TechWhere): TechsConnection! } @@ -129,12 +128,6 @@ describe("Plural option", () => { value: StringAggregateSelection! } - type TechAggregateSelection { - count: Int! - name: StringAggregateSelection! - value: StringAggregateSelection! - } - input TechCreateInput { name: String value: String @@ -262,7 +255,6 @@ describe("Plural option", () => { type Query { techs(limit: Int, offset: Int, sort: [TechSort!], where: TechWhere): [Tech!]! - techsAggregate(where: TechWhere): TechAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"techsConnection\\\\\\" instead\\") techsConnection(after: String, first: Int, sort: [TechSort!], where: TechWhere): TechsConnection! } @@ -308,12 +300,6 @@ describe("Plural option", () => { value: StringAggregateSelection! } - type TechAggregateSelection { - count: Int! - name: StringAggregateSelection! - value: StringAggregateSelection! - } - input TechCreateInput { name: String value: String @@ -441,7 +427,6 @@ describe("Plural option", () => { type Query { technologies(limit: Int, offset: Int, sort: [TechSort!], where: TechWhere): [Tech!]! - technologiesAggregate(where: TechWhere): TechAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"technologiesConnection\\\\\\" instead\\") technologiesConnection(after: String, first: Int, sort: [TechSort!], where: TechWhere): TechnologiesConnection! } @@ -487,12 +472,6 @@ describe("Plural option", () => { value: StringAggregateSelection! } - type TechAggregateSelection { - count: Int! - name: StringAggregateSelection! - value: StringAggregateSelection! - } - input TechCreateInput { name: String value: String diff --git a/packages/graphql/tests/schema/directives/populatedBy.test.ts b/packages/graphql/tests/schema/directives/populatedBy.test.ts index e39e92ebc7..5b1fb20452 100644 --- a/packages/graphql/tests/schema/directives/populatedBy.test.ts +++ b/packages/graphql/tests/schema/directives/populatedBy.test.ts @@ -219,13 +219,6 @@ describe("@populatedBy tests", () => { callback3: StringAggregateSelection! } - type MovieAggregateSelection { - callback1: StringAggregateSelection! - callback2: StringAggregateSelection! - callback3: StringAggregateSelection! - count: Int! - } - input MovieCreateInput { callback2: String! id: ID @@ -306,7 +299,6 @@ describe("@populatedBy tests", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -470,13 +462,6 @@ describe("@populatedBy tests", () => { callback3: IntAggregateSelection! } - type MovieAggregateSelection { - callback1: IntAggregateSelection! - callback2: IntAggregateSelection! - callback3: IntAggregateSelection! - count: Int! - } - input MovieCreateInput { callback2: Int! id: ID @@ -562,7 +547,6 @@ describe("@populatedBy tests", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -828,10 +812,6 @@ describe("@populatedBy tests", () => { count: Count! } - type GenreAggregateSelection { - count: Int! - } - input GenreConnectWhere { node: GenreWhere! } @@ -913,7 +893,6 @@ describe("@populatedBy tests", () => { type Movie { genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): MovieGenreGenresAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\" instead\\") genresConnection(after: String, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! id: ID } @@ -922,10 +901,6 @@ describe("@populatedBy tests", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { genres: MovieGenresFieldInput id: ID @@ -945,11 +920,6 @@ describe("@populatedBy tests", () => { edge: MovieGenreGenresEdgeAggregateSelection } - type MovieGenreGenresAggregationSelection { - count: Int! - edge: MovieGenreGenresEdgeAggregateSelection - } - type MovieGenreGenresEdgeAggregateSelection { callback1: StringAggregateSelection! callback2: StringAggregateSelection! @@ -1139,10 +1109,8 @@ describe("@populatedBy tests", () => { type Query { genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\" instead\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1418,10 +1386,6 @@ describe("@populatedBy tests", () => { count: Count! } - type GenreAggregateSelection { - count: Int! - } - input GenreConnectWhere { node: GenreWhere! } @@ -1525,7 +1489,6 @@ describe("@populatedBy tests", () => { type Movie { genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): MovieGenreGenresAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\" instead\\") genresConnection(after: String, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! id: ID } @@ -1534,10 +1497,6 @@ describe("@populatedBy tests", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { genres: MovieGenresFieldInput id: ID @@ -1557,11 +1516,6 @@ describe("@populatedBy tests", () => { edge: MovieGenreGenresEdgeAggregateSelection } - type MovieGenreGenresAggregationSelection { - count: Int! - edge: MovieGenreGenresEdgeAggregateSelection - } - type MovieGenreGenresEdgeAggregateSelection { callback1: IntAggregateSelection! callback2: IntAggregateSelection! @@ -1751,10 +1705,8 @@ describe("@populatedBy tests", () => { type Query { genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\" instead\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/directives/query.test.ts b/packages/graphql/tests/schema/directives/query.test.ts index 7bbe388e61..ac1cb4fda5 100644 --- a/packages/graphql/tests/schema/directives/query.test.ts +++ b/packages/graphql/tests/schema/directives/query.test.ts @@ -23,147 +23,6 @@ import { gql } from "graphql-tag"; import { Neo4jGraphQL } from "../../../src"; describe("@query directive", () => { - describe("on OBJECT", () => { - test("default arguments should disable aggregation", async () => { - const typeDefs = gql` - type Actor @node { - username: String! - password: String! - } - - type Movie @query @node { - title: String - } - `; - - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const schema = await neoSchema.getSchema(); - const queryFields = schema.getQueryType()?.getFields() as GraphQLFieldMap; - - const movies = queryFields["movies"]; - const actors = queryFields["actors"]; - - expect(movies).toBeDefined(); - expect(actors).toBeDefined(); - - const moviesConnection = queryFields["moviesConnection"]; - const actorsConnection = queryFields["actorsConnection"]; - - expect(moviesConnection).toBeDefined(); - expect(actorsConnection).toBeDefined(); - - const moviesAggregate = queryFields["moviesAggregate"]; - const actorsAggregate = queryFields["actorsAggregate"]; - - expect(moviesAggregate).toBeUndefined(); - expect(actorsAggregate).toBeDefined(); - }); - - test("should enable aggregation", async () => { - const typeDefs = gql` - type Actor @query(aggregate: true) @node { - username: String! - password: String! - } - - type Movie @node { - title: String - } - `; - - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const schema = await neoSchema.getSchema(); - - const queryFields = schema.getQueryType()?.getFields() as GraphQLFieldMap; - - const movies = queryFields["movies"]; - const actors = queryFields["actors"]; - - expect(movies).toBeDefined(); - expect(actors).toBeDefined(); - - const moviesConnection = queryFields["moviesConnection"]; - const actorsConnection = queryFields["actorsConnection"]; - - expect(moviesConnection).toBeDefined(); - expect(actorsConnection).toBeDefined(); - - const moviesAggregate = queryFields["moviesAggregate"]; - const actorsAggregate = queryFields["actorsAggregate"]; - - expect(moviesAggregate).toBeDefined(); - expect(actorsAggregate).toBeDefined(); - }); - - test("should disable read and aggregate for Actor", async () => { - const typeDefs = gql` - type Actor @query(read: false, aggregate: false) @node { - name: String - } - - type Movie @node { - title: String - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - - const schema = await neoSchema.getSchema(); - const queryFields = schema.getQueryType()?.getFields() as GraphQLFieldMap; - - const movies = queryFields["movies"]; - const actors = queryFields["actors"]; - - expect(movies).toBeDefined(); - expect(actors).toBeUndefined(); - - const moviesConnection = queryFields["moviesConnection"]; - const actorsConnection = queryFields["actorsConnection"]; - - expect(moviesConnection).toBeDefined(); - expect(actorsConnection).toBeUndefined(); - - const moviesAggregate = queryFields["moviesAggregate"]; - const actorsAggregate = queryFields["actorsAggregate"]; - - expect(moviesAggregate).toBeDefined(); - expect(actorsAggregate).toBeUndefined(); - }); - - test("should disable read and enable aggregate for Actor", async () => { - const typeDefs = gql` - type Actor @query(read: false, aggregate: true) @node { - name: String - } - - type Movie @node { - title: String - } - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - - const schema = await neoSchema.getSchema(); - const queryFields = schema.getQueryType()?.getFields() as GraphQLFieldMap; - - const movies = queryFields["movies"]; - const actors = queryFields["actors"]; - - expect(movies).toBeDefined(); - expect(actors).toBeUndefined(); - - const moviesConnection = queryFields["moviesConnection"]; - const actorsConnection = queryFields["actorsConnection"]; - - expect(moviesConnection).toBeDefined(); - expect(actorsConnection).toBeUndefined(); - - const moviesAggregate = queryFields["moviesAggregate"]; - const actorsAggregate = queryFields["actorsAggregate"]; - - expect(moviesAggregate).toBeDefined(); - expect(actorsAggregate).toBeDefined(); - }); - }); - describe("on SCHEMA", () => { test("default arguments should disable aggregation", async () => { const typeDefs = gql` @@ -201,44 +60,6 @@ describe("@query directive", () => { expect(actorsAggregate).toBeUndefined(); }); - test("should enable aggregation", async () => { - const typeDefs = gql` - type Actor @node { - username: String! - password: String! - } - - type Movie @node { - title: String - } - - extend schema @query(aggregate: true) - `; - - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const schema = await neoSchema.getSchema(); - - const queryFields = schema.getQueryType()?.getFields() as GraphQLFieldMap; - - const movies = queryFields["movies"]; - const actors = queryFields["actors"]; - - expect(movies).toBeDefined(); - expect(actors).toBeDefined(); - - const moviesConnection = queryFields["moviesConnection"]; - const actorsConnection = queryFields["actorsConnection"]; - - expect(moviesConnection).toBeDefined(); - expect(actorsConnection).toBeDefined(); - - const moviesAggregate = queryFields["moviesAggregate"]; - const actorsAggregate = queryFields["actorsAggregate"]; - - expect(moviesAggregate).toBeDefined(); - expect(actorsAggregate).toBeDefined(); - }); - test("should disable read and aggregate", async () => { const typeDefs = gql` type Actor @node { @@ -274,42 +95,6 @@ describe("@query directive", () => { expect(actorsAggregate).toBeUndefined(); }); - test("should disable read and enable aggregate", async () => { - const typeDefs = gql` - type Actor @node { - name: String - } - - type Movie @node { - title: String - } - - extend schema @query(read: false, aggregate: true) - `; - const neoSchema = new Neo4jGraphQL({ typeDefs }); - - const schema = await neoSchema.getSchema(); - const queryFields = schema.getQueryType()?.getFields() as GraphQLFieldMap; - - const movies = queryFields["movies"]; - const actors = queryFields["actors"]; - - expect(movies).toBeUndefined(); - expect(actors).toBeUndefined(); - - const moviesConnection = queryFields["moviesConnection"]; - const actorsConnection = queryFields["actorsConnection"]; - - expect(moviesConnection).toBeUndefined(); - expect(actorsConnection).toBeUndefined(); - - const moviesAggregate = queryFields["moviesAggregate"]; - const actorsAggregate = queryFields["actorsAggregate"]; - - expect(moviesAggregate).toBeDefined(); - expect(actorsAggregate).toBeDefined(); - }); - test("should throw an Error when is used in both schema on object", async () => { const typeDefs = gql` type Actor @query(read: true, aggregate: true) @node { diff --git a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts index e06e4d488f..5b95c3e24b 100644 --- a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts @@ -18,40 +18,12 @@ */ import { printSchemaWithDirectives } from "@graphql-tools/utils"; -import type { GraphQLFieldMap, GraphQLObjectType } from "graphql"; +import type { GraphQLObjectType } from "graphql"; import { lexicographicSortSchema } from "graphql"; import { gql } from "graphql-tag"; import { Neo4jGraphQL } from "../../../src"; describe("@relationship directive, aggregate argument", () => { - test("the default behavior should enable nested aggregation (this will change in 4.0)", async () => { - const typeDefs = gql` - type Actor @node { - username: String! - password: String! - } - - type Movie @node { - title: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN) - } - `; - - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const schema = await neoSchema.getSchema(); - const movieType = schema.getType("Movie") as GraphQLObjectType; - expect(movieType).toBeDefined(); - - const movieFields = movieType.getFields(); - const movieActorsAggregate = movieFields["actorsAggregate"]; - expect(movieActorsAggregate).toBeDefined(); - - const movieActorActorsAggregationSelection = schema.getType( - "MovieActorActorsAggregationSelection" - ) as GraphQLObjectType; - expect(movieActorActorsAggregationSelection).toBeDefined(); - }); - test("should disable nested aggregation", async () => { const typeDefs = gql` type Actor @node { @@ -80,130 +52,6 @@ describe("@relationship directive, aggregate argument", () => { expect(movieActorActorsAggregationSelection).toBeUndefined(); }); - test("should enable nested aggregation", async () => { - const typeDefs = gql` - type Actor @node { - username: String! - password: String! - } - - type Movie @node { - title: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, aggregate: true) - } - `; - - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const schema = await neoSchema.getSchema(); - const movieType = schema.getType("Movie") as GraphQLObjectType; - expect(movieType).toBeDefined(); - - const movieFields = movieType.getFields(); - const movieActorsAggregate = movieFields["actorsAggregate"]; - expect(movieActorsAggregate).toBeDefined(); - - const movieActorActorsAggregationSelection = schema.getType( - "MovieActorActorsAggregationSelection" - ) as GraphQLObjectType; - expect(movieActorActorsAggregationSelection).toBeDefined(); - }); - - test("should work in conjunction with @query aggregate:false and @relationship aggregate:true", async () => { - const typeDefs = gql` - type Actor @query(aggregate: false) @node { - username: String! - password: String! - } - - type Movie @node { - title: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, aggregate: true) - } - `; - - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const schema = await neoSchema.getSchema(); - const movieType = schema.getType("Movie") as GraphQLObjectType; - expect(movieType).toBeDefined(); - - const movieFields = movieType.getFields(); - const movieActorsAggregate = movieFields["actorsAggregate"]; - expect(movieActorsAggregate).toBeDefined(); - - const queryFields = schema.getQueryType()?.getFields() as GraphQLFieldMap; - - const movies = queryFields["movies"]; - const actors = queryFields["actors"]; - - expect(movies).toBeDefined(); - expect(actors).toBeDefined(); - - const moviesConnection = queryFields["moviesConnection"]; - const actorsConnection = queryFields["actorsConnection"]; - - expect(moviesConnection).toBeDefined(); - expect(actorsConnection).toBeDefined(); - - const moviesAggregate = queryFields["moviesAggregate"]; - const actorsAggregate = queryFields["actorsAggregate"]; - - expect(moviesAggregate).toBeDefined(); - expect(actorsAggregate).toBeUndefined(); - - const movieActorActorsAggregationSelection = schema.getType( - "MovieActorActorsAggregationSelection" - ) as GraphQLObjectType; - expect(movieActorActorsAggregationSelection).toBeDefined(); - }); - - test("should work in conjunction with @query aggregate:true and @relationship aggregate:false", async () => { - const typeDefs = gql` - type Actor @query(aggregate: true) @node { - username: String! - password: String! - } - - type Movie @node { - title: String - actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, aggregate: false) - } - `; - - const neoSchema = new Neo4jGraphQL({ typeDefs }); - const schema = await neoSchema.getSchema(); - const movieType = schema.getType("Movie") as GraphQLObjectType; - expect(movieType).toBeDefined(); - - const movieFields = movieType.getFields(); - const movieActorsAggregate = movieFields["actorsAggregate"]; - expect(movieActorsAggregate).toBeUndefined(); - - const queryFields = schema.getQueryType()?.getFields() as GraphQLFieldMap; - - const movies = queryFields["movies"]; - const actors = queryFields["actors"]; - - expect(movies).toBeDefined(); - expect(actors).toBeDefined(); - - const moviesConnection = queryFields["moviesConnection"]; - const actorsConnection = queryFields["actorsConnection"]; - - expect(moviesConnection).toBeDefined(); - expect(actorsConnection).toBeDefined(); - - const moviesAggregate = queryFields["moviesAggregate"]; - const actorsAggregate = queryFields["actorsAggregate"]; - - expect(moviesAggregate).toBeDefined(); - expect(actorsAggregate).toBeDefined(); - - const movieActorActorsAggregationSelection = schema.getType( - "MovieActorActorsAggregationSelection" - ) as GraphQLObjectType; - expect(movieActorActorsAggregationSelection).toBeUndefined(); - }); - describe("snapshot tests", () => { test("aggregate argument set as false", async () => { const typeDefs = gql` @@ -242,12 +90,6 @@ describe("@relationship directive, aggregate argument", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectWhere { node: ActorWhere! } @@ -519,11 +361,6 @@ describe("@relationship directive, aggregate argument", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieCreateInput { actors: MovieActorsFieldInput title: String @@ -616,10 +453,8 @@ describe("@relationship directive, aggregate argument", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -716,12 +551,6 @@ describe("@relationship directive, aggregate argument", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectWhere { node: ActorWhere! } @@ -849,7 +678,6 @@ describe("@relationship directive, aggregate argument", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -859,11 +687,6 @@ describe("@relationship directive, aggregate argument", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { password: StringAggregateSelection! username: StringAggregateSelection! @@ -1015,11 +838,6 @@ describe("@relationship directive, aggregate argument", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieCreateInput { actors: MovieActorsFieldInput title: String @@ -1112,10 +930,8 @@ describe("@relationship directive, aggregate argument", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1218,12 +1034,6 @@ describe("@relationship directive, aggregate argument", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorCreateInput { password: String! username: String! @@ -1480,11 +1290,6 @@ describe("@relationship directive, aggregate argument", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieCreateInput { actors: MovieActorsFieldInput title: String @@ -1597,12 +1402,6 @@ describe("@relationship directive, aggregate argument", () => { username: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input PersonConnectWhere { node: PersonWhere! } @@ -1667,13 +1466,10 @@ describe("@relationship directive, aggregate argument", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -1774,12 +1570,6 @@ describe("@relationship directive, aggregate argument", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorCreateInput { password: String! username: String! @@ -1892,7 +1682,6 @@ describe("@relationship directive, aggregate argument", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -2043,11 +1832,6 @@ describe("@relationship directive, aggregate argument", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieCreateInput { actors: MovieActorsFieldInput title: String @@ -2067,11 +1851,6 @@ describe("@relationship directive, aggregate argument", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { password: StringAggregateSelection! username: StringAggregateSelection! @@ -2175,12 +1954,6 @@ describe("@relationship directive, aggregate argument", () => { username: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input PersonConnectWhere { node: PersonWhere! } @@ -2245,13 +2018,10 @@ describe("@relationship directive, aggregate argument", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -2356,12 +2126,6 @@ describe("@relationship directive, aggregate argument", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectWhere { node: ActorWhere! } @@ -2616,11 +2380,6 @@ describe("@relationship directive, aggregate argument", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieCreateInput { actors: MovieActorsCreateInput title: String @@ -2733,11 +2492,6 @@ describe("@relationship directive, aggregate argument", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonConnectWhere { node: PersonWhere! } @@ -2777,14 +2531,11 @@ describe("@relationship directive, aggregate argument", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! castMembers(limit: Int, offset: Int, where: CastMemberWhere): [CastMember!]! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -2884,12 +2635,6 @@ describe("@relationship directive, aggregate argument", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorConnectWhere { node: ActorWhere! } @@ -3144,11 +2889,6 @@ describe("@relationship directive, aggregate argument", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieCreateInput { actors: MovieActorsCreateInput title: String @@ -3261,11 +3001,6 @@ describe("@relationship directive, aggregate argument", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonConnectWhere { node: PersonWhere! } @@ -3305,14 +3040,11 @@ describe("@relationship directive, aggregate argument", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! castMembers(limit: Int, offset: Int, where: CastMemberWhere): [CastMember!]! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") 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 1495e2eb0d..f071452ad5 100644 --- a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts @@ -126,7 +126,6 @@ describe("Relationship nested operations", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -222,10 +221,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -240,11 +235,6 @@ describe("Relationship nested operations", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -344,11 +334,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonCreateInput { name: String } @@ -395,10 +380,8 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -554,7 +537,6 @@ describe("Relationship nested operations", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -663,10 +645,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { actors: MovieActorsFieldInput id: ID @@ -682,11 +660,6 @@ describe("Relationship nested operations", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -787,11 +760,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonCreateInput { name: String } @@ -838,10 +806,8 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -997,7 +963,6 @@ describe("Relationship nested operations", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -1106,10 +1071,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { actors: MovieActorsFieldInput id: ID @@ -1125,11 +1086,6 @@ describe("Relationship nested operations", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -1230,11 +1186,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonConnectWhere { node: PersonWhere! } @@ -1285,10 +1236,8 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -1444,7 +1393,6 @@ describe("Relationship nested operations", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -1549,10 +1497,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -1567,11 +1511,6 @@ describe("Relationship nested operations", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -1672,11 +1611,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonCreateInput { name: String } @@ -1723,10 +1657,8 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -1882,7 +1814,6 @@ describe("Relationship nested operations", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -1987,10 +1918,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -2009,11 +1936,6 @@ describe("Relationship nested operations", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -2114,11 +2036,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonCreateInput { name: String } @@ -2165,10 +2082,8 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -2324,7 +2239,6 @@ describe("Relationship nested operations", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -2429,10 +2343,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -2447,11 +2357,6 @@ describe("Relationship nested operations", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -2552,11 +2457,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonCreateInput { name: String } @@ -2603,10 +2503,8 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -2763,7 +2661,6 @@ describe("Relationship nested operations", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -2859,10 +2756,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -2877,11 +2770,6 @@ describe("Relationship nested operations", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -2981,11 +2869,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonCreateInput { name: String } @@ -3032,10 +2915,8 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -3193,7 +3074,6 @@ describe("Relationship nested operations", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -3289,10 +3169,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -3307,11 +3183,6 @@ describe("Relationship nested operations", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -3412,11 +3283,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonCreateInput { name: String } @@ -3470,10 +3336,8 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -3630,11 +3494,9 @@ describe("Relationship nested operations", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID producers(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - producersAggregate(where: PersonWhere): MoviePersonProducersAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"producersConnection\\\\\\" instead\\") producersConnection(after: String, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! } @@ -3763,10 +3625,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { actors: MovieActorsFieldInput id: ID @@ -3786,11 +3644,6 @@ describe("Relationship nested operations", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -3800,11 +3653,6 @@ describe("Relationship nested operations", () => { node: MoviePersonProducersNodeAggregateSelection } - type MoviePersonProducersAggregationSelection { - count: Int! - node: MoviePersonProducersNodeAggregateSelection - } - type MoviePersonProducersNodeAggregateSelection { name: StringAggregateSelection! } @@ -4031,11 +3879,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonConnectWhere { node: PersonWhere! } @@ -4086,10 +3929,8 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -4246,11 +4087,9 @@ describe("Relationship nested operations", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID producers(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - producersAggregate(where: PersonWhere): MoviePersonProducersAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"producersConnection\\\\\\" instead\\") producersConnection(after: String, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! } @@ -4358,10 +4197,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { actors: MovieActorsFieldInput id: ID @@ -4377,11 +4212,6 @@ describe("Relationship nested operations", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -4391,11 +4221,6 @@ describe("Relationship nested operations", () => { node: MoviePersonProducersNodeAggregateSelection } - type MoviePersonProducersAggregationSelection { - count: Int! - node: MoviePersonProducersNodeAggregateSelection - } - type MoviePersonProducersNodeAggregateSelection { name: StringAggregateSelection! } @@ -4622,11 +4447,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonCreateInput { name: String } @@ -4673,10 +4493,8 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -4877,10 +4695,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -4982,11 +4796,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonOneCreateInput { name: String } @@ -5051,11 +4860,6 @@ describe("Relationship nested operations", () => { nameTwo: StringAggregateSelection! } - type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelection! - } - input PersonTwoCreateInput { nameTwo: String } @@ -5103,14 +4907,11 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, where: PersonWhere): [Person!]! personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\" instead\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\" instead\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -5338,10 +5139,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { actors: MovieActorsCreateInput id: ID @@ -5445,11 +5242,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonOneCreateInput { name: String } @@ -5514,11 +5306,6 @@ describe("Relationship nested operations", () => { nameTwo: StringAggregateSelection! } - type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelection! - } - input PersonTwoCreateInput { nameTwo: String } @@ -5566,14 +5353,11 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, where: PersonWhere): [Person!]! personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\" instead\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\" instead\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -5801,10 +5585,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { actors: MovieActorsCreateInput id: ID @@ -5908,11 +5688,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonOneConnectWhere { node: PersonOneWhere! } @@ -5981,11 +5756,6 @@ describe("Relationship nested operations", () => { nameTwo: StringAggregateSelection! } - type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelection! - } - input PersonTwoConnectWhere { node: PersonTwoWhere! } @@ -6037,14 +5807,11 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, where: PersonWhere): [Person!]! personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\" instead\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\" instead\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -6259,10 +6026,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -6365,11 +6128,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonOneCreateInput { name: String } @@ -6434,11 +6192,6 @@ describe("Relationship nested operations", () => { nameTwo: StringAggregateSelection! } - type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelection! - } - input PersonTwoCreateInput { nameTwo: String } @@ -6486,14 +6239,11 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, where: PersonWhere): [Person!]! personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\" instead\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\" instead\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -6713,10 +6463,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -6823,11 +6569,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonOneCreateInput { name: String } @@ -6892,11 +6633,6 @@ describe("Relationship nested operations", () => { nameTwo: StringAggregateSelection! } - type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelection! - } - input PersonTwoCreateInput { nameTwo: String } @@ -6944,14 +6680,11 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, where: PersonWhere): [Person!]! personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\" instead\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\" instead\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -7166,10 +6899,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -7272,11 +7001,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonOneCreateInput { name: String } @@ -7341,11 +7065,6 @@ describe("Relationship nested operations", () => { nameTwo: StringAggregateSelection! } - type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelection! - } - input PersonTwoCreateInput { nameTwo: String } @@ -7393,14 +7112,11 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, where: PersonWhere): [Person!]! personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\" instead\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\" instead\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -7593,10 +7309,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -7698,11 +7410,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonOneCreateInput { name: String } @@ -7767,11 +7474,6 @@ describe("Relationship nested operations", () => { nameTwo: StringAggregateSelection! } - type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelection! - } - input PersonTwoCreateInput { nameTwo: String } @@ -7819,14 +7521,11 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, where: PersonWhere): [Person!]! personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\" instead\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\" instead\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -8021,10 +7720,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -8127,11 +7822,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonOneCreateInput { name: String } @@ -8204,11 +7894,6 @@ describe("Relationship nested operations", () => { nameTwo: StringAggregateSelection! } - type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelection! - } - input PersonTwoCreateInput { nameTwo: String } @@ -8263,14 +7948,11 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, where: PersonWhere): [Person!]! personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\" instead\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\" instead\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -8548,10 +8230,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { actors: MovieActorsCreateInput id: ID @@ -8758,11 +8436,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonOneConnectWhere { node: PersonOneWhere! } @@ -8831,11 +8504,6 @@ describe("Relationship nested operations", () => { nameTwo: StringAggregateSelection! } - type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelection! - } - input PersonTwoConnectWhere { node: PersonTwoWhere! } @@ -8887,14 +8555,11 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, where: PersonWhere): [Person!]! personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\" instead\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\" instead\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -9125,10 +8790,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { actors: MovieActorsCreateInput id: ID @@ -9331,11 +8992,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonOneCreateInput { name: String } @@ -9400,11 +9056,6 @@ describe("Relationship nested operations", () => { nameTwo: StringAggregateSelection! } - type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelection! - } - input PersonTwoCreateInput { nameTwo: String } @@ -9452,14 +9103,11 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, where: PersonWhere): [Person!]! personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\" instead\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\" instead\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -9647,7 +9295,6 @@ describe("Relationship nested operations", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -9743,10 +9390,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -9761,11 +9404,6 @@ describe("Relationship nested operations", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -9868,11 +9506,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - type PersonEdge { cursor: String! node: Person! @@ -9897,11 +9530,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonOneCreateInput { name: String someExtraProp: [Int!]! @@ -9981,11 +9609,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonTwoCreateInput { name: String } @@ -10041,16 +9664,12 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\" instead\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\" instead\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -10238,7 +9857,6 @@ describe("Relationship nested operations", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -10347,10 +9965,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { actors: MovieActorsFieldInput id: ID @@ -10366,11 +9980,6 @@ describe("Relationship nested operations", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -10474,11 +10083,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonCreateInput { PersonOne: PersonOneCreateInput PersonTwo: PersonTwoCreateInput @@ -10508,11 +10112,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonOneCreateInput { name: String someExtraProp: [Int!]! @@ -10592,11 +10191,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonTwoCreateInput { name: String } @@ -10652,16 +10246,12 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\" instead\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\" instead\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -10849,7 +10439,6 @@ describe("Relationship nested operations", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -10958,10 +10547,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { actors: MovieActorsFieldInput id: ID @@ -10977,11 +10562,6 @@ describe("Relationship nested operations", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -11085,11 +10665,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonConnectWhere { node: PersonWhere! } @@ -11118,11 +10693,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonOneCreateInput { name: String someExtraProp: [Int!]! @@ -11202,11 +10772,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonTwoCreateInput { name: String } @@ -11262,16 +10827,12 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\" instead\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\" instead\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -11459,7 +11020,6 @@ describe("Relationship nested operations", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -11564,10 +11124,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -11582,11 +11138,6 @@ describe("Relationship nested operations", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -11690,11 +11241,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - type PersonEdge { cursor: String! node: Person! @@ -11719,11 +11265,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonOneCreateInput { name: String someExtraProp: [Int!]! @@ -11803,11 +11344,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonTwoCreateInput { name: String } @@ -11868,16 +11404,12 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\" instead\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\" instead\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -12065,7 +11597,6 @@ describe("Relationship nested operations", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -12170,10 +11701,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -12192,11 +11719,6 @@ describe("Relationship nested operations", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -12300,11 +11822,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - type PersonEdge { cursor: String! node: Person! @@ -12329,11 +11846,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonOneCreateInput { name: String someExtraProp: [Int!]! @@ -12413,11 +11925,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonTwoCreateInput { name: String } @@ -12473,16 +11980,12 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\" instead\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\" instead\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -12670,7 +12173,6 @@ describe("Relationship nested operations", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -12775,10 +12277,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -12793,11 +12291,6 @@ describe("Relationship nested operations", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -12901,11 +12394,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - type PersonEdge { cursor: String! node: Person! @@ -12930,11 +12418,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonOneCreateInput { name: String someExtraProp: [Int!]! @@ -13014,11 +12497,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonTwoCreateInput { name: String } @@ -13074,16 +12552,12 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\" instead\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\" instead\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -13272,11 +12746,9 @@ describe("Relationship nested operations", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID producers(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - producersAggregate(where: PersonWhere): MoviePersonProducersAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"producersConnection\\\\\\" instead\\") producersConnection(after: String, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! } @@ -13405,10 +12877,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { actors: MovieActorsFieldInput id: ID @@ -13428,11 +12896,6 @@ describe("Relationship nested operations", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -13442,11 +12905,6 @@ describe("Relationship nested operations", () => { node: MoviePersonProducersNodeAggregateSelection } - type MoviePersonProducersAggregationSelection { - count: Int! - node: MoviePersonProducersNodeAggregateSelection - } - type MoviePersonProducersNodeAggregateSelection { name: StringAggregateSelection! } @@ -13676,11 +13134,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonConnectWhere { node: PersonWhere! } @@ -13714,11 +13167,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonOneCreateInput { name: String someExtraProp: [Int!]! @@ -13798,11 +13246,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonTwoCreateInput { name: String } @@ -13863,16 +13306,12 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\" instead\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\" instead\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } @@ -14062,11 +13501,9 @@ describe("Relationship nested operations", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID producers(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - producersAggregate(where: PersonWhere): MoviePersonProducersAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"producersConnection\\\\\\" instead\\") producersConnection(after: String, first: Int, sort: [MovieProducersConnectionSort!], where: MovieProducersConnectionWhere): MovieProducersConnection! } @@ -14179,10 +13616,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { actors: MovieActorsFieldInput id: ID @@ -14202,11 +13635,6 @@ describe("Relationship nested operations", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -14216,11 +13644,6 @@ describe("Relationship nested operations", () => { node: MoviePersonProducersNodeAggregateSelection } - type MoviePersonProducersAggregationSelection { - count: Int! - node: MoviePersonProducersNodeAggregateSelection - } - type MoviePersonProducersNodeAggregateSelection { name: StringAggregateSelection! } @@ -14450,11 +13873,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonCreateInput { PersonOne: PersonOneCreateInput PersonTwo: PersonTwoCreateInput @@ -14484,11 +13902,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonOneCreateInput { name: String someExtraProp: [Int!]! @@ -14568,11 +13981,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonTwoAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonTwoCreateInput { name: String } @@ -14628,16 +14036,12 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\" instead\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\" instead\\") 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 d30c0cdb0a..7f64374ea2 100644 --- a/packages/graphql/tests/schema/directives/relationship-properties.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-properties.test.ts @@ -135,7 +135,6 @@ describe("Relationship-properties", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String! } @@ -149,11 +148,6 @@ describe("Relationship-properties", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -186,12 +180,6 @@ describe("Relationship-properties", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - edge: ActorMovieMoviesEdgeAggregateSelection - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesEdgeAggregateSelection { screenTime: IntAggregateSelection! } @@ -514,7 +502,6 @@ describe("Relationship-properties", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String! } @@ -525,12 +512,6 @@ describe("Relationship-properties", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsEdgeAggregateSelection { screenTime: IntAggregateSelection! } @@ -680,11 +661,6 @@ describe("Relationship-properties", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -800,10 +776,8 @@ describe("Relationship-properties", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -984,7 +958,6 @@ describe("Relationship-properties", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String! } @@ -998,11 +971,6 @@ describe("Relationship-properties", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -1035,12 +1003,6 @@ describe("Relationship-properties", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - edge: ActorMovieMoviesEdgeAggregateSelection - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesEdgeAggregateSelection { screenTime: IntAggregateSelection! timestamp: DateTimeAggregateSelection! @@ -1369,7 +1331,6 @@ describe("Relationship-properties", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String! } @@ -1380,12 +1341,6 @@ describe("Relationship-properties", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsEdgeAggregateSelection { screenTime: IntAggregateSelection! timestamp: DateTimeAggregateSelection! @@ -1536,11 +1491,6 @@ describe("Relationship-properties", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -1656,10 +1606,8 @@ describe("Relationship-properties", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1798,7 +1746,6 @@ describe("Relationship-properties", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String! } @@ -1812,11 +1759,6 @@ describe("Relationship-properties", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -1849,12 +1791,6 @@ describe("Relationship-properties", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - edge: ActorMovieMoviesEdgeAggregateSelection - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesEdgeAggregateSelection { timestamp: DateTimeAggregateSelection! } @@ -2157,7 +2093,6 @@ describe("Relationship-properties", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String! } @@ -2168,12 +2103,6 @@ describe("Relationship-properties", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsEdgeAggregateSelection { timestamp: DateTimeAggregateSelection! } @@ -2320,11 +2249,6 @@ describe("Relationship-properties", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -2440,10 +2364,8 @@ describe("Relationship-properties", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 b263db261c..8487b5878f 100644 --- a/packages/graphql/tests/schema/directives/relationship.test.ts +++ b/packages/graphql/tests/schema/directives/relationship.test.ts @@ -56,11 +56,6 @@ describe("Relationship", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectWhere { node: ActorWhere! } @@ -192,7 +187,6 @@ describe("Relationship", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -202,11 +196,6 @@ describe("Relationship", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -336,10 +325,6 @@ describe("Relationship", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { actors: MovieActorsFieldInput id: ID @@ -432,10 +417,8 @@ describe("Relationship", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -519,7 +502,6 @@ describe("Relationship", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String } @@ -533,11 +515,6 @@ describe("Relationship", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -569,11 +546,6 @@ describe("Relationship", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -848,7 +820,6 @@ describe("Relationship", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID title: String @@ -859,11 +830,6 @@ describe("Relationship", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -1001,11 +967,6 @@ describe("Relationship", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -1131,10 +1092,8 @@ describe("Relationship", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 38277923f3..3d6c5e51d3 100644 --- a/packages/graphql/tests/schema/directives/selectable.test.ts +++ b/packages/graphql/tests/schema/directives/selectable.test.ts @@ -78,12 +78,6 @@ describe("@selectable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { description: String title: String! @@ -150,7 +144,6 @@ describe("@selectable", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -252,11 +245,6 @@ describe("@selectable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieCreateInput { description: String title: String! @@ -323,7 +311,6 @@ describe("@selectable", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -424,11 +411,6 @@ describe("@selectable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieCreateInput { description: String title: String! @@ -495,7 +477,6 @@ describe("@selectable", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -606,12 +587,6 @@ describe("@selectable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { description: String title: String! @@ -719,7 +694,6 @@ describe("@selectable", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -797,7 +771,6 @@ describe("@selectable", () => { } type Actor { - actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") name: String! } @@ -933,11 +906,6 @@ describe("@selectable", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { actedIn: ActorActedInFieldInput name: String! @@ -952,16 +920,6 @@ describe("@selectable", () => { node: Actor! } - type ActorMovieActedInAggregationSelection { - count: Int! - node: ActorMovieActedInNodeAggregateSelection - } - - type ActorMovieActedInNodeAggregateSelection { - description: StringAggregateSelection! - title: StringAggregateSelection! - } - \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -1091,12 +1049,6 @@ describe("@selectable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieConnectWhere { node: MovieWhere! } @@ -1181,10 +1133,8 @@ describe("@selectable", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1267,7 +1217,6 @@ describe("@selectable", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -1420,11 +1369,6 @@ describe("@selectable", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { actedIn: ActorActedInFieldInput name: String! @@ -1444,11 +1388,6 @@ describe("@selectable", () => { node: ActorMovieActedInNodeAggregateSelection } - type ActorMovieActedInAggregationSelection { - count: Int! - node: ActorMovieActedInNodeAggregateSelection - } - type ActorMovieActedInNodeAggregateSelection { description: StringAggregateSelection! title: StringAggregateSelection! @@ -1588,12 +1527,6 @@ describe("@selectable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieConnectWhere { node: MovieWhere! } @@ -1678,10 +1611,8 @@ describe("@selectable", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1906,11 +1837,6 @@ describe("@selectable", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { actedIn: ActorActedInCreateInput name: String! @@ -2033,12 +1959,6 @@ describe("@selectable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieConnectWhere { node: MovieWhere! } @@ -2133,14 +2053,11 @@ describe("@selectable", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, where: ProductionWhere): [Production!]! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -2159,12 +2076,6 @@ describe("@selectable", () => { name: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelection! - name: StringAggregateSelection! - } - input SeriesConnectWhere { node: SeriesWhere! } @@ -2448,11 +2359,6 @@ describe("@selectable", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { actedIn: ActorActedInCreateInput name: String! @@ -2575,12 +2481,6 @@ describe("@selectable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieConnectWhere { node: MovieWhere! } @@ -2675,14 +2575,11 @@ describe("@selectable", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, where: ProductionWhere): [Production!]! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -2701,12 +2598,6 @@ describe("@selectable", () => { name: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelection! - name: StringAggregateSelection! - } - input SeriesConnectWhere { node: SeriesWhere! } @@ -2850,7 +2741,6 @@ describe("@selectable", () => { } type Actor { - actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") name: String! } @@ -2986,11 +2876,6 @@ describe("@selectable", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { actedIn: ActorActedInFieldInput name: String! @@ -3005,16 +2890,6 @@ describe("@selectable", () => { node: Actor! } - type ActorProductionActedInAggregationSelection { - count: Int! - node: ActorProductionActedInNodeAggregateSelection - } - - type ActorProductionActedInNodeAggregateSelection { - description: StringAggregateSelection! - title: StringAggregateSelection! - } - \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -3149,12 +3024,6 @@ describe("@selectable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { description: String title: String! @@ -3240,12 +3109,6 @@ describe("@selectable", () => { title: StringAggregateSelection! } - type ProductionAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input ProductionConnectWhere { node: ProductionWhere! } @@ -3319,16 +3182,12 @@ describe("@selectable", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\" instead\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -3347,12 +3206,6 @@ describe("@selectable", () => { title: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - type SeriesConnection { aggregate: SeriesAggregate! edges: [SeriesEdge!]! @@ -3497,7 +3350,6 @@ describe("@selectable", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -3649,11 +3501,6 @@ describe("@selectable", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { actedIn: ActorActedInFieldInput name: String! @@ -3668,16 +3515,6 @@ describe("@selectable", () => { node: Actor! } - type ActorProductionActedInAggregationSelection { - count: Int! - node: ActorProductionActedInNodeAggregateSelection - } - - type ActorProductionActedInNodeAggregateSelection { - description: StringAggregateSelection! - title: StringAggregateSelection! - } - \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -3812,12 +3649,6 @@ describe("@selectable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { description: String title: String! @@ -3903,12 +3734,6 @@ describe("@selectable", () => { title: StringAggregateSelection! } - type ProductionAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input ProductionConnectWhere { node: ProductionWhere! } @@ -3982,16 +3807,12 @@ describe("@selectable", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\" instead\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -4010,12 +3831,6 @@ describe("@selectable", () => { title: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - type SeriesConnection { aggregate: SeriesAggregate! edges: [SeriesEdge!]! diff --git a/packages/graphql/tests/schema/directives/settable.test.ts b/packages/graphql/tests/schema/directives/settable.test.ts index 36f39bcb56..584b371a50 100644 --- a/packages/graphql/tests/schema/directives/settable.test.ts +++ b/packages/graphql/tests/schema/directives/settable.test.ts @@ -79,12 +79,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { title: String! } @@ -150,7 +144,6 @@ describe("@settable", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -253,12 +246,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { description: String title: String! @@ -323,7 +310,6 @@ describe("@settable", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -435,12 +421,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { title: String! } @@ -546,7 +526,6 @@ describe("@settable", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -625,7 +604,6 @@ describe("@settable", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -773,11 +751,6 @@ describe("@settable", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { name: String! } @@ -796,11 +769,6 @@ describe("@settable", () => { node: ActorMovieActedInNodeAggregateSelection } - type ActorMovieActedInAggregationSelection { - count: Int! - node: ActorMovieActedInNodeAggregateSelection - } - type ActorMovieActedInNodeAggregateSelection { description: StringAggregateSelection! title: StringAggregateSelection! @@ -940,12 +908,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieConnectWhere { node: MovieWhere! } @@ -1030,10 +992,8 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1117,7 +1077,6 @@ describe("@settable", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -1253,11 +1212,6 @@ describe("@settable", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { actedIn: ActorActedInFieldInput name: String! @@ -1277,11 +1231,6 @@ describe("@settable", () => { node: ActorMovieActedInNodeAggregateSelection } - type ActorMovieActedInAggregationSelection { - count: Int! - node: ActorMovieActedInNodeAggregateSelection - } - type ActorMovieActedInNodeAggregateSelection { description: StringAggregateSelection! title: StringAggregateSelection! @@ -1420,12 +1369,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieConnectWhere { node: MovieWhere! } @@ -1510,10 +1453,8 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1596,7 +1537,6 @@ describe("@settable", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -1739,11 +1679,6 @@ describe("@settable", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { actedIn: [ActorActedInConnectFieldInput!] } @@ -1775,11 +1710,6 @@ describe("@settable", () => { node: ActorMovieActedInNodeAggregateSelection } - type ActorMovieActedInAggregationSelection { - count: Int! - node: ActorMovieActedInNodeAggregateSelection - } - type ActorMovieActedInNodeAggregateSelection { description: StringAggregateSelection! title: StringAggregateSelection! @@ -1916,7 +1846,6 @@ describe("@settable", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! description: String title: String! @@ -1927,11 +1856,6 @@ describe("@settable", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -2070,12 +1994,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -2201,10 +2119,8 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -2287,7 +2203,6 @@ describe("@settable", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -2438,11 +2353,6 @@ describe("@settable", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { actedIn: [ActorActedInConnectFieldInput!] } @@ -2473,11 +2383,6 @@ describe("@settable", () => { node: ActorMovieActedInNodeAggregateSelection } - type ActorMovieActedInAggregationSelection { - count: Int! - node: ActorMovieActedInNodeAggregateSelection - } - type ActorMovieActedInNodeAggregateSelection { description: StringAggregateSelection! title: StringAggregateSelection! @@ -2615,7 +2520,6 @@ describe("@settable", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! description: String title: String! @@ -2626,11 +2530,6 @@ describe("@settable", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -2769,12 +2668,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -2900,10 +2793,8 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -3125,11 +3016,6 @@ describe("@settable", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { name: String! } @@ -3251,12 +3137,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieConnectWhere { node: MovieWhere! } @@ -3351,14 +3231,11 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, where: ProductionWhere): [Production!]! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -3377,12 +3254,6 @@ describe("@settable", () => { name: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelection! - name: StringAggregateSelection! - } - input SeriesConnectWhere { node: SeriesWhere! } @@ -3628,11 +3499,6 @@ describe("@settable", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { actedIn: ActorActedInCreateInput name: String! @@ -3754,12 +3620,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieConnectWhere { node: MovieWhere! } @@ -3854,14 +3714,11 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, where: ProductionWhere): [Production!]! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -3880,12 +3737,6 @@ describe("@settable", () => { name: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelection! - name: StringAggregateSelection! - } - input SeriesConnectWhere { node: SeriesWhere! } @@ -4151,11 +4002,6 @@ describe("@settable", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { actedIn: ActorActedInConnectInput } @@ -4317,7 +4163,6 @@ describe("@settable", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! description: String title: String! @@ -4328,11 +4173,6 @@ describe("@settable", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -4471,12 +4311,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -4612,14 +4446,11 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, where: ProductionWhere): [Production!]! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -4638,12 +4469,6 @@ describe("@settable", () => { name: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelection! - name: StringAggregateSelection! - } - input SeriesConnectWhere { node: SeriesWhere! } @@ -4932,11 +4757,6 @@ describe("@settable", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { actedIn: ActorActedInConnectInput } @@ -5098,7 +4918,6 @@ describe("@settable", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! description: String title: String! @@ -5109,11 +4928,6 @@ describe("@settable", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -5252,12 +5066,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -5393,14 +5201,11 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, where: ProductionWhere): [Production!]! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -5419,12 +5224,6 @@ describe("@settable", () => { name: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelection! - name: StringAggregateSelection! - } - input SeriesConnectWhere { node: SeriesWhere! } @@ -5576,7 +5375,6 @@ describe("@settable", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -5724,11 +5522,6 @@ describe("@settable", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { name: String! } @@ -5747,11 +5540,6 @@ describe("@settable", () => { node: ActorProductionActedInNodeAggregateSelection } - type ActorProductionActedInAggregationSelection { - count: Int! - node: ActorProductionActedInNodeAggregateSelection - } - type ActorProductionActedInNodeAggregateSelection { description: StringAggregateSelection! title: StringAggregateSelection! @@ -5896,12 +5684,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { description: String title: String! @@ -5987,12 +5769,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type ProductionAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input ProductionConnectWhere { node: ProductionWhere! } @@ -6066,16 +5842,12 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\" instead\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -6094,12 +5866,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - type SeriesConnection { aggregate: SeriesAggregate! edges: [SeriesEdge!]! @@ -6245,7 +6011,6 @@ describe("@settable", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -6381,11 +6146,6 @@ describe("@settable", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { actedIn: ActorActedInFieldInput name: String! @@ -6405,11 +6165,6 @@ describe("@settable", () => { node: ActorProductionActedInNodeAggregateSelection } - type ActorProductionActedInAggregationSelection { - count: Int! - node: ActorProductionActedInNodeAggregateSelection - } - type ActorProductionActedInNodeAggregateSelection { description: StringAggregateSelection! title: StringAggregateSelection! @@ -6553,12 +6308,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { description: String title: String! @@ -6644,12 +6393,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type ProductionAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input ProductionConnectWhere { node: ProductionWhere! } @@ -6716,16 +6459,12 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\" instead\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -6744,12 +6483,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - type SeriesConnection { aggregate: SeriesAggregate! edges: [SeriesEdge!]! @@ -6896,7 +6629,6 @@ describe("@settable", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -7039,11 +6771,6 @@ describe("@settable", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { actedIn: [ActorActedInConnectFieldInput!] } @@ -7075,11 +6802,6 @@ describe("@settable", () => { node: ActorProductionActedInNodeAggregateSelection } - type ActorProductionActedInAggregationSelection { - count: Int! - node: ActorProductionActedInNodeAggregateSelection - } - type ActorProductionActedInNodeAggregateSelection { description: StringAggregateSelection! title: StringAggregateSelection! @@ -7221,21 +6943,11 @@ describe("@settable", () => { type Movie implements Production { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! description: String title: String! } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelection! - } - input MovieActorsAggregateInput { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput @@ -7339,12 +7051,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { actors: MovieActorsFieldInput description: String @@ -7568,12 +7274,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type ProductionAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input ProductionConnectInput { actors: [ProductionActorsConnectFieldInput!] } @@ -7679,36 +7379,22 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\" instead\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } type Series implements Production { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): SeriesActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! description: String title: String! } - type SeriesActorActorsAggregationSelection { - count: Int! - node: SeriesActorActorsNodeAggregateSelection - } - - type SeriesActorActorsNodeAggregateSelection { - name: StringAggregateSelection! - } - input SeriesActorsAggregateInput { AND: [SeriesActorsAggregateInput!] NOT: SeriesActorsAggregateInput @@ -7812,12 +7498,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - type SeriesConnection { aggregate: SeriesAggregate! edges: [SeriesEdge!]! @@ -7997,7 +7677,6 @@ describe("@settable", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -8148,11 +7827,6 @@ describe("@settable", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { actedIn: [ActorActedInConnectFieldInput!] } @@ -8183,11 +7857,6 @@ describe("@settable", () => { node: ActorProductionActedInNodeAggregateSelection } - type ActorProductionActedInAggregationSelection { - count: Int! - node: ActorProductionActedInNodeAggregateSelection - } - type ActorProductionActedInNodeAggregateSelection { description: StringAggregateSelection! title: StringAggregateSelection! @@ -8330,21 +7999,11 @@ describe("@settable", () => { type Movie implements Production { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! description: String title: String! } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelection! - } - input MovieActorsAggregateInput { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput @@ -8448,12 +8107,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { actors: MovieActorsFieldInput description: String @@ -8694,12 +8347,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type ProductionAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input ProductionConnectInput { actors: [ProductionActorsConnectFieldInput!] } @@ -8813,36 +8460,22 @@ describe("@settable", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\" instead\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } type Series implements Production { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): SeriesActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! description: String title: String! } - type SeriesActorActorsAggregationSelection { - count: Int! - node: SeriesActorActorsNodeAggregateSelection - } - - type SeriesActorActorsNodeAggregateSelection { - name: StringAggregateSelection! - } - input SeriesActorsAggregateInput { AND: [SeriesActorsAggregateInput!] NOT: SeriesActorsAggregateInput @@ -8946,12 +8579,6 @@ describe("@settable", () => { title: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - type SeriesConnection { aggregate: SeriesAggregate! edges: [SeriesEdge!]! diff --git a/packages/graphql/tests/schema/directives/timestamps.test.ts b/packages/graphql/tests/schema/directives/timestamps.test.ts index 70d2e412fd..74ba23e0a5 100644 --- a/packages/graphql/tests/schema/directives/timestamps.test.ts +++ b/packages/graphql/tests/schema/directives/timestamps.test.ts @@ -118,12 +118,6 @@ describe("Timestamps", () => { updatedAt: DateTimeAggregateSelection! } - type MovieAggregateSelection { - count: Int! - createdAt: DateTimeAggregateSelection! - updatedAt: DateTimeAggregateSelection! - } - input MovieCreateInput { id: ID updatedAt: DateTime! @@ -199,7 +193,6 @@ describe("Timestamps", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 92b8509c1d..c9c717c9d6 100644 --- a/packages/graphql/tests/schema/enum.test.ts +++ b/packages/graphql/tests/schema/enum.test.ts @@ -77,10 +77,6 @@ describe("Enum", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { status: Status } @@ -134,7 +130,6 @@ describe("Enum", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 a2224615a6..4c19b18a75 100644 --- a/packages/graphql/tests/schema/extend.test.ts +++ b/packages/graphql/tests/schema/extend.test.ts @@ -95,11 +95,6 @@ describe("Extend", () => { name: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input MovieCreateInput { id: ID name: String @@ -166,7 +161,6 @@ describe("Extend", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 055bbefcb5..85e5e39c72 100644 --- a/packages/graphql/tests/schema/federation.test.ts +++ b/packages/graphql/tests/schema/federation.test.ts @@ -148,7 +148,6 @@ describe("Apollo Federation", () => { type Post { author(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - authorAggregate(where: UserWhere): PostUserAuthorAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"authorConnection\\\\\\" instead\\") authorConnection(after: String, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! content: String! } @@ -162,11 +161,6 @@ describe("Apollo Federation", () => { content: StringAggregateSelection! } - type PostAggregateSelection { - content: StringAggregateSelection! - count: Int! - } - input PostAuthorAggregateInput { AND: [PostAuthorAggregateInput!] NOT: PostAuthorAggregateInput @@ -346,11 +340,6 @@ describe("Apollo Federation", () => { node: PostUserAuthorNodeAggregateSelection } - type PostUserAuthorAggregationSelection { - count: Int! - node: PostUserAuthorNodeAggregateSelection - } - type PostUserAuthorNodeAggregateSelection { name: StringAggregateSelection! } @@ -404,10 +393,8 @@ describe("Apollo Federation", () => { type Query { _service: _Service! posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\" instead\\") postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! @shareable - usersAggregate(where: UserWhere): UserAggregateSelection! @shareable @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\" instead\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! @shareable } @@ -468,7 +455,6 @@ describe("Apollo Federation", () => { type User @shareable { name: String! posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): UserPostPostsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\" instead\\") postsConnection(after: String, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! } @@ -481,11 +467,6 @@ describe("Apollo Federation", () => { name: StringAggregateSelection! } - type UserAggregateSelection @shareable { - count: Int! - name: StringAggregateSelection! - } - input UserConnectInput { posts: [UserPostsConnectFieldInput!] } @@ -517,11 +498,6 @@ describe("Apollo Federation", () => { node: UserPostPostsNodeAggregateSelection } - type UserPostPostsAggregationSelection { - count: Int! - node: UserPostPostsNodeAggregateSelection - } - type UserPostPostsNodeAggregateSelection { content: StringAggregateSelection! } @@ -867,7 +843,6 @@ describe("Apollo Federation", () => { type Post { author(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - authorAggregate(where: UserWhere): PostUserAuthorAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"authorConnection\\\\\\" instead\\") authorConnection(after: String, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! content: String! } @@ -881,11 +856,6 @@ describe("Apollo Federation", () => { content: StringAggregateSelection! } - type PostAggregateSelection { - content: StringAggregateSelection! - count: Int! - } - input PostAuthorAggregateInput { AND: [PostAuthorAggregateInput!] NOT: PostAuthorAggregateInput @@ -1039,11 +1009,6 @@ describe("Apollo Federation", () => { node: PostUserAuthorNodeAggregateSelection } - type PostUserAuthorAggregationSelection { - count: Int! - node: PostUserAuthorNodeAggregateSelection - } - type PostUserAuthorNodeAggregateSelection { name: StringAggregateSelection! } @@ -1098,10 +1063,8 @@ describe("Apollo Federation", () => { _entities(representations: [_Any!]!): [_Entity]! _service: _Service! posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\" instead\\") postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\" instead\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } @@ -1172,11 +1135,6 @@ describe("Apollo Federation", () => { name: StringAggregateSelection! } - type UserAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input UserConnectWhere { node: UserWhere! } diff --git a/packages/graphql/tests/schema/fulltext.test.ts b/packages/graphql/tests/schema/fulltext.test.ts index 1b834ec91a..289f948740 100644 --- a/packages/graphql/tests/schema/fulltext.test.ts +++ b/packages/graphql/tests/schema/fulltext.test.ts @@ -93,12 +93,6 @@ describe("@fulltext schema", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { description: String title: String @@ -189,7 +183,6 @@ describe("@fulltext schema", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesByDescription(after: String, first: Int, phrase: String!, sort: [MovieIndexSort!], where: MovieIndexWhere): MoviesIndexConnection! moviesByTitle(after: String, first: Int, phrase: String!, sort: [MovieIndexSort!], where: MovieIndexWhere): MoviesIndexConnection! moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! diff --git a/packages/graphql/tests/schema/global-node.test.ts b/packages/graphql/tests/schema/global-node.test.ts index 9faa9bd2a4..8076fa7c26 100644 --- a/packages/graphql/tests/schema/global-node.test.ts +++ b/packages/graphql/tests/schema/global-node.test.ts @@ -93,11 +93,6 @@ describe("Node Interface Types", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieCreateInput { imdb: ID! title: String! @@ -171,7 +166,6 @@ describe("Node Interface Types", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 0dfc9855e7..5e2d3f6ca2 100644 --- a/packages/graphql/tests/schema/inheritance.test.ts +++ b/packages/graphql/tests/schema/inheritance.test.ts @@ -60,7 +60,6 @@ describe("inheritance", () => { type Actor implements Person @customDirectiveObj { friends(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - friendsAggregate(where: PersonWhere): ActorPersonFriendsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"friendsConnection\\\\\\" instead\\") friendsConnection(after: String, first: Int, sort: [PersonFriendsConnectionSort!], where: PersonFriendsConnectionWhere): PersonFriendsConnection! name: String } @@ -74,11 +73,6 @@ describe("inheritance", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { friends: ActorFriendsFieldInput name: String @@ -201,20 +195,6 @@ describe("inheritance", () => { where: PersonFriendsConnectionWhere } - type ActorPersonFriendsAggregationSelection { - count: Int! - edge: ActorPersonFriendsEdgeAggregateSelection - node: ActorPersonFriendsNodeAggregateSelection - } - - type ActorPersonFriendsEdgeAggregateSelection { - since: IntAggregateSelection! - } - - type ActorPersonFriendsNodeAggregateSelection { - name: StringAggregateSelection! - } - \\"\\"\\" Fields to sort Actors by. The order in which sorts are applied is not guaranteed when specifying many fields in one ActorSort object. \\"\\"\\" @@ -377,13 +357,6 @@ describe("inheritance", () => { since_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter since: { lte: ... }\\") } - type IntAggregateSelection { - average: Float - max: Int - min: Int - sum: Int - } - \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" input IntScalarAggregationFilters { average: FloatScalarFilters @@ -445,11 +418,6 @@ describe("inheritance", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonConnectInput { friends: [PersonFriendsConnectFieldInput!] } @@ -715,10 +683,8 @@ describe("inheritance", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") 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 0b077bc2ef..f1b6fd1cfe 100644 --- a/packages/graphql/tests/schema/inputs.test.ts +++ b/packages/graphql/tests/schema/inputs.test.ts @@ -93,10 +93,6 @@ describe("Inputs", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -157,7 +153,6 @@ describe("Inputs", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 83b7a9b1e4..b73539647a 100644 --- a/packages/graphql/tests/schema/interface-relationships.test.ts +++ b/packages/graphql/tests/schema/interface-relationships.test.ts @@ -122,7 +122,6 @@ describe("Interface Relationships", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -267,11 +266,6 @@ describe("Interface Relationships", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { actedIn: ActorActedInFieldInput name: String! @@ -292,12 +286,6 @@ describe("Interface Relationships", () => { node: ActorProductionActedInNodeAggregateSelection } - type ActorProductionActedInAggregationSelection { - count: Int! - edge: ActorProductionActedInEdgeAggregateSelection - node: ActorProductionActedInNodeAggregateSelection - } - type ActorProductionActedInEdgeAggregateSelection { screenTime: IntAggregateSelection! } @@ -467,12 +455,6 @@ describe("Interface Relationships", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - runtime: IntAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { runtime: Int! title: String! @@ -559,11 +541,6 @@ describe("Interface Relationships", () => { title: StringAggregateSelection! } - type ProductionAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input ProductionConnectWhere { node: ProductionWhere! } @@ -628,16 +605,12 @@ describe("Interface Relationships", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\" instead\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -656,12 +629,6 @@ describe("Interface Relationships", () => { title: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - episodes: IntAggregateSelection! - title: StringAggregateSelection! - } - type SeriesConnection { aggregate: SeriesAggregate! edges: [SeriesEdge!]! @@ -886,7 +853,6 @@ describe("Interface Relationships", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -1034,11 +1000,6 @@ describe("Interface Relationships", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { actedIn: [ActorActedInConnectFieldInput!] } @@ -1071,12 +1032,6 @@ describe("Interface Relationships", () => { node: ActorProductionActedInNodeAggregateSelection } - type ActorProductionActedInAggregationSelection { - count: Int! - edge: ActorProductionActedInEdgeAggregateSelection - node: ActorProductionActedInNodeAggregateSelection - } - type ActorProductionActedInEdgeAggregateSelection { screenTime: IntAggregateSelection! } @@ -1208,7 +1163,6 @@ describe("Interface Relationships", () => { type Episode { runtime: Int! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): EpisodeSeriesSeriesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [EpisodeSeriesConnectionSort!], where: EpisodeSeriesConnectionWhere): EpisodeSeriesConnection! } @@ -1221,11 +1175,6 @@ describe("Interface Relationships", () => { runtime: IntAggregateSelection! } - type EpisodeAggregateSelection { - count: Int! - runtime: IntAggregateSelection! - } - input EpisodeConnectInput { series: [EpisodeSeriesConnectFieldInput!] } @@ -1402,11 +1351,6 @@ describe("Interface Relationships", () => { node: EpisodeSeriesSeriesNodeAggregateSelection } - type EpisodeSeriesSeriesAggregationSelection { - count: Int! - node: EpisodeSeriesSeriesNodeAggregateSelection - } - type EpisodeSeriesSeriesNodeAggregateSelection { episodeCount: IntAggregateSelection! title: StringAggregateSelection! @@ -1531,26 +1475,11 @@ describe("Interface Relationships", () => { type Movie implements Production { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! runtime: Int! title: String! } - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsEdgeAggregateSelection { - screenTime: IntAggregateSelection! - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelection! - } - input MovieActorsAggregateInput { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput @@ -1659,12 +1588,6 @@ describe("Interface Relationships", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - runtime: IntAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { actors: MovieActorsFieldInput runtime: Int! @@ -1964,11 +1887,6 @@ describe("Interface Relationships", () => { title: StringAggregateSelection! } - type ProductionAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input ProductionConnectInput { actors: [ProductionActorsConnectFieldInput!] } @@ -2073,47 +1991,26 @@ describe("Interface Relationships", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! episodes(limit: Int, offset: Int, sort: [EpisodeSort!], where: EpisodeWhere): [Episode!]! - episodesAggregate(where: EpisodeWhere): EpisodeAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"episodesConnection\\\\\\" instead\\") episodesConnection(after: String, first: Int, sort: [EpisodeSort!], where: EpisodeWhere): EpisodesConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\" instead\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } type Series implements Production { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): SeriesActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! episodeCount: Int! episodes(limit: Int, offset: Int, sort: [EpisodeSort!], where: EpisodeWhere): [Episode!]! - episodesAggregate(where: EpisodeWhere): SeriesEpisodeEpisodesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"episodesConnection\\\\\\" instead\\") episodesConnection(after: String, first: Int, sort: [SeriesEpisodesConnectionSort!], where: SeriesEpisodesConnectionWhere): SeriesEpisodesConnection! title: String! } - type SeriesActorActorsAggregationSelection { - count: Int! - edge: SeriesActorActorsEdgeAggregateSelection - node: SeriesActorActorsNodeAggregateSelection - } - - type SeriesActorActorsEdgeAggregateSelection { - screenTime: IntAggregateSelection! - } - - type SeriesActorActorsNodeAggregateSelection { - name: StringAggregateSelection! - } - input SeriesActorsAggregateInput { AND: [SeriesActorsAggregateInput!] NOT: SeriesActorsAggregateInput @@ -2222,12 +2119,6 @@ describe("Interface Relationships", () => { title: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - episodeCount: IntAggregateSelection! - title: StringAggregateSelection! - } - input SeriesConnectInput { actors: [SeriesActorsConnectFieldInput!] episodes: [SeriesEpisodesConnectFieldInput!] @@ -2271,11 +2162,6 @@ describe("Interface Relationships", () => { node: SeriesEpisodeEpisodesNodeAggregateSelection } - type SeriesEpisodeEpisodesAggregationSelection { - count: Int! - node: SeriesEpisodeEpisodesNodeAggregateSelection - } - type SeriesEpisodeEpisodesNodeAggregateSelection { runtime: IntAggregateSelection! } @@ -2693,7 +2579,6 @@ describe("Interface Relationships", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -2841,11 +2726,6 @@ describe("Interface Relationships", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { actedIn: [ActorActedInConnectFieldInput!] } @@ -2878,12 +2758,6 @@ describe("Interface Relationships", () => { node: ActorProductionActedInNodeAggregateSelection } - type ActorProductionActedInAggregationSelection { - count: Int! - edge: ActorProductionActedInEdgeAggregateSelection - node: ActorProductionActedInNodeAggregateSelection - } - type ActorProductionActedInEdgeAggregateSelection { screenTime: IntAggregateSelection! } @@ -3015,7 +2889,6 @@ describe("Interface Relationships", () => { type Episode { runtime: Int! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): EpisodeSeriesSeriesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [EpisodeSeriesConnectionSort!], where: EpisodeSeriesConnectionWhere): EpisodeSeriesConnection! } @@ -3028,11 +2901,6 @@ describe("Interface Relationships", () => { runtime: IntAggregateSelection! } - type EpisodeAggregateSelection { - count: Int! - runtime: IntAggregateSelection! - } - input EpisodeConnectInput { series: [EpisodeSeriesConnectFieldInput!] } @@ -3209,11 +3077,6 @@ describe("Interface Relationships", () => { node: EpisodeSeriesSeriesNodeAggregateSelection } - type EpisodeSeriesSeriesAggregationSelection { - count: Int! - node: EpisodeSeriesSeriesNodeAggregateSelection - } - type EpisodeSeriesSeriesNodeAggregateSelection { episodeCount: IntAggregateSelection! title: StringAggregateSelection! @@ -3338,26 +3201,11 @@ describe("Interface Relationships", () => { type Movie implements Production { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! runtime: Int! title: String! } - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsEdgeAggregateSelection { - screenTime: IntAggregateSelection! - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelection! - } - input MovieActorsAggregateInput { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput @@ -3466,12 +3314,6 @@ describe("Interface Relationships", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - runtime: IntAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { actors: MovieActorsFieldInput runtime: Int! @@ -3791,11 +3633,6 @@ describe("Interface Relationships", () => { title: StringAggregateSelection! } - type ProductionAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input ProductionConnectInput { actors: [ProductionActorsConnectFieldInput!] } @@ -3900,47 +3737,26 @@ describe("Interface Relationships", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! episodes(limit: Int, offset: Int, sort: [EpisodeSort!], where: EpisodeWhere): [Episode!]! - episodesAggregate(where: EpisodeWhere): EpisodeAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"episodesConnection\\\\\\" instead\\") episodesConnection(after: String, first: Int, sort: [EpisodeSort!], where: EpisodeWhere): EpisodesConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\" instead\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } type Series implements Production { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): SeriesActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ProductionActorsConnectionSort!], where: ProductionActorsConnectionWhere): ProductionActorsConnection! episodeCount: Int! episodes(limit: Int, offset: Int, sort: [EpisodeSort!], where: EpisodeWhere): [Episode!]! - episodesAggregate(where: EpisodeWhere): SeriesEpisodeEpisodesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"episodesConnection\\\\\\" instead\\") episodesConnection(after: String, first: Int, sort: [SeriesEpisodesConnectionSort!], where: SeriesEpisodesConnectionWhere): SeriesEpisodesConnection! title: String! } - type SeriesActorActorsAggregationSelection { - count: Int! - edge: SeriesActorActorsEdgeAggregateSelection - node: SeriesActorActorsNodeAggregateSelection - } - - type SeriesActorActorsEdgeAggregateSelection { - seasons: IntAggregateSelection! - } - - type SeriesActorActorsNodeAggregateSelection { - name: StringAggregateSelection! - } - input SeriesActorsAggregateInput { AND: [SeriesActorsAggregateInput!] NOT: SeriesActorsAggregateInput @@ -4049,12 +3865,6 @@ describe("Interface Relationships", () => { title: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - episodeCount: IntAggregateSelection! - title: StringAggregateSelection! - } - input SeriesConnectInput { actors: [SeriesActorsConnectFieldInput!] episodes: [SeriesEpisodesConnectFieldInput!] @@ -4098,11 +3908,6 @@ describe("Interface Relationships", () => { node: SeriesEpisodeEpisodesNodeAggregateSelection } - type SeriesEpisodeEpisodesAggregationSelection { - count: Int! - node: SeriesEpisodeEpisodesNodeAggregateSelection - } - type SeriesEpisodeEpisodesNodeAggregateSelection { runtime: IntAggregateSelection! } @@ -4604,11 +4409,6 @@ describe("Interface Relationships", () => { field1: StringAggregateSelection! } - type Interface1AggregateSelection { - count: Int! - field1: StringAggregateSelection! - } - input Interface1ConnectInput { interface2: [Interface1Interface2ConnectFieldInput!] } @@ -4849,11 +4649,6 @@ describe("Interface Relationships", () => { field2: StringAggregateSelection! } - type Interface2AggregateSelection { - count: Int! - field2: StringAggregateSelection! - } - input Interface2ConnectWhere { node: Interface2Where! } @@ -4944,25 +4739,18 @@ describe("Interface Relationships", () => { type Query { interface1s(limit: Int, offset: Int, sort: [Interface1Sort!], where: Interface1Where): [Interface1!]! - interface1sAggregate(where: Interface1Where): Interface1AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"interface1sConnection\\\\\\" instead\\") interface1sConnection(after: String, first: Int, sort: [Interface1Sort!], where: Interface1Where): Interface1sConnection! interface2s(limit: Int, offset: Int, sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! - interface2sAggregate(where: Interface2Where): Interface2AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"interface2sConnection\\\\\\" instead\\") interface2sConnection(after: String, first: Int, sort: [Interface2Sort!], where: Interface2Where): Interface2sConnection! type1Interface1s(limit: Int, offset: Int, sort: [Type1Interface1Sort!], where: Type1Interface1Where): [Type1Interface1!]! - type1Interface1sAggregate(where: Type1Interface1Where): Type1Interface1AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"type1Interface1sConnection\\\\\\" instead\\") type1Interface1sConnection(after: String, first: Int, sort: [Type1Interface1Sort!], where: Type1Interface1Where): Type1Interface1sConnection! type1Interface2s(limit: Int, offset: Int, sort: [Type1Interface2Sort!], where: Type1Interface2Where): [Type1Interface2!]! - type1Interface2sAggregate(where: Type1Interface2Where): Type1Interface2AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"type1Interface2sConnection\\\\\\" instead\\") type1Interface2sConnection(after: String, first: Int, sort: [Type1Interface2Sort!], where: Type1Interface2Where): Type1Interface2sConnection! type1s(limit: Int, offset: Int, sort: [Type1Sort!], where: Type1Where): [Type1!]! - type1sAggregate(where: Type1Where): Type1AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"type1sConnection\\\\\\" instead\\") type1sConnection(after: String, first: Int, sort: [Type1Sort!], where: Type1Where): Type1sConnection! type2Interface1s(limit: Int, offset: Int, sort: [Type2Interface1Sort!], where: Type2Interface1Where): [Type2Interface1!]! - type2Interface1sAggregate(where: Type2Interface1Where): Type2Interface1AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"type2Interface1sConnection\\\\\\" instead\\") type2Interface1sConnection(after: String, first: Int, sort: [Type2Interface1Sort!], where: Type2Interface1Where): Type2Interface1sConnection! type2Interface2s(limit: Int, offset: Int, sort: [Type2Interface2Sort!], where: Type2Interface2Where): [Type2Interface2!]! - type2Interface2sAggregate(where: Type2Interface2Where): Type2Interface2AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"type2Interface2sConnection\\\\\\" instead\\") type2Interface2sConnection(after: String, first: Int, sort: [Type2Interface2Sort!], where: Type2Interface2Where): Type2Interface2sConnection! } @@ -5003,7 +4791,6 @@ describe("Interface Relationships", () => { type Type1 { field1: String! interface1(limit: Int, offset: Int, sort: [Interface1Sort!], where: Interface1Where): [Interface1!]! - interface1Aggregate(where: Interface1Where): Type1Interface1Interface1AggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"interface1Connection\\\\\\" instead\\") interface1Connection(after: String, first: Int, sort: [Type1Interface1ConnectionSort!], where: Type1Interface1ConnectionWhere): Type1Interface1Connection! } @@ -5016,11 +4803,6 @@ describe("Interface Relationships", () => { field1: StringAggregateSelection! } - type Type1AggregateSelection { - count: Int! - field1: StringAggregateSelection! - } - input Type1CreateInput { field1: String! interface1: Type1Interface1FieldInput @@ -5038,7 +4820,6 @@ describe("Interface Relationships", () => { type Type1Interface1 implements Interface1 { field1: String! interface2(limit: Int, offset: Int, sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! - interface2Aggregate(where: Interface2Where): Type1Interface1Interface2Interface2AggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"interface2Connection\\\\\\" instead\\") interface2Connection(after: String, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } @@ -5064,11 +4845,6 @@ describe("Interface Relationships", () => { field1: StringAggregateSelection! } - type Type1Interface1AggregateSelection { - count: Int! - field1: StringAggregateSelection! - } - input Type1Interface1ConnectFieldInput { connect: Interface1ConnectInput where: Interface1ConnectWhere @@ -5161,11 +4937,6 @@ describe("Interface Relationships", () => { node: Type1Interface1Interface1NodeAggregateSelection } - type Type1Interface1Interface1AggregationSelection { - count: Int! - node: Type1Interface1Interface1NodeAggregateSelection - } - type Type1Interface1Interface1NodeAggregateSelection { field1: StringAggregateSelection! } @@ -5235,15 +5006,6 @@ describe("Interface Relationships", () => { create: [Type1Interface1Interface2CreateFieldInput!] } - type Type1Interface1Interface2Interface2AggregationSelection { - count: Int! - node: Type1Interface1Interface2Interface2NodeAggregateSelection - } - - type Type1Interface1Interface2Interface2NodeAggregateSelection { - field2: StringAggregateSelection! - } - input Type1Interface1Interface2NodeAggregationWhereInput { AND: [Type1Interface1Interface2NodeAggregationWhereInput!] NOT: Type1Interface1Interface2NodeAggregationWhereInput @@ -5399,11 +5161,6 @@ describe("Interface Relationships", () => { field2: StringAggregateSelection! } - type Type1Interface2AggregateSelection { - count: Int! - field2: StringAggregateSelection! - } - input Type1Interface2CreateInput { field2: String! } @@ -5506,7 +5263,6 @@ describe("Interface Relationships", () => { type Type2Interface1 implements Interface1 { field1: String! interface2(limit: Int, offset: Int, sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! - interface2Aggregate(where: Interface2Where): Type2Interface1Interface2Interface2AggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"interface2Connection\\\\\\" instead\\") interface2Connection(after: String, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } @@ -5519,11 +5275,6 @@ describe("Interface Relationships", () => { field1: StringAggregateSelection! } - type Type2Interface1AggregateSelection { - count: Int! - field1: StringAggregateSelection! - } - input Type2Interface1CreateInput { field1: String! interface2: Type2Interface1Interface2FieldInput @@ -5603,15 +5354,6 @@ describe("Interface Relationships", () => { create: [Type2Interface1Interface2CreateFieldInput!] } - type Type2Interface1Interface2Interface2AggregationSelection { - count: Int! - node: Type2Interface1Interface2Interface2NodeAggregateSelection - } - - type Type2Interface1Interface2Interface2NodeAggregateSelection { - field2: StringAggregateSelection! - } - input Type2Interface1Interface2NodeAggregationWhereInput { AND: [Type2Interface1Interface2NodeAggregationWhereInput!] NOT: Type2Interface1Interface2NodeAggregationWhereInput @@ -5727,11 +5469,6 @@ describe("Interface Relationships", () => { field2: StringAggregateSelection! } - type Type2Interface2AggregateSelection { - count: Int! - field2: StringAggregateSelection! - } - input Type2Interface2CreateInput { field2: String! } @@ -5927,13 +5664,6 @@ describe("Interface Relationships", () => { lte: Float } - type IntAggregateSelection { - average: Float - max: Int - min: Int - sum: Int - } - \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" input IntScalarAggregationFilters { average: FloatScalarFilters @@ -5974,11 +5704,6 @@ describe("Interface Relationships", () => { field1: StringAggregateSelection! } - type Interface1AggregateSelection { - count: Int! - field1: StringAggregateSelection! - } - input Interface1ConnectInput { interface2: [Interface1Interface2ConnectFieldInput!] } @@ -6274,11 +5999,6 @@ describe("Interface Relationships", () => { field2: StringAggregateSelection! } - type Interface2AggregateSelection { - count: Int! - field2: StringAggregateSelection! - } - input Interface2ConnectWhere { node: Interface2Where! } @@ -6433,25 +6153,18 @@ describe("Interface Relationships", () => { type Query { interface1s(limit: Int, offset: Int, sort: [Interface1Sort!], where: Interface1Where): [Interface1!]! - interface1sAggregate(where: Interface1Where): Interface1AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"interface1sConnection\\\\\\" instead\\") interface1sConnection(after: String, first: Int, sort: [Interface1Sort!], where: Interface1Where): Interface1sConnection! interface2s(limit: Int, offset: Int, sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! - interface2sAggregate(where: Interface2Where): Interface2AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"interface2sConnection\\\\\\" instead\\") interface2sConnection(after: String, first: Int, sort: [Interface2Sort!], where: Interface2Where): Interface2sConnection! type1Interface1s(limit: Int, offset: Int, sort: [Type1Interface1Sort!], where: Type1Interface1Where): [Type1Interface1!]! - type1Interface1sAggregate(where: Type1Interface1Where): Type1Interface1AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"type1Interface1sConnection\\\\\\" instead\\") type1Interface1sConnection(after: String, first: Int, sort: [Type1Interface1Sort!], where: Type1Interface1Where): Type1Interface1sConnection! type1Interface2s(limit: Int, offset: Int, sort: [Type1Interface2Sort!], where: Type1Interface2Where): [Type1Interface2!]! - type1Interface2sAggregate(where: Type1Interface2Where): Type1Interface2AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"type1Interface2sConnection\\\\\\" instead\\") type1Interface2sConnection(after: String, first: Int, sort: [Type1Interface2Sort!], where: Type1Interface2Where): Type1Interface2sConnection! type1s(limit: Int, offset: Int, sort: [Type1Sort!], where: Type1Where): [Type1!]! - type1sAggregate(where: Type1Where): Type1AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"type1sConnection\\\\\\" instead\\") type1sConnection(after: String, first: Int, sort: [Type1Sort!], where: Type1Where): Type1sConnection! type2Interface1s(limit: Int, offset: Int, sort: [Type2Interface1Sort!], where: Type2Interface1Where): [Type2Interface1!]! - type2Interface1sAggregate(where: Type2Interface1Where): Type2Interface1AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"type2Interface1sConnection\\\\\\" instead\\") type2Interface1sConnection(after: String, first: Int, sort: [Type2Interface1Sort!], where: Type2Interface1Where): Type2Interface1sConnection! type2Interface2s(limit: Int, offset: Int, sort: [Type2Interface2Sort!], where: Type2Interface2Where): [Type2Interface2!]! - type2Interface2sAggregate(where: Type2Interface2Where): Type2Interface2AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"type2Interface2sConnection\\\\\\" instead\\") type2Interface2sConnection(after: String, first: Int, sort: [Type2Interface2Sort!], where: Type2Interface2Where): Type2Interface2sConnection! } @@ -6492,7 +6205,6 @@ describe("Interface Relationships", () => { type Type1 { field1: String! interface1(limit: Int, offset: Int, sort: [Interface1Sort!], where: Interface1Where): [Interface1!]! - interface1Aggregate(where: Interface1Where): Type1Interface1Interface1AggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"interface1Connection\\\\\\" instead\\") interface1Connection(after: String, first: Int, sort: [Type1Interface1ConnectionSort!], where: Type1Interface1ConnectionWhere): Type1Interface1Connection! } @@ -6505,11 +6217,6 @@ describe("Interface Relationships", () => { field1: StringAggregateSelection! } - type Type1AggregateSelection { - count: Int! - field1: StringAggregateSelection! - } - input Type1CreateInput { field1: String! interface1: Type1Interface1FieldInput @@ -6527,7 +6234,6 @@ describe("Interface Relationships", () => { type Type1Interface1 implements Interface1 { field1: String! interface2(limit: Int, offset: Int, sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! - interface2Aggregate(where: Interface2Where): Type1Interface1Interface2Interface2AggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"interface2Connection\\\\\\" instead\\") interface2Connection(after: String, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } @@ -6553,11 +6259,6 @@ describe("Interface Relationships", () => { field1: StringAggregateSelection! } - type Type1Interface1AggregateSelection { - count: Int! - field1: StringAggregateSelection! - } - input Type1Interface1ConnectFieldInput { connect: Interface1ConnectInput where: Interface1ConnectWhere @@ -6650,11 +6351,6 @@ describe("Interface Relationships", () => { node: Type1Interface1Interface1NodeAggregateSelection } - type Type1Interface1Interface1AggregationSelection { - count: Int! - node: Type1Interface1Interface1NodeAggregateSelection - } - type Type1Interface1Interface1NodeAggregateSelection { field1: StringAggregateSelection! } @@ -6728,20 +6424,6 @@ describe("Interface Relationships", () => { create: [Type1Interface1Interface2CreateFieldInput!] } - type Type1Interface1Interface2Interface2AggregationSelection { - count: Int! - edge: Type1Interface1Interface2Interface2EdgeAggregateSelection - node: Type1Interface1Interface2Interface2NodeAggregateSelection - } - - type Type1Interface1Interface2Interface2EdgeAggregateSelection { - propsField: IntAggregateSelection! - } - - type Type1Interface1Interface2Interface2NodeAggregateSelection { - field2: StringAggregateSelection! - } - input Type1Interface1Interface2NodeAggregationWhereInput { AND: [Type1Interface1Interface2NodeAggregationWhereInput!] NOT: Type1Interface1Interface2NodeAggregationWhereInput @@ -6898,11 +6580,6 @@ describe("Interface Relationships", () => { field2: StringAggregateSelection! } - type Type1Interface2AggregateSelection { - count: Int! - field2: StringAggregateSelection! - } - input Type1Interface2CreateInput { field2: String! } @@ -7005,7 +6682,6 @@ describe("Interface Relationships", () => { type Type2Interface1 implements Interface1 { field1: String! interface2(limit: Int, offset: Int, sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! - interface2Aggregate(where: Interface2Where): Type2Interface1Interface2Interface2AggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"interface2Connection\\\\\\" instead\\") interface2Connection(after: String, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } @@ -7018,11 +6694,6 @@ describe("Interface Relationships", () => { field1: StringAggregateSelection! } - type Type2Interface1AggregateSelection { - count: Int! - field1: StringAggregateSelection! - } - input Type2Interface1CreateInput { field1: String! interface2: Type2Interface1Interface2FieldInput @@ -7106,20 +6777,6 @@ describe("Interface Relationships", () => { create: [Type2Interface1Interface2CreateFieldInput!] } - type Type2Interface1Interface2Interface2AggregationSelection { - count: Int! - edge: Type2Interface1Interface2Interface2EdgeAggregateSelection - node: Type2Interface1Interface2Interface2NodeAggregateSelection - } - - type Type2Interface1Interface2Interface2EdgeAggregateSelection { - propsField: IntAggregateSelection! - } - - type Type2Interface1Interface2Interface2NodeAggregateSelection { - field2: StringAggregateSelection! - } - input Type2Interface1Interface2NodeAggregationWhereInput { AND: [Type2Interface1Interface2NodeAggregationWhereInput!] NOT: Type2Interface1Interface2NodeAggregationWhereInput @@ -7236,11 +6893,6 @@ describe("Interface Relationships", () => { field2: StringAggregateSelection! } - type Type2Interface2AggregateSelection { - count: Int! - field2: StringAggregateSelection! - } - input Type2Interface2CreateInput { field2: String! } @@ -7442,13 +7094,6 @@ describe("Interface Relationships", () => { lte: Float } - type IntAggregateSelection { - average: Float - max: Int - min: Int - sum: Int - } - \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" input IntScalarAggregationFilters { average: FloatScalarFilters @@ -7489,11 +7134,6 @@ describe("Interface Relationships", () => { field1: StringAggregateSelection! } - type Interface1AggregateSelection { - count: Int! - field1: StringAggregateSelection! - } - input Interface1ConnectInput { interface2: [Interface1Interface2ConnectFieldInput!] } @@ -7809,11 +7449,6 @@ describe("Interface Relationships", () => { field2: StringAggregateSelection! } - type Interface2AggregateSelection { - count: Int! - field2: StringAggregateSelection! - } - input Interface2ConnectWhere { node: Interface2Where! } @@ -7904,25 +7539,18 @@ describe("Interface Relationships", () => { type Query { interface1s(limit: Int, offset: Int, sort: [Interface1Sort!], where: Interface1Where): [Interface1!]! - interface1sAggregate(where: Interface1Where): Interface1AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"interface1sConnection\\\\\\" instead\\") interface1sConnection(after: String, first: Int, sort: [Interface1Sort!], where: Interface1Where): Interface1sConnection! interface2s(limit: Int, offset: Int, sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! - interface2sAggregate(where: Interface2Where): Interface2AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"interface2sConnection\\\\\\" instead\\") interface2sConnection(after: String, first: Int, sort: [Interface2Sort!], where: Interface2Where): Interface2sConnection! type1Interface1s(limit: Int, offset: Int, sort: [Type1Interface1Sort!], where: Type1Interface1Where): [Type1Interface1!]! - type1Interface1sAggregate(where: Type1Interface1Where): Type1Interface1AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"type1Interface1sConnection\\\\\\" instead\\") type1Interface1sConnection(after: String, first: Int, sort: [Type1Interface1Sort!], where: Type1Interface1Where): Type1Interface1sConnection! type1Interface2s(limit: Int, offset: Int, sort: [Type1Interface2Sort!], where: Type1Interface2Where): [Type1Interface2!]! - type1Interface2sAggregate(where: Type1Interface2Where): Type1Interface2AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"type1Interface2sConnection\\\\\\" instead\\") type1Interface2sConnection(after: String, first: Int, sort: [Type1Interface2Sort!], where: Type1Interface2Where): Type1Interface2sConnection! type1s(limit: Int, offset: Int, sort: [Type1Sort!], where: Type1Where): [Type1!]! - type1sAggregate(where: Type1Where): Type1AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"type1sConnection\\\\\\" instead\\") type1sConnection(after: String, first: Int, sort: [Type1Sort!], where: Type1Where): Type1sConnection! type2Interface1s(limit: Int, offset: Int, sort: [Type2Interface1Sort!], where: Type2Interface1Where): [Type2Interface1!]! - type2Interface1sAggregate(where: Type2Interface1Where): Type2Interface1AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"type2Interface1sConnection\\\\\\" instead\\") type2Interface1sConnection(after: String, first: Int, sort: [Type2Interface1Sort!], where: Type2Interface1Where): Type2Interface1sConnection! type2Interface2s(limit: Int, offset: Int, sort: [Type2Interface2Sort!], where: Type2Interface2Where): [Type2Interface2!]! - type2Interface2sAggregate(where: Type2Interface2Where): Type2Interface2AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"type2Interface2sConnection\\\\\\" instead\\") type2Interface2sConnection(after: String, first: Int, sort: [Type2Interface2Sort!], where: Type2Interface2Where): Type2Interface2sConnection! } @@ -7963,7 +7591,6 @@ describe("Interface Relationships", () => { type Type1 { field1: String! interface1(limit: Int, offset: Int, sort: [Interface1Sort!], where: Interface1Where): [Interface1!]! - interface1Aggregate(where: Interface1Where): Type1Interface1Interface1AggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"interface1Connection\\\\\\" instead\\") interface1Connection(after: String, first: Int, sort: [Type1Interface1ConnectionSort!], where: Type1Interface1ConnectionWhere): Type1Interface1Connection! } @@ -7976,11 +7603,6 @@ describe("Interface Relationships", () => { field1: StringAggregateSelection! } - type Type1AggregateSelection { - count: Int! - field1: StringAggregateSelection! - } - input Type1CreateInput { field1: String! interface1: Type1Interface1FieldInput @@ -7998,7 +7620,6 @@ describe("Interface Relationships", () => { type Type1Interface1 implements Interface1 { field1: String! interface2(limit: Int, offset: Int, sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! - interface2Aggregate(where: Interface2Where): Type1Interface1Interface2Interface2AggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"interface2Connection\\\\\\" instead\\") interface2Connection(after: String, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } @@ -8024,11 +7645,6 @@ describe("Interface Relationships", () => { field1: StringAggregateSelection! } - type Type1Interface1AggregateSelection { - count: Int! - field1: StringAggregateSelection! - } - input Type1Interface1ConnectFieldInput { connect: Interface1ConnectInput where: Interface1ConnectWhere @@ -8121,11 +7737,6 @@ describe("Interface Relationships", () => { node: Type1Interface1Interface1NodeAggregateSelection } - type Type1Interface1Interface1AggregationSelection { - count: Int! - node: Type1Interface1Interface1NodeAggregateSelection - } - type Type1Interface1Interface1NodeAggregateSelection { field1: StringAggregateSelection! } @@ -8199,20 +7810,6 @@ describe("Interface Relationships", () => { create: [Type1Interface1Interface2CreateFieldInput!] } - type Type1Interface1Interface2Interface2AggregationSelection { - count: Int! - edge: Type1Interface1Interface2Interface2EdgeAggregateSelection - node: Type1Interface1Interface2Interface2NodeAggregateSelection - } - - type Type1Interface1Interface2Interface2EdgeAggregateSelection { - type1Field: IntAggregateSelection! - } - - type Type1Interface1Interface2Interface2NodeAggregateSelection { - field2: StringAggregateSelection! - } - input Type1Interface1Interface2NodeAggregationWhereInput { AND: [Type1Interface1Interface2NodeAggregationWhereInput!] NOT: Type1Interface1Interface2NodeAggregationWhereInput @@ -8369,11 +7966,6 @@ describe("Interface Relationships", () => { field2: StringAggregateSelection! } - type Type1Interface2AggregateSelection { - count: Int! - field2: StringAggregateSelection! - } - input Type1Interface2CreateInput { field2: String! } @@ -8539,7 +8131,6 @@ describe("Interface Relationships", () => { type Type2Interface1 implements Interface1 { field1: String! interface2(limit: Int, offset: Int, sort: [Interface2Sort!], where: Interface2Where): [Interface2!]! - interface2Aggregate(where: Interface2Where): Type2Interface1Interface2Interface2AggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"interface2Connection\\\\\\" instead\\") interface2Connection(after: String, first: Int, sort: [Interface1Interface2ConnectionSort!], where: Interface1Interface2ConnectionWhere): Interface1Interface2Connection! } @@ -8552,11 +8143,6 @@ describe("Interface Relationships", () => { field1: StringAggregateSelection! } - type Type2Interface1AggregateSelection { - count: Int! - field1: StringAggregateSelection! - } - input Type2Interface1CreateInput { field1: String! interface2: Type2Interface1Interface2FieldInput @@ -8640,20 +8226,6 @@ describe("Interface Relationships", () => { create: [Type2Interface1Interface2CreateFieldInput!] } - type Type2Interface1Interface2Interface2AggregationSelection { - count: Int! - edge: Type2Interface1Interface2Interface2EdgeAggregateSelection - node: Type2Interface1Interface2Interface2NodeAggregateSelection - } - - type Type2Interface1Interface2Interface2EdgeAggregateSelection { - type2Field: IntAggregateSelection! - } - - type Type2Interface1Interface2Interface2NodeAggregateSelection { - field2: StringAggregateSelection! - } - input Type2Interface1Interface2NodeAggregationWhereInput { AND: [Type2Interface1Interface2NodeAggregationWhereInput!] NOT: Type2Interface1Interface2NodeAggregationWhereInput @@ -8770,11 +8342,6 @@ describe("Interface Relationships", () => { field2: StringAggregateSelection! } - type Type2Interface2AggregateSelection { - count: Int! - field2: StringAggregateSelection! - } - input Type2Interface2CreateInput { field2: String! } @@ -8961,11 +8528,9 @@ describe("Interface Relationships", () => { type Comment implements Content { content: String creator(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - creatorAggregate(where: UserWhere): CommentUserCreatorAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"creatorConnection\\\\\\" instead\\") creatorConnection(after: String, first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! id: ID post(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! - postAggregate(where: PostWhere): CommentPostPostAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"postConnection\\\\\\" instead\\") postConnection(after: String, first: Int, sort: [CommentPostConnectionSort!], where: CommentPostConnectionWhere): CommentPostConnection! } @@ -8978,11 +8543,6 @@ describe("Interface Relationships", () => { content: StringAggregateSelection! } - type CommentAggregateSelection { - content: StringAggregateSelection! - count: Int! - } - input CommentConnectInput { creator: [CommentCreatorConnectFieldInput!] post: [CommentPostConnectFieldInput!] @@ -9220,11 +8780,6 @@ describe("Interface Relationships", () => { node: CommentPostPostNodeAggregateSelection } - type CommentPostPostAggregationSelection { - count: Int! - node: CommentPostPostNodeAggregateSelection - } - type CommentPostPostNodeAggregateSelection { content: StringAggregateSelection! } @@ -9275,15 +8830,6 @@ describe("Interface Relationships", () => { post: [CommentPostUpdateFieldInput!] } - type CommentUserCreatorAggregationSelection { - count: Int! - node: CommentUserCreatorNodeAggregateSelection - } - - type CommentUserCreatorNodeAggregateSelection { - name: StringAggregateSelection! - } - input CommentWhere { AND: [CommentWhere!] NOT: CommentWhere @@ -9384,11 +8930,6 @@ describe("Interface Relationships", () => { content: StringAggregateSelection! } - type ContentAggregateSelection { - content: StringAggregateSelection! - count: Int! - } - input ContentConnectInput { creator: [ContentCreatorConnectFieldInput!] } @@ -9716,11 +9257,9 @@ describe("Interface Relationships", () => { type Post implements Content { comments(limit: Int, offset: Int, sort: [CommentSort!], where: CommentWhere): [Comment!]! - commentsAggregate(where: CommentWhere): PostCommentCommentsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"commentsConnection\\\\\\" instead\\") commentsConnection(after: String, first: Int, sort: [PostCommentsConnectionSort!], where: PostCommentsConnectionWhere): PostCommentsConnection! content: String creator(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - creatorAggregate(where: UserWhere): PostUserCreatorAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"creatorConnection\\\\\\" instead\\") creatorConnection(after: String, first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! id: ID } @@ -9734,21 +9273,11 @@ describe("Interface Relationships", () => { content: StringAggregateSelection! } - type PostAggregateSelection { - content: StringAggregateSelection! - count: Int! - } - type PostCommentCommentsAggregateSelection { count: CountConnection! node: PostCommentCommentsNodeAggregateSelection } - type PostCommentCommentsAggregationSelection { - count: Int! - node: PostCommentCommentsNodeAggregateSelection - } - type PostCommentCommentsNodeAggregateSelection { content: StringAggregateSelection! } @@ -10029,15 +9558,6 @@ describe("Interface Relationships", () => { id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") } - type PostUserCreatorAggregationSelection { - count: Int! - node: PostUserCreatorNodeAggregateSelection - } - - type PostUserCreatorNodeAggregateSelection { - name: StringAggregateSelection! - } - input PostWhere { AND: [PostWhere!] NOT: PostWhere @@ -10119,16 +9639,12 @@ describe("Interface Relationships", () => { type Query { comments(limit: Int, offset: Int, sort: [CommentSort!], where: CommentWhere): [Comment!]! - commentsAggregate(where: CommentWhere): CommentAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"commentsConnection\\\\\\" instead\\") commentsConnection(after: String, first: Int, sort: [CommentSort!], where: CommentWhere): CommentsConnection! contents(limit: Int, offset: Int, sort: [ContentSort!], where: ContentWhere): [Content!]! - contentsAggregate(where: ContentWhere): ContentAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"contentsConnection\\\\\\" instead\\") contentsConnection(after: String, first: Int, sort: [ContentSort!], where: ContentWhere): ContentsConnection! posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\" instead\\") postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\" instead\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } @@ -10193,7 +9709,6 @@ describe("Interface Relationships", () => { type User { content(limit: Int, offset: Int, sort: [ContentSort!], where: ContentWhere): [Content!]! - contentAggregate(where: ContentWhere): UserContentContentAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"contentConnection\\\\\\" instead\\") contentConnection(after: String, first: Int, sort: [UserContentConnectionSort!], where: UserContentConnectionWhere): UserContentConnection! id: ID name: String @@ -10208,11 +9723,6 @@ describe("Interface Relationships", () => { name: StringAggregateSelection! } - type UserAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input UserConnectInput { content: [UserContentConnectFieldInput!] } @@ -10291,11 +9801,6 @@ describe("Interface Relationships", () => { node: UserContentContentNodeAggregateSelection } - type UserContentContentAggregationSelection { - count: Int! - node: UserContentContentNodeAggregateSelection - } - type UserContentContentNodeAggregateSelection { content: StringAggregateSelection! } @@ -10572,7 +10077,6 @@ describe("Interface Relationships", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [ShowSort!], where: ShowWhere): [Show!]! - actedInAggregate(where: ShowWhere): ActorShowActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -10720,11 +10224,6 @@ describe("Interface Relationships", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { actedIn: [ActorActedInConnectFieldInput!] } @@ -10768,12 +10267,6 @@ describe("Interface Relationships", () => { node: ActorShowActedInNodeAggregateSelection } - type ActorShowActedInAggregationSelection { - count: Int! - edge: ActorShowActedInEdgeAggregateSelection - node: ActorShowActedInNodeAggregateSelection - } - type ActorShowActedInEdgeAggregateSelection { screenTime: IntAggregateSelection! } @@ -10930,26 +10423,11 @@ describe("Interface Relationships", () => { type Movie implements Production & Show { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ShowActorsConnectionSort!], where: ShowActorsConnectionWhere): ShowActorsConnection! runtime: Int! title: String! } - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsEdgeAggregateSelection { - screenTime: IntAggregateSelection! - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelection! - } - input MovieActorsAggregateInput { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput @@ -11056,12 +10534,6 @@ describe("Interface Relationships", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - runtime: IntAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { actors: MovieActorsFieldInput runtime: Int! @@ -11182,11 +10654,6 @@ describe("Interface Relationships", () => { title: StringAggregateSelection! } - type ProductionAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - type ProductionEdge { cursor: String! node: Production! @@ -11226,44 +10693,24 @@ describe("Interface Relationships", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\" instead\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! shows(limit: Int, offset: Int, sort: [ShowSort!], where: ShowWhere): [Show!]! - showsAggregate(where: ShowWhere): ShowAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"showsConnection\\\\\\" instead\\") showsConnection(after: String, first: Int, sort: [ShowSort!], where: ShowWhere): ShowsConnection! } type Series implements Production & Show { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): SeriesActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ShowActorsConnectionSort!], where: ShowActorsConnectionWhere): ShowActorsConnection! episodeCount: Int! title: String! } - type SeriesActorActorsAggregationSelection { - count: Int! - edge: SeriesActorActorsEdgeAggregateSelection - node: SeriesActorActorsNodeAggregateSelection - } - - type SeriesActorActorsEdgeAggregateSelection { - episodeNr: IntAggregateSelection! - } - - type SeriesActorActorsNodeAggregateSelection { - name: StringAggregateSelection! - } - input SeriesActorsAggregateInput { AND: [SeriesActorsAggregateInput!] NOT: SeriesActorsAggregateInput @@ -11370,12 +10817,6 @@ describe("Interface Relationships", () => { title: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - episodeCount: IntAggregateSelection! - title: StringAggregateSelection! - } - type SeriesConnection { aggregate: SeriesAggregate! edges: [SeriesEdge!]! @@ -11670,11 +11111,6 @@ describe("Interface Relationships", () => { title: StringAggregateSelection! } - type ShowAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input ShowConnectInput { actors: [ShowActorsConnectFieldInput!] } diff --git a/packages/graphql/tests/schema/interfaces.test.ts b/packages/graphql/tests/schema/interfaces.test.ts index 7a595e009f..f6aa74e95d 100644 --- a/packages/graphql/tests/schema/interfaces.test.ts +++ b/packages/graphql/tests/schema/interfaces.test.ts @@ -112,7 +112,6 @@ describe("Interfaces", () => { customQuery: [Movie] id: ID movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieNodeMoviesConnectionSort!], where: MovieNodeMoviesConnectionWhere): MovieNodeMoviesConnection! nodes: [MovieNode!] } @@ -121,10 +120,6 @@ describe("Interfaces", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieConnectInput { movies: [MovieMoviesConnectFieldInput!] } @@ -151,10 +146,6 @@ describe("Interfaces", () => { node: Movie! } - type MovieMovieMoviesAggregationSelection { - count: Int! - } - input MovieMoviesAggregateInput { AND: [MovieMoviesAggregateInput!] NOT: MovieMoviesAggregateInput @@ -235,10 +226,6 @@ describe("Interfaces", () => { count: Count! } - type MovieNodeAggregateSelection { - count: Int! - } - type MovieNodeEdge { cursor: String! node: MovieNode! @@ -467,10 +454,8 @@ describe("Interfaces", () => { type Query { movieNodes(limit: Int, offset: Int, sort: [MovieNodeSort!], where: MovieNodeWhere): [MovieNode!]! - movieNodesAggregate(where: MovieNodeWhere): MovieNodeAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"movieNodesConnection\\\\\\" instead\\") movieNodesConnection(after: String, first: Int, sort: [MovieNodeSort!], where: MovieNodeWhere): MovieNodesConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -591,7 +576,6 @@ describe("Interfaces", () => { customQuery: [Movie] id: ID movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieNodeMoviesConnectionSort!], where: MovieNodeMoviesConnectionWhere): MovieNodeMoviesConnection! nodes: [MovieNode!] } @@ -600,10 +584,6 @@ describe("Interfaces", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieConnectInput { movies: [MovieMoviesConnectFieldInput!] } @@ -630,10 +610,6 @@ describe("Interfaces", () => { node: Movie! } - type MovieMovieMoviesAggregationSelection { - count: Int! - } - input MovieMoviesAggregateInput { AND: [MovieMoviesAggregateInput!] NOT: MovieMoviesAggregateInput @@ -714,10 +690,6 @@ describe("Interfaces", () => { count: Count! } - type MovieNodeAggregateSelection { - count: Int! - } - type MovieNodeEdge { cursor: String! node: MovieNode! @@ -946,10 +918,8 @@ describe("Interfaces", () => { type Query { movieNodes(limit: Int, offset: Int, sort: [MovieNodeSort!], where: MovieNodeWhere): [MovieNode!]! - movieNodesAggregate(where: MovieNodeWhere): MovieNodeAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"movieNodesConnection\\\\\\" instead\\") movieNodesConnection(after: String, first: Int, sort: [MovieNodeSort!], where: MovieNodeWhere): MovieNodesConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 13920c702a..f4b75aee0f 100644 --- a/packages/graphql/tests/schema/issues/1038.test.ts +++ b/packages/graphql/tests/schema/issues/1038.test.ts @@ -59,12 +59,6 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { code: StringAggregateSelection! } - type AWSAccountAggregateSelection { - accountName: StringAggregateSelection! - code: StringAggregateSelection! - count: Int! - } - input AWSAccountCreateInput { accountName: String code: String @@ -152,12 +146,6 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { zoneType: StringAggregateSelection! } - type DNSZoneAggregateSelection { - awsId: StringAggregateSelection! - count: Int! - zoneType: StringAggregateSelection! - } - input DNSZoneCreateInput { awsId: String zoneType: String @@ -235,10 +223,8 @@ describe("https://github.com/neo4j/graphql/issues/1038", () => { type Query { awsAccounts(limit: Int, offset: Int, sort: [AWSAccountSort!], where: AWSAccountWhere): [AWSAccount!]! - awsAccountsAggregate(where: AWSAccountWhere): AWSAccountAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"awsAccountsConnection\\\\\\" instead\\") awsAccountsConnection(after: String, first: Int, sort: [AWSAccountSort!], where: AWSAccountWhere): AwsAccountsConnection! dnsZones(limit: Int, offset: Int, sort: [DNSZoneSort!], where: DNSZoneWhere): [DNSZone!]! - dnsZonesAggregate(where: DNSZoneWhere): DNSZoneAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"dnsZonesConnection\\\\\\" instead\\") 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 01a6919d12..27de08f779 100644 --- a/packages/graphql/tests/schema/issues/1182.test.ts +++ b/packages/graphql/tests/schema/issues/1182.test.ts @@ -64,12 +64,6 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - dob: DateTimeAggregateSelection! - name: StringAggregateSelection! - } - input ActorConnectWhere { node: ActorWhere! } @@ -255,7 +249,6 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID! title: String! @@ -266,11 +259,6 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { dob: DateTimeAggregateSelection! name: StringAggregateSelection! @@ -417,11 +405,6 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieCreateInput { actors: MovieActorsFieldInput title: String! @@ -568,10 +551,8 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 b7f96fa772..bbfcf16aaa 100644 --- a/packages/graphql/tests/schema/issues/1575.test.ts +++ b/packages/graphql/tests/schema/issues/1575.test.ts @@ -72,10 +72,6 @@ describe("https://github.com/neo4j/graphql/issues/1575", () => { count: Count! } - type FooAggregateSelection { - count: Int! - } - input FooCreateInput { geo_point: PointInput point: PointInput @@ -193,7 +189,6 @@ describe("https://github.com/neo4j/graphql/issues/1575", () => { type Query { foos(limit: Int, offset: Int, sort: [FooSort!], where: FooWhere): [Foo!]! - foosAggregate(where: FooWhere): FooAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"foosConnection\\\\\\" instead\\") 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 9a4611226f..76839eb441 100644 --- a/packages/graphql/tests/schema/issues/1614.test.ts +++ b/packages/graphql/tests/schema/issues/1614.test.ts @@ -87,7 +87,6 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { type CrewMember { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): CrewMemberMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [CrewMemberMoviesConnectionSort!], where: CrewMemberMoviesConnectionWhere): CrewMemberMoviesConnection! } @@ -95,10 +94,6 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { count: Count! } - type CrewMemberAggregateSelection { - count: Int! - } - input CrewMemberCreateInput { movies: CrewMemberMoviesFieldInput } @@ -117,11 +112,6 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { node: CrewMemberMovieMoviesNodeAggregateSelection } - type CrewMemberMovieMoviesAggregationSelection { - count: Int! - node: CrewMemberMovieMoviesNodeAggregateSelection - } - type CrewMemberMovieMoviesNodeAggregateSelection { name: StringAggregateSelection! } @@ -387,11 +377,6 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { name: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input MovieConnectWhere { node: MovieWhere! } @@ -466,10 +451,8 @@ describe("https://github.com/neo4j/graphql/issues/1614", () => { type Query { crewMembers(limit: Int, offset: Int, where: CrewMemberWhere): [CrewMember!]! - crewMembersAggregate(where: CrewMemberWhere): CrewMemberAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"crewMembersConnection\\\\\\" instead\\") crewMembersConnection(after: String, first: Int, where: CrewMemberWhere): CrewMembersConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 64a97b6b19..52b236a561 100644 --- a/packages/graphql/tests/schema/issues/162.test.ts +++ b/packages/graphql/tests/schema/issues/162.test.ts @@ -171,13 +171,10 @@ describe("162", () => { type Query { tigerJawLevel2Part1s(limit: Int, offset: Int, sort: [TigerJawLevel2Part1Sort!], where: TigerJawLevel2Part1Where): [TigerJawLevel2Part1!]! - tigerJawLevel2Part1sAggregate(where: TigerJawLevel2Part1Where): TigerJawLevel2Part1AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"tigerJawLevel2Part1sConnection\\\\\\" instead\\") tigerJawLevel2Part1sConnection(after: String, first: Int, sort: [TigerJawLevel2Part1Sort!], where: TigerJawLevel2Part1Where): TigerJawLevel2Part1sConnection! tigerJawLevel2s(limit: Int, offset: Int, sort: [TigerJawLevel2Sort!], where: TigerJawLevel2Where): [TigerJawLevel2!]! - tigerJawLevel2sAggregate(where: TigerJawLevel2Where): TigerJawLevel2AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"tigerJawLevel2sConnection\\\\\\" instead\\") tigerJawLevel2sConnection(after: String, first: Int, sort: [TigerJawLevel2Sort!], where: TigerJawLevel2Where): TigerJawLevel2sConnection! tigers(limit: Int, offset: Int, sort: [TigerSort!], where: TigerWhere): [Tiger!]! - tigersAggregate(where: TigerWhere): TigerAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"tigersConnection\\\\\\" instead\\") tigersConnection(after: String, first: Int, sort: [TigerSort!], where: TigerWhere): TigersConnection! } @@ -202,11 +199,6 @@ describe("162", () => { x: IntAggregateSelection! } - type TigerAggregateSelection { - count: Int! - x: IntAggregateSelection! - } - input TigerConnectWhere { node: TigerWhere! } @@ -223,7 +215,6 @@ describe("162", () => { type TigerJawLevel2 { id: ID part1(limit: Int, offset: Int, sort: [TigerJawLevel2Part1Sort!], where: TigerJawLevel2Part1Where): [TigerJawLevel2Part1!]! - part1Aggregate(where: TigerJawLevel2Part1Where): TigerJawLevel2TigerJawLevel2Part1Part1AggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"part1Connection\\\\\\" instead\\") part1Connection(after: String, first: Int, sort: [TigerJawLevel2Part1ConnectionSort!], where: TigerJawLevel2Part1ConnectionWhere): TigerJawLevel2Part1Connection! } @@ -231,10 +222,6 @@ describe("162", () => { count: Count! } - type TigerJawLevel2AggregateSelection { - count: Int! - } - input TigerJawLevel2CreateInput { id: ID part1: TigerJawLevel2Part1FieldInput @@ -252,7 +239,6 @@ describe("162", () => { type TigerJawLevel2Part1 { id: ID tiger(limit: Int, offset: Int, sort: [TigerSort!], where: TigerWhere): [Tiger!]! - tigerAggregate(where: TigerWhere): TigerJawLevel2Part1TigerTigerAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"tigerConnection\\\\\\" instead\\") tigerConnection(after: String, first: Int, sort: [TigerJawLevel2Part1TigerConnectionSort!], where: TigerJawLevel2Part1TigerConnectionWhere): TigerJawLevel2Part1TigerConnection! } @@ -272,10 +258,6 @@ describe("162", () => { count_LTE: Int } - type TigerJawLevel2Part1AggregateSelection { - count: Int! - } - input TigerJawLevel2Part1ConnectFieldInput { connect: [TigerJawLevel2Part1ConnectInput!] where: TigerJawLevel2Part1ConnectWhere @@ -525,11 +507,6 @@ describe("162", () => { node: TigerJawLevel2Part1TigerTigerNodeAggregateSelection } - type TigerJawLevel2Part1TigerTigerAggregationSelection { - count: Int! - node: TigerJawLevel2Part1TigerTigerNodeAggregateSelection - } - type TigerJawLevel2Part1TigerTigerNodeAggregateSelection { x: IntAggregateSelection! } @@ -631,10 +608,6 @@ describe("162", () => { count: CountConnection! } - type TigerJawLevel2TigerJawLevel2Part1Part1AggregationSelection { - count: Int! - } - input TigerJawLevel2UpdateInput { id: IDScalarMutations id_SET: ID @deprecated(reason: \\"Please use the generic mutation 'id: { set: ... } }' instead.\\") diff --git a/packages/graphql/tests/schema/issues/200.test.ts b/packages/graphql/tests/schema/issues/200.test.ts index e491f59a6e..26fd5747de 100644 --- a/packages/graphql/tests/schema/issues/200.test.ts +++ b/packages/graphql/tests/schema/issues/200.test.ts @@ -65,12 +65,6 @@ describe("200", () => { name: StringAggregateSelection! } - type CategoryAggregateSelection { - count: Int! - description: StringAggregateSelection! - name: StringAggregateSelection! - } - input CategoryCreateInput { description: String! = \\"\\" exampleImageLocations: [String!] @@ -186,7 +180,6 @@ describe("200", () => { type Query { categories(limit: Int, offset: Int, sort: [CategorySort!], where: CategoryWhere): [Category!]! - categoriesAggregate(where: CategoryWhere): CategoryAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"categoriesConnection\\\\\\" instead\\") 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 b54551d066..5e2d39dc9e 100644 --- a/packages/graphql/tests/schema/issues/2187.test.ts +++ b/packages/graphql/tests/schema/issues/2187.test.ts @@ -124,7 +124,6 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { type Genre { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): GenreMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [GenreMoviesConnectionSort!], where: GenreMoviesConnectionWhere): GenreMoviesConnection! name: String } @@ -138,11 +137,6 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { name: StringAggregateSelection! } - type GenreAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input GenreConnectInput { movies: [GenreMoviesConnectFieldInput!] } @@ -174,11 +168,6 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { node: GenreMovieMoviesNodeAggregateSelection } - type GenreMovieMoviesAggregationSelection { - count: Int! - node: GenreMovieMoviesNodeAggregateSelection - } - type GenreMovieMoviesNodeAggregateSelection { imdbRating: FloatAggregateSelection! title: StringAggregateSelection! @@ -455,7 +444,6 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { type Movie { genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! @deprecated(reason: \\"Do not use genre\\") - genresAggregate(where: GenreWhere): MovieGenreGenresAggregationSelection @deprecated(reason: \\"Do not use genre\\") genresConnection(after: String, first: Int, sort: [MovieGenresConnectionSort!], where: MovieGenresConnectionWhere): MovieGenresConnection! @deprecated(reason: \\"Do not use genre\\") imdbRating: Float title: String @deprecated(reason: \\"Do not use title\\") @@ -473,13 +461,6 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { year: IntAggregateSelection! } - type MovieAggregateSelection { - count: Int! - imdbRating: FloatAggregateSelection! - title: StringAggregateSelection! - year: IntAggregateSelection! - } - input MovieConnectInput { genres: [MovieGenresConnectFieldInput!] @deprecated(reason: \\"Do not use genre\\") } @@ -513,11 +494,6 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { node: MovieGenreGenresNodeAggregateSelection } - type MovieGenreGenresAggregationSelection { - count: Int! - node: MovieGenreGenresNodeAggregateSelection - } - type MovieGenreGenresNodeAggregateSelection { name: StringAggregateSelection! } @@ -761,10 +737,8 @@ describe("https://github.com/neo4j/graphql/issues/2187", () => { type Query { genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\" instead\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 d26a2fe7a5..406fe3e6b3 100644 --- a/packages/graphql/tests/schema/issues/2377.test.ts +++ b/packages/graphql/tests/schema/issues/2377.test.ts @@ -230,10 +230,8 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { type Query { resourceEntities(limit: Int, offset: Int, sort: [ResourceEntitySort!], where: ResourceEntityWhere): [ResourceEntity!]! - resourceEntitiesAggregate(where: ResourceEntityWhere): ResourceEntityAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"resourceEntitiesConnection\\\\\\" instead\\") resourceEntitiesConnection(after: String, first: Int, sort: [ResourceEntitySort!], where: ResourceEntityWhere): ResourceEntitiesConnection! resources(limit: Int, offset: Int, sort: [ResourceSort!], where: ResourceWhere): [Resource!]! - resourcesAggregate(where: ResourceWhere): ResourceAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"resourcesConnection\\\\\\" instead\\") resourcesConnection(after: String, first: Int, sort: [ResourceSort!], where: ResourceWhere): ResourcesConnection! } @@ -242,7 +240,6 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { Resources encapsulating the given resource (e.g., a github org contains a repo) \\"\\"\\" containedBy(limit: Int, offset: Int, sort: [ResourceSort!], where: ResourceWhere): [Resource!]! - containedByAggregate(where: ResourceWhere): ResourceResourceContainedByAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"containedByConnection\\\\\\" instead\\") containedByConnection(after: String, first: Int, sort: [ResourceContainedByConnectionSort!], where: ResourceContainedByConnectionWhere): ResourceContainedByConnection! createdAt: DateTime! externalIds: [ID!] @@ -266,13 +263,6 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { updatedAt: DateTimeAggregateSelection! } - type ResourceAggregateSelection { - count: Int! - createdAt: DateTimeAggregateSelection! - name: StringAggregateSelection! - updatedAt: DateTimeAggregateSelection! - } - input ResourceConnectInput { containedBy: [ResourceContainedByConnectFieldInput!] } @@ -479,11 +469,6 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { name: StringAggregateSelection! } - type ResourceEntityAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - type ResourceEntityEdge { cursor: String! node: ResourceEntity! @@ -546,11 +531,6 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { node: ResourceResourceContainedByNodeAggregateSelection } - type ResourceResourceContainedByAggregationSelection { - count: Int! - node: ResourceResourceContainedByNodeAggregateSelection - } - type ResourceResourceContainedByNodeAggregateSelection { createdAt: DateTimeAggregateSelection! name: StringAggregateSelection! diff --git a/packages/graphql/tests/schema/issues/2993.test.ts b/packages/graphql/tests/schema/issues/2993.test.ts index 0354465384..f734e01099 100644 --- a/packages/graphql/tests/schema/issues/2993.test.ts +++ b/packages/graphql/tests/schema/issues/2993.test.ts @@ -223,11 +223,6 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { userName: StringAggregateSelection! } - type ProfileAggregateSelection { - count: Int! - userName: StringAggregateSelection! - } - input ProfileConnectWhere { node: ProfileWhere! } @@ -299,10 +294,8 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { type Query { profiles(limit: Int, offset: Int, sort: [ProfileSort!], where: ProfileWhere): [Profile!]! - profilesAggregate(where: ProfileWhere): ProfileAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"profilesConnection\\\\\\" instead\\") profilesConnection(after: String, first: Int, sort: [ProfileSort!], where: ProfileWhere): ProfilesConnection! users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\" instead\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } @@ -357,7 +350,6 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { type User implements Profile { following(limit: Int, offset: Int, sort: [ProfileSort!], where: ProfileWhere): [Profile!]! - followingAggregate(where: ProfileWhere): UserProfileFollowingAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"followingConnection\\\\\\" instead\\") followingConnection(after: String, first: Int, sort: [UserFollowingConnectionSort!], where: UserFollowingConnectionWhere): UserFollowingConnection! id: ID! userName: String! @@ -372,11 +364,6 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { userName: StringAggregateSelection! } - type UserAggregateSelection { - count: Int! - userName: StringAggregateSelection! - } - input UserCreateInput { following: UserFollowingFieldInput userName: String! @@ -526,12 +513,6 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { node: UserProfileFollowingNodeAggregateSelection } - type UserProfileFollowingAggregationSelection { - count: Int! - edge: UserProfileFollowingEdgeAggregateSelection - node: UserProfileFollowingNodeAggregateSelection - } - type UserProfileFollowingEdgeAggregateSelection { since: DateTimeAggregateSelection! } diff --git a/packages/graphql/tests/schema/issues/3428.test.ts b/packages/graphql/tests/schema/issues/3428.test.ts index d34f3d96c6..763f6927a3 100644 --- a/packages/graphql/tests/schema/issues/3428.test.ts +++ b/packages/graphql/tests/schema/issues/3428.test.ts @@ -120,7 +120,6 @@ describe("Relationship nested operations", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID } @@ -216,10 +215,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -234,11 +229,6 @@ describe("Relationship nested operations", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -339,11 +329,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonCreateInput { name: String } @@ -397,10 +382,8 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! } @@ -594,10 +577,6 @@ describe("Relationship nested operations", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID } @@ -699,11 +678,6 @@ describe("Relationship nested operations", () => { name: StringAggregateSelection! } - type PersonOneAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonOneCreateInput { name: String } @@ -768,11 +742,6 @@ describe("Relationship nested operations", () => { nameTwo: StringAggregateSelection! } - type PersonTwoAggregateSelection { - count: Int! - nameTwo: StringAggregateSelection! - } - input PersonTwoCreateInput { nameTwo: String } @@ -820,14 +789,11 @@ describe("Relationship nested operations", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, where: PersonWhere): [Person!]! personOnes(limit: Int, offset: Int, sort: [PersonOneSort!], where: PersonOneWhere): [PersonOne!]! - personOnesAggregate(where: PersonOneWhere): PersonOneAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personOnesConnection\\\\\\" instead\\") personOnesConnection(after: String, first: Int, sort: [PersonOneSort!], where: PersonOneWhere): PersonOnesConnection! personTwos(limit: Int, offset: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): [PersonTwo!]! - personTwosAggregate(where: PersonTwoWhere): PersonTwoAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"personTwosConnection\\\\\\" instead\\") personTwosConnection(after: String, first: Int, sort: [PersonTwoSort!], where: PersonTwoWhere): PersonTwosConnection! } diff --git a/packages/graphql/tests/schema/issues/3537.test.ts b/packages/graphql/tests/schema/issues/3537.test.ts index 9ba80e2b06..5711c1e9b2 100644 --- a/packages/graphql/tests/schema/issues/3537.test.ts +++ b/packages/graphql/tests/schema/issues/3537.test.ts @@ -341,12 +341,6 @@ describe("Extending the schema in when using getSubgraphSchema", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - type ActorEdge { cursor: String! node: Actor! @@ -402,11 +396,6 @@ describe("Extending the schema in when using getSubgraphSchema", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - type MovieEdge { cursor: String! node: Movie! @@ -449,10 +438,8 @@ describe("Extending the schema in when using getSubgraphSchema", () => { type Query { _service: _Service! actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -562,12 +549,6 @@ describe("Extending the schema in when using getSubgraphSchema", () => { username: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - password: StringAggregateSelection! - username: StringAggregateSelection! - } - input ActorCreateInput { password: String! username: String! @@ -699,11 +680,6 @@ describe("Extending the schema in when using getSubgraphSchema", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieCreateInput { title: String } @@ -787,10 +763,8 @@ describe("Extending the schema in when using getSubgraphSchema", () => { type Query { _service: _Service! actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 38f94d0e28..61e868f723 100644 --- a/packages/graphql/tests/schema/issues/3541.test.ts +++ b/packages/graphql/tests/schema/issues/3541.test.ts @@ -78,11 +78,6 @@ describe("Extending the schema in when using getSubgraphSchema", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - type ActorEdge { cursor: String! node: Actor! @@ -161,7 +156,6 @@ describe("Extending the schema in when using getSubgraphSchema", () => { type Movie @key(fields: \\"title\\") @shareable { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String! } @@ -171,11 +165,6 @@ describe("Extending the schema in when using getSubgraphSchema", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -276,11 +265,6 @@ describe("Extending the schema in when using getSubgraphSchema", () => { title: StringAggregateSelection! } - type MovieAggregateSelection @shareable { - count: Int! - title: StringAggregateSelection! - } - type MovieEdge @shareable { cursor: String! node: Movie! @@ -351,10 +335,8 @@ describe("Extending the schema in when using getSubgraphSchema", () => { _entities(representations: [_Any!]!): [_Entity]! _service: _Service! actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! @shareable - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @shareable @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! @shareable } @@ -469,11 +451,6 @@ describe("Extending the schema in when using getSubgraphSchema", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectWhere { node: ActorWhere! } @@ -605,7 +582,6 @@ describe("Extending the schema in when using getSubgraphSchema", () => { type Movie @key(fields: \\"title\\") @key(fields: \\"id\\") @shareable { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID! title: String! @@ -616,11 +592,6 @@ describe("Extending the schema in when using getSubgraphSchema", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -830,7 +801,6 @@ describe("Extending the schema in when using getSubgraphSchema", () => { _entities(representations: [_Any!]!): [_Entity]! _service: _Service! actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") 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 2052911488..973e5a49c2 100644 --- a/packages/graphql/tests/schema/issues/3698.test.ts +++ b/packages/graphql/tests/schema/issues/3698.test.ts @@ -131,7 +131,6 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { type Genre { name: String! product(limit: Int, offset: Int, sort: [IProductSort!], where: IProductWhere): [IProduct!]! - productAggregate(where: IProductWhere): GenreIProductProductAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"productConnection\\\\\\" instead\\") productConnection(after: String, first: Int, sort: [GenreProductConnectionSort!], where: GenreProductConnectionWhere): GenreProductConnection! } @@ -144,11 +143,6 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { name: StringAggregateSelection! } - type GenreAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input GenreConnectInput { product: [GenreProductConnectFieldInput!] } @@ -196,11 +190,6 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { node: GenreIProductProductNodeAggregateSelection } - type GenreIProductProductAggregationSelection { - count: Int! - node: GenreIProductProductNodeAggregateSelection - } - type GenreIProductProductNodeAggregateSelection { id: StringAggregateSelection! info: StringAggregateSelection! @@ -469,13 +458,6 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { name: StringAggregateSelection! } - type IProductAggregateSelection { - count: Int! - id: StringAggregateSelection! - info: StringAggregateSelection! - name: StringAggregateSelection! - } - input IProductConnectWhere { node: IProductWhere! } @@ -566,7 +548,6 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { type Movie implements IProduct { genre(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! - genreAggregate(where: GenreWhere): MovieGenreGenreAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"genreConnection\\\\\\" instead\\") genreConnection(after: String, first: Int, sort: [MovieGenreConnectionSort!], where: MovieGenreConnectionWhere): MovieGenreConnection! id: String! info: String! @@ -583,12 +564,6 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { name: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - id: StringAggregateSelection! - name: StringAggregateSelection! - } - input MovieCreateInput { genre: MovieGenreFieldInput id: String! @@ -710,11 +685,6 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { node: MovieGenreGenreNodeAggregateSelection } - type MovieGenreGenreAggregationSelection { - count: Int! - node: MovieGenreGenreNodeAggregateSelection - } - type MovieGenreGenreNodeAggregateSelection { name: StringAggregateSelection! } @@ -871,13 +841,10 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { type Query { genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\" instead\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! iProducts(limit: Int, offset: Int, sort: [IProductSort!], where: IProductWhere): [IProduct!]! - iProductsAggregate(where: IProductWhere): IProductAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"iProductsConnection\\\\\\" instead\\") iProductsConnection(after: String, first: Int, sort: [IProductSort!], where: IProductWhere): IProductsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 4d0ba06435..54fe27ccde 100644 --- a/packages/graphql/tests/schema/issues/3817.test.ts +++ b/packages/graphql/tests/schema/issues/3817.test.ts @@ -199,7 +199,6 @@ describe("https://github.com/neo4j/graphql/issues/3817", () => { type Person { friends(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - friendsAggregate(where: PersonWhere): PersonPersonFriendsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"friendsConnection\\\\\\" instead\\") friendsConnection(after: String, first: Int, sort: [PersonFriendsConnectionSort!], where: PersonFriendsConnectionWhere): PersonFriendsConnection! id: ID! } @@ -208,10 +207,6 @@ describe("https://github.com/neo4j/graphql/issues/3817", () => { count: Count! } - type PersonAggregateSelection { - count: Int! - } - input PersonConnectInput { friends: [PersonFriendsConnectFieldInput!] } @@ -350,11 +345,6 @@ describe("https://github.com/neo4j/graphql/issues/3817", () => { edge: PersonPersonFriendsEdgeAggregateSelection } - type PersonPersonFriendsAggregationSelection { - count: Int! - edge: PersonPersonFriendsEdgeAggregateSelection - } - type PersonPersonFriendsEdgeAggregateSelection { id: StringAggregateSelection! } @@ -422,7 +412,6 @@ describe("https://github.com/neo4j/graphql/issues/3817", () => { type Query { people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") 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 78379759d4..bcd23fdeea 100644 --- a/packages/graphql/tests/schema/issues/4511.test.ts +++ b/packages/graphql/tests/schema/issues/4511.test.ts @@ -105,10 +105,6 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { count: Count! } - type CreatureAggregateSelection { - count: Int! - } - input CreatureConnectInput { movies: [CreatureMoviesConnectFieldInput!] } @@ -354,7 +350,6 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { type Movie implements Production { director(limit: Int, offset: Int, where: CreatureWhere): [Creature!]! - directorAggregate(where: CreatureWhere): MovieCreatureDirectorAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"directorConnection\\\\\\" instead\\") directorConnection(after: String, first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! id: ID title: String! @@ -369,21 +364,12 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieCreateInput { director: MovieDirectorFieldInput id: ID title: String! } - type MovieCreatureDirectorAggregationSelection { - count: Int! - } - input MovieDeleteInput { director: [MovieDirectorDeleteFieldInput!] } @@ -569,7 +555,6 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { type Person implements Creature { movies(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - moviesAggregate(where: ProductionWhere): PersonProductionMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [CreatureMoviesConnectionSort!], where: CreatureMoviesConnectionWhere): CreatureMoviesConnection! } @@ -577,10 +562,6 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { count: Count! } - type PersonAggregateSelection { - count: Int! - } - input PersonCreateInput { movies: PersonMoviesFieldInput } @@ -683,10 +664,6 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { where: CreatureMoviesConnectionWhere } - type PersonProductionMoviesAggregationSelection { - count: Int! - } - input PersonUpdateInput { movies: [PersonMoviesUpdateFieldInput!] } @@ -739,10 +716,6 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { count: Count! } - type ProductionAggregateSelection { - count: Int! - } - input ProductionConnectInput { director: [ProductionDirectorConnectFieldInput!] } @@ -947,25 +920,19 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { type Query { creatures(limit: Int, offset: Int, where: CreatureWhere): [Creature!]! - creaturesAggregate(where: CreatureWhere): CreatureAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"creaturesConnection\\\\\\" instead\\") creaturesConnection(after: String, first: Int, where: CreatureWhere): CreaturesConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\" instead\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } type Series implements Production { director(limit: Int, offset: Int, where: CreatureWhere): [Creature!]! - directorAggregate(where: CreatureWhere): SeriesCreatureDirectorAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"directorConnection\\\\\\" instead\\") directorConnection(after: String, first: Int, where: ProductionDirectorConnectionWhere): ProductionDirectorConnection! episode: Int! id: ID @@ -982,12 +949,6 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { title: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - episode: IntAggregateSelection! - title: StringAggregateSelection! - } - type SeriesConnection { aggregate: SeriesAggregate! edges: [SeriesEdge!]! @@ -1008,10 +969,6 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { timestamp: Float! } - type SeriesCreatureDirectorAggregationSelection { - count: Int! - } - input SeriesDeleteInput { director: [SeriesDirectorDeleteFieldInput!] } diff --git a/packages/graphql/tests/schema/issues/4615.test.ts b/packages/graphql/tests/schema/issues/4615.test.ts index d957c974e5..f2bef96723 100644 --- a/packages/graphql/tests/schema/issues/4615.test.ts +++ b/packages/graphql/tests/schema/issues/4615.test.ts @@ -130,7 +130,6 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [ShowSort!], where: ShowWhere): [Show!]! - actedInAggregate(where: ShowWhere): ActorShowActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -278,11 +277,6 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { actedIn: [ActorActedInConnectFieldInput!] } @@ -326,12 +320,6 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { node: ActorShowActedInNodeAggregateSelection } - type ActorShowActedInAggregationSelection { - count: Int! - edge: ActorShowActedInEdgeAggregateSelection - node: ActorShowActedInNodeAggregateSelection - } - type ActorShowActedInEdgeAggregateSelection { screenTime: IntAggregateSelection! } @@ -511,27 +499,12 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { type Movie implements Show { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ShowActorsConnectionSort!], where: ShowActorsConnectionWhere): ShowActorsConnection! release: DateTime! runtime: Int title: String! } - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - - type MovieActorActorsEdgeAggregateSelection { - screenTime: IntAggregateSelection! - } - - type MovieActorActorsNodeAggregateSelection { - name: StringAggregateSelection! - } - input MovieActorsAggregateInput { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput @@ -639,13 +612,6 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - release: DateTimeAggregateSelection! - runtime: IntAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { actors: MovieActorsFieldInput release: DateTime! @@ -765,41 +731,22 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! series(limit: Int, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! shows(limit: Int, offset: Int, sort: [ShowSort!], where: ShowWhere): [Show!]! - showsAggregate(where: ShowWhere): ShowAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"showsConnection\\\\\\" instead\\") showsConnection(after: String, first: Int, sort: [ShowSort!], where: ShowWhere): ShowsConnection! } type Series implements Show { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): SeriesActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ShowActorsConnectionSort!], where: ShowActorsConnectionWhere): ShowActorsConnection! episodes: Int title: String! } - type SeriesActorActorsAggregationSelection { - count: Int! - edge: SeriesActorActorsEdgeAggregateSelection - node: SeriesActorActorsNodeAggregateSelection - } - - type SeriesActorActorsEdgeAggregateSelection { - screenTime: IntAggregateSelection! - } - - type SeriesActorActorsNodeAggregateSelection { - name: StringAggregateSelection! - } - input SeriesActorsAggregateInput { AND: [SeriesActorsAggregateInput!] NOT: SeriesActorsAggregateInput @@ -906,12 +853,6 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { title: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - episodes: IntAggregateSelection! - title: StringAggregateSelection! - } - type SeriesConnection { aggregate: SeriesAggregate! edges: [SeriesEdge!]! @@ -1186,11 +1127,6 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { title: StringAggregateSelection! } - type ShowAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input ShowConnectInput { actors: [ShowActorsConnectFieldInput!] } diff --git a/packages/graphql/tests/schema/issues/5428.test.ts b/packages/graphql/tests/schema/issues/5428.test.ts index b6edc8acda..eb81359dd0 100644 --- a/packages/graphql/tests/schema/issues/5428.test.ts +++ b/packages/graphql/tests/schema/issues/5428.test.ts @@ -81,7 +81,6 @@ describe("https://github.com/neo4j/graphql/issues/5428", () => { type Query { test(limit: Int, offset: Int, sort: [TestSort!], where: TestWhere): [Test!]! - testAggregate(where: TestWhere): TestAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"testConnection\\\\\\" instead\\") testConnection(after: String, first: Int, sort: [TestSort!], where: TestWhere): TestConnection! } @@ -125,11 +124,6 @@ describe("https://github.com/neo4j/graphql/issues/5428", () => { Name: StringAggregateSelection! } - type TestAggregateSelection { - Name: StringAggregateSelection! - count: Int! - } - type TestConnection { aggregate: TestAggregate! edges: [TestEdge!]! diff --git a/packages/graphql/tests/schema/issues/5631.test.ts b/packages/graphql/tests/schema/issues/5631.test.ts index 416e9bcff5..1c649d3e0c 100644 --- a/packages/graphql/tests/schema/issues/5631.test.ts +++ b/packages/graphql/tests/schema/issues/5631.test.ts @@ -67,10 +67,6 @@ describe("https://github.com/neo4j/graphql/issues/5631", () => { count: Count! } - type ActorAggregateSelection { - count: Int! - } - input ActorCreateInput { \\"\\"\\" Appears because this input type would be empty otherwise because this type is composed of just generated and/or relationship properties. See https://neo4j.com/docs/graphql-manual/current/troubleshooting/faqs/ @@ -157,10 +153,6 @@ describe("https://github.com/neo4j/graphql/issues/5631", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { \\"\\"\\" Appears because this input type would be empty otherwise because this type is composed of just generated and/or relationship properties. See https://neo4j.com/docs/graphql-manual/current/troubleshooting/faqs/ @@ -213,10 +205,8 @@ describe("https://github.com/neo4j/graphql/issues/5631", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 73623a637b..53a733c24c 100644 --- a/packages/graphql/tests/schema/issues/609.test.ts +++ b/packages/graphql/tests/schema/issues/609.test.ts @@ -76,11 +76,6 @@ describe("609", () => { deprecatedField: StringAggregateSelection! } - type DeprecatedAggregateSelection { - count: Int! - deprecatedField: StringAggregateSelection! - } - input DeprecatedCreateInput { deprecatedField: String @deprecated } @@ -137,7 +132,6 @@ describe("609", () => { type Query { deprecateds(limit: Int, offset: Int, sort: [DeprecatedSort!], where: DeprecatedWhere): [Deprecated!]! - deprecatedsAggregate(where: DeprecatedWhere): DeprecatedAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"deprecatedsConnection\\\\\\" instead\\") 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 cfe81e94f5..f7f85f31f6 100644 --- a/packages/graphql/tests/schema/issues/872.test.ts +++ b/packages/graphql/tests/schema/issues/872.test.ts @@ -51,14 +51,12 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String! } type Actor2 { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): Actor2MovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [Actor2MoviesConnectionSort!], where: Actor2MoviesConnectionWhere): Actor2MoviesConnection! name: String! } @@ -72,11 +70,6 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { name: StringAggregateSelection! } - type Actor2AggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input Actor2CreateInput { movies: Actor2MoviesFieldInput name: String! @@ -96,11 +89,6 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { node: Actor2MovieMoviesNodeAggregateSelection } - type Actor2MovieMoviesAggregationSelection { - count: Int! - node: Actor2MovieMoviesNodeAggregateSelection - } - type Actor2MovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -296,11 +284,6 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { movies: ActorMoviesFieldInput name: String! @@ -320,11 +303,6 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { title: StringAggregateSelection! } @@ -597,11 +575,6 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectWhere { node: MovieWhere! } @@ -686,13 +659,10 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { type Query { actor2s(limit: Int, offset: Int, sort: [Actor2Sort!], where: Actor2Where): [Actor2!]! - actor2sAggregate(where: Actor2Where): Actor2AggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actor2sConnection\\\\\\" instead\\") actor2sConnection(after: String, first: Int, sort: [Actor2Sort!], where: Actor2Where): Actor2sConnection! actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/limit-required.test.ts b/packages/graphql/tests/schema/limit-required.test.ts index 6a7c390d1b..79be2a3d78 100644 --- a/packages/graphql/tests/schema/limit-required.test.ts +++ b/packages/graphql/tests/schema/limit-required.test.ts @@ -132,11 +132,9 @@ describe("limitRequired constructor option", () => { type Actor implements Person { actedIn(limit: Int!, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int!, sort: [PersonActedInConnectionSort!], where: PersonActedInConnectionWhere): PersonActedInConnection! id: ID! movies(limit: Int!, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int!, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! name: String! } @@ -255,11 +253,6 @@ describe("limitRequired constructor option", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { actedIn: [ActorActedInConnectFieldInput!] movies: [ActorMoviesConnectFieldInput!] @@ -291,21 +284,6 @@ describe("limitRequired constructor option", () => { node: Actor! } - type ActorMovieMoviesAggregationSelection { - count: Int! - edge: ActorMovieMoviesEdgeAggregateSelection - node: ActorMovieMoviesNodeAggregateSelection - } - - type ActorMovieMoviesEdgeAggregateSelection { - screenTime: IntAggregateSelection! - } - - type ActorMovieMoviesNodeAggregateSelection { - runtime: IntAggregateSelection! - title: StringAggregateSelection! - } - input ActorMoviesAggregateInput { AND: [ActorMoviesAggregateInput!] NOT: ActorMoviesAggregateInput @@ -425,20 +403,6 @@ describe("limitRequired constructor option", () => { where: PersonMoviesConnectionWhere } - type ActorProductionActedInAggregationSelection { - count: Int! - edge: ActorProductionActedInEdgeAggregateSelection - node: ActorProductionActedInNodeAggregateSelection - } - - type ActorProductionActedInEdgeAggregateSelection { - screenTime: IntAggregateSelection! - } - - type ActorProductionActedInNodeAggregateSelection { - title: StringAggregateSelection! - } - input ActorRelationshipFilters { \\"\\"\\"Filter type where all of the related Actors match this filter\\"\\"\\" all: ActorWhere @@ -649,7 +613,6 @@ describe("limitRequired constructor option", () => { type Movie implements Production { actors(limit: Int!, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int!, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID! runtime: Int! @@ -662,12 +625,6 @@ describe("limitRequired constructor option", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsEdgeAggregateSelection { screenTime: IntAggregateSelection! } @@ -818,12 +775,6 @@ describe("limitRequired constructor option", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - runtime: IntAggregateSelection! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -1107,11 +1058,6 @@ describe("limitRequired constructor option", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - type PersonEdge { cursor: String! node: Person! @@ -1366,11 +1312,6 @@ describe("limitRequired constructor option", () => { title: StringAggregateSelection! } - type ProductionAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input ProductionConnectWhere { node: ProductionWhere! } @@ -1444,19 +1385,14 @@ describe("limitRequired constructor option", () => { type Query { actors(limit: Int!, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int!, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int!, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int!, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int!, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int!, sort: [PersonSort!], where: PersonWhere): PeopleConnection! productions(limit: Int!, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\" instead\\") productionsConnection(after: String, first: Int!, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int!, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int!, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! } @@ -1476,12 +1412,6 @@ describe("limitRequired constructor option", () => { title: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - episodes: IntAggregateSelection! - title: StringAggregateSelection! - } - type SeriesConnection { aggregate: SeriesAggregate! edges: [SeriesEdge!]! @@ -1717,13 +1647,11 @@ describe("limitRequired constructor option", () => { type Actor { actedIn(limit: Int!, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - actedInAggregate(where: ProductionWhere): ActorProductionActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int!, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! contact(limit: Int!, offset: Int, where: ContactWhere): [Contact!]! contactConnection(after: String, first: Int!, where: ActorContactConnectionWhere): ActorContactConnection! id: ID! movies(limit: Int!, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int!, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String! } @@ -1868,11 +1796,6 @@ describe("limitRequired constructor option", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { actedIn: [ActorActedInConnectFieldInput!] contact: ActorContactConnectInput @@ -2056,12 +1979,6 @@ describe("limitRequired constructor option", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - edge: ActorMovieMoviesEdgeAggregateSelection - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesEdgeAggregateSelection { screenTime: IntAggregateSelection! } @@ -2230,12 +2147,6 @@ describe("limitRequired constructor option", () => { node: ActorProductionActedInNodeAggregateSelection } - type ActorProductionActedInAggregationSelection { - count: Int! - edge: ActorProductionActedInEdgeAggregateSelection - node: ActorProductionActedInNodeAggregateSelection - } - type ActorProductionActedInEdgeAggregateSelection { screenTime: IntAggregateSelection! } @@ -2464,11 +2375,6 @@ describe("limitRequired constructor option", () => { address: StringAggregateSelection! } - type EmailAggregateSelection { - address: StringAggregateSelection! - count: Int! - } - input EmailConnectWhere { node: EmailWhere! } @@ -2571,7 +2477,6 @@ describe("limitRequired constructor option", () => { type Movie implements Production { actors(limit: Int!, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int!, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! id: ID! runtime: Int! @@ -2584,12 +2489,6 @@ describe("limitRequired constructor option", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsEdgeAggregateSelection { screenTime: IntAggregateSelection! } @@ -2740,12 +2639,6 @@ describe("limitRequired constructor option", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - runtime: IntAggregateSelection! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -2905,11 +2798,6 @@ describe("limitRequired constructor option", () => { title: StringAggregateSelection! } - type ProductionAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input ProductionConnectWhere { node: ProductionWhere! } @@ -2983,23 +2871,17 @@ describe("limitRequired constructor option", () => { type Query { actors(limit: Int!, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int!, sort: [ActorSort!], where: ActorWhere): ActorsConnection! contacts(limit: Int!, offset: Int, where: ContactWhere): [Contact!]! emails(limit: Int!, offset: Int, sort: [EmailSort!], where: EmailWhere): [Email!]! - emailsAggregate(where: EmailWhere): EmailAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"emailsConnection\\\\\\" instead\\") emailsConnection(after: String, first: Int!, sort: [EmailSort!], where: EmailWhere): EmailsConnection! movies(limit: Int!, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int!, sort: [MovieSort!], where: MovieWhere): MoviesConnection! productions(limit: Int!, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\" instead\\") productionsConnection(after: String, first: Int!, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! series(limit: Int!, offset: Int, sort: [SeriesSort!], where: SeriesWhere): [Series!]! - seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"seriesConnection\\\\\\" instead\\") seriesConnection(after: String, first: Int!, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! telephones(limit: Int!, offset: Int, sort: [TelephoneSort!], where: TelephoneWhere): [Telephone!]! - telephonesAggregate(where: TelephoneWhere): TelephoneAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"telephonesConnection\\\\\\" instead\\") telephonesConnection(after: String, first: Int!, sort: [TelephoneSort!], where: TelephoneWhere): TelephonesConnection! } @@ -3019,12 +2901,6 @@ describe("limitRequired constructor option", () => { title: StringAggregateSelection! } - type SeriesAggregateSelection { - count: Int! - episodes: IntAggregateSelection! - title: StringAggregateSelection! - } - type SeriesConnection { aggregate: SeriesAggregate! edges: [SeriesEdge!]! @@ -3135,11 +3011,6 @@ describe("limitRequired constructor option", () => { number: StringAggregateSelection! } - type TelephoneAggregateSelection { - count: Int! - number: StringAggregateSelection! - } - input TelephoneConnectWhere { node: TelephoneWhere! } @@ -3318,7 +3189,6 @@ describe("limitRequired constructor option", () => { type Actor { id: ID! movies(limit: Int!, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int!, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String! } @@ -3332,11 +3202,6 @@ describe("limitRequired constructor option", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { id: ID! movies: ActorMoviesFieldInput @@ -3358,12 +3223,6 @@ describe("limitRequired constructor option", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - edge: ActorMovieMoviesEdgeAggregateSelection - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesEdgeAggregateSelection { screenTime: IntAggregateSelection! } @@ -3703,12 +3562,6 @@ describe("limitRequired constructor option", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieConnectWhere { node: MovieWhere! } @@ -3817,10 +3670,8 @@ describe("limitRequired constructor option", () => { type Query { actors(limit: Int!, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int!, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int!, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesByDescription(after: String, first: Int!, phrase: String!, sort: [MovieIndexSort!], where: MovieIndexWhere): MoviesIndexConnection! moviesByTitle(after: String, first: Int!, phrase: String!, sort: [MovieIndexSort!], where: MovieIndexWhere): MoviesIndexConnection! moviesConnection(after: String, first: Int!, sort: [MovieSort!], where: MovieWhere): MoviesConnection! @@ -3983,7 +3834,6 @@ describe("limitRequired constructor option", () => { type Actor { id: ID! movies(limit: Int!, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int!, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String! } @@ -3997,11 +3847,6 @@ describe("limitRequired constructor option", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { id: ID! movies: ActorMoviesFieldInput @@ -4023,12 +3868,6 @@ describe("limitRequired constructor option", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - edge: ActorMovieMoviesEdgeAggregateSelection - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesEdgeAggregateSelection { screenTime: IntAggregateSelection! } @@ -4368,12 +4207,6 @@ describe("limitRequired constructor option", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieConnectWhere { node: MovieWhere! } @@ -4482,11 +4315,9 @@ describe("limitRequired constructor option", () => { type Query { actors(limit: Int!, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int!, sort: [ActorSort!], where: ActorWhere): ActorsConnection! descriptionQuery(after: String, first: Int!, sort: [MovieIndexSort!], vector: [Float!], where: MovieIndexWhere): MoviesIndexConnection! movies(limit: Int!, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int!, sort: [MovieSort!], where: MovieWhere): MoviesConnection! titleQuery(after: String, first: Int!, sort: [MovieIndexSort!], vector: [Float!], where: MovieIndexWhere): MoviesIndexConnection! } diff --git a/packages/graphql/tests/schema/lowercase-type-names.test.ts b/packages/graphql/tests/schema/lowercase-type-names.test.ts index 38ac90ac40..a1065fef07 100644 --- a/packages/graphql/tests/schema/lowercase-type-names.test.ts +++ b/packages/graphql/tests/schema/lowercase-type-names.test.ts @@ -194,10 +194,8 @@ describe("lower case type names", () => { type Query { actors(limit: Int, offset: Int, sort: [actorSort!], where: actorWhere): [actor!]! - actorsAggregate(where: actorWhere): actorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [actorSort!], where: actorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [movieSort!], where: movieWhere): [movie!]! - moviesAggregate(where: movieWhere): movieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [movieSort!], where: movieWhere): MoviesConnection! } @@ -258,7 +256,6 @@ describe("lower case type names", () => { type actor { createdAt: DateTime movies(limit: Int, offset: Int, sort: [movieSort!], where: movieWhere): [movie!]! - moviesAggregate(where: movieWhere): actormovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [actorMoviesConnectionSort!], where: actorMoviesConnectionWhere): actorMoviesConnection! name: String year: Int @@ -275,13 +272,6 @@ describe("lower case type names", () => { year: IntAggregateSelection! } - type actorAggregateSelection { - count: Int! - createdAt: DateTimeAggregateSelection! - name: StringAggregateSelection! - year: IntAggregateSelection! - } - input actorConnectInput { movies: [actorMoviesConnectFieldInput!] } @@ -572,11 +562,6 @@ describe("lower case type names", () => { node: actormovieMoviesNodeAggregateSelection } - type actormovieMoviesAggregationSelection { - count: Int! - node: actormovieMoviesNodeAggregateSelection - } - type actormovieMoviesNodeAggregateSelection { createdAt: DateTimeAggregateSelection! name: StringAggregateSelection! @@ -586,7 +571,6 @@ describe("lower case type names", () => { type movie { actors(limit: Int, offset: Int, sort: [actorSort!], where: actorWhere): [actor!]! - actorsAggregate(where: actorWhere): movieactorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [movieActorsConnectionSort!], where: movieActorsConnectionWhere): movieActorsConnection! createdAt: DateTime name: String @@ -762,14 +746,6 @@ describe("lower case type names", () => { year: IntAggregateSelection! } - type movieAggregateSelection { - count: Int! - createdAt: DateTimeAggregateSelection! - name: StringAggregateSelection! - testId: StringAggregateSelection! - year: IntAggregateSelection! - } - input movieConnectInput { actors: [movieActorsConnectFieldInput!] } @@ -898,11 +874,6 @@ describe("lower case type names", () => { node: movieactorActorsNodeAggregateSelection } - type movieactorActorsAggregationSelection { - count: Int! - node: movieactorActorsNodeAggregateSelection - } - type movieactorActorsNodeAggregateSelection { createdAt: DateTimeAggregateSelection! name: StringAggregateSelection! diff --git a/packages/graphql/tests/schema/math.test.ts b/packages/graphql/tests/schema/math.test.ts index b74c75086d..693e32b686 100644 --- a/packages/graphql/tests/schema/math.test.ts +++ b/packages/graphql/tests/schema/math.test.ts @@ -115,11 +115,6 @@ describe("Algebraic", () => { viewers: IntAggregateSelection! } - type MovieAggregateSelection { - count: Int! - viewers: IntAggregateSelection! - } - input MovieCreateInput { id: ID viewers: Int! @@ -189,7 +184,6 @@ describe("Algebraic", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -315,11 +309,6 @@ describe("Algebraic", () => { viewers: BigIntAggregateSelection! } - type MovieAggregateSelection { - count: Int! - viewers: BigIntAggregateSelection! - } - input MovieCreateInput { id: ID viewers: BigInt! @@ -389,7 +378,6 @@ describe("Algebraic", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -513,11 +501,6 @@ describe("Algebraic", () => { viewers: FloatAggregateSelection! } - type MovieAggregateSelection { - count: Int! - viewers: FloatAggregateSelection! - } - input MovieCreateInput { id: ID viewers: Float! @@ -589,7 +572,6 @@ describe("Algebraic", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -681,7 +663,6 @@ describe("Algebraic", () => { type Director { directs(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - directsAggregate(where: MovieWhere): DirectorMovieDirectsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"directsConnection\\\\\\" instead\\") directsConnection(after: String, first: Int, sort: [DirectorDirectsConnectionSort!], where: DirectorDirectsConnectionWhere): DirectorDirectsConnection! lastName: String! } @@ -695,11 +676,6 @@ describe("Algebraic", () => { lastName: StringAggregateSelection! } - type DirectorAggregateSelection { - count: Int! - lastName: StringAggregateSelection! - } - input DirectorConnectInput { directs: [DirectorDirectsConnectFieldInput!] } @@ -862,11 +838,6 @@ describe("Algebraic", () => { node: DirectorMovieDirectsNodeAggregateSelection } - type DirectorMovieDirectsAggregationSelection { - count: Int! - node: DirectorMovieDirectsNodeAggregateSelection - } - type DirectorMovieDirectsNodeAggregateSelection { viewers: IntAggregateSelection! } @@ -999,7 +970,6 @@ describe("Algebraic", () => { type Movie { directedBy(limit: Int, offset: Int, sort: [DirectorSort!], where: DirectorWhere): [Director!]! - directedByAggregate(where: DirectorWhere): MovieDirectorDirectedByAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"directedByConnection\\\\\\" instead\\") directedByConnection(after: String, first: Int, sort: [MovieDirectedByConnectionSort!], where: MovieDirectedByConnectionWhere): MovieDirectedByConnection! id: ID viewers: Int! @@ -1014,11 +984,6 @@ describe("Algebraic", () => { viewers: IntAggregateSelection! } - type MovieAggregateSelection { - count: Int! - viewers: IntAggregateSelection! - } - input MovieConnectInput { directedBy: [MovieDirectedByConnectFieldInput!] } @@ -1168,11 +1133,6 @@ describe("Algebraic", () => { node: MovieDirectorDirectedByNodeAggregateSelection } - type MovieDirectorDirectedByAggregationSelection { - count: Int! - node: MovieDirectorDirectedByNodeAggregateSelection - } - type MovieDirectorDirectedByNodeAggregateSelection { lastName: StringAggregateSelection! } @@ -1287,10 +1247,8 @@ describe("Algebraic", () => { type Query { directors(limit: Int, offset: Int, sort: [DirectorSort!], where: DirectorWhere): [Director!]! - directorsAggregate(where: DirectorWhere): DirectorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"directorsConnection\\\\\\" instead\\") directorsConnection(after: String, first: Int, sort: [DirectorSort!], where: DirectorWhere): DirectorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1475,7 +1433,6 @@ describe("Algebraic", () => { id: ID viewers: Int! workers(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - workersAggregate(where: PersonWhere): MoviePersonWorkersAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"workersConnection\\\\\\" instead\\") workersConnection(after: String, first: Int, sort: [MovieWorkersConnectionSort!], where: MovieWorkersConnectionWhere): MovieWorkersConnection! } @@ -1488,11 +1445,6 @@ describe("Algebraic", () => { viewers: IntAggregateSelection! } - type MovieAggregateSelection { - count: Int! - viewers: IntAggregateSelection! - } - input MovieCreateInput { id: ID viewers: Int! @@ -1513,11 +1465,6 @@ describe("Algebraic", () => { node: MoviePersonWorkersNodeAggregateSelection } - type MoviePersonWorkersAggregationSelection { - count: Int! - node: MoviePersonWorkersNodeAggregateSelection - } - type MoviePersonWorkersNodeAggregateSelection { name: StringAggregateSelection! } @@ -1746,7 +1693,6 @@ describe("Algebraic", () => { type Person { name: String! worksInProduction(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - worksInProductionAggregate(where: ProductionWhere): PersonProductionWorksInProductionAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"worksInProductionConnection\\\\\\" instead\\") worksInProductionConnection(after: String, first: Int, sort: [PersonWorksInProductionConnectionSort!], where: PersonWorksInProductionConnectionWhere): PersonWorksInProductionConnection! } @@ -1759,11 +1705,6 @@ describe("Algebraic", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonConnectInput { worksInProduction: [PersonWorksInProductionConnectFieldInput!] } @@ -1795,11 +1736,6 @@ describe("Algebraic", () => { node: PersonProductionWorksInProductionNodeAggregateSelection } - type PersonProductionWorksInProductionAggregationSelection { - count: Int! - node: PersonProductionWorksInProductionNodeAggregateSelection - } - type PersonProductionWorksInProductionNodeAggregateSelection { viewers: IntAggregateSelection! } @@ -2008,11 +1944,6 @@ describe("Algebraic", () => { viewers: IntAggregateSelection! } - type ProductionAggregateSelection { - count: Int! - viewers: IntAggregateSelection! - } - input ProductionConnectWhere { node: ProductionWhere! } @@ -2078,13 +2009,10 @@ describe("Algebraic", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! productions(limit: Int, offset: Int, sort: [ProductionSort!], where: ProductionWhere): [Production!]! - productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"productionsConnection\\\\\\" instead\\") productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! } @@ -2339,7 +2267,6 @@ describe("Algebraic", () => { type Movie { actors(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - actorsAggregate(where: PersonWhere): MoviePersonActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String! } @@ -2485,11 +2412,6 @@ describe("Algebraic", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -2522,12 +2444,6 @@ describe("Algebraic", () => { node: MoviePersonActorsNodeAggregateSelection } - type MoviePersonActorsAggregationSelection { - count: Int! - edge: MoviePersonActorsEdgeAggregateSelection - node: MoviePersonActorsNodeAggregateSelection - } - type MoviePersonActorsEdgeAggregateSelection { pay: FloatAggregateSelection! } @@ -2632,7 +2548,6 @@ describe("Algebraic", () => { type Person { actedInMovies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInMoviesAggregate(where: MovieWhere): PersonMovieActedInMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInMoviesConnection\\\\\\" instead\\") actedInMoviesConnection(after: String, first: Int, sort: [PersonActedInMoviesConnectionSort!], where: PersonActedInMoviesConnectionWhere): PersonActedInMoviesConnection! name: String! } @@ -2780,11 +2695,6 @@ describe("Algebraic", () => { name: StringAggregateSelection! } - type PersonAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input PersonConnectInput { actedInMovies: [PersonActedInMoviesConnectFieldInput!] } @@ -2817,12 +2727,6 @@ describe("Algebraic", () => { node: PersonMovieActedInMoviesNodeAggregateSelection } - type PersonMovieActedInMoviesAggregationSelection { - count: Int! - edge: PersonMovieActedInMoviesEdgeAggregateSelection - node: PersonMovieActedInMoviesNodeAggregateSelection - } - type PersonMovieActedInMoviesEdgeAggregateSelection { pay: FloatAggregateSelection! } @@ -2896,10 +2800,8 @@ describe("Algebraic", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") 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 358f5fa340..355b4f4777 100644 --- a/packages/graphql/tests/schema/nested-aggregation-on-type.test.ts +++ b/packages/graphql/tests/schema/nested-aggregation-on-type.test.ts @@ -95,7 +95,6 @@ describe("nested aggregation on interface", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String! } @@ -282,11 +281,6 @@ describe("nested aggregation on interface", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorCreateInput { actedIn: ActorActedInFieldInput name: String! @@ -307,12 +301,6 @@ describe("nested aggregation on interface", () => { node: ActorMovieActedInNodeAggregateSelection } - type ActorMovieActedInAggregationSelection { - count: Int! - edge: ActorMovieActedInEdgeAggregateSelection - node: ActorMovieActedInNodeAggregateSelection - } - type ActorMovieActedInEdgeAggregateSelection { screenTime: IntAggregateSelection! } @@ -505,13 +493,6 @@ describe("nested aggregation on interface", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - cost: FloatAggregateSelection! - count: Int! - runtime: IntAggregateSelection! - title: StringAggregateSelection! - } - input MovieConnectWhere { node: MovieWhere! } @@ -614,10 +595,8 @@ describe("nested aggregation on interface", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 2b2e411eb6..e3a3523600 100644 --- a/packages/graphql/tests/schema/null.test.ts +++ b/packages/graphql/tests/schema/null.test.ts @@ -268,14 +268,6 @@ describe("Null", () => { name: StringAggregateSelection! } - type MovieAggregateSelection { - actorCount: IntAggregateSelection! - averageRating: FloatAggregateSelection! - count: Int! - createdAt: DateTimeAggregateSelection! - name: StringAggregateSelection! - } - input MovieCreateInput { actorCount: Int! actorCounts: [Int!]! @@ -501,7 +493,6 @@ describe("Null", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 378a328280..9685a1bf49 100644 --- a/packages/graphql/tests/schema/pluralize-consistency.test.ts +++ b/packages/graphql/tests/schema/pluralize-consistency.test.ts @@ -122,10 +122,8 @@ describe("Pluralize consistency", () => { type Query { superFriends(limit: Int, offset: Int, sort: [super_friendSort!], where: super_friendWhere): [super_friend!]! - superFriendsAggregate(where: super_friendWhere): super_friendAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"superFriendsConnection\\\\\\" instead\\") superFriendsConnection(after: String, first: Int, sort: [super_friendSort!], where: super_friendWhere): SuperFriendsConnection! superUsers(limit: Int, offset: Int, sort: [super_userSort!], where: super_userWhere): [super_user!]! - superUsersAggregate(where: super_userWhere): super_userAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"superUsersConnection\\\\\\" instead\\") superUsersConnection(after: String, first: Int, sort: [super_userSort!], where: super_userWhere): SuperUsersConnection! } @@ -210,11 +208,6 @@ describe("Pluralize consistency", () => { name: StringAggregateSelection! } - type super_friendAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input super_friendConnectWhere { node: super_friendWhere! } @@ -265,7 +258,6 @@ describe("Pluralize consistency", () => { type super_user { my_friend(limit: Int, offset: Int, sort: [super_friendSort!], where: super_friendWhere): [super_friend!]! - my_friendAggregate(where: super_friendWhere): super_usersuper_friendMy_friendAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"my_friendConnection\\\\\\" instead\\") my_friendConnection(after: String, first: Int, sort: [super_userMy_friendConnectionSort!], where: super_userMy_friendConnectionWhere): super_userMy_friendConnection! name: String! } @@ -279,11 +271,6 @@ describe("Pluralize consistency", () => { name: StringAggregateSelection! } - type super_userAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input super_userCreateInput { my_friend: super_userMy_friendFieldInput name: String! @@ -486,11 +473,6 @@ describe("Pluralize consistency", () => { node: super_usersuper_friendMy_friendNodeAggregateSelection } - type super_usersuper_friendMy_friendAggregationSelection { - count: Int! - node: super_usersuper_friendMy_friendNodeAggregateSelection - } - type super_usersuper_friendMy_friendNodeAggregateSelection { name: StringAggregateSelection! }" diff --git a/packages/graphql/tests/schema/query-direction.test.ts b/packages/graphql/tests/schema/query-direction.test.ts index b026442317..0739873239 100644 --- a/packages/graphql/tests/schema/query-direction.test.ts +++ b/packages/graphql/tests/schema/query-direction.test.ts @@ -110,7 +110,6 @@ describe("Query Direction", () => { type Query { users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\" instead\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } @@ -165,7 +164,6 @@ describe("Query Direction", () => { type User { friends(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - friendsAggregate(where: UserWhere): UserUserFriendsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"friendsConnection\\\\\\" instead\\") friendsConnection(after: String, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! name: String! } @@ -179,11 +177,6 @@ describe("Query Direction", () => { name: StringAggregateSelection! } - type UserAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input UserConnectInput { friends: [UserFriendsConnectFieldInput!] } @@ -363,11 +356,6 @@ describe("Query Direction", () => { node: UserUserFriendsNodeAggregateSelection } - type UserUserFriendsAggregationSelection { - count: Int! - node: UserUserFriendsNodeAggregateSelection - } - type UserUserFriendsNodeAggregateSelection { name: StringAggregateSelection! } @@ -507,7 +495,6 @@ describe("Query Direction", () => { type Query { users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\" instead\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } @@ -562,7 +549,6 @@ describe("Query Direction", () => { type User { friends(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - friendsAggregate(where: UserWhere): UserUserFriendsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"friendsConnection\\\\\\" instead\\") friendsConnection(after: String, first: Int, sort: [UserFriendsConnectionSort!], where: UserFriendsConnectionWhere): UserFriendsConnection! name: String! } @@ -576,11 +562,6 @@ describe("Query Direction", () => { name: StringAggregateSelection! } - type UserAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input UserConnectInput { friends: [UserFriendsConnectFieldInput!] } @@ -760,11 +741,6 @@ describe("Query Direction", () => { node: UserUserFriendsNodeAggregateSelection } - type UserUserFriendsAggregationSelection { - count: Int! - node: UserUserFriendsNodeAggregateSelection - } - type UserUserFriendsNodeAggregateSelection { name: StringAggregateSelection! } diff --git a/packages/graphql/tests/schema/remove-deprecated/aggregate-operations.test.ts b/packages/graphql/tests/schema/remove-deprecated/aggregate-operations.test.ts deleted file mode 100644 index 03ec3434af..0000000000 --- a/packages/graphql/tests/schema/remove-deprecated/aggregate-operations.test.ts +++ /dev/null @@ -1,631 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { printSchemaWithDirectives } from "@graphql-tools/utils"; -import { 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 - } - - input ConnectionAggregationCountFilterInput { - edges: IntScalarFilters - nodes: IntScalarFilters - } - - type Count { - nodes: Int! - } - - type CountConnection { - edges: Int! - nodes: Int! - } - - \\"\\"\\" - 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! - } - - \\"\\"\\"Float filters\\"\\"\\" - input FloatScalarFilters { - eq: Float - gt: Float - gte: Float - in: [Float!] - lt: Float - lte: Float - } - - \\"\\"\\"ID filters\\"\\"\\" - input IDScalarFilters { - contains: ID - endsWith: ID - eq: ID - in: [ID!] - startsWith: ID - } - - \\"\\"\\"ID mutations\\"\\"\\" - input IDScalarMutations { - set: ID - } - - type IntAggregateSelection { - average: Float - max: Int - min: Int - sum: Int - } - - \\"\\"\\"Filters for an aggregation of an int field\\"\\"\\" - input IntScalarAggregationFilters { - average: FloatScalarFilters - max: IntScalarFilters - min: IntScalarFilters - sum: IntScalarFilters - } - - \\"\\"\\"Int filters\\"\\"\\" - input IntScalarFilters { - eq: Int - gt: Int - gte: Int - in: [Int!] - lt: Int - lte: Int - } - - \\"\\"\\"Int mutations\\"\\"\\" - input IntScalarMutations { - add: Int - set: Int - subtract: Int - } - - \\"\\"\\" - The edge properties for the following fields: - * Post.likes - \\"\\"\\" - type Likes { - someID: ID - someString: String - } - - input LikesAggregationWhereInput { - AND: [LikesAggregationWhereInput!] - NOT: LikesAggregationWhereInput - OR: [LikesAggregationWhereInput!] - someString: StringScalarAggregationFilters - someString_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { eq: ... } } }' instead.\\") - someString_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { gt: ... } } }' instead.\\") - someString_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { gte: ... } } }' instead.\\") - someString_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { lt: ... } } }' instead.\\") - someString_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { lte: ... } } }' instead.\\") - someString_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { eq: ... } } }' instead.\\") - someString_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { gt: ... } } }' instead.\\") - someString_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { gte: ... } } }' instead.\\") - someString_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { lt: ... } } }' instead.\\") - someString_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { lte: ... } } }' instead.\\") - someString_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { eq: ... } } }' instead.\\") - someString_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { gt: ... } } }' instead.\\") - someString_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { gte: ... } } }' instead.\\") - someString_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { lt: ... } } }' instead.\\") - someString_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { lte: ... } } }' instead.\\") - } - - input LikesCreateInput { - someID: ID - someString: String - } - - input LikesSort { - someID: SortDirection - someString: SortDirection - } - - input LikesUpdateInput { - someID: IDScalarMutations - someID_SET: ID @deprecated(reason: \\"Please use the generic mutation 'someID: { set: ... } }' instead.\\") - someString: StringScalarMutations - someString_SET: String @deprecated(reason: \\"Please use the generic mutation 'someString: { set: ... } }' instead.\\") - } - - input LikesWhere { - AND: [LikesWhere!] - NOT: LikesWhere - OR: [LikesWhere!] - someID: IDScalarFilters - someID_CONTAINS: ID @deprecated(reason: \\"Please use the relevant generic filter someID: { contains: ... }\\") - someID_ENDS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter someID: { endsWith: ... }\\") - someID_EQ: ID @deprecated(reason: \\"Please use the relevant generic filter someID: { eq: ... }\\") - someID_IN: [ID] @deprecated(reason: \\"Please use the relevant generic filter someID: { in: ... }\\") - someID_STARTS_WITH: ID @deprecated(reason: \\"Please use the relevant generic filter someID: { startsWith: ... }\\") - someString: StringScalarFilters - someString_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter someString: { contains: ... }\\") - someString_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter someString: { endsWith: ... }\\") - someString_EQ: String @deprecated(reason: \\"Please use the relevant generic filter someString: { eq: ... }\\") - someString_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter someString: { in: ... }\\") - someString_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter someString: { startsWith: ... }\\") - } - - type Mutation { - createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! - createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! - deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! - deleteUsers(where: UserWhere): DeleteInfo! - updatePosts(update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! - updateUsers(update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! - } - - \\"\\"\\"Pagination information (Relay)\\"\\"\\" - type PageInfo { - endCursor: String - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - } - - type Post { - likes(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - likesConnection(after: String, first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! - title: String - } - - type PostAggregate { - count: Count! - node: PostAggregateNode! - } - - type PostAggregateNode { - title: StringAggregateSelection! - } - - input PostCreateInput { - likes: PostLikesFieldInput - title: String - } - - input PostDeleteInput { - likes: [PostLikesDeleteFieldInput!] - } - - type PostEdge { - cursor: String! - node: Post! - } - - input PostLikesAggregateInput { - AND: [PostLikesAggregateInput!] - NOT: PostLikesAggregateInput - OR: [PostLikesAggregateInput!] - count: IntScalarFilters - count_EQ: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - edge: LikesAggregationWhereInput - node: PostLikesNodeAggregationWhereInput - } - - input PostLikesConnectFieldInput { - edge: LikesCreateInput - where: UserConnectWhere - } - - type PostLikesConnection { - aggregate: PostUserLikesAggregateSelection! - edges: [PostLikesRelationship!]! - pageInfo: PageInfo! - totalCount: Int! - } - - input PostLikesConnectionAggregateInput { - AND: [PostLikesConnectionAggregateInput!] - NOT: PostLikesConnectionAggregateInput - OR: [PostLikesConnectionAggregateInput!] - count: ConnectionAggregationCountFilterInput - edge: LikesAggregationWhereInput - node: PostLikesNodeAggregationWhereInput - } - - input PostLikesConnectionFilters { - \\"\\"\\"Filter Posts by aggregating results on related PostLikesConnections\\"\\"\\" - aggregate: PostLikesConnectionAggregateInput - \\"\\"\\" - Return Posts where all of the related PostLikesConnections match this filter - \\"\\"\\" - all: PostLikesConnectionWhere - \\"\\"\\" - Return Posts where none of the related PostLikesConnections match this filter - \\"\\"\\" - none: PostLikesConnectionWhere - \\"\\"\\" - Return Posts where one of the related PostLikesConnections match this filter - \\"\\"\\" - single: PostLikesConnectionWhere - \\"\\"\\" - Return Posts where some of the related PostLikesConnections match this filter - \\"\\"\\" - some: PostLikesConnectionWhere - } - - input PostLikesConnectionSort { - edge: LikesSort - node: UserSort - } - - input PostLikesConnectionWhere { - AND: [PostLikesConnectionWhere!] - NOT: PostLikesConnectionWhere - OR: [PostLikesConnectionWhere!] - edge: LikesWhere - node: UserWhere - } - - input PostLikesCreateFieldInput { - edge: LikesCreateInput - node: UserCreateInput! - } - - input PostLikesDeleteFieldInput { - where: PostLikesConnectionWhere - } - - input PostLikesDisconnectFieldInput { - where: PostLikesConnectionWhere - } - - input PostLikesFieldInput { - connect: [PostLikesConnectFieldInput!] - create: [PostLikesCreateFieldInput!] - } - - input PostLikesNodeAggregationWhereInput { - AND: [PostLikesNodeAggregationWhereInput!] - NOT: PostLikesNodeAggregationWhereInput - OR: [PostLikesNodeAggregationWhereInput!] - someID: IntScalarAggregationFilters - someID_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'someID: { average: { eq: ... } } }' instead.\\") - someID_AVERAGE_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someID: { average: { gt: ... } } }' instead.\\") - someID_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someID: { average: { gte: ... } } }' instead.\\") - someID_AVERAGE_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someID: { average: { lt: ... } } }' instead.\\") - someID_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someID: { average: { lte: ... } } }' instead.\\") - someID_MAX_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'someID: { max: { eq: ... } } }' instead.\\") - someID_MAX_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someID: { max: { gt: ... } } }' instead.\\") - someID_MAX_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someID: { max: { gte: ... } } }' instead.\\") - someID_MAX_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someID: { max: { lt: ... } } }' instead.\\") - someID_MAX_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someID: { max: { lte: ... } } }' instead.\\") - someID_MIN_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'someID: { min: { eq: ... } } }' instead.\\") - someID_MIN_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someID: { min: { gt: ... } } }' instead.\\") - someID_MIN_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someID: { min: { gte: ... } } }' instead.\\") - someID_MIN_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someID: { min: { lt: ... } } }' instead.\\") - someID_MIN_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someID: { min: { lte: ... } } }' instead.\\") - someID_SUM_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'someID: { sum: { eq: ... } } }' instead.\\") - someID_SUM_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someID: { sum: { gt: ... } } }' instead.\\") - someID_SUM_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someID: { sum: { gte: ... } } }' instead.\\") - someID_SUM_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someID: { sum: { lt: ... } } }' instead.\\") - someID_SUM_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someID: { sum: { lte: ... } } }' instead.\\") - someString: StringScalarAggregationFilters - someString_AVERAGE_LENGTH_EQUAL: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { eq: ... } } }' instead.\\") - someString_AVERAGE_LENGTH_GT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { gt: ... } } }' instead.\\") - someString_AVERAGE_LENGTH_GTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { gte: ... } } }' instead.\\") - someString_AVERAGE_LENGTH_LT: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { lt: ... } } }' instead.\\") - someString_AVERAGE_LENGTH_LTE: Float @deprecated(reason: \\"Please use the relevant generic filter 'someString: { averageLength: { lte: ... } } }' instead.\\") - someString_LONGEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { eq: ... } } }' instead.\\") - someString_LONGEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { gt: ... } } }' instead.\\") - someString_LONGEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { gte: ... } } }' instead.\\") - someString_LONGEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { lt: ... } } }' instead.\\") - someString_LONGEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { longestLength: { lte: ... } } }' instead.\\") - someString_SHORTEST_LENGTH_EQUAL: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { eq: ... } } }' instead.\\") - someString_SHORTEST_LENGTH_GT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { gt: ... } } }' instead.\\") - someString_SHORTEST_LENGTH_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { gte: ... } } }' instead.\\") - someString_SHORTEST_LENGTH_LT: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { lt: ... } } }' instead.\\") - someString_SHORTEST_LENGTH_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter 'someString: { shortestLength: { lte: ... } } }' instead.\\") - } - - type PostLikesRelationship { - cursor: String! - node: User! - properties: Likes! - } - - input PostLikesUpdateConnectionInput { - edge: LikesUpdateInput - node: UserUpdateInput - } - - input PostLikesUpdateFieldInput { - connect: [PostLikesConnectFieldInput!] - create: [PostLikesCreateFieldInput!] - delete: [PostLikesDeleteFieldInput!] - disconnect: [PostLikesDisconnectFieldInput!] - update: PostLikesUpdateConnectionInput - where: PostLikesConnectionWhere - } - - \\"\\"\\" - Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. - \\"\\"\\" - input PostSort { - title: SortDirection - } - - input PostUpdateInput { - likes: [PostLikesUpdateFieldInput!] - title: StringScalarMutations - title_SET: String @deprecated(reason: \\"Please use the generic mutation 'title: { set: ... } }' instead.\\") - } - - type PostUserLikesAggregateSelection { - count: CountConnection! - edge: PostUserLikesEdgeAggregateSelection - node: PostUserLikesNodeAggregateSelection - } - - type PostUserLikesEdgeAggregateSelection { - someString: StringAggregateSelection! - } - - type PostUserLikesNodeAggregateSelection { - someID: IntAggregateSelection! - someString: StringAggregateSelection! - } - - input PostWhere { - AND: [PostWhere!] - NOT: PostWhere - OR: [PostWhere!] - likes: UserRelationshipFilters - likesAggregate: PostLikesAggregateInput @deprecated(reason: \\"Aggregate filters are moved inside the likesConnection filter, please use { likesConnection: { aggregate: {...} } } instead\\") - likesConnection: PostLikesConnectionFilters - \\"\\"\\" - Return Posts where all of the related PostLikesConnections match this filter - \\"\\"\\" - likesConnection_ALL: PostLikesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'likesConnection: { all: { node: ... } } }' instead.\\") - \\"\\"\\" - Return Posts where none of the related PostLikesConnections match this filter - \\"\\"\\" - likesConnection_NONE: PostLikesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'likesConnection: { none: { node: ... } } }' instead.\\") - \\"\\"\\" - Return Posts where one of the related PostLikesConnections match this filter - \\"\\"\\" - likesConnection_SINGLE: PostLikesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'likesConnection: { single: { node: ... } } }' instead.\\") - \\"\\"\\" - Return Posts where some of the related PostLikesConnections match this filter - \\"\\"\\" - likesConnection_SOME: PostLikesConnectionWhere @deprecated(reason: \\"Please use the relevant generic filter 'likesConnection: { some: { node: ... } } }' instead.\\") - \\"\\"\\"Return Posts where all of the related Users match this filter\\"\\"\\" - likes_ALL: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'likes: { all: ... }' instead.\\") - \\"\\"\\"Return Posts where none of the related Users match this filter\\"\\"\\" - likes_NONE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'likes: { none: ... }' instead.\\") - \\"\\"\\"Return Posts where one of the related Users match this filter\\"\\"\\" - likes_SINGLE: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'likes: { single: ... }' instead.\\") - \\"\\"\\"Return Posts where some of the related Users match this filter\\"\\"\\" - likes_SOME: UserWhere @deprecated(reason: \\"Please use the relevant generic filter 'likes: { some: ... }' instead.\\") - title: StringScalarFilters - title_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter title: { contains: ... }\\") - title_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { endsWith: ... }\\") - title_EQ: String @deprecated(reason: \\"Please use the relevant generic filter title: { eq: ... }\\") - title_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter title: { in: ... }\\") - title_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter title: { startsWith: ... }\\") - } - - type PostsConnection { - aggregate: PostAggregate! - edges: [PostEdge!]! - pageInfo: PageInfo! - totalCount: Int! - } - - type Query { - posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! - postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! - users(limit: Int, offset: Int, 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 - } - - \\"\\"\\"Filters for an aggregation of a string field\\"\\"\\" - input StringScalarAggregationFilters { - averageLength: FloatScalarFilters - longestLength: IntScalarFilters - shortestLength: IntScalarFilters - } - - \\"\\"\\"String filters\\"\\"\\" - input StringScalarFilters { - contains: String - endsWith: String - eq: String - in: [String!] - startsWith: String - } - - \\"\\"\\"String mutations\\"\\"\\" - input StringScalarMutations { - set: String - } - - \\"\\"\\" - Information about the number of nodes and relationships created and deleted during an update mutation - \\"\\"\\" - 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 { - count: Count! - node: UserAggregateNode! - } - - type UserAggregateNode { - someID: IntAggregateSelection! - someString: StringAggregateSelection! - } - - input UserConnectWhere { - node: UserWhere! - } - - input UserCreateInput { - someID: Int - someString: String - } - - type UserEdge { - cursor: String! - node: User! - } - - input UserRelationshipFilters { - \\"\\"\\"Filter type where all of the related Users match this filter\\"\\"\\" - all: UserWhere - \\"\\"\\"Filter type where none of the related Users match this filter\\"\\"\\" - none: UserWhere - \\"\\"\\"Filter type where one of the related Users match this filter\\"\\"\\" - single: UserWhere - \\"\\"\\"Filter type where some of the related Users match this filter\\"\\"\\" - some: UserWhere - } - - \\"\\"\\" - Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. - \\"\\"\\" - input UserSort { - someID: SortDirection - someString: SortDirection - } - - input UserUpdateInput { - someID: IntScalarMutations - someID_DECREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'someID: { decrement: ... } }' instead.\\") - someID_INCREMENT: Int @deprecated(reason: \\"Please use the relevant generic mutation 'someID: { increment: ... } }' instead.\\") - someID_SET: Int @deprecated(reason: \\"Please use the generic mutation 'someID: { set: ... } }' instead.\\") - someString: StringScalarMutations - someString_SET: String @deprecated(reason: \\"Please use the generic mutation 'someString: { set: ... } }' instead.\\") - } - - input UserWhere { - AND: [UserWhere!] - NOT: UserWhere - OR: [UserWhere!] - someID: IntScalarFilters - someID_EQ: Int @deprecated(reason: \\"Please use the relevant generic filter someID: { eq: ... }\\") - someID_GT: Int @deprecated(reason: \\"Please use the relevant generic filter someID: { gt: ... }\\") - someID_GTE: Int @deprecated(reason: \\"Please use the relevant generic filter someID: { gte: ... }\\") - someID_IN: [Int] @deprecated(reason: \\"Please use the relevant generic filter someID: { in: ... }\\") - someID_LT: Int @deprecated(reason: \\"Please use the relevant generic filter someID: { lt: ... }\\") - someID_LTE: Int @deprecated(reason: \\"Please use the relevant generic filter someID: { lte: ... }\\") - someString: StringScalarFilters - someString_CONTAINS: String @deprecated(reason: \\"Please use the relevant generic filter someString: { contains: ... }\\") - someString_ENDS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter someString: { endsWith: ... }\\") - someString_EQ: String @deprecated(reason: \\"Please use the relevant generic filter someString: { eq: ... }\\") - someString_IN: [String] @deprecated(reason: \\"Please use the relevant generic filter someString: { in: ... }\\") - someString_STARTS_WITH: String @deprecated(reason: \\"Please use the relevant generic filter someString: { startsWith: ... }\\") - } - - type UsersConnection { - aggregate: UserAggregate! - edges: [UserEdge!]! - pageInfo: PageInfo! - totalCount: Int! - }" - `); - }); -}); diff --git a/packages/graphql/tests/schema/remove-deprecated/aggregations-deprecated-disabled.test.ts b/packages/graphql/tests/schema/remove-deprecated/aggregations-deprecated-disabled.test.ts index 887e343d18..ad029ad66a 100644 --- a/packages/graphql/tests/schema/remove-deprecated/aggregations-deprecated-disabled.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/aggregations-deprecated-disabled.test.ts @@ -295,20 +295,6 @@ describe("Deprecated Aggregations disabled", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - createdAt: DateTimeAggregateSelection! - imdbRating: FloatAggregateSelection! - isbn: StringAggregateSelection! - screenTime: DurationAggregateSelection! - someBigInt: BigIntAggregateSelection! - someInt: IntAggregateSelection! - someLocalDateTime: LocalDateTimeAggregateSelection! - someLocalTime: LocalTimeAggregateSelection! - someTime: TimeAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { createdAt: DateTime id: ID @@ -481,7 +467,6 @@ describe("Deprecated Aggregations disabled", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1055,7 +1040,6 @@ describe("Deprecated Aggregations disabled", () => { type Post { likes(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - likesAggregate(where: UserWhere): PostUserLikesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"likesConnection\\\\\\" instead\\") likesConnection(after: String, first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! title: String } @@ -1069,11 +1053,6 @@ describe("Deprecated Aggregations disabled", () => { title: StringAggregateSelection! } - type PostAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input PostCreateInput { likes: PostLikesFieldInput title: String @@ -1229,12 +1208,6 @@ describe("Deprecated Aggregations disabled", () => { node: PostUserLikesNodeAggregateSelection } - type PostUserLikesAggregationSelection { - count: Int! - edge: PostUserLikesEdgeAggregateSelection - node: PostUserLikesNodeAggregateSelection - } - type PostUserLikesEdgeAggregateSelection { someBigInt: BigIntAggregateSelection! someDateTime: DateTimeAggregateSelection! @@ -1307,10 +1280,8 @@ describe("Deprecated Aggregations disabled", () => { type Query { posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\" instead\\") postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\" instead\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } @@ -1427,19 +1398,6 @@ describe("Deprecated Aggregations disabled", () => { someTime: TimeAggregateSelection! } - type UserAggregateSelection { - count: Int! - someBigInt: BigIntAggregateSelection! - someDateTime: DateTimeAggregateSelection! - someDuration: DurationAggregateSelection! - someFloat: FloatAggregateSelection! - someInt: IntAggregateSelection! - someLocalDateTime: LocalDateTimeAggregateSelection! - someLocalTime: LocalTimeAggregateSelection! - someString: StringAggregateSelection! - someTime: TimeAggregateSelection! - } - input UserConnectWhere { node: UserWhere! } @@ -2183,7 +2141,6 @@ describe("Deprecated Aggregations disabled", () => { type Post { likes(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - likesAggregate(where: UserWhere): PostUserLikesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"likesConnection\\\\\\" instead\\") likesConnection(after: String, first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! title: String } @@ -2197,11 +2154,6 @@ describe("Deprecated Aggregations disabled", () => { title: StringAggregateSelection! } - type PostAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input PostCreateInput { likes: PostLikesFieldInput title: String @@ -2354,11 +2306,6 @@ describe("Deprecated Aggregations disabled", () => { node: PostUserLikesNodeAggregateSelection } - type PostUserLikesAggregationSelection { - count: Int! - node: PostUserLikesNodeAggregateSelection - } - type PostUserLikesNodeAggregateSelection { someBigInt: BigIntAggregateSelection! someDateTime: DateTimeAggregateSelection! @@ -2419,10 +2366,8 @@ describe("Deprecated Aggregations disabled", () => { type Query { posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\" instead\\") postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\" instead\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } @@ -2551,19 +2496,6 @@ describe("Deprecated Aggregations disabled", () => { someTime: TimeAggregateSelection! } - type UserAggregateSelection { - count: Int! - someBigInt: BigIntAggregateSelection! - someDateTime: DateTimeAggregateSelection! - someDuration: DurationAggregateSelection! - someFloat: FloatAggregateSelection! - someInt: IntAggregateSelection! - someLocalDateTime: LocalDateTimeAggregateSelection! - someLocalTime: LocalTimeAggregateSelection! - someString: StringAggregateSelection! - someTime: TimeAggregateSelection! - } - input UserConnectWhere { node: UserWhere! } diff --git a/packages/graphql/tests/schema/remove-deprecated/aggregations-filters-outside-connection.test.ts b/packages/graphql/tests/schema/remove-deprecated/aggregations-filters-outside-connection.test.ts index 17e9ea5f47..cc955d8031 100644 --- a/packages/graphql/tests/schema/remove-deprecated/aggregations-filters-outside-connection.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/aggregations-filters-outside-connection.test.ts @@ -232,7 +232,6 @@ describe("Aggregations filters outside connection filters", () => { type Post { likes(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - likesAggregate(where: UserWhere): PostUserLikesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"likesConnection\\\\\\" instead\\") likesConnection(after: String, first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! title: String } @@ -246,11 +245,6 @@ describe("Aggregations filters outside connection filters", () => { title: StringAggregateSelection! } - type PostAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input PostCreateInput { likes: PostLikesFieldInput title: String @@ -420,12 +414,6 @@ describe("Aggregations filters outside connection filters", () => { node: PostUserLikesNodeAggregateSelection } - type PostUserLikesAggregationSelection { - count: Int! - edge: PostUserLikesEdgeAggregateSelection - node: PostUserLikesNodeAggregateSelection - } - type PostUserLikesEdgeAggregateSelection { someString: StringAggregateSelection! } @@ -482,10 +470,8 @@ describe("Aggregations filters outside connection filters", () => { type Query { posts(limit: Int, offset: Int, sort: [PostSort!], where: PostWhere): [Post!]! - postsAggregate(where: PostWhere): PostAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"postsConnection\\\\\\" instead\\") postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! users(limit: Int, offset: Int, sort: [UserSort!], where: UserWhere): [User!]! - usersAggregate(where: UserWhere): UserAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"usersConnection\\\\\\" instead\\") usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! } @@ -558,12 +544,6 @@ describe("Aggregations filters outside connection filters", () => { someString: StringAggregateSelection! } - type UserAggregateSelection { - count: Int! - someID: IntAggregateSelection! - someString: StringAggregateSelection! - } - input UserConnectWhere { node: UserWhere! } diff --git a/packages/graphql/tests/schema/remove-deprecated/attribute-filtering.test.ts b/packages/graphql/tests/schema/remove-deprecated/attribute-filtering.test.ts index 0ce8c7daf7..0be8efbec3 100644 --- a/packages/graphql/tests/schema/remove-deprecated/attribute-filtering.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/attribute-filtering.test.ts @@ -449,13 +449,10 @@ describe("Exclude attribute suffix based filtering", () => { type Query { ds(limit: Int, offset: Int, where: dWhere): [d!]! interfaceCS(limit: Int, offset: Int, sort: [interfaceCSort!], where: interfaceCWhere): [interfaceC!]! - interfaceCSAggregate(where: interfaceCWhere): interfaceCAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"interfaceCSConnection\\\\\\" instead\\") interfaceCSConnection(after: String, first: Int, sort: [interfaceCSort!], where: interfaceCWhere): InterfaceCSConnection! typeAS(limit: Int, offset: Int, sort: [typeASort!], where: typeAWhere): [typeA!]! - typeASAggregate(where: typeAWhere): typeAAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"typeASConnection\\\\\\" instead\\") typeASConnection(after: String, first: Int, sort: [typeASort!], where: typeAWhere): TypeASConnection! typeBS(limit: Int, offset: Int, sort: [typeBSort!], where: typeBWhere): [typeB!]! - typeBSAggregate(where: typeBWhere): typeBAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"typeBSConnection\\\\\\" instead\\") typeBSConnection(after: String, first: Int, sort: [typeBSort!], where: typeBWhere): TypeBSConnection! } @@ -596,16 +593,6 @@ describe("Exclude attribute suffix based filtering", () => { time: TimeAggregateSelection! } - type interfaceCAggregateSelection { - averageRating: FloatAggregateSelection! - count: Int! - createdAt: DateTimeAggregateSelection! - duration: DurationAggregateSelection! - localDateTime: LocalDateTimeAggregateSelection! - localTime: LocalTimeAggregateSelection! - time: TimeAggregateSelection! - } - type interfaceCEdge { cursor: String! node: interfaceC! @@ -825,7 +812,6 @@ describe("Exclude attribute suffix based filtering", () => { type typeA { actedIn(limit: Int, offset: Int, sort: [typeBSort!], where: typeBWhere): [typeB!]! - actedInAggregate(where: typeBWhere): typeAtypeBActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [typeAActedInConnectionSort!], where: typeAActedInConnectionWhere): typeAActedInConnection! name: String } @@ -1038,11 +1024,6 @@ describe("Exclude attribute suffix based filtering", () => { name: StringAggregateSelection! } - type typeAAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input typeAConnectInput { actedIn: [typeAActedInConnectFieldInput!] } @@ -1133,12 +1114,6 @@ describe("Exclude attribute suffix based filtering", () => { node: typeAtypeBActedInNodeAggregateSelection } - type typeAtypeBActedInAggregationSelection { - count: Int! - edge: typeAtypeBActedInEdgeAggregateSelection - node: typeAtypeBActedInNodeAggregateSelection - } - type typeAtypeBActedInEdgeAggregateSelection { averageRating: FloatAggregateSelection! createdAt: DateTimeAggregateSelection! @@ -1170,7 +1145,6 @@ describe("Exclude attribute suffix based filtering", () => { point: Point ratings: [Float!]! rels(limit: Int, offset: Int, sort: [typeASort!], where: typeAWhere): [typeA!]! - relsAggregate(where: typeAWhere): typeBtypeARelsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"relsConnection\\\\\\" instead\\") relsConnection(after: String, first: Int, sort: [typeBRelsConnectionSort!], where: typeBRelsConnectionWhere): typeBRelsConnection! time: Time } @@ -1189,16 +1163,6 @@ describe("Exclude attribute suffix based filtering", () => { time: TimeAggregateSelection! } - type typeBAggregateSelection { - averageRating: FloatAggregateSelection! - count: Int! - createdAt: DateTimeAggregateSelection! - duration: DurationAggregateSelection! - localDateTime: LocalDateTimeAggregateSelection! - localTime: LocalTimeAggregateSelection! - time: TimeAggregateSelection! - } - input typeBConnectInput { rels: [typeBRelsConnectFieldInput!] } @@ -1482,12 +1446,6 @@ describe("Exclude attribute suffix based filtering", () => { node: typeBtypeARelsNodeAggregateSelection } - type typeBtypeARelsAggregationSelection { - count: Int! - edge: typeBtypeARelsEdgeAggregateSelection - node: typeBtypeARelsNodeAggregateSelection - } - type typeBtypeARelsEdgeAggregateSelection { averageRating: FloatAggregateSelection! createdAt: DateTimeAggregateSelection! diff --git a/packages/graphql/tests/schema/remove-deprecated/mutation-operations.test.ts b/packages/graphql/tests/schema/remove-deprecated/mutation-operations.test.ts index 8c6e6b4d29..37d5552d7f 100644 --- a/packages/graphql/tests/schema/remove-deprecated/mutation-operations.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/mutation-operations.test.ts @@ -129,7 +129,6 @@ describe("Deprecated mutation operations", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String } @@ -282,11 +281,6 @@ describe("Deprecated mutation operations", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { actedIn: [ActorActedInConnectFieldInput!] } @@ -319,12 +313,6 @@ describe("Deprecated mutation operations", () => { node: ActorMovieActedInNodeAggregateSelection } - type ActorMovieActedInAggregationSelection { - count: Int! - edge: ActorMovieActedInEdgeAggregateSelection - node: ActorMovieActedInNodeAggregateSelection - } - type ActorMovieActedInEdgeAggregateSelection { value: IntAggregateSelection! } @@ -555,7 +543,6 @@ describe("Deprecated mutation operations", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float! date: Date @@ -570,12 +557,6 @@ describe("Deprecated mutation operations", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsEdgeAggregateSelection { value: IntAggregateSelection! } @@ -725,11 +706,6 @@ describe("Deprecated mutation operations", () => { averageRating: FloatAggregateSelection! } - type MovieAggregateSelection { - averageRating: FloatAggregateSelection! - count: Int! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -927,10 +903,8 @@ describe("Deprecated mutation operations", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } diff --git a/packages/graphql/tests/schema/remove-deprecated/relationship-filtering.test.ts b/packages/graphql/tests/schema/remove-deprecated/relationship-filtering.test.ts index e4f0e99cca..64c393286b 100644 --- a/packages/graphql/tests/schema/remove-deprecated/relationship-filtering.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/relationship-filtering.test.ts @@ -462,13 +462,10 @@ describe("Exclude suffix based filtering", () => { type Query { ds(limit: Int, offset: Int, where: dWhere): [d!]! interfaceCS(limit: Int, offset: Int, sort: [interfaceCSort!], where: interfaceCWhere): [interfaceC!]! - interfaceCSAggregate(where: interfaceCWhere): interfaceCAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"interfaceCSConnection\\\\\\" instead\\") interfaceCSConnection(after: String, first: Int, sort: [interfaceCSort!], where: interfaceCWhere): InterfaceCSConnection! typeAS(limit: Int, offset: Int, sort: [typeASort!], where: typeAWhere): [typeA!]! - typeASAggregate(where: typeAWhere): typeAAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"typeASConnection\\\\\\" instead\\") typeASConnection(after: String, first: Int, sort: [typeASort!], where: typeAWhere): TypeASConnection! typeBS(limit: Int, offset: Int, sort: [typeBSort!], where: typeBWhere): [typeB!]! - typeBSAggregate(where: typeBWhere): typeBAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"typeBSConnection\\\\\\" instead\\") typeBSConnection(after: String, first: Int, sort: [typeBSort!], where: typeBWhere): TypeBSConnection! } @@ -609,16 +606,6 @@ describe("Exclude suffix based filtering", () => { time: TimeAggregateSelection! } - type interfaceCAggregateSelection { - averageRating: FloatAggregateSelection! - count: Int! - createdAt: DateTimeAggregateSelection! - duration: DurationAggregateSelection! - localDateTime: LocalDateTimeAggregateSelection! - localTime: LocalTimeAggregateSelection! - time: TimeAggregateSelection! - } - type interfaceCEdge { cursor: String! node: interfaceC! @@ -954,7 +941,6 @@ describe("Exclude suffix based filtering", () => { type typeA { actedIn(limit: Int, offset: Int, sort: [typeBSort!], where: typeBWhere): [typeB!]! - actedInAggregate(where: typeBWhere): typeAtypeBActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [typeAActedInConnectionSort!], where: typeAActedInConnectionWhere): typeAActedInConnection! name: String } @@ -1167,11 +1153,6 @@ describe("Exclude suffix based filtering", () => { name: StringAggregateSelection! } - type typeAAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input typeAConnectInput { actedIn: [typeAActedInConnectFieldInput!] } @@ -1243,12 +1224,6 @@ describe("Exclude suffix based filtering", () => { node: typeAtypeBActedInNodeAggregateSelection } - type typeAtypeBActedInAggregationSelection { - count: Int! - edge: typeAtypeBActedInEdgeAggregateSelection - node: typeAtypeBActedInNodeAggregateSelection - } - type typeAtypeBActedInEdgeAggregateSelection { averageRating: FloatAggregateSelection! createdAt: DateTimeAggregateSelection! @@ -1280,7 +1255,6 @@ describe("Exclude suffix based filtering", () => { point: Point ratings: [Float!]! rels(limit: Int, offset: Int, sort: [typeASort!], where: typeAWhere): [typeA!]! - relsAggregate(where: typeAWhere): typeBtypeARelsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"relsConnection\\\\\\" instead\\") relsConnection(after: String, first: Int, sort: [typeBRelsConnectionSort!], where: typeBRelsConnectionWhere): typeBRelsConnection! time: Time } @@ -1299,16 +1273,6 @@ describe("Exclude suffix based filtering", () => { time: TimeAggregateSelection! } - type typeBAggregateSelection { - averageRating: FloatAggregateSelection! - count: Int! - createdAt: DateTimeAggregateSelection! - duration: DurationAggregateSelection! - localDateTime: LocalDateTimeAggregateSelection! - localTime: LocalTimeAggregateSelection! - time: TimeAggregateSelection! - } - input typeBConnectInput { rels: [typeBRelsConnectFieldInput!] } @@ -1633,12 +1597,6 @@ describe("Exclude suffix based filtering", () => { node: typeBtypeARelsNodeAggregateSelection } - type typeBtypeARelsAggregationSelection { - count: Int! - edge: typeBtypeARelsEdgeAggregateSelection - node: typeBtypeARelsNodeAggregateSelection - } - type typeBtypeARelsEdgeAggregateSelection { averageRating: FloatAggregateSelection! createdAt: DateTimeAggregateSelection! diff --git a/packages/graphql/tests/schema/scalar.test.ts b/packages/graphql/tests/schema/scalar.test.ts index bcfbc4df5e..37948e3949 100644 --- a/packages/graphql/tests/schema/scalar.test.ts +++ b/packages/graphql/tests/schema/scalar.test.ts @@ -119,10 +119,6 @@ describe("Scalar", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { id: ID myCustomArrayScalar: [CustomScalar!] @@ -198,7 +194,6 @@ describe("Scalar", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 e48c94f3a0..02f7b01d7b 100644 --- a/packages/graphql/tests/schema/simple.test.ts +++ b/packages/graphql/tests/schema/simple.test.ts @@ -157,12 +157,6 @@ describe("Simple", () => { averageRating: FloatAggregateSelection! } - type MovieAggregateSelection { - actorCount: IntAggregateSelection! - averageRating: FloatAggregateSelection! - count: Int! - } - input MovieCreateInput { actorCount: Int averageRating: Float @@ -253,7 +247,6 @@ describe("Simple", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 3b4b5f8d83..efed2d1dc8 100644 --- a/packages/graphql/tests/schema/string-comparators.test.ts +++ b/packages/graphql/tests/schema/string-comparators.test.ts @@ -88,11 +88,6 @@ describe("String Comparators", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieCreateInput { title: String } @@ -153,7 +148,6 @@ describe("String Comparators", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -260,11 +254,6 @@ describe("String Comparators", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieCreateInput { title: String } @@ -321,7 +310,6 @@ describe("String Comparators", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -433,11 +421,6 @@ describe("String Comparators", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieCreateInput { title: String } @@ -496,7 +479,6 @@ describe("String Comparators", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -646,7 +628,6 @@ describe("String Comparators", () => { type Actor { actedIn(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - actedInAggregate(where: MovieWhere): ActorMovieActedInAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actedInConnection\\\\\\" instead\\") actedInConnection(after: String, first: Int, sort: [ActorActedInConnectionSort!], where: ActorActedInConnectionWhere): ActorActedInConnection! name: String } @@ -794,11 +775,6 @@ describe("String Comparators", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectInput { actedIn: [ActorActedInConnectFieldInput!] } @@ -831,12 +807,6 @@ describe("String Comparators", () => { node: ActorMovieActedInNodeAggregateSelection } - type ActorMovieActedInAggregationSelection { - count: Int! - edge: ActorMovieActedInEdgeAggregateSelection - node: ActorMovieActedInNodeAggregateSelection - } - type ActorMovieActedInEdgeAggregateSelection { screenTime: StringAggregateSelection! } @@ -981,7 +951,6 @@ describe("String Comparators", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! title: String } @@ -992,12 +961,6 @@ describe("String Comparators", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsEdgeAggregateSelection { screenTime: StringAggregateSelection! } @@ -1147,11 +1110,6 @@ describe("String Comparators", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -1271,10 +1229,8 @@ describe("String Comparators", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 4cd827951e..17fa858dd5 100644 --- a/packages/graphql/tests/schema/subscriptions.test.ts +++ b/packages/graphql/tests/schema/subscriptions.test.ts @@ -66,11 +66,6 @@ describe("Subscriptions", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectWhere { node: ActorWhere! } @@ -286,7 +281,6 @@ describe("Subscriptions", () => { type Movie { actorCount: Int actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float id: ID @@ -298,11 +292,6 @@ describe("Subscriptions", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -438,12 +427,6 @@ describe("Subscriptions", () => { averageRating: FloatAggregateSelection! } - type MovieAggregateSelection { - actorCount: IntAggregateSelection! - averageRating: FloatAggregateSelection! - count: Int! - } - input MovieCreateInput { actorCount: Int actors: MovieActorsFieldInput @@ -624,10 +607,8 @@ describe("Subscriptions", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -729,7 +710,6 @@ describe("Subscriptions", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! } @@ -737,10 +717,6 @@ describe("Subscriptions", () => { count: Count! } - type ActorAggregateSelection { - count: Int! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -781,11 +757,6 @@ describe("Subscriptions", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! @@ -1142,7 +1113,6 @@ describe("Subscriptions", () => { type Movie { actorCount: Int actors(limit: Int, offset: Int, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float id: ID @@ -1153,10 +1123,6 @@ describe("Subscriptions", () => { count: CountConnection! } - type MovieActorActorsAggregationSelection { - count: Int! - } - input MovieActorsAggregateInput { AND: [MovieActorsAggregateInput!] NOT: MovieActorsAggregateInput @@ -1263,12 +1229,6 @@ describe("Subscriptions", () => { averageRating: FloatAggregateSelection! } - type MovieAggregateSelection { - actorCount: IntAggregateSelection! - averageRating: FloatAggregateSelection! - count: Int! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -1472,10 +1432,8 @@ describe("Subscriptions", () => { type Query { actors(limit: Int, offset: Int, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -1882,12 +1840,6 @@ describe("Subscriptions", () => { averageRating: FloatAggregateSelection! } - type MovieAggregateSelection { - actorCount: IntAggregateSelection! - averageRating: FloatAggregateSelection! - count: Int! - } - input MovieConnectInput { actors: MovieActorsConnectInput } @@ -2100,7 +2052,6 @@ describe("Subscriptions", () => { type Person { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): PersonMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! } @@ -2108,10 +2059,6 @@ describe("Subscriptions", () => { count: Count! } - type PersonAggregateSelection { - count: Int! - } - input PersonConnectInput { movies: [PersonMoviesConnectFieldInput!] } @@ -2152,11 +2099,6 @@ describe("Subscriptions", () => { node: PersonMovieMoviesNodeAggregateSelection } - type PersonMovieMoviesAggregationSelection { - count: Int! - node: PersonMovieMoviesNodeAggregateSelection - } - type PersonMovieMoviesNodeAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! @@ -2359,13 +2301,10 @@ describe("Subscriptions", () => { type Query { actors(limit: Int, offset: Int, where: ActorWhere): [Actor!]! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! stars(limit: Int, offset: Int, where: StarWhere): [Star!]! - starsAggregate(where: StarWhere): StarAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"starsConnection\\\\\\" instead\\") starsConnection(after: String, first: Int, where: StarWhere): StarsConnection! } @@ -2379,7 +2318,6 @@ describe("Subscriptions", () => { type Star { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): StarMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! } @@ -2387,10 +2325,6 @@ describe("Subscriptions", () => { count: Count! } - type StarAggregateSelection { - count: Int! - } - input StarConnectInput { movies: [StarMoviesConnectFieldInput!] } @@ -2431,11 +2365,6 @@ describe("Subscriptions", () => { node: StarMovieMoviesNodeAggregateSelection } - type StarMovieMoviesAggregationSelection { - count: Int! - node: StarMovieMoviesNodeAggregateSelection - } - type StarMovieMoviesNodeAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! @@ -2779,7 +2708,6 @@ describe("Subscriptions", () => { type Actor { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! } @@ -2787,10 +2715,6 @@ describe("Subscriptions", () => { count: Count! } - type ActorAggregateSelection { - count: Int! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -2831,11 +2755,6 @@ describe("Subscriptions", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesNodeAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! @@ -3192,7 +3111,6 @@ describe("Subscriptions", () => { type Movie { actorCount: Int actors(limit: Int, offset: Int, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float id: ID @@ -3204,11 +3122,6 @@ describe("Subscriptions", () => { edge: MovieActorActorsEdgeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - } - type MovieActorActorsEdgeAggregateSelection { screenTime: IntAggregateSelection! } @@ -3330,12 +3243,6 @@ describe("Subscriptions", () => { averageRating: FloatAggregateSelection! } - type MovieAggregateSelection { - actorCount: IntAggregateSelection! - averageRating: FloatAggregateSelection! - count: Int! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] } @@ -3539,10 +3446,8 @@ describe("Subscriptions", () => { type Query { actors(limit: Int, offset: Int, where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -3627,11 +3532,6 @@ describe("Subscriptions", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - name: StringAggregateSelection! - } - input ActorConnectWhere { node: ActorWhere! } @@ -3847,7 +3747,6 @@ describe("Subscriptions", () => { type Movie { actorCount: Int actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! averageRating: Float id: ID @@ -3859,11 +3758,6 @@ describe("Subscriptions", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsNodeAggregateSelection { name: StringAggregateSelection! } @@ -3999,12 +3893,6 @@ describe("Subscriptions", () => { averageRating: FloatAggregateSelection! } - type MovieAggregateSelection { - actorCount: IntAggregateSelection! - averageRating: FloatAggregateSelection! - count: Int! - } - input MovieCreateInput { actorCount: Int actors: MovieActorsFieldInput @@ -4131,10 +4019,8 @@ describe("Subscriptions", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -4564,12 +4450,6 @@ describe("Subscriptions", () => { averageRating: FloatAggregateSelection! } - type MovieAggregateSelection { - actorCount: IntAggregateSelection! - averageRating: FloatAggregateSelection! - count: Int! - } - input MovieConnectInput { actors: MovieActorsConnectInput } @@ -4782,7 +4662,6 @@ describe("Subscriptions", () => { type Person { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): PersonMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! } @@ -4790,10 +4669,6 @@ describe("Subscriptions", () => { count: Count! } - type PersonAggregateSelection { - count: Int! - } - input PersonConnectInput { movies: [PersonMoviesConnectFieldInput!] } @@ -4834,11 +4709,6 @@ describe("Subscriptions", () => { node: PersonMovieMoviesNodeAggregateSelection } - type PersonMovieMoviesAggregationSelection { - count: Int! - node: PersonMovieMoviesNodeAggregateSelection - } - type PersonMovieMoviesNodeAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! @@ -5041,13 +4911,10 @@ describe("Subscriptions", () => { type Query { actors(limit: Int, offset: Int, where: ActorWhere): [Actor!]! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, where: PersonWhere): PeopleConnection! stars(limit: Int, offset: Int, where: StarWhere): [Star!]! - starsAggregate(where: StarWhere): StarAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"starsConnection\\\\\\" instead\\") starsConnection(after: String, first: Int, where: StarWhere): StarsConnection! } @@ -5061,7 +4928,6 @@ describe("Subscriptions", () => { type Star { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): StarMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [StarMoviesConnectionSort!], where: StarMoviesConnectionWhere): StarMoviesConnection! } @@ -5069,10 +4935,6 @@ describe("Subscriptions", () => { count: Count! } - type StarAggregateSelection { - count: Int! - } - input StarConnectInput { movies: [StarMoviesConnectFieldInput!] } @@ -5103,11 +4965,6 @@ describe("Subscriptions", () => { node: StarMovieMoviesNodeAggregateSelection } - type StarMovieMoviesAggregationSelection { - count: Int! - node: StarMovieMoviesNodeAggregateSelection - } - type StarMovieMoviesNodeAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! diff --git a/packages/graphql/tests/schema/types/bigint.test.ts b/packages/graphql/tests/schema/types/bigint.test.ts index 3183ef89a0..d1539bce24 100644 --- a/packages/graphql/tests/schema/types/bigint.test.ts +++ b/packages/graphql/tests/schema/types/bigint.test.ts @@ -108,12 +108,6 @@ describe("Bigint", () => { size: BigIntAggregateSelection! } - type FileAggregateSelection { - count: Int! - name: StringAggregateSelection! - size: BigIntAggregateSelection! - } - input FileCreateInput { name: String! size: BigInt! @@ -183,7 +177,6 @@ describe("Bigint", () => { type Query { files(limit: Int, offset: Int, sort: [FileSort!], where: FileWhere): [File!]! - filesAggregate(where: FileWhere): FileAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"filesConnection\\\\\\" instead\\") 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 38fd5dd4d3..c8b3606c2f 100644 --- a/packages/graphql/tests/schema/types/date.test.ts +++ b/packages/graphql/tests/schema/types/date.test.ts @@ -105,10 +105,6 @@ describe("Date", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { date: Date id: ID @@ -176,7 +172,6 @@ describe("Date", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 6aed23d5b0..8624356eb0 100644 --- a/packages/graphql/tests/schema/types/datetime.test.ts +++ b/packages/graphql/tests/schema/types/datetime.test.ts @@ -115,11 +115,6 @@ describe("Datetime", () => { datetime: DateTimeAggregateSelection! } - type MovieAggregateSelection { - count: Int! - datetime: DateTimeAggregateSelection! - } - input MovieCreateInput { datetime: DateTime id: ID @@ -187,7 +182,6 @@ describe("Datetime", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 c3f39b66f3..2c7f096f99 100644 --- a/packages/graphql/tests/schema/types/duration.test.ts +++ b/packages/graphql/tests/schema/types/duration.test.ts @@ -115,11 +115,6 @@ describe("Duration", () => { duration: DurationAggregateSelection! } - type MovieAggregateSelection { - count: Int! - duration: DurationAggregateSelection! - } - input MovieCreateInput { duration: Duration id: ID @@ -187,7 +182,6 @@ describe("Duration", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 6ae972196c..ee2882a25d 100644 --- a/packages/graphql/tests/schema/types/localdatetime.test.ts +++ b/packages/graphql/tests/schema/types/localdatetime.test.ts @@ -115,11 +115,6 @@ describe("Localdatetime", () => { localDT: LocalDateTimeAggregateSelection! } - type MovieAggregateSelection { - count: Int! - localDT: LocalDateTimeAggregateSelection! - } - input MovieCreateInput { id: ID localDT: LocalDateTime @@ -187,7 +182,6 @@ describe("Localdatetime", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 733d2484e2..37732925e9 100644 --- a/packages/graphql/tests/schema/types/localtime.test.ts +++ b/packages/graphql/tests/schema/types/localtime.test.ts @@ -117,11 +117,6 @@ describe("Localtime", () => { time: LocalTimeAggregateSelection! } - type MovieAggregateSelection { - count: Int! - time: LocalTimeAggregateSelection! - } - input MovieCreateInput { id: ID time: LocalTime @@ -189,7 +184,6 @@ describe("Localtime", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 2a71faec06..69350c10b5 100644 --- a/packages/graphql/tests/schema/types/point.test.ts +++ b/packages/graphql/tests/schema/types/point.test.ts @@ -71,10 +71,6 @@ describe("Point", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { filmedAt: PointInput! } @@ -180,7 +176,6 @@ describe("Point", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! } @@ -302,10 +297,6 @@ describe("Point", () => { count: Count! } - type MachineAggregateSelection { - count: Int! - } - input MachineCreateInput { partLocation: CartesianPointInput! } @@ -364,7 +355,6 @@ describe("Point", () => { type Query { machines(limit: Int, offset: Int, sort: [MachineSort!], where: MachineWhere): [Machine!]! - machinesAggregate(where: MachineWhere): MachineAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"machinesConnection\\\\\\" instead\\") machinesConnection(after: String, first: Int, sort: [MachineSort!], where: MachineWhere): MachinesConnection! } @@ -448,10 +438,6 @@ describe("Point", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieCreateInput { filmedAt: [PointInput!]! } @@ -524,7 +510,6 @@ describe("Point", () => { type Query { movies(limit: Int, offset: Int, where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, where: MovieWhere): MoviesConnection! } @@ -624,10 +609,6 @@ describe("Point", () => { count: Count! } - type MachineAggregateSelection { - count: Int! - } - input MachineCreateInput { partLocations: [CartesianPointInput!]! } @@ -676,7 +657,6 @@ describe("Point", () => { type Query { machines(limit: Int, offset: Int, where: MachineWhere): [Machine!]! - machinesAggregate(where: MachineWhere): MachineAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"machinesConnection\\\\\\" instead\\") 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 1d3c74adeb..3435ab631a 100644 --- a/packages/graphql/tests/schema/types/time.test.ts +++ b/packages/graphql/tests/schema/types/time.test.ts @@ -92,11 +92,6 @@ describe("Time", () => { time: TimeAggregateSelection! } - type MovieAggregateSelection { - count: Int! - time: TimeAggregateSelection! - } - input MovieCreateInput { id: ID time: Time @@ -164,7 +159,6 @@ describe("Time", () => { type Query { movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") 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 f8003533ad..576bb60912 100644 --- a/packages/graphql/tests/schema/union-interface-relationship.test.ts +++ b/packages/graphql/tests/schema/union-interface-relationship.test.ts @@ -147,7 +147,6 @@ describe("Union Interface Relationships", () => { type Actor { id: Int movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): ActorMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [ActorMoviesConnectionSort!], where: ActorMoviesConnectionWhere): ActorMoviesConnection! name: String! } @@ -162,12 +161,6 @@ describe("Union Interface Relationships", () => { name: StringAggregateSelection! } - type ActorAggregateSelection { - count: Int! - id: IntAggregateSelection! - name: StringAggregateSelection! - } - input ActorConnectInput { movies: [ActorMoviesConnectFieldInput!] } @@ -201,12 +194,6 @@ describe("Union Interface Relationships", () => { node: ActorMovieMoviesNodeAggregateSelection } - type ActorMovieMoviesAggregationSelection { - count: Int! - edge: ActorMovieMoviesEdgeAggregateSelection - node: ActorMovieMoviesNodeAggregateSelection - } - type ActorMovieMoviesEdgeAggregateSelection { screenTime: IntAggregateSelection! } @@ -582,13 +569,6 @@ describe("Union Interface Relationships", () => { url: StringAggregateSelection! } - type InfluencerAggregateSelection { - count: Int! - reputation: IntAggregateSelection! - reviewerId: IntAggregateSelection! - url: StringAggregateSelection! - } - input InfluencerCreateInput { reputation: Int! reviewerId: Int @@ -689,13 +669,11 @@ describe("Union Interface Relationships", () => { type Movie { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): MovieActorActorsAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [MovieActorsConnectionSort!], where: MovieActorsConnectionWhere): MovieActorsConnection! directors(limit: Int, offset: Int, where: DirectorWhere): [Director!]! directorsConnection(after: String, first: Int, sort: [MovieDirectorsConnectionSort!], where: MovieDirectorsConnectionWhere): MovieDirectorsConnection! imdbId: Int reviewers(limit: Int, offset: Int, sort: [ReviewerSort!], where: ReviewerWhere): [Reviewer!]! - reviewersAggregate(where: ReviewerWhere): MovieReviewerReviewersAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"reviewersConnection\\\\\\" instead\\") reviewersConnection(after: String, first: Int, sort: [MovieReviewersConnectionSort!], where: MovieReviewersConnectionWhere): MovieReviewersConnection! title: String! } @@ -706,12 +684,6 @@ describe("Union Interface Relationships", () => { node: MovieActorActorsNodeAggregateSelection } - type MovieActorActorsAggregationSelection { - count: Int! - edge: MovieActorActorsEdgeAggregateSelection - node: MovieActorActorsNodeAggregateSelection - } - type MovieActorActorsEdgeAggregateSelection { screenTime: IntAggregateSelection! } @@ -884,12 +856,6 @@ describe("Union Interface Relationships", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - imdbId: IntAggregateSelection! - title: StringAggregateSelection! - } - input MovieConnectInput { actors: [MovieActorsConnectFieldInput!] directors: MovieDirectorsConnectInput @@ -1103,12 +1069,6 @@ describe("Union Interface Relationships", () => { node: MovieReviewerReviewersNodeAggregateSelection } - type MovieReviewerReviewersAggregationSelection { - count: Int! - edge: MovieReviewerReviewersEdgeAggregateSelection - node: MovieReviewerReviewersNodeAggregateSelection - } - type MovieReviewerReviewersEdgeAggregateSelection { score: IntAggregateSelection! } @@ -1434,7 +1394,6 @@ describe("Union Interface Relationships", () => { type Person implements Reviewer { id: Int movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): PersonMovieMoviesAggregationSelection @deprecated(reason: \\"Please use field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [PersonMoviesConnectionSort!], where: PersonMoviesConnectionWhere): PersonMoviesConnection! name: String! reputation: Int! @@ -1453,14 +1412,6 @@ describe("Union Interface Relationships", () => { reviewerId: IntAggregateSelection! } - type PersonAggregateSelection { - count: Int! - id: IntAggregateSelection! - name: StringAggregateSelection! - reputation: IntAggregateSelection! - reviewerId: IntAggregateSelection! - } - input PersonConnectInput { movies: [PersonMoviesConnectFieldInput!] } @@ -1496,12 +1447,6 @@ describe("Union Interface Relationships", () => { node: PersonMovieMoviesNodeAggregateSelection } - type PersonMovieMoviesAggregationSelection { - count: Int! - edge: PersonMovieMoviesEdgeAggregateSelection - node: PersonMovieMoviesNodeAggregateSelection - } - type PersonMovieMoviesEdgeAggregateSelection { score: IntAggregateSelection! } @@ -1756,20 +1701,15 @@ describe("Union Interface Relationships", () => { type Query { actors(limit: Int, offset: Int, sort: [ActorSort!], where: ActorWhere): [Actor!]! - actorsAggregate(where: ActorWhere): ActorAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"actorsConnection\\\\\\" instead\\") actorsConnection(after: String, first: Int, sort: [ActorSort!], where: ActorWhere): ActorsConnection! directors(limit: Int, offset: Int, where: DirectorWhere): [Director!]! influencers(limit: Int, offset: Int, sort: [InfluencerSort!], where: InfluencerWhere): [Influencer!]! - influencersAggregate(where: InfluencerWhere): InfluencerAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"influencersConnection\\\\\\" instead\\") influencersConnection(after: String, first: Int, sort: [InfluencerSort!], where: InfluencerWhere): InfluencersConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! people(limit: Int, offset: Int, sort: [PersonSort!], where: PersonWhere): [Person!]! - peopleAggregate(where: PersonWhere): PersonAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"peopleConnection\\\\\\" instead\\") peopleConnection(after: String, first: Int, sort: [PersonSort!], where: PersonWhere): PeopleConnection! reviewers(limit: Int, offset: Int, sort: [ReviewerSort!], where: ReviewerWhere): [Reviewer!]! - reviewersAggregate(where: ReviewerWhere): ReviewerAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"reviewersConnection\\\\\\" instead\\") reviewersConnection(after: String, first: Int, sort: [ReviewerSort!], where: ReviewerWhere): ReviewersConnection! } @@ -1852,12 +1792,6 @@ describe("Union Interface Relationships", () => { reviewerId: IntAggregateSelection! } - type ReviewerAggregateSelection { - count: Int! - reputation: IntAggregateSelection! - reviewerId: IntAggregateSelection! - } - input ReviewerConnectWhere { node: ReviewerWhere! } diff --git a/packages/graphql/tests/schema/unions.test.ts b/packages/graphql/tests/schema/unions.test.ts index 4d7bd95474..e7ddc3d70d 100644 --- a/packages/graphql/tests/schema/unions.test.ts +++ b/packages/graphql/tests/schema/unions.test.ts @@ -84,10 +84,6 @@ describe("Unions", () => { count: Count! } - type GenreAggregateSelection { - count: Int! - } - input GenreConnectWhere { node: GenreWhere! } @@ -157,10 +153,6 @@ describe("Unions", () => { count: Count! } - type MovieAggregateSelection { - count: Int! - } - input MovieConnectInput { search: MovieSearchConnectInput } @@ -409,10 +401,8 @@ describe("Unions", () => { type Query { genres(limit: Int, offset: Int, sort: [GenreSort!], where: GenreWhere): [Genre!]! - genresAggregate(where: GenreWhere): GenreAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"genresConnection\\\\\\" instead\\") genresConnection(after: String, first: Int, sort: [GenreSort!], where: GenreWhere): GenresConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! searches(limit: Int, offset: Int, where: SearchWhere): [Search!]! } diff --git a/packages/graphql/tests/schema/vector.test.ts b/packages/graphql/tests/schema/vector.test.ts index 5b40ebb741..a9621e567d 100644 --- a/packages/graphql/tests/schema/vector.test.ts +++ b/packages/graphql/tests/schema/vector.test.ts @@ -97,12 +97,6 @@ describe("@vector schema", () => { title: StringAggregateSelection! } - type MovieAggregateSelection { - count: Int! - description: StringAggregateSelection! - title: StringAggregateSelection! - } - input MovieCreateInput { description: String title: String @@ -194,7 +188,6 @@ describe("@vector schema", () => { type Query { descriptionQuery(after: String, first: Int, sort: [MovieIndexSort!], vector: [Float!], where: MovieIndexWhere): MoviesIndexConnection! movies(limit: Int, offset: Int, sort: [MovieSort!], where: MovieWhere): [Movie!]! - moviesAggregate(where: MovieWhere): MovieAggregateSelection! @deprecated(reason: \\"Please use the explicit field \\\\\\"aggregate\\\\\\" inside \\\\\\"moviesConnection\\\\\\" instead\\") moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! titleQuery(after: String, first: Int, sort: [MovieIndexSort!], vector: [Float!], where: MovieIndexWhere): MoviesIndexConnection! } diff --git a/packages/graphql/tests/tck/aggregations/alias-directive.test.ts b/packages/graphql/tests/tck/aggregations/alias-directive.test.ts index ef6a97078e..82ea5de48b 100644 --- a/packages/graphql/tests/tck/aggregations/alias-directive.test.ts +++ b/packages/graphql/tests/tck/aggregations/alias-directive.test.ts @@ -42,19 +42,23 @@ describe("Cypher Aggregations Many with Alias directive", () => { test("Min", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - title { - shortest - longest - } - imdbRating { - min - max - average - } - createdAt { - min - max + moviesConnection { + aggregate { + node { + title { + shortest + longest + } + imdbRating { + min + max + average + } + createdAt { + min + max + } + } } } } @@ -81,7 +85,20 @@ describe("Cypher Aggregations Many with Alias directive", () => { WITH this RETURN { min: apoc.date.convertFormat(toString(min(this._createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\"), max: apoc.date.convertFormat(toString(max(this._createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var2 } - RETURN { title: var0, imdbRating: var1, createdAt: var2 }" + CALL { + WITH * + MATCH (this3:Movie) + WITH collect({ node: this3 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this3 + RETURN collect({ node: { __id: id(this3), __resolveType: \\"Movie\\" } }) AS var4 + } + RETURN var4, totalCount + } + RETURN { edges: var4, totalCount: totalCount, aggregate: { node: { title: var0, imdbRating: var1, createdAt: var2 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); diff --git a/packages/graphql/tests/tck/aggregations/alias.test.ts b/packages/graphql/tests/tck/aggregations/alias.test.ts index 14d51c97ad..3cf714f627 100644 --- a/packages/graphql/tests/tck/aggregations/alias.test.ts +++ b/packages/graphql/tests/tck/aggregations/alias.test.ts @@ -42,20 +42,26 @@ describe("Cypher Aggregations Many while Alias fields", () => { test("Field Alias Aggregations", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - _count: count - _title: title { - _shortest: shortest - _longest: longest - } - _imdbRating: imdbRating { - _min: min - _max: max - _average: average - } - _createdAt: createdAt { - _min: min - _max: max + moviesConnection { + _aggr: aggregate { + _count: count { + _nodes: nodes + } + _n: node { + _title: title { + _shortest: shortest + _longest: longest + } + _imdbRating: imdbRating { + _min: min + _max: max + _average: average + } + _createdAt: createdAt { + _min: min + _max: max + } + } } } } @@ -67,7 +73,7 @@ describe("Cypher Aggregations Many while Alias fields", () => { "CYPHER 5 CALL { MATCH (this:Movie) - RETURN count(this) AS var0 + RETURN { nodes: count(DISTINCT this) } AS var0 } CALL { MATCH (this:Movie) @@ -86,7 +92,20 @@ describe("Cypher Aggregations Many while Alias fields", () => { WITH this RETURN { _min: apoc.date.convertFormat(toString(min(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\"), _max: apoc.date.convertFormat(toString(max(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var3 } - RETURN { _count: var0, _title: var1, _imdbRating: var2, _createdAt: var3 }" + CALL { + WITH * + MATCH (this4:Movie) + WITH collect({ node: this4 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this4 + RETURN collect({ node: { __id: id(this4), __resolveType: \\"Movie\\" } }) AS var5 + } + RETURN var5, totalCount + } + RETURN { edges: var5, totalCount: totalCount, aggregate: { _count: var0, node: { _title: var1, _imdbRating: var2, _createdAt: var3 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); diff --git a/packages/graphql/tests/tck/aggregations/auth.test.ts b/packages/graphql/tests/tck/aggregations/auth.test.ts index fe62f0aeb4..d5314a01bd 100644 --- a/packages/graphql/tests/tck/aggregations/auth.test.ts +++ b/packages/graphql/tests/tck/aggregations/auth.test.ts @@ -71,8 +71,12 @@ describe("Cypher Aggregations with Auth", () => { test("Simple Count", async () => { const query = /* GraphQL */ ` { - usersAggregate { - count + usersConnection { + aggregate { + count { + nodes + } + } } } `; @@ -85,9 +89,22 @@ describe("Cypher Aggregations with Auth", () => { CALL { MATCH (this:User) WHERE (($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) - RETURN count(this) AS var0 + RETURN { nodes: count(DISTINCT this) } AS var0 + } + CALL { + WITH * + MATCH (this1:User) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"User\\" } }) AS var2 + } + RETURN var2, totalCount } - RETURN { count: var0 }" + RETURN { edges: var2, totalCount: totalCount, aggregate: { count: var0 } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -104,8 +121,12 @@ describe("Cypher Aggregations with Auth", () => { test("Count with WHERE", async () => { const query = /* GraphQL */ ` { - usersAggregate(where: { name: { eq: "some-name" } }) { - count + usersConnection(where: { name: { eq: "some-name" } }) { + aggregate { + count { + nodes + } + } } } `; @@ -118,9 +139,23 @@ describe("Cypher Aggregations with Auth", () => { CALL { MATCH (this:User) WHERE (this.name = $param0 AND ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)) AND apoc.util.validatePredicate(NOT ($isAuthenticated = true AND ($jwt.sub IS NOT NULL AND this.id = $jwt.sub)), \\"@neo4j/graphql/FORBIDDEN\\", [0])) - RETURN count(this) AS var0 + RETURN { nodes: count(DISTINCT this) } AS var0 + } + CALL { + WITH * + MATCH (this1:User) + WHERE this1.name = $param3 + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"User\\" } }) AS var2 + } + RETURN var2, totalCount } - RETURN { count: var0 }" + RETURN { edges: var2, totalCount: totalCount, aggregate: { count: var0 } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -130,7 +165,8 @@ describe("Cypher Aggregations with Auth", () => { \\"jwt\\": { \\"roles\\": [], \\"sub\\": \\"super_admin\\" - } + }, + \\"param3\\": \\"some-name\\" }" `); }); @@ -138,10 +174,14 @@ describe("Cypher Aggregations with Auth", () => { test("Field Int with auth", async () => { const query = /* GraphQL */ ` { - usersAggregate { - imdbRatingInt { - min - max + usersConnection { + aggregate { + node { + imdbRatingInt { + min + max + } + } } } } @@ -158,7 +198,20 @@ describe("Cypher Aggregations with Auth", () => { WITH this RETURN { min: min(this.imdbRatingInt), max: max(this.imdbRatingInt) } AS var0 } - RETURN { imdbRatingInt: var0 }" + CALL { + WITH * + MATCH (this1:User) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"User\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { imdbRatingInt: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -175,10 +228,14 @@ describe("Cypher Aggregations with Auth", () => { test("Field Float with auth", async () => { const query = /* GraphQL */ ` { - usersAggregate { - imdbRatingFloat { - min - max + usersConnection { + aggregate { + node { + imdbRatingFloat { + min + max + } + } } } } @@ -195,7 +252,20 @@ describe("Cypher Aggregations with Auth", () => { WITH this RETURN { min: min(this.imdbRatingFloat), max: max(this.imdbRatingFloat) } AS var0 } - RETURN { imdbRatingFloat: var0 }" + CALL { + WITH * + MATCH (this1:User) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"User\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { imdbRatingFloat: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -212,10 +282,14 @@ describe("Cypher Aggregations with Auth", () => { test("Field BigInt with auth", async () => { const query = /* GraphQL */ ` { - usersAggregate { - imdbRatingBigInt { - min - max + usersConnection { + aggregate { + node { + imdbRatingBigInt { + min + max + } + } } } } @@ -232,7 +306,20 @@ describe("Cypher Aggregations with Auth", () => { WITH this RETURN { min: min(this.imdbRatingBigInt), max: max(this.imdbRatingBigInt) } AS var0 } - RETURN { imdbRatingBigInt: var0 }" + CALL { + WITH * + MATCH (this1:User) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"User\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { imdbRatingBigInt: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -249,10 +336,14 @@ describe("Cypher Aggregations with Auth", () => { test("Field String with auth", async () => { const query = /* GraphQL */ ` { - usersAggregate { - name { - shortest - longest + usersConnection { + aggregate { + node { + name { + shortest + longest + } + } } } } @@ -271,7 +362,20 @@ describe("Cypher Aggregations with Auth", () => { WITH collect(this.name) AS list RETURN { longest: head(list), shortest: last(list) } AS var0 } - RETURN { name: var0 }" + CALL { + WITH * + MATCH (this1:User) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"User\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { name: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -288,10 +392,14 @@ describe("Cypher Aggregations with Auth", () => { test("Field DateTime with auth", async () => { const query = /* GraphQL */ ` { - usersAggregate { - createdAt { - min - max + usersConnection { + aggregate { + node { + createdAt { + min + max + } + } } } } @@ -308,7 +416,20 @@ describe("Cypher Aggregations with Auth", () => { WITH this RETURN { min: apoc.date.convertFormat(toString(min(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\"), max: apoc.date.convertFormat(toString(max(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var0 } - RETURN { createdAt: var0 }" + CALL { + WITH * + MATCH (this1:User) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"User\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { createdAt: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` diff --git a/packages/graphql/tests/tck/aggregations/bigint.test.ts b/packages/graphql/tests/tck/aggregations/bigint.test.ts index 618c6c8959..bb345e7272 100644 --- a/packages/graphql/tests/tck/aggregations/bigint.test.ts +++ b/packages/graphql/tests/tck/aggregations/bigint.test.ts @@ -39,9 +39,13 @@ describe("Cypher Aggregations BigInt", () => { test("Min", async () => { const query = /* GraphQL */ ` { - filesAggregate { - size { - min + filesConnection { + aggregate { + node { + size { + min + } + } } } } @@ -56,7 +60,20 @@ describe("Cypher Aggregations BigInt", () => { WITH this RETURN { min: min(this.size) } AS var0 } - RETURN { size: var0 }" + CALL { + WITH * + MATCH (this1:File) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"File\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { size: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -65,9 +82,13 @@ describe("Cypher Aggregations BigInt", () => { test("Max", async () => { const query = /* GraphQL */ ` { - filesAggregate { - size { - max + filesConnection { + aggregate { + node { + size { + max + } + } } } } @@ -82,7 +103,20 @@ describe("Cypher Aggregations BigInt", () => { WITH this RETURN { max: max(this.size) } AS var0 } - RETURN { size: var0 }" + CALL { + WITH * + MATCH (this1:File) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"File\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { size: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -91,9 +125,13 @@ describe("Cypher Aggregations BigInt", () => { test("Average", async () => { const query = /* GraphQL */ ` { - filesAggregate { - size { - average + filesConnection { + aggregate { + node { + size { + average + } + } } } } @@ -108,7 +146,20 @@ describe("Cypher Aggregations BigInt", () => { WITH this RETURN { average: avg(this.size) } AS var0 } - RETURN { size: var0 }" + CALL { + WITH * + MATCH (this1:File) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"File\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { size: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -117,9 +168,13 @@ describe("Cypher Aggregations BigInt", () => { test("Sum", async () => { const query = /* GraphQL */ ` { - filesAggregate { - size { - sum + filesConnection { + aggregate { + node { + size { + sum + } + } } } } @@ -134,7 +189,20 @@ describe("Cypher Aggregations BigInt", () => { WITH this RETURN { sum: sum(this.size) } AS var0 } - RETURN { size: var0 }" + CALL { + WITH * + MATCH (this1:File) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"File\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { size: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -143,12 +211,16 @@ describe("Cypher Aggregations BigInt", () => { test("Min, Max, Sum and Average", async () => { const query = /* GraphQL */ ` { - filesAggregate { - size { - min - max - average - sum + filesConnection { + aggregate { + node { + size { + min + max + average + sum + } + } } } } @@ -163,7 +235,20 @@ describe("Cypher Aggregations BigInt", () => { WITH this RETURN { min: min(this.size), max: max(this.size), average: avg(this.size), sum: sum(this.size) } AS var0 } - RETURN { size: var0 }" + CALL { + WITH * + MATCH (this1:File) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"File\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { size: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); diff --git a/packages/graphql/tests/tck/aggregations/count.test.ts b/packages/graphql/tests/tck/aggregations/count.test.ts index 4c4465055f..5413032570 100644 --- a/packages/graphql/tests/tck/aggregations/count.test.ts +++ b/packages/graphql/tests/tck/aggregations/count.test.ts @@ -39,8 +39,12 @@ describe("Cypher Aggregations Count", () => { test("Simple Count", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - count + moviesConnection { + aggregate { + count { + nodes + } + } } } `; @@ -51,9 +55,22 @@ describe("Cypher Aggregations Count", () => { "CYPHER 5 CALL { MATCH (this:Movie) - RETURN count(this) AS var0 + RETURN { nodes: count(DISTINCT this) } AS var0 } - RETURN { count: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { count: var0 } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -62,8 +79,12 @@ describe("Cypher Aggregations Count", () => { test("Count with WHERE", async () => { const query = /* GraphQL */ ` { - moviesAggregate(where: { title: { eq: "some-title" } }) { - count + moviesConnection(where: { title: { eq: "some-title" } }) { + aggregate { + count { + nodes + } + } } } `; @@ -75,14 +96,29 @@ describe("Cypher Aggregations Count", () => { CALL { MATCH (this:Movie) WHERE this.title = $param0 - RETURN count(this) AS var0 + RETURN { nodes: count(DISTINCT this) } AS var0 + } + CALL { + WITH * + MATCH (this1:Movie) + WHERE this1.title = $param1 + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount } - RETURN { count: var0 }" + RETURN { edges: var2, totalCount: totalCount, aggregate: { count: var0 } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"param0\\": \\"some-title\\" + \\"param0\\": \\"some-title\\", + \\"param1\\": \\"some-title\\" }" `); }); diff --git a/packages/graphql/tests/tck/aggregations/datetime.test.ts b/packages/graphql/tests/tck/aggregations/datetime.test.ts index 10edb88fab..8104f21916 100644 --- a/packages/graphql/tests/tck/aggregations/datetime.test.ts +++ b/packages/graphql/tests/tck/aggregations/datetime.test.ts @@ -39,9 +39,13 @@ describe("Cypher Aggregations DateTime", () => { test("Min", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - createdAt { - min + moviesConnection { + aggregate { + node { + createdAt { + min + } + } } } } @@ -56,7 +60,20 @@ describe("Cypher Aggregations DateTime", () => { WITH this RETURN { min: apoc.date.convertFormat(toString(min(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var0 } - RETURN { createdAt: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { createdAt: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -65,9 +82,13 @@ describe("Cypher Aggregations DateTime", () => { test("Max", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - createdAt { - max + moviesConnection { + aggregate { + node { + createdAt { + max + } + } } } } @@ -82,7 +103,20 @@ describe("Cypher Aggregations DateTime", () => { WITH this RETURN { max: apoc.date.convertFormat(toString(max(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var0 } - RETURN { createdAt: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { createdAt: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -91,10 +125,14 @@ describe("Cypher Aggregations DateTime", () => { test("Min and Max", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - createdAt { - min - max + moviesConnection { + aggregate { + node { + createdAt { + min + max + } + } } } } @@ -109,7 +147,20 @@ describe("Cypher Aggregations DateTime", () => { WITH this RETURN { min: apoc.date.convertFormat(toString(min(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\"), max: apoc.date.convertFormat(toString(max(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var0 } - RETURN { createdAt: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { createdAt: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); diff --git a/packages/graphql/tests/tck/aggregations/duration.test.ts b/packages/graphql/tests/tck/aggregations/duration.test.ts index 827eefcb18..ef0677422c 100644 --- a/packages/graphql/tests/tck/aggregations/duration.test.ts +++ b/packages/graphql/tests/tck/aggregations/duration.test.ts @@ -39,9 +39,13 @@ describe("Cypher Aggregations Duration", () => { test("Min", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - screenTime { - min + moviesConnection { + aggregate { + node { + screenTime { + min + } + } } } } @@ -56,7 +60,20 @@ describe("Cypher Aggregations Duration", () => { WITH this RETURN { min: min(this.screenTime) } AS var0 } - RETURN { screenTime: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { screenTime: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -65,9 +82,13 @@ describe("Cypher Aggregations Duration", () => { test("Max", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - screenTime { - max + moviesConnection { + aggregate { + node { + screenTime { + max + } + } } } } @@ -82,7 +103,20 @@ describe("Cypher Aggregations Duration", () => { WITH this RETURN { max: max(this.screenTime) } AS var0 } - RETURN { screenTime: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { screenTime: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -91,10 +125,14 @@ describe("Cypher Aggregations Duration", () => { test("Min and Max", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - screenTime { - min - max + moviesConnection { + aggregate { + node { + screenTime { + min + max + } + } } } } @@ -109,7 +147,20 @@ describe("Cypher Aggregations Duration", () => { WITH this RETURN { min: min(this.screenTime), max: max(this.screenTime) } AS var0 } - RETURN { screenTime: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { screenTime: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); diff --git a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-alias.test.ts b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-alias.test.ts index 5779cf0e43..3e826e3522 100644 --- a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-alias.test.ts +++ b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-alias.test.ts @@ -51,10 +51,12 @@ describe("Field Level Aggregations Alias", () => { const query = /* GraphQL */ ` query { movies { - actorsAggregate { - node { - myName { - shortest + actorsConnection { + aggregate { + node { + myName { + shortest + } } } } @@ -69,13 +71,30 @@ describe("Field Level Aggregations Alias", () => { MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) - WITH this1 - ORDER BY size(this1.name) DESC - WITH collect(this1.name) AS list - RETURN { shortest: last(list) } AS var2 + CALL { + WITH this + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) + WITH this1 + ORDER BY size(this1.name) DESC + WITH collect(this1.name) AS list + RETURN { shortest: last(list) } AS var2 + } + CALL { + WITH * + MATCH (this)<-[this3:ACTED_IN]-(this4:Actor) + WITH collect({ node: this4, relationship: this3 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this4, edge.relationship AS this3 + RETURN collect({ node: { __id: id(this4), __resolveType: \\"Actor\\" } }) AS var5 + } + RETURN var5, totalCount + } + RETURN { edges: var5, totalCount: totalCount, aggregate: { node: { myName: var2 } } } AS var6 } - RETURN this { actorsAggregate: { node: { myName: var2 } } } AS this" + RETURN this { actorsConnection: var6 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -85,10 +104,12 @@ describe("Field Level Aggregations Alias", () => { const query = /* GraphQL */ ` query { movies { - actorsAggregate { - edge { - time { - max + actorsConnection { + aggregate { + edge { + time { + max + } } } } @@ -103,11 +124,28 @@ describe("Field Level Aggregations Alias", () => { MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) - WITH this0 - RETURN { max: max(this0.screentime) } AS var2 + CALL { + WITH this + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) + WITH this0 + RETURN { max: max(this0.screentime) } AS var2 + } + CALL { + WITH * + MATCH (this)<-[this3:ACTED_IN]-(this4:Actor) + WITH collect({ node: this4, relationship: this3 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this4, edge.relationship AS this3 + RETURN collect({ node: { __id: id(this4), __resolveType: \\"Actor\\" } }) AS var5 + } + RETURN var5, totalCount + } + RETURN { edges: var5, totalCount: totalCount, aggregate: { edge: { time: var2 } } } AS var6 } - RETURN this { actorsAggregate: { edge: { time: var2 } } } AS this" + RETURN this { actorsConnection: var6 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); diff --git a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-edge.test.ts b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-edge.test.ts index 7673ab0f67..9b953477a1 100644 --- a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-edge.test.ts +++ b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-edge.test.ts @@ -51,13 +51,15 @@ describe("Field Level Aggregations", () => { const query = /* GraphQL */ ` query { movies { - actorsAggregate { - edge { - screentime { - max - min - average - sum + actorsConnection { + aggregate { + edge { + screentime { + max + min + average + sum + } } } } @@ -72,11 +74,28 @@ describe("Field Level Aggregations", () => { MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) - WITH this0 - RETURN { min: min(this0.screentime), max: max(this0.screentime), average: avg(this0.screentime), sum: sum(this0.screentime) } AS var2 + CALL { + WITH this + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) + WITH this0 + RETURN { min: min(this0.screentime), max: max(this0.screentime), average: avg(this0.screentime), sum: sum(this0.screentime) } AS var2 + } + CALL { + WITH * + MATCH (this)<-[this3:ACTED_IN]-(this4:Actor) + WITH collect({ node: this4, relationship: this3 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this4, edge.relationship AS this3 + RETURN collect({ node: { __id: id(this4), __resolveType: \\"Actor\\" } }) AS var5 + } + RETURN var5, totalCount + } + RETURN { edges: var5, totalCount: totalCount, aggregate: { edge: { screentime: var2 } } } AS var6 } - RETURN this { actorsAggregate: { edge: { screentime: var2 } } } AS this" + RETURN this { actorsConnection: var6 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); diff --git a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-labels.test.ts b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-labels.test.ts index 7cf61e1277..6dde8a2627 100644 --- a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-labels.test.ts +++ b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-labels.test.ts @@ -51,10 +51,12 @@ describe("Field Level Aggregations Alias", () => { const query = /* GraphQL */ ` query { movies { - actorsAggregate { - node { - name { - shortest + actorsConnection { + aggregate { + node { + name { + shortest + } } } } @@ -69,13 +71,30 @@ describe("Field Level Aggregations Alias", () => { MATCH (this:Film) CALL { WITH this - MATCH (this)<-[this0:ACTED_IN]-(this1:Person) - WITH this1 - ORDER BY size(this1.name) DESC - WITH collect(this1.name) AS list - RETURN { shortest: last(list) } AS var2 + CALL { + WITH this + MATCH (this)<-[this0:ACTED_IN]-(this1:Person) + WITH this1 + ORDER BY size(this1.name) DESC + WITH collect(this1.name) AS list + RETURN { shortest: last(list) } AS var2 + } + CALL { + WITH * + MATCH (this)<-[this3:ACTED_IN]-(this4:Person) + WITH collect({ node: this4, relationship: this3 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this4, edge.relationship AS this3 + RETURN collect({ node: { __id: id(this4), __resolveType: \\"Actor\\" } }) AS var5 + } + RETURN var5, totalCount + } + RETURN { edges: var5, totalCount: totalCount, aggregate: { node: { name: var2 } } } AS var6 } - RETURN this { actorsAggregate: { node: { name: var2 } } } AS this" + RETURN this { actorsConnection: var6 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); diff --git a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-where.test.ts b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-where.test.ts index 8dd6d5de01..b1914624b0 100644 --- a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-where.test.ts +++ b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations-where.test.ts @@ -50,8 +50,12 @@ describe("Field Level Aggregations Where", () => { query { movies { title - actorsAggregate(where: { age: { gt: 40 } }) { - count + actorsConnection(where: { node: { age: { gt: 40 } } }) { + aggregate { + count { + nodes + } + } } } } @@ -64,11 +68,29 @@ describe("Field Level Aggregations Where", () => { MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:ACTED_IN]-(this1:Person) - WHERE this1.age > $param0 - RETURN count(this1) AS var2 + CALL { + WITH this + MATCH (this)<-[this0:ACTED_IN]-(this1:Person) + WHERE this1.age > $param0 + RETURN { nodes: count(DISTINCT this1) } AS var2 + } + CALL { + WITH * + MATCH (this)<-[this3:ACTED_IN]-(this4:Person) + WHERE this4.age > $param1 + WITH collect({ node: this4, relationship: this3 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this4, edge.relationship AS this3 + RETURN collect({ node: { __id: id(this4), __resolveType: \\"Person\\" } }) AS var5 + } + RETURN var5, totalCount + } + RETURN { edges: var5, totalCount: totalCount, aggregate: { count: var2 } } AS var6 } - RETURN this { .title, actorsAggregate: { count: var2 } } AS this" + RETURN this { .title, actorsConnection: var6 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -76,6 +98,10 @@ describe("Field Level Aggregations Where", () => { \\"param0\\": { \\"low\\": 40, \\"high\\": 0 + }, + \\"param1\\": { + \\"low\\": 40, + \\"high\\": 0 } }" `); @@ -86,11 +112,19 @@ describe("Field Level Aggregations Where", () => { query { movies { title - actorsAggregate(where: { name_CONTAINS: "abc" }) { - count + actorsConnection(where: { node: { name_CONTAINS: "abc" } }) { + aggregate { + count { + nodes + } + } } - directorsAggregate(where: { name_CONTAINS: "abcdefg" }) { - count + directorsConnection(where: { node: { name_CONTAINS: "abcdefg" } }) { + aggregate { + count { + nodes + } + } } } } @@ -103,23 +137,61 @@ describe("Field Level Aggregations Where", () => { MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:ACTED_IN]-(this1:Person) - WHERE this1.name CONTAINS $param0 - RETURN count(this1) AS var2 + CALL { + WITH this + MATCH (this)<-[this0:ACTED_IN]-(this1:Person) + WHERE this1.name CONTAINS $param0 + RETURN { nodes: count(DISTINCT this1) } AS var2 + } + CALL { + WITH * + MATCH (this)<-[this3:ACTED_IN]-(this4:Person) + WHERE this4.name CONTAINS $param1 + WITH collect({ node: this4, relationship: this3 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this4, edge.relationship AS this3 + RETURN collect({ node: { __id: id(this4), __resolveType: \\"Person\\" } }) AS var5 + } + RETURN var5, totalCount + } + RETURN { edges: var5, totalCount: totalCount, aggregate: { count: var2 } } AS var6 } CALL { WITH this - MATCH (this)<-[this3:DIRECTED]-(this4:Person) - WHERE this4.name CONTAINS $param1 - RETURN count(this4) AS var5 + CALL { + WITH this + MATCH (this)<-[this7:DIRECTED]-(this8:Person) + WHERE this8.name CONTAINS $param2 + RETURN { nodes: count(DISTINCT this8) } AS var9 + } + CALL { + WITH * + MATCH (this)<-[this10:DIRECTED]-(this11:Person) + WHERE this11.name CONTAINS $param3 + WITH collect({ node: this11, relationship: this10 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this11, edge.relationship AS this10 + RETURN collect({ node: { __id: id(this11), __resolveType: \\"Person\\" } }) AS var12 + } + RETURN var12, totalCount + } + RETURN { edges: var12, totalCount: totalCount, aggregate: { count: var9 } } AS var13 } - RETURN this { .title, actorsAggregate: { count: var2 }, directorsAggregate: { count: var5 } } AS this" + RETURN this { .title, actorsConnection: var6, directorsConnection: var13 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"abc\\", - \\"param1\\": \\"abcdefg\\" + \\"param1\\": \\"abc\\", + \\"param2\\": \\"abcdefg\\", + \\"param3\\": \\"abcdefg\\" }" `); }); diff --git a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations.test.ts b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations.test.ts index 835ad83122..498635eef3 100644 --- a/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations.test.ts +++ b/packages/graphql/tests/tck/aggregations/field-level-aggregations/field-level-aggregations.test.ts @@ -98,12 +98,16 @@ describe("Field Level Aggregations", () => { const query = /* GraphQL */ ` query { movies { - actorsAggregate { - count - node { - name { - longest - shortest + actorsConnection { + aggregate { + count { + nodes + } + node { + name { + longest + shortest + } } } } @@ -118,18 +122,35 @@ describe("Field Level Aggregations", () => { MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) - RETURN count(this1) AS var2 - } - CALL { - WITH this - MATCH (this)<-[this3:ACTED_IN]-(this4:Actor) - WITH this4 - ORDER BY size(this4.name) DESC - WITH collect(this4.name) AS list - RETURN { longest: head(list), shortest: last(list) } AS var5 + CALL { + WITH this + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) + RETURN { nodes: count(DISTINCT this1) } AS var2 + } + CALL { + WITH this + MATCH (this)<-[this3:ACTED_IN]-(this4:Actor) + WITH this4 + ORDER BY size(this4.name) DESC + WITH collect(this4.name) AS list + RETURN { longest: head(list), shortest: last(list) } AS var5 + } + CALL { + WITH * + MATCH (this)<-[this6:ACTED_IN]-(this7:Actor) + WITH collect({ node: this7, relationship: this6 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this7, edge.relationship AS this6 + RETURN collect({ node: { __id: id(this7), __resolveType: \\"Actor\\" } }) AS var8 + } + RETURN var8, totalCount + } + RETURN { edges: var8, totalCount: totalCount, aggregate: { count: var2, node: { name: var5 } } } AS var9 } - RETURN this { actorsAggregate: { count: var2, node: { name: var5 } } } AS this" + RETURN this { actorsConnection: var9 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -139,13 +160,15 @@ describe("Field Level Aggregations", () => { const query = /* GraphQL */ ` query { movies { - actorsAggregate { - node { - age { - min - max - average - sum + actorsConnection { + aggregate { + node { + age { + min + max + average + sum + } } } } @@ -160,11 +183,28 @@ describe("Field Level Aggregations", () => { MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) - WITH this1 - RETURN { min: min(this1.age), max: max(this1.age), average: avg(this1.age), sum: sum(this1.age) } AS var2 + CALL { + WITH this + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) + WITH this1 + RETURN { min: min(this1.age), max: max(this1.age), average: avg(this1.age), sum: sum(this1.age) } AS var2 + } + CALL { + WITH * + MATCH (this)<-[this3:ACTED_IN]-(this4:Actor) + WITH collect({ node: this4, relationship: this3 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this4, edge.relationship AS this3 + RETURN collect({ node: { __id: id(this4), __resolveType: \\"Actor\\" } }) AS var5 + } + RETURN var5, totalCount + } + RETURN { edges: var5, totalCount: totalCount, aggregate: { node: { age: var2 } } } AS var6 } - RETURN this { actorsAggregate: { node: { age: var2 } } } AS this" + RETURN this { actorsConnection: var6 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -175,11 +215,13 @@ describe("Field Level Aggregations", () => { query { movies { title - actorsAggregate { - node { - name { - longest - shortest + actorsConnection { + aggregate { + node { + name { + longest + shortest + } } } } @@ -194,13 +236,30 @@ describe("Field Level Aggregations", () => { MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) - WITH this1 - ORDER BY size(this1.name) DESC - WITH collect(this1.name) AS list - RETURN { longest: head(list), shortest: last(list) } AS var2 + CALL { + WITH this + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) + WITH this1 + ORDER BY size(this1.name) DESC + WITH collect(this1.name) AS list + RETURN { longest: head(list), shortest: last(list) } AS var2 + } + CALL { + WITH * + MATCH (this)<-[this3:ACTED_IN]-(this4:Actor) + WITH collect({ node: this4, relationship: this3 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this4, edge.relationship AS this3 + RETURN collect({ node: { __id: id(this4), __resolveType: \\"Actor\\" } }) AS var5 + } + RETURN var5, totalCount + } + RETURN { edges: var5, totalCount: totalCount, aggregate: { node: { name: var2 } } } AS var6 } - RETURN this { .title, actorsAggregate: { node: { name: var2 } } } AS this" + RETURN this { .title, actorsConnection: var6 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -210,10 +269,12 @@ describe("Field Level Aggregations", () => { const query = /* GraphQL */ ` query { actors { - moviesAggregate { - node { - released { - min + moviesConnection { + aggregate { + node { + released { + min + } } } } @@ -228,11 +289,28 @@ describe("Field Level Aggregations", () => { MATCH (this:Actor) CALL { WITH this - MATCH (this)-[this0:ACTED_IN]->(this1:Movie) - WITH this1 - RETURN { min: apoc.date.convertFormat(toString(min(this1.released)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var2 + CALL { + WITH this + MATCH (this)-[this0:ACTED_IN]->(this1:Movie) + WITH this1 + RETURN { min: apoc.date.convertFormat(toString(min(this1.released)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var2 + } + CALL { + WITH * + MATCH (this)-[this3:ACTED_IN]->(this4:Movie) + WITH collect({ node: this4, relationship: this3 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this4, edge.relationship AS this3 + RETURN collect({ node: { __id: id(this4), __resolveType: \\"Movie\\" } }) AS var5 + } + RETURN var5, totalCount + } + RETURN { edges: var5, totalCount: totalCount, aggregate: { node: { released: var2 } } } AS var6 } - RETURN this { moviesAggregate: { node: { released: var2 } } } AS this" + RETURN this { moviesConnection: var6 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -242,17 +320,19 @@ describe("Field Level Aggregations", () => { const query = /* GraphQL */ ` query { movies { - actorsAggregate { - node { - name { - longest - shortest - } - age { - min - max - average - sum + actorsConnection { + aggregate { + node { + name { + longest + shortest + } + age { + min + max + average + sum + } } } } @@ -267,19 +347,36 @@ describe("Field Level Aggregations", () => { MATCH (this:Movie) CALL { WITH this - MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) - WITH this1 - ORDER BY size(this1.name) DESC - WITH collect(this1.name) AS list - RETURN { longest: head(list), shortest: last(list) } AS var2 - } - CALL { - WITH this - MATCH (this)<-[this3:ACTED_IN]-(this4:Actor) - WITH this4 - RETURN { min: min(this4.age), max: max(this4.age), average: avg(this4.age), sum: sum(this4.age) } AS var5 + CALL { + WITH this + MATCH (this)<-[this0:ACTED_IN]-(this1:Actor) + WITH this1 + ORDER BY size(this1.name) DESC + WITH collect(this1.name) AS list + RETURN { longest: head(list), shortest: last(list) } AS var2 + } + CALL { + WITH this + MATCH (this)<-[this3:ACTED_IN]-(this4:Actor) + WITH this4 + RETURN { min: min(this4.age), max: max(this4.age), average: avg(this4.age), sum: sum(this4.age) } AS var5 + } + CALL { + WITH * + MATCH (this)<-[this6:ACTED_IN]-(this7:Actor) + WITH collect({ node: this7, relationship: this6 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this7, edge.relationship AS this6 + RETURN collect({ node: { __id: id(this7), __resolveType: \\"Actor\\" } }) AS var8 + } + RETURN var8, totalCount + } + RETURN { edges: var8, totalCount: totalCount, aggregate: { node: { name: var2, age: var5 } } } AS var9 } - RETURN this { actorsAggregate: { node: { name: var2, age: var5 } } } AS this" + RETURN this { actorsConnection: var9 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); diff --git a/packages/graphql/tests/tck/aggregations/float.test.ts b/packages/graphql/tests/tck/aggregations/float.test.ts index 77797aae35..b7cdaa5faa 100644 --- a/packages/graphql/tests/tck/aggregations/float.test.ts +++ b/packages/graphql/tests/tck/aggregations/float.test.ts @@ -39,9 +39,13 @@ describe("Cypher Aggregations Float", () => { test("Min", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - actorCount { - min + moviesConnection { + aggregate { + node { + actorCount { + min + } + } } } } @@ -56,7 +60,20 @@ describe("Cypher Aggregations Float", () => { WITH this RETURN { min: min(this.actorCount) } AS var0 } - RETURN { actorCount: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { actorCount: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -65,9 +82,13 @@ describe("Cypher Aggregations Float", () => { test("Max", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - actorCount { - max + moviesConnection { + aggregate { + node { + actorCount { + max + } + } } } } @@ -82,7 +103,20 @@ describe("Cypher Aggregations Float", () => { WITH this RETURN { max: max(this.actorCount) } AS var0 } - RETURN { actorCount: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { actorCount: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -91,9 +125,13 @@ describe("Cypher Aggregations Float", () => { test("Average", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - actorCount { - average + moviesConnection { + aggregate { + node { + actorCount { + average + } + } } } } @@ -108,7 +146,20 @@ describe("Cypher Aggregations Float", () => { WITH this RETURN { average: avg(this.actorCount) } AS var0 } - RETURN { actorCount: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { actorCount: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -117,9 +168,13 @@ describe("Cypher Aggregations Float", () => { test("Sum", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - actorCount { - sum + moviesConnection { + aggregate { + node { + actorCount { + sum + } + } } } } @@ -134,7 +189,20 @@ describe("Cypher Aggregations Float", () => { WITH this RETURN { sum: sum(this.actorCount) } AS var0 } - RETURN { actorCount: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { actorCount: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -143,12 +211,16 @@ describe("Cypher Aggregations Float", () => { test("Min, Max, Sum and Average", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - actorCount { - min - max - average - sum + moviesConnection { + aggregate { + node { + actorCount { + min + max + average + sum + } + } } } } @@ -163,7 +235,20 @@ describe("Cypher Aggregations Float", () => { WITH this RETURN { min: min(this.actorCount), max: max(this.actorCount), average: avg(this.actorCount), sum: sum(this.actorCount) } AS var0 } - RETURN { actorCount: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { actorCount: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -172,13 +257,19 @@ describe("Cypher Aggregations Float", () => { test("Min, Max, Sum and Average with count", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - count - actorCount { - min - max - average - sum + moviesConnection { + aggregate { + count { + nodes + } + node { + actorCount { + min + max + average + sum + } + } } } } @@ -190,14 +281,27 @@ describe("Cypher Aggregations Float", () => { "CYPHER 5 CALL { MATCH (this:Movie) - RETURN count(this) AS var0 + RETURN { nodes: count(DISTINCT this) } AS var0 } CALL { MATCH (this:Movie) WITH this RETURN { min: min(this.actorCount), max: max(this.actorCount), average: avg(this.actorCount), sum: sum(this.actorCount) } AS var1 } - RETURN { count: var0, actorCount: var1 }" + CALL { + WITH * + MATCH (this2:Movie) + WITH collect({ node: this2 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this2 + RETURN collect({ node: { __id: id(this2), __resolveType: \\"Movie\\" } }) AS var3 + } + RETURN var3, totalCount + } + RETURN { edges: var3, totalCount: totalCount, aggregate: { count: var0, node: { actorCount: var1 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); diff --git a/packages/graphql/tests/tck/aggregations/int.test.ts b/packages/graphql/tests/tck/aggregations/int.test.ts index b8197ad1e7..7ca03c1b49 100644 --- a/packages/graphql/tests/tck/aggregations/int.test.ts +++ b/packages/graphql/tests/tck/aggregations/int.test.ts @@ -39,9 +39,13 @@ describe("Cypher Aggregations Int", () => { test("Min", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - imdbRating { - min + moviesConnection { + aggregate { + node { + imdbRating { + min + } + } } } } @@ -56,7 +60,20 @@ describe("Cypher Aggregations Int", () => { WITH this RETURN { min: min(this.imdbRating) } AS var0 } - RETURN { imdbRating: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { imdbRating: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -65,9 +82,13 @@ describe("Cypher Aggregations Int", () => { test("Max", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - imdbRating { - max + moviesConnection { + aggregate { + node { + imdbRating { + max + } + } } } } @@ -82,7 +103,20 @@ describe("Cypher Aggregations Int", () => { WITH this RETURN { max: max(this.imdbRating) } AS var0 } - RETURN { imdbRating: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { imdbRating: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -91,9 +125,13 @@ describe("Cypher Aggregations Int", () => { test("Average", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - imdbRating { - average + moviesConnection { + aggregate { + node { + imdbRating { + average + } + } } } } @@ -108,7 +146,20 @@ describe("Cypher Aggregations Int", () => { WITH this RETURN { average: avg(this.imdbRating) } AS var0 } - RETURN { imdbRating: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { imdbRating: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -117,9 +168,13 @@ describe("Cypher Aggregations Int", () => { test("Sum", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - imdbRating { - sum + moviesConnection { + aggregate { + node { + imdbRating { + sum + } + } } } } @@ -134,7 +189,20 @@ describe("Cypher Aggregations Int", () => { WITH this RETURN { sum: sum(this.imdbRating) } AS var0 } - RETURN { imdbRating: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { imdbRating: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -143,12 +211,16 @@ describe("Cypher Aggregations Int", () => { test("Min, Max, Sum and Average", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - imdbRating { - min - max - average - sum + moviesConnection { + aggregate { + node { + imdbRating { + min + max + average + sum + } + } } } } @@ -163,7 +235,20 @@ describe("Cypher Aggregations Int", () => { WITH this RETURN { min: min(this.imdbRating), max: max(this.imdbRating), average: avg(this.imdbRating), sum: sum(this.imdbRating) } AS var0 } - RETURN { imdbRating: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { imdbRating: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); diff --git a/packages/graphql/tests/tck/aggregations/label.test.ts b/packages/graphql/tests/tck/aggregations/label.test.ts index 2e0c855c2b..038bb43c4a 100644 --- a/packages/graphql/tests/tck/aggregations/label.test.ts +++ b/packages/graphql/tests/tck/aggregations/label.test.ts @@ -49,19 +49,23 @@ describe("Cypher Aggregations Many while Alias fields", () => { test("Custom Label Aggregations", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - _title: title { - _shortest: shortest - _longest: longest - } - _imdbRating: imdbRating { - _min: min - _max: max - _average: average - } - _createdAt: createdAt { - _min: min - _max: max + moviesConnection { + aggregate { + node { + _title: title { + _shortest: shortest + _longest: longest + } + _imdbRating: imdbRating { + _min: min + _max: max + _average: average + } + _createdAt: createdAt { + _min: min + _max: max + } + } } } } @@ -88,7 +92,20 @@ describe("Cypher Aggregations Many while Alias fields", () => { WITH this RETURN { _min: apoc.date.convertFormat(toString(min(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\"), _max: apoc.date.convertFormat(toString(max(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var2 } - RETURN { _title: var0, _imdbRating: var1, _createdAt: var2 }" + CALL { + WITH * + MATCH (this3:Film) + WITH collect({ node: this3 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this3 + RETURN collect({ node: { __id: id(this3), __resolveType: \\"Movie\\" } }) AS var4 + } + RETURN var4, totalCount + } + RETURN { edges: var4, totalCount: totalCount, aggregate: { node: { _title: var0, _imdbRating: var1, _createdAt: var2 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -97,19 +114,23 @@ describe("Cypher Aggregations Many while Alias fields", () => { test("Additional Labels Aggregations", async () => { const query = /* GraphQL */ ` { - actorsAggregate { - _name: name { - _shortest: shortest - _longest: longest - } - _imdbRating: imdbRating { - _min: min - _max: max - _average: average - } - _createdAt: createdAt { - _min: min - _max: max + actorsConnection { + aggregate { + node { + _name: name { + _shortest: shortest + _longest: longest + } + _imdbRating: imdbRating { + _min: min + _max: max + _average: average + } + _createdAt: createdAt { + _min: min + _max: max + } + } } } } @@ -136,7 +157,20 @@ describe("Cypher Aggregations Many while Alias fields", () => { WITH this RETURN { _min: apoc.date.convertFormat(toString(min(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\"), _max: apoc.date.convertFormat(toString(max(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var2 } - RETURN { _name: var0, _imdbRating: var1, _createdAt: var2 }" + CALL { + WITH * + MATCH (this3:Actor:Person:Alien) + WITH collect({ node: this3 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this3 + RETURN collect({ node: { __id: id(this3), __resolveType: \\"Actor\\" } }) AS var4 + } + RETURN var4, totalCount + } + RETURN { edges: var4, totalCount: totalCount, aggregate: { node: { _name: var0, _imdbRating: var1, _createdAt: var2 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); diff --git a/packages/graphql/tests/tck/aggregations/localdatetime.test.ts b/packages/graphql/tests/tck/aggregations/localdatetime.test.ts index 9d770a8924..35baff1716 100644 --- a/packages/graphql/tests/tck/aggregations/localdatetime.test.ts +++ b/packages/graphql/tests/tck/aggregations/localdatetime.test.ts @@ -39,9 +39,13 @@ describe("Cypher Aggregations LocalDateTime", () => { test("Min", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - createdAt { - min + moviesConnection { + aggregate { + node { + createdAt { + min + } + } } } } @@ -56,7 +60,20 @@ describe("Cypher Aggregations LocalDateTime", () => { WITH this RETURN { min: min(this.createdAt) } AS var0 } - RETURN { createdAt: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { createdAt: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -65,9 +82,13 @@ describe("Cypher Aggregations LocalDateTime", () => { test("Max", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - createdAt { - max + moviesConnection { + aggregate { + node { + createdAt { + max + } + } } } } @@ -82,7 +103,20 @@ describe("Cypher Aggregations LocalDateTime", () => { WITH this RETURN { max: max(this.createdAt) } AS var0 } - RETURN { createdAt: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { createdAt: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -91,10 +125,14 @@ describe("Cypher Aggregations LocalDateTime", () => { test("Min and Max", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - createdAt { - min - max + moviesConnection { + aggregate { + node { + createdAt { + min + max + } + } } } } @@ -109,7 +147,20 @@ describe("Cypher Aggregations LocalDateTime", () => { WITH this RETURN { min: min(this.createdAt), max: max(this.createdAt) } AS var0 } - RETURN { createdAt: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { createdAt: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); diff --git a/packages/graphql/tests/tck/aggregations/localtime.test.ts b/packages/graphql/tests/tck/aggregations/localtime.test.ts index 99484bf1ec..0d0850323f 100644 --- a/packages/graphql/tests/tck/aggregations/localtime.test.ts +++ b/packages/graphql/tests/tck/aggregations/localtime.test.ts @@ -39,9 +39,13 @@ describe("Cypher Aggregations LocalTime", () => { test("Min", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - createdAt { - min + moviesConnection { + aggregate { + node { + createdAt { + min + } + } } } } @@ -56,7 +60,20 @@ describe("Cypher Aggregations LocalTime", () => { WITH this RETURN { min: min(this.createdAt) } AS var0 } - RETURN { createdAt: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { createdAt: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -65,9 +82,13 @@ describe("Cypher Aggregations LocalTime", () => { test("Max", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - createdAt { - max + moviesConnection { + aggregate { + node { + createdAt { + max + } + } } } } @@ -82,7 +103,20 @@ describe("Cypher Aggregations LocalTime", () => { WITH this RETURN { max: max(this.createdAt) } AS var0 } - RETURN { createdAt: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { createdAt: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -91,10 +125,14 @@ describe("Cypher Aggregations LocalTime", () => { test("Min and Max", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - createdAt { - min - max + moviesConnection { + aggregate { + node { + createdAt { + min + max + } + } } } } @@ -109,7 +147,20 @@ describe("Cypher Aggregations LocalTime", () => { WITH this RETURN { min: min(this.createdAt), max: max(this.createdAt) } AS var0 } - RETURN { createdAt: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { createdAt: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); diff --git a/packages/graphql/tests/tck/aggregations/many.test.ts b/packages/graphql/tests/tck/aggregations/many.test.ts index b5aba6059a..9606b0e04e 100644 --- a/packages/graphql/tests/tck/aggregations/many.test.ts +++ b/packages/graphql/tests/tck/aggregations/many.test.ts @@ -42,19 +42,23 @@ describe("Cypher Aggregations Many", () => { test("Min", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - title { - shortest - longest - } - imdbRating { - min - max - average - } - createdAt { - min - max + moviesConnection { + aggregate { + node { + title { + shortest + longest + } + imdbRating { + min + max + average + } + createdAt { + min + max + } + } } } } @@ -81,7 +85,20 @@ describe("Cypher Aggregations Many", () => { WITH this RETURN { min: apoc.date.convertFormat(toString(min(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\"), max: apoc.date.convertFormat(toString(max(this.createdAt)), \\"iso_zoned_date_time\\", \\"iso_offset_date_time\\") } AS var2 } - RETURN { title: var0, imdbRating: var1, createdAt: var2 }" + CALL { + WITH * + MATCH (this3:Movie) + WITH collect({ node: this3 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this3 + RETURN collect({ node: { __id: id(this3), __resolveType: \\"Movie\\" } }) AS var4 + } + RETURN var4, totalCount + } + RETURN { edges: var4, totalCount: totalCount, aggregate: { node: { title: var0, imdbRating: var1, createdAt: var2 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); diff --git a/packages/graphql/tests/tck/aggregations/string.test.ts b/packages/graphql/tests/tck/aggregations/string.test.ts index 8c93821e75..6b2fe73c49 100644 --- a/packages/graphql/tests/tck/aggregations/string.test.ts +++ b/packages/graphql/tests/tck/aggregations/string.test.ts @@ -40,9 +40,13 @@ describe("Cypher Aggregations String", () => { test("Shortest", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - title { - shortest + moviesConnection { + aggregate { + node { + title { + shortest + } + } } } } @@ -59,7 +63,20 @@ describe("Cypher Aggregations String", () => { WITH collect(this.title) AS list RETURN { shortest: last(list) } AS var0 } - RETURN { title: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { title: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -68,9 +85,13 @@ describe("Cypher Aggregations String", () => { test("Longest", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - title { - longest + moviesConnection { + aggregate { + node { + title { + longest + } + } } } } @@ -87,7 +108,20 @@ describe("Cypher Aggregations String", () => { WITH collect(this.title) AS list RETURN { longest: head(list) } AS var0 } - RETURN { title: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { title: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -96,10 +130,14 @@ describe("Cypher Aggregations String", () => { test("Shortest and longest", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - title { - shortest - longest + moviesConnection { + aggregate { + node { + title { + shortest + longest + } + } } } } @@ -116,7 +154,20 @@ describe("Cypher Aggregations String", () => { WITH collect(this.title) AS list RETURN { longest: head(list), shortest: last(list) } AS var0 } - RETURN { title: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { title: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -125,9 +176,13 @@ describe("Cypher Aggregations String", () => { test("Shortest with filter", async () => { const query = /* GraphQL */ ` { - moviesAggregate(where: { testId: { eq: "10" } }) { - title { - shortest + moviesConnection(where: { testId: { eq: "10" } }) { + aggregate { + node { + title { + shortest + } + } } } } @@ -145,12 +200,27 @@ describe("Cypher Aggregations String", () => { WITH collect(this.title) AS list RETURN { shortest: last(list) } AS var0 } - RETURN { title: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WHERE this1.testId = $param1 + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { title: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"param0\\": \\"10\\" + \\"param0\\": \\"10\\", + \\"param1\\": \\"10\\" }" `); }); diff --git a/packages/graphql/tests/tck/aggregations/time.test.ts b/packages/graphql/tests/tck/aggregations/time.test.ts index 3d646dd128..1135d31d1a 100644 --- a/packages/graphql/tests/tck/aggregations/time.test.ts +++ b/packages/graphql/tests/tck/aggregations/time.test.ts @@ -39,9 +39,13 @@ describe("Cypher Aggregations Time", () => { test("Min", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - createdAt { - min + moviesConnection { + aggregate { + node { + createdAt { + min + } + } } } } @@ -56,7 +60,20 @@ describe("Cypher Aggregations Time", () => { WITH this RETURN { min: min(this.createdAt) } AS var0 } - RETURN { createdAt: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { createdAt: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -65,9 +82,13 @@ describe("Cypher Aggregations Time", () => { test("Max", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - createdAt { - max + moviesConnection { + aggregate { + node { + createdAt { + max + } + } } } } @@ -82,7 +103,20 @@ describe("Cypher Aggregations Time", () => { WITH this RETURN { max: max(this.createdAt) } AS var0 } - RETURN { createdAt: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { createdAt: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); @@ -91,10 +125,14 @@ describe("Cypher Aggregations Time", () => { test("Min and Max", async () => { const query = /* GraphQL */ ` { - moviesAggregate { - createdAt { - min - max + moviesConnection { + aggregate { + node { + createdAt { + min + max + } + } } } } @@ -109,7 +147,20 @@ describe("Cypher Aggregations Time", () => { WITH this RETURN { min: min(this.createdAt), max: max(this.createdAt) } AS var0 } - RETURN { createdAt: var0 }" + CALL { + WITH * + MATCH (this1:Movie) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Movie\\" } }) AS var2 + } + RETURN var2, totalCount + } + RETURN { edges: var2, totalCount: totalCount, aggregate: { node: { createdAt: var0 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); diff --git a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-aggregation.test.ts b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-aggregation.test.ts index a82e939631..c2e8c98881 100644 --- a/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-aggregation.test.ts +++ b/packages/graphql/tests/tck/directives/cypher/filtering/cypher-filtering-aggregation.test.ts @@ -39,9 +39,13 @@ describe("cypher directive filtering - Aggregation", () => { const query = /* GraphQL */ ` query { - moviesAggregate(where: { custom_field: { startsWith: "he" } }) { - title { - shortest + moviesConnection(where: { custom_field: { startsWith: "he" } }) { + aggregate { + node { + title { + shortest + } + } } } } @@ -75,12 +79,39 @@ describe("cypher directive filtering - Aggregation", () => { WITH collect(this.title) AS list RETURN { shortest: last(list) } AS var2 } - RETURN { title: var2 }" + CALL { + WITH * + MATCH (this3:Movie) + CALL { + WITH this3 + CALL { + WITH this3 + WITH this3 AS this + MATCH (this) + RETURN this.custom_field as s + } + WITH s AS this4 + RETURN this4 AS var5 + } + WITH * + WHERE var5 STARTS WITH $param1 + WITH collect({ node: this3 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this3 + RETURN collect({ node: { __id: id(this3), __resolveType: \\"Movie\\" } }) AS var6 + } + RETURN var6, totalCount + } + RETURN { edges: var6, totalCount: totalCount, aggregate: { node: { title: var2 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"param0\\": \\"he\\" + \\"param0\\": \\"he\\", + \\"param1\\": \\"he\\" }" `); }); @@ -103,9 +134,13 @@ describe("cypher directive filtering - Aggregation", () => { const query = /* GraphQL */ ` query { - moviesAggregate(where: { custom_field: { gt: 0 } }) { - released { - min + moviesConnection(where: { custom_field: { gt: 0 } }) { + aggregate { + node { + released { + min + } + } } } } @@ -137,7 +172,33 @@ describe("cypher directive filtering - Aggregation", () => { WITH this RETURN { min: min(this.released) } AS var2 } - RETURN { released: var2 }" + CALL { + WITH * + MATCH (this3:Movie) + CALL { + WITH this3 + CALL { + WITH this3 + WITH this3 AS this + MATCH (this) + RETURN this.custom_field as s + } + WITH s AS this4 + RETURN this4 AS var5 + } + WITH * + WHERE var5 > $param1 + WITH collect({ node: this3 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this3 + RETURN collect({ node: { __id: id(this3), __resolveType: \\"Movie\\" } }) AS var6 + } + RETURN var6, totalCount + } + RETURN { edges: var6, totalCount: totalCount, aggregate: { node: { released: var2 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -145,6 +206,10 @@ describe("cypher directive filtering - Aggregation", () => { \\"param0\\": { \\"low\\": 0, \\"high\\": 0 + }, + \\"param1\\": { + \\"low\\": 0, + \\"high\\": 0 } }" `); @@ -168,9 +233,13 @@ describe("cypher directive filtering - Aggregation", () => { const query = /* GraphQL */ ` query { - moviesAggregate(where: { custom_field: { includes: "test" } }) { - title { - longest + moviesConnection(where: { custom_field: { includes: "test" } }) { + aggregate { + node { + title { + longest + } + } } } } @@ -205,12 +274,40 @@ describe("cypher directive filtering - Aggregation", () => { WITH collect(this.title) AS list RETURN { longest: head(list) } AS var3 } - RETURN { title: var3 }" + CALL { + WITH * + MATCH (this4:Movie) + CALL { + WITH this4 + CALL { + WITH this4 + WITH this4 AS this + MATCH (this) + RETURN this.custom_field as s + } + UNWIND s AS var5 + WITH var5 AS this6 + RETURN collect(this6) AS var7 + } + WITH * + WHERE $param1 IN var7 + WITH collect({ node: this4 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this4 + RETURN collect({ node: { __id: id(this4), __resolveType: \\"Movie\\" } }) AS var8 + } + RETURN var8, totalCount + } + RETURN { edges: var8, totalCount: totalCount, aggregate: { node: { title: var3 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ - \\"param0\\": \\"test\\" + \\"param0\\": \\"test\\", + \\"param1\\": \\"test\\" }" `); }); @@ -233,9 +330,13 @@ describe("cypher directive filtering - Aggregation", () => { const query = /* GraphQL */ ` query { - moviesAggregate(where: { custom_field: { includes: 2 } }) { - title { - longest + moviesConnection(where: { custom_field: { includes: 2 } }) { + aggregate { + node { + title { + longest + } + } } } } @@ -270,7 +371,34 @@ describe("cypher directive filtering - Aggregation", () => { WITH collect(this.title) AS list RETURN { longest: head(list) } AS var3 } - RETURN { title: var3 }" + CALL { + WITH * + MATCH (this4:Movie) + CALL { + WITH this4 + CALL { + WITH this4 + WITH this4 AS this + MATCH (this) + RETURN this.custom_field as s + } + UNWIND s AS var5 + WITH var5 AS this6 + RETURN collect(this6) AS var7 + } + WITH * + WHERE $param1 IN var7 + WITH collect({ node: this4 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this4 + RETURN collect({ node: { __id: id(this4), __resolveType: \\"Movie\\" } }) AS var8 + } + RETURN var8, totalCount + } + RETURN { edges: var8, totalCount: totalCount, aggregate: { node: { title: var3 } } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -278,6 +406,10 @@ describe("cypher directive filtering - Aggregation", () => { \\"param0\\": { \\"low\\": 2, \\"high\\": 0 + }, + \\"param1\\": { + \\"low\\": 2, + \\"high\\": 0 } }" `); diff --git a/packages/graphql/tests/tck/directives/plural.test.ts b/packages/graphql/tests/tck/directives/plural.test.ts index 63fd60b5a7..26790696aa 100644 --- a/packages/graphql/tests/tck/directives/plural.test.ts +++ b/packages/graphql/tests/tck/directives/plural.test.ts @@ -59,8 +59,12 @@ describe("Plural directive", () => { test("Count Tech with plural techs using aggregation", async () => { const query = /* GraphQL */ ` { - techsAggregate { - count + techsConnection { + aggregate { + count { + nodes + } + } } } `; @@ -71,9 +75,22 @@ describe("Plural directive", () => { "CYPHER 5 CALL { MATCH (this:Tech) - RETURN count(this) AS var0 + RETURN { nodes: count(DISTINCT this) } AS var0 + } + CALL { + WITH * + MATCH (this1:Tech) + WITH collect({ node: this1 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this1 + RETURN collect({ node: { __id: id(this1), __resolveType: \\"Tech\\" } }) AS var2 + } + RETURN var2, totalCount } - RETURN { count: var0 }" + RETURN { edges: var2, totalCount: totalCount, aggregate: { count: var0 } } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); diff --git a/packages/graphql/tests/tck/issues/1320.test.ts b/packages/graphql/tests/tck/issues/1320.test.ts index bfe0f83647..752bc62adf 100644 --- a/packages/graphql/tests/tck/issues/1320.test.ts +++ b/packages/graphql/tests/tck/issues/1320.test.ts @@ -54,11 +54,19 @@ describe("https://github.com/neo4j/graphql/issues/1320", () => { const query = /* GraphQL */ ` query getAggreationOnTeams { stats: teams { - accepted: ownsRisksAggregate(where: { mitigationState: { includes: Accepted } }) { - count + accepted: ownsRisksConnection(where: { node: { mitigationState: { includes: Accepted } } }) { + aggregate { + count { + nodes + } + } } - identified: ownsRisksAggregate(where: { mitigationState: { includes: Identified } }) { - count + identified: ownsRisksConnection(where: { node: { mitigationState: { includes: Identified } } }) { + aggregate { + count { + nodes + } + } } } } @@ -70,23 +78,61 @@ describe("https://github.com/neo4j/graphql/issues/1320", () => { MATCH (this:Team) CALL { WITH this - MATCH (this)-[this0:OWNS_RISK]->(this1:Risk) - WHERE $param0 IN this1.mitigationState - RETURN count(this1) AS var2 + CALL { + WITH this + MATCH (this)-[this0:OWNS_RISK]->(this1:Risk) + WHERE $param0 IN this1.mitigationState + RETURN { nodes: count(DISTINCT this1) } AS var2 + } + CALL { + WITH * + MATCH (this)-[this3:OWNS_RISK]->(this4:Risk) + WHERE $param1 IN this4.mitigationState + WITH collect({ node: this4, relationship: this3 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this4, edge.relationship AS this3 + RETURN collect({ node: { __id: id(this4), __resolveType: \\"Risk\\" } }) AS var5 + } + RETURN var5, totalCount + } + RETURN { edges: var5, totalCount: totalCount, aggregate: { count: var2 } } AS var6 } CALL { WITH this - MATCH (this)-[this3:OWNS_RISK]->(this4:Risk) - WHERE $param1 IN this4.mitigationState - RETURN count(this4) AS var5 + CALL { + WITH this + MATCH (this)-[this7:OWNS_RISK]->(this8:Risk) + WHERE $param2 IN this8.mitigationState + RETURN { nodes: count(DISTINCT this8) } AS var9 + } + CALL { + WITH * + MATCH (this)-[this10:OWNS_RISK]->(this11:Risk) + WHERE $param3 IN this11.mitigationState + WITH collect({ node: this11, relationship: this10 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this11, edge.relationship AS this10 + RETURN collect({ node: { __id: id(this11), __resolveType: \\"Risk\\" } }) AS var12 + } + RETURN var12, totalCount + } + RETURN { edges: var12, totalCount: totalCount, aggregate: { count: var9 } } AS var13 } - RETURN this { accepted: { count: var2 }, identified: { count: var5 } } AS this" + RETURN this { accepted: var6, identified: var13 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"param0\\": \\"Accepted\\", - \\"param1\\": \\"Identified\\" + \\"param1\\": \\"Accepted\\", + \\"param2\\": \\"Identified\\", + \\"param3\\": \\"Identified\\" }" `); }); diff --git a/packages/graphql/tests/tck/issues/1933.test.ts b/packages/graphql/tests/tck/issues/1933.test.ts index b3e762b989..095123102b 100644 --- a/packages/graphql/tests/tck/issues/1933.test.ts +++ b/packages/graphql/tests/tck/issues/1933.test.ts @@ -59,14 +59,18 @@ describe("https://github.com/neo4j/graphql/issues/1933", () => { employeeId firstName lastName - projectsAggregate { - count - edge { - allocation { - max - min - average - sum + projectsConnection { + aggregate { + count { + nodes + } + edge { + allocation { + max + min + average + sum + } } } } @@ -88,16 +92,33 @@ describe("https://github.com/neo4j/graphql/issues/1933", () => { WHERE var2 = true CALL { WITH this - MATCH (this)-[this3:PARTICIPATES]->(this4:Project) - RETURN count(this4) AS var5 - } - CALL { - WITH this - MATCH (this)-[this6:PARTICIPATES]->(this7:Project) - WITH this6 - RETURN { min: min(this6.allocation), max: max(this6.allocation), average: avg(this6.allocation), sum: sum(this6.allocation) } AS var8 + CALL { + WITH this + MATCH (this)-[this3:PARTICIPATES]->(this4:Project) + RETURN { nodes: count(DISTINCT this4) } AS var5 + } + CALL { + WITH this + MATCH (this)-[this6:PARTICIPATES]->(this7:Project) + WITH this6 + RETURN { min: min(this6.allocation), max: max(this6.allocation), average: avg(this6.allocation), sum: sum(this6.allocation) } AS var8 + } + CALL { + WITH * + MATCH (this)-[this9:PARTICIPATES]->(this10:Project) + WITH collect({ node: this10, relationship: this9 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this10, edge.relationship AS this9 + RETURN collect({ node: { __id: id(this10), __resolveType: \\"Project\\" } }) AS var11 + } + RETURN var11, totalCount + } + RETURN { edges: var11, totalCount: totalCount, aggregate: { count: var5, edge: { allocation: var8 } } } AS var12 } - RETURN this { .employeeId, .firstName, .lastName, projectsAggregate: { count: var5, edge: { allocation: var8 } } } AS this" + RETURN this { .employeeId, .firstName, .lastName, projectsConnection: var12 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` diff --git a/packages/graphql/tests/tck/issues/4095.test.ts b/packages/graphql/tests/tck/issues/4095.test.ts index 90eb23c970..55ec5dcec2 100644 --- a/packages/graphql/tests/tck/issues/4095.test.ts +++ b/packages/graphql/tests/tck/issues/4095.test.ts @@ -63,8 +63,12 @@ describe("https://github.com/neo4j/graphql/issues/4095", () => { query Family { families { id - membersAggregate { - count + membersConnection { + aggregate { + count { + nodes + } + } } } } @@ -77,14 +81,35 @@ describe("https://github.com/neo4j/graphql/issues/4095", () => { MATCH (this:Family) CALL { WITH this - MATCH (this)<-[this0:MEMBER_OF]-(this1:Person) - WHERE ($isAuthenticated = true AND EXISTS { - MATCH (this1)<-[:CREATOR_OF]-(this2:User) - WHERE ($jwt.uid IS NOT NULL AND this2.id = $jwt.uid) - }) - RETURN count(this1) AS var3 + CALL { + WITH this + MATCH (this)<-[this0:MEMBER_OF]-(this1:Person) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this1)<-[:CREATOR_OF]-(this2:User) + WHERE ($jwt.uid IS NOT NULL AND this2.id = $jwt.uid) + }) + RETURN { nodes: count(DISTINCT this1) } AS var3 + } + CALL { + WITH * + MATCH (this)<-[this4:MEMBER_OF]-(this5:Person) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this5)<-[:CREATOR_OF]-(this6:User) + WHERE ($jwt.uid IS NOT NULL AND this6.id = $jwt.uid) + }) + WITH collect({ node: this5, relationship: this4 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this5, edge.relationship AS this4 + RETURN collect({ node: { __id: id(this5), __resolveType: \\"Person\\" } }) AS var7 + } + RETURN var7, totalCount + } + RETURN { edges: var7, totalCount: totalCount, aggregate: { count: var3 } } AS var8 } - RETURN this { .id, membersAggregate: { count: var3 } } AS this" + RETURN this { .id, membersConnection: var8 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` diff --git a/packages/graphql/tests/tck/issues/4115.test.ts b/packages/graphql/tests/tck/issues/4115.test.ts index 472bec48a0..fb09d1cdc5 100644 --- a/packages/graphql/tests/tck/issues/4115.test.ts +++ b/packages/graphql/tests/tck/issues/4115.test.ts @@ -86,8 +86,12 @@ describe("https://github.com/neo4j/graphql/issues/4115", () => { query Family { families { id - membersAggregate { - count + membersConnection { + aggregate { + count { + nodes + } + } } } } @@ -100,20 +104,47 @@ describe("https://github.com/neo4j/graphql/issues/4115", () => { MATCH (this:Family) CALL { WITH this - MATCH (this)<-[this0:MEMBER_OF]-(this1:Person) - WHERE ($isAuthenticated = true AND (EXISTS { - MATCH (this1)<-[:CREATOR_OF]-(this2:User) - WHERE ($jwt.uid IS NOT NULL AND this2.id = $jwt.uid) - } AND EXISTS { - MATCH (this1)-[:MEMBER_OF]->(this3:Family) - WHERE EXISTS { - MATCH (this3)<-[:CREATOR_OF]-(this4:User) - WHERE ($param2 IS NOT NULL AND $param2 IN this4.roles) + CALL { + WITH this + MATCH (this)<-[this0:MEMBER_OF]-(this1:Person) + WHERE ($isAuthenticated = true AND (EXISTS { + MATCH (this1)<-[:CREATOR_OF]-(this2:User) + WHERE ($jwt.uid IS NOT NULL AND this2.id = $jwt.uid) + } AND EXISTS { + MATCH (this1)-[:MEMBER_OF]->(this3:Family) + WHERE EXISTS { + MATCH (this3)<-[:CREATOR_OF]-(this4:User) + WHERE ($param2 IS NOT NULL AND $param2 IN this4.roles) + } + })) + RETURN { nodes: count(DISTINCT this1) } AS var5 + } + CALL { + WITH * + MATCH (this)<-[this6:MEMBER_OF]-(this7:Person) + WHERE ($isAuthenticated = true AND (EXISTS { + MATCH (this7)<-[:CREATOR_OF]-(this8:User) + WHERE ($jwt.uid IS NOT NULL AND this8.id = $jwt.uid) + } AND EXISTS { + MATCH (this7)-[:MEMBER_OF]->(this9:Family) + WHERE EXISTS { + MATCH (this9)<-[:CREATOR_OF]-(this10:User) + WHERE ($param3 IS NOT NULL AND $param3 IN this10.roles) + } + })) + WITH collect({ node: this7, relationship: this6 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this7, edge.relationship AS this6 + RETURN collect({ node: { __id: id(this7), __resolveType: \\"Person\\" } }) AS var11 } - })) - RETURN count(this1) AS var5 + RETURN var11, totalCount + } + RETURN { edges: var11, totalCount: totalCount, aggregate: { count: var5 } } AS var12 } - RETURN this { .id, membersAggregate: { count: var5 } } AS this" + RETURN this { .id, membersConnection: var12 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` @@ -125,7 +156,8 @@ describe("https://github.com/neo4j/graphql/issues/4115", () => { ], \\"sub\\": \\"michel\\" }, - \\"param2\\": \\"plan:paid\\" + \\"param2\\": \\"plan:paid\\", + \\"param3\\": \\"plan:paid\\" }" `); }); diff --git a/packages/graphql/tests/tck/issues/4116.test.ts b/packages/graphql/tests/tck/issues/4116.test.ts index 8a8e41564d..10e42daa1f 100644 --- a/packages/graphql/tests/tck/issues/4116.test.ts +++ b/packages/graphql/tests/tck/issues/4116.test.ts @@ -77,8 +77,12 @@ describe("https://github.com/neo4j/graphql/issues/4116", () => { query Family { families { id - membersAggregate { - count + membersConnection { + aggregate { + count { + nodes + } + } } } } @@ -91,23 +95,48 @@ describe("https://github.com/neo4j/graphql/issues/4116", () => { MATCH (this:Family) CALL { WITH this - MATCH (this)<-[this0:MEMBER_OF]-(this1:Person) - WHERE ($isAuthenticated = true AND EXISTS { - MATCH (this1)-[:MEMBER_OF]->(this2:Family) - WHERE EXISTS { - MATCH (this2)<-[:CREATOR_OF]-(this3:User) - WHERE ($param1 IS NOT NULL AND $param1 IN this3.roles) + CALL { + WITH this + MATCH (this)<-[this0:MEMBER_OF]-(this1:Person) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this1)-[:MEMBER_OF]->(this2:Family) + WHERE EXISTS { + MATCH (this2)<-[:CREATOR_OF]-(this3:User) + WHERE ($param1 IS NOT NULL AND $param1 IN this3.roles) + } + }) + RETURN { nodes: count(DISTINCT this1) } AS var4 + } + CALL { + WITH * + MATCH (this)<-[this5:MEMBER_OF]-(this6:Person) + WHERE ($isAuthenticated = true AND EXISTS { + MATCH (this6)-[:MEMBER_OF]->(this7:Family) + WHERE EXISTS { + MATCH (this7)<-[:CREATOR_OF]-(this8:User) + WHERE ($param2 IS NOT NULL AND $param2 IN this8.roles) + } + }) + WITH collect({ node: this6, relationship: this5 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this6, edge.relationship AS this5 + RETURN collect({ node: { __id: id(this6), __resolveType: \\"Person\\" } }) AS var9 } - }) - RETURN count(this1) AS var4 + RETURN var9, totalCount + } + RETURN { edges: var9, totalCount: totalCount, aggregate: { count: var4 } } AS var10 } - RETURN this { .id, membersAggregate: { count: var4 } } AS this" + RETURN this { .id, membersConnection: var10 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(` "{ \\"isAuthenticated\\": true, - \\"param1\\": \\"plan:paid\\" + \\"param1\\": \\"plan:paid\\", + \\"param2\\": \\"plan:paid\\" }" `); }); diff --git a/packages/graphql/tests/tck/undirected-relationships/query-direction-aggregations.test.ts b/packages/graphql/tests/tck/undirected-relationships/query-direction-aggregations.test.ts index f045afcc9f..558a18b402 100644 --- a/packages/graphql/tests/tck/undirected-relationships/query-direction-aggregations.test.ts +++ b/packages/graphql/tests/tck/undirected-relationships/query-direction-aggregations.test.ts @@ -38,8 +38,12 @@ describe("QueryDirection in relationships aggregations", () => { const query = /* GraphQL */ ` query Users { users { - friendsAggregate { - count + friendsConnection { + aggregate { + count { + nodes + } + } } } } @@ -52,10 +56,27 @@ describe("QueryDirection in relationships aggregations", () => { MATCH (this:User) CALL { WITH this - MATCH (this)-[this0:FRIENDS_WITH]->(this1:User) - RETURN count(this1) AS var2 + CALL { + WITH this + MATCH (this)-[this0:FRIENDS_WITH]->(this1:User) + RETURN { nodes: count(DISTINCT this1) } AS var2 + } + CALL { + WITH * + MATCH (this)-[this3:FRIENDS_WITH]->(this4:User) + WITH collect({ node: this4, relationship: this3 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this4, edge.relationship AS this3 + RETURN collect({ node: { __id: id(this4), __resolveType: \\"User\\" } }) AS var5 + } + RETURN var5, totalCount + } + RETURN { edges: var5, totalCount: totalCount, aggregate: { count: var2 } } AS var6 } - RETURN this { friendsAggregate: { count: var2 } } AS this" + RETURN this { friendsConnection: var6 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); }); @@ -74,8 +95,12 @@ describe("QueryDirection in relationships aggregations", () => { const query = /* GraphQL */ ` query Users { users { - friendsAggregate { - count + friendsConnection { + aggregate { + count { + nodes + } + } } } } @@ -88,10 +113,27 @@ describe("QueryDirection in relationships aggregations", () => { MATCH (this:User) CALL { WITH this - MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) - RETURN count(this1) AS var2 + CALL { + WITH this + MATCH (this)-[this0:FRIENDS_WITH]-(this1:User) + RETURN { nodes: count(DISTINCT this1) } AS var2 + } + CALL { + WITH * + MATCH (this)-[this3:FRIENDS_WITH]-(this4:User) + WITH collect({ node: this4, relationship: this3 }) AS edges + WITH edges, size(edges) AS totalCount + CALL { + WITH edges + UNWIND edges AS edge + WITH edge.node AS this4, edge.relationship AS this3 + RETURN collect({ node: { __id: id(this4), __resolveType: \\"User\\" } }) AS var5 + } + RETURN var5, totalCount + } + RETURN { edges: var5, totalCount: totalCount, aggregate: { count: var2 } } AS var6 } - RETURN this { friendsAggregate: { count: var2 } } AS this" + RETURN this { friendsConnection: var6 } AS this" `); expect(formatParams(result.params)).toMatchInlineSnapshot(`"{}"`); }); diff --git a/packages/graphql/tests/utils/graphql-types.ts b/packages/graphql/tests/utils/graphql-types.ts index 2c174cb4d1..5eaa91b0a9 100644 --- a/packages/graphql/tests/utils/graphql-types.ts +++ b/packages/graphql/tests/utils/graphql-types.ts @@ -27,7 +27,7 @@ type UniqueTypeOperations = { create: string; update: string; delete: string; - aggregate: string; + aggregate: string; // TODO: remove connection: string; subscribe: { created: string;