From aa313c8626275fe2aa6ca272deaff65a5fa2eb9a Mon Sep 17 00:00:00 2001 From: MacondoExpress Date: Thu, 9 Jan 2025 13:35:29 +0000 Subject: [PATCH 1/7] introduce typename filter in v6 --- packages/graphql/src/schema/constants.ts | 7 + .../src/schema/generation/where-input.ts | 10 +- .../queryAST/factory/FilterFactory.ts | 2 +- packages/graphql/src/types/index.ts | 1 + .../filtering/typename-in.int.test.ts | 10 +- .../graphql/tests/schema/comments.test.ts | 3 +- .../schema/connections/interfaces.test.ts | 6 +- .../tests/schema/directive-preserve.test.ts | 9 +- .../schema/directives/customResolver.test.ts | 3 +- .../tests/schema/directives/cypher.test.ts | 3 +- .../tests/schema/directives/default.test.ts | 3 +- .../schema/directives/filterable.test.ts | 9 +- .../tests/schema/directives/private.test.ts | 6 +- .../directives/relationship-aggregate.test.ts | 6 +- .../relationship-nested-operations.test.ts | 24 +- .../schema/directives/selectable.test.ts | 6 +- .../tests/schema/directives/settable.test.ts | 12 +- .../graphql/tests/schema/inheritance.test.ts | 3 +- .../schema/interface-relationships.test.ts | 36 +- .../graphql/tests/schema/interfaces.test.ts | 6 +- .../graphql/tests/schema/issues/2377.test.ts | 3 +- .../graphql/tests/schema/issues/2993.test.ts | 3 +- .../graphql/tests/schema/issues/3439.test.ts | 15 +- .../graphql/tests/schema/issues/3698.test.ts | 9 +- .../graphql/tests/schema/issues/4511.test.ts | 6 +- .../graphql/tests/schema/issues/4615.test.ts | 3 +- packages/graphql/tests/schema/math.test.ts | 3 +- .../schema/remove-deprecated/comments.test.ts | 3 +- .../directed-argument.test.ts | 3 +- .../options-argument.test.ts | 3 +- .../remove-deprecated/typename_IN.test.ts | 377 ++++++++++++++++++ .../tests/schema/subscriptions.test.ts | 6 +- .../union-interface-relationship.test.ts | 3 +- 33 files changed, 529 insertions(+), 73 deletions(-) create mode 100644 packages/graphql/tests/schema/remove-deprecated/typename_IN.test.ts diff --git a/packages/graphql/src/schema/constants.ts b/packages/graphql/src/schema/constants.ts index ba1cb77d64..39659c8447 100644 --- a/packages/graphql/src/schema/constants.ts +++ b/packages/graphql/src/schema/constants.ts @@ -60,3 +60,10 @@ export const DEPRECATE_OVERWRITE = { reason: "The overwrite argument is deprecated and will be removed", }, }; + +export const DEPRECATE_TYPENAME_IN = { + name: DEPRECATED, + args: { + reason: "The typename_IN filter is deprecated, please use the typename filters instead", + }, +}; diff --git a/packages/graphql/src/schema/generation/where-input.ts b/packages/graphql/src/schema/generation/where-input.ts index 3bb14b31a9..b8ff6aad27 100644 --- a/packages/graphql/src/schema/generation/where-input.ts +++ b/packages/graphql/src/schema/generation/where-input.ts @@ -32,7 +32,7 @@ import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/Uni import { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { RelationshipDeclarationAdapter } from "../../schema-model/relationship/model-adapters/RelationshipDeclarationAdapter"; import type { Neo4jFeaturesSettings } from "../../types"; -import { DEPRECATE_IMPLICIT_EQUAL_FILTERS } from "../constants"; +import { DEPRECATE_IMPLICIT_EQUAL_FILTERS, DEPRECATE_TYPENAME_IN } from "../constants"; import { getWhereFieldsForAttributes } from "../get-where-fields"; import { withAggregateInputType } from "./aggregate-types"; import { @@ -143,7 +143,13 @@ export function withWhereInputType({ name: entityAdapter.operations.implementationEnumTypename, values: enumValues, }); - whereInputType.addFields({ typename_IN: { type: interfaceImplementation.NonNull.List } }); + if (shouldAddDeprecatedFields(features, "typename_IN")) { + whereInputType.addFields({ + typename_IN: { type: interfaceImplementation.NonNull.List, directives: [DEPRECATE_TYPENAME_IN] }, + }); + } + + whereInputType.addFields({ typename: { type: interfaceImplementation.NonNull.List } }); } } return whereInputType; diff --git a/packages/graphql/src/translate/queryAST/factory/FilterFactory.ts b/packages/graphql/src/translate/queryAST/factory/FilterFactory.ts index 43e6cfa214..98aecca30c 100644 --- a/packages/graphql/src/translate/queryAST/factory/FilterFactory.ts +++ b/packages/graphql/src/translate/queryAST/factory/FilterFactory.ts @@ -430,7 +430,7 @@ export class FilterFactory { filters: nestedFilters, }); } - if (key === "typename_IN") { + if (key === "typename_IN" || key === "typename") { const acceptedEntities = entity.concreteEntities.filter((concreteEntity) => { return valueAsArray.some((typenameFilterValue) => typenameFilterValue === concreteEntity.name); }); diff --git a/packages/graphql/src/types/index.ts b/packages/graphql/src/types/index.ts index e6d9f34efb..de4ebcde02 100644 --- a/packages/graphql/src/types/index.ts +++ b/packages/graphql/src/types/index.ts @@ -453,6 +453,7 @@ export type Neo4jFeaturesSettings = { deprecatedOptionsArgument?: boolean; directedArgument?: boolean; connectOrCreate?: boolean; + typename_IN?: boolean; }; vector?: Neo4jVectorSettings; }; diff --git a/packages/graphql/tests/integration/filtering/typename-in.int.test.ts b/packages/graphql/tests/integration/filtering/typename-in.int.test.ts index 6f70d2b905..11ae33d414 100644 --- a/packages/graphql/tests/integration/filtering/typename-in.int.test.ts +++ b/packages/graphql/tests/integration/filtering/typename-in.int.test.ts @@ -88,7 +88,7 @@ describe("typename_IN", () => { test("top-level", async () => { const query = ` { - productions(where: { OR: [{ AND: [{ title_EQ: "The Matrix" }, { typename_IN: [${Movie.name}] }] }, { typename_IN: [${Series.name}] }]}) { + productions(where: { OR: [{ AND: [{ title_EQ: "The Matrix" }, { typename: [${Movie.name}] }] }, { typename: [${Series.name}] }]}) { __typename title } @@ -116,8 +116,8 @@ describe("typename_IN", () => { { ${Actor.plural} { actedIn(where: { OR: [ - { AND: [{ title_EQ: "The Matrix" }, { typename_IN: [${Movie.name}] }] } - { typename_IN: [${Series.name}] } + { AND: [{ title_EQ: "The Matrix" }, { typename: [${Movie.name}] }] } + { typename: [${Series.name}] } ] }) { __typename title @@ -149,7 +149,7 @@ describe("typename_IN", () => { test("aggregation", async () => { const query = ` { - productionsAggregate(where: { OR: [ { typename_IN: [${Movie.name}, ${Series.name}] } { typename_IN: [${Cartoon.name}] } ] }) { + productionsAggregate(where: { OR: [ { typename: [${Movie.name}, ${Series.name}] } { typename: [${Cartoon.name}] } ] }) { count } } @@ -168,7 +168,7 @@ describe("typename_IN", () => { const query = ` { ${Actor.plural} { - actedInAggregate(where: { NOT: { typename_IN: [${Movie.name}, ${Series.name}] } }) { + actedInAggregate(where: { NOT: { typename: [${Movie.name}, ${Series.name}] } }) { count } } diff --git a/packages/graphql/tests/schema/comments.test.ts b/packages/graphql/tests/schema/comments.test.ts index 8707f970c1..666f8f6f21 100644 --- a/packages/graphql/tests/schema/comments.test.ts +++ b/packages/graphql/tests/schema/comments.test.ts @@ -1139,7 +1139,8 @@ describe("Comments", () => { title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ProductionsConnection { diff --git a/packages/graphql/tests/schema/connections/interfaces.test.ts b/packages/graphql/tests/schema/connections/interfaces.test.ts index 9449e0510d..fcd4b882fa 100644 --- a/packages/graphql/tests/schema/connections/interfaces.test.ts +++ b/packages/graphql/tests/schema/connections/interfaces.test.ts @@ -243,7 +243,8 @@ describe("Connection with interfaces", () => { movies: ProductionWhere moviesAggregate: CreatureMoviesAggregateInput moviesConnection: CreatureMoviesConnectionWhere - typename_IN: [CreatureImplementation!] + typename: [CreatureImplementation!] + typename_IN: [CreatureImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type CreaturesConnection { @@ -804,7 +805,8 @@ describe("Connection with interfaces", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ProductionsConnection { diff --git a/packages/graphql/tests/schema/directive-preserve.test.ts b/packages/graphql/tests/schema/directive-preserve.test.ts index 1c862adf74..71e2ba4981 100644 --- a/packages/graphql/tests/schema/directive-preserve.test.ts +++ b/packages/graphql/tests/schema/directive-preserve.test.ts @@ -1603,7 +1603,8 @@ describe("Directive-preserve", () => { title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ProductionsConnection { @@ -2517,7 +2518,8 @@ describe("Directive-preserve", () => { title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ProductionsConnection { @@ -3454,7 +3456,8 @@ describe("Directive-preserve", () => { title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ProductionsConnection { diff --git a/packages/graphql/tests/schema/directives/customResolver.test.ts b/packages/graphql/tests/schema/directives/customResolver.test.ts index b8c1d1861e..862aa27751 100644 --- a/packages/graphql/tests/schema/directives/customResolver.test.ts +++ b/packages/graphql/tests/schema/directives/customResolver.test.ts @@ -201,7 +201,8 @@ describe("@customResolver directive", () => { customResolver_EQ: String customResolver_IN: [String] customResolver_STARTS_WITH: String - typename_IN: [UserInterfaceImplementation!] + typename: [UserInterfaceImplementation!] + typename_IN: [UserInterfaceImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type UserInterfacesConnection { diff --git a/packages/graphql/tests/schema/directives/cypher.test.ts b/packages/graphql/tests/schema/directives/cypher.test.ts index f3a0ccc8fa..4187665fa6 100644 --- a/packages/graphql/tests/schema/directives/cypher.test.ts +++ b/packages/graphql/tests/schema/directives/cypher.test.ts @@ -1354,7 +1354,8 @@ describe("Cypher", () => { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ProductionsConnection { diff --git a/packages/graphql/tests/schema/directives/default.test.ts b/packages/graphql/tests/schema/directives/default.test.ts index 4da2ac7559..181f3b128c 100644 --- a/packages/graphql/tests/schema/directives/default.test.ts +++ b/packages/graphql/tests/schema/directives/default.test.ts @@ -255,7 +255,8 @@ describe("@default directive", () => { toBeOverridden_EQ: String toBeOverridden_IN: [String!] toBeOverridden_STARTS_WITH: String - typename_IN: [UserInterfaceImplementation!] + typename: [UserInterfaceImplementation!] + typename_IN: [UserInterfaceImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type UserInterfacesConnection { diff --git a/packages/graphql/tests/schema/directives/filterable.test.ts b/packages/graphql/tests/schema/directives/filterable.test.ts index 3ccf4583fd..e35a173e21 100644 --- a/packages/graphql/tests/schema/directives/filterable.test.ts +++ b/packages/graphql/tests/schema/directives/filterable.test.ts @@ -5891,7 +5891,8 @@ describe("@filterable directive", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") username: String @deprecated(reason: \\"Please use the explicit _EQ version\\") username_CONTAINS: String username_ENDS_WITH: String @@ -6587,7 +6588,8 @@ describe("@filterable directive", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") username: String @deprecated(reason: \\"Please use the explicit _EQ version\\") username_CONTAINS: String username_ENDS_WITH: String @@ -7248,7 +7250,8 @@ describe("@filterable directive", () => { AND: [PersonWhere!] NOT: PersonWhere OR: [PersonWhere!] - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") username: String @deprecated(reason: \\"Please use the explicit _EQ version\\") username_CONTAINS: String username_ENDS_WITH: String diff --git a/packages/graphql/tests/schema/directives/private.test.ts b/packages/graphql/tests/schema/directives/private.test.ts index bad7f55fcd..d0d031c6dc 100644 --- a/packages/graphql/tests/schema/directives/private.test.ts +++ b/packages/graphql/tests/schema/directives/private.test.ts @@ -179,7 +179,8 @@ describe("@private directive", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - typename_IN: [UserInterfaceImplementation!] + typename: [UserInterfaceImplementation!] + typename_IN: [UserInterfaceImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type UserInterfacesConnection { @@ -393,7 +394,8 @@ describe("@private directive", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - typename_IN: [UserInterfaceImplementation!] + typename: [UserInterfaceImplementation!] + typename_IN: [UserInterfaceImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type UserInterfacesConnection { diff --git a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts index 9aba720c89..2993e4e732 100644 --- a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts @@ -1381,7 +1381,8 @@ describe("@relationship directive, aggregate argument", () => { password_EQ: String password_IN: [String!] password_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") username: String @deprecated(reason: \\"Please use the explicit _EQ version\\") username_CONTAINS: String username_ENDS_WITH: String @@ -1849,7 +1850,8 @@ describe("@relationship directive, aggregate argument", () => { password_EQ: String password_IN: [String!] password_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") username: String @deprecated(reason: \\"Please use the explicit _EQ version\\") username_CONTAINS: String username_ENDS_WITH: String diff --git a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts index bf85743f78..f2a21061dd 100644 --- a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts @@ -8350,7 +8350,8 @@ describe("Relationship nested operations", () => { name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type Query { @@ -8837,7 +8838,8 @@ describe("Relationship nested operations", () => { name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type Query { @@ -9323,7 +9325,8 @@ describe("Relationship nested operations", () => { name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type Query { @@ -9805,7 +9808,8 @@ describe("Relationship nested operations", () => { name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type Query { @@ -10286,7 +10290,8 @@ describe("Relationship nested operations", () => { name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type Query { @@ -10763,7 +10768,8 @@ describe("Relationship nested operations", () => { name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type Query { @@ -11388,7 +11394,8 @@ describe("Relationship nested operations", () => { name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type Query { @@ -11989,7 +11996,8 @@ describe("Relationship nested operations", () => { name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type Query { diff --git a/packages/graphql/tests/schema/directives/selectable.test.ts b/packages/graphql/tests/schema/directives/selectable.test.ts index 4a40e51bfd..5961ecedee 100644 --- a/packages/graphql/tests/schema/directives/selectable.test.ts +++ b/packages/graphql/tests/schema/directives/selectable.test.ts @@ -2851,7 +2851,8 @@ describe("@selectable", () => { title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ProductionsConnection { @@ -3411,7 +3412,8 @@ describe("@selectable", () => { title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ProductionsConnection { diff --git a/packages/graphql/tests/schema/directives/settable.test.ts b/packages/graphql/tests/schema/directives/settable.test.ts index aba39701d4..e19be6f6f9 100644 --- a/packages/graphql/tests/schema/directives/settable.test.ts +++ b/packages/graphql/tests/schema/directives/settable.test.ts @@ -5030,7 +5030,8 @@ describe("@settable", () => { title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ProductionsConnection { @@ -5566,7 +5567,8 @@ describe("@settable", () => { title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ProductionsConnection { @@ -6344,7 +6346,8 @@ describe("@settable", () => { title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ProductionsConnection { @@ -7263,7 +7266,8 @@ describe("@settable", () => { title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ProductionsConnection { diff --git a/packages/graphql/tests/schema/inheritance.test.ts b/packages/graphql/tests/schema/inheritance.test.ts index 2b63e97c14..419275a8d2 100644 --- a/packages/graphql/tests/schema/inheritance.test.ts +++ b/packages/graphql/tests/schema/inheritance.test.ts @@ -582,7 +582,8 @@ describe("inheritance", () => { name_EQ: String name_IN: [String] name_STARTS_WITH: String - typename_IN: [PersonImplementation!] + typename: [PersonImplementation!] + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type Query { diff --git a/packages/graphql/tests/schema/interface-relationships.test.ts b/packages/graphql/tests/schema/interface-relationships.test.ts index 8fdc7f5446..4f8815a050 100644 --- a/packages/graphql/tests/schema/interface-relationships.test.ts +++ b/packages/graphql/tests/schema/interface-relationships.test.ts @@ -510,7 +510,8 @@ describe("Interface Relationships", () => { title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ProductionsConnection { @@ -1681,7 +1682,8 @@ describe("Interface Relationships", () => { title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ProductionsConnection { @@ -3156,7 +3158,8 @@ describe("Interface Relationships", () => { title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ProductionsConnection { @@ -3912,7 +3915,8 @@ describe("Interface Relationships", () => { Return Interface1s where some of the related Interface2s match this filter \\"\\"\\" interface2_SOME: Interface2Where - typename_IN: [Interface1Implementation!] + typename: [Interface1Implementation!] + typename_IN: [Interface1Implementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type Interface1sConnection { @@ -3980,7 +3984,8 @@ describe("Interface Relationships", () => { field2_EQ: String field2_IN: [String] field2_STARTS_WITH: String - typename_IN: [Interface2Implementation!] + typename: [Interface2Implementation!] + typename_IN: [Interface2Implementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type Interface2sConnection { @@ -5095,7 +5100,8 @@ describe("Interface Relationships", () => { Return Interface1s where some of the related Interface2s match this filter \\"\\"\\" interface2_SOME: Interface2Where - typename_IN: [Interface1Implementation!] + typename: [Interface1Implementation!] + typename_IN: [Interface1Implementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type Interface1sConnection { @@ -5163,7 +5169,8 @@ describe("Interface Relationships", () => { field2_EQ: String field2_IN: [String] field2_STARTS_WITH: String - typename_IN: [Interface2Implementation!] + typename: [Interface2Implementation!] + typename_IN: [Interface2Implementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type Interface2sConnection { @@ -6385,7 +6392,8 @@ describe("Interface Relationships", () => { Return Interface1s where some of the related Interface2s match this filter \\"\\"\\" interface2_SOME: Interface2Where - typename_IN: [Interface1Implementation!] + typename: [Interface1Implementation!] + typename_IN: [Interface1Implementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type Interface1sConnection { @@ -6453,7 +6461,8 @@ describe("Interface Relationships", () => { field2_EQ: String field2_IN: [String] field2_STARTS_WITH: String - typename_IN: [Interface2Implementation!] + typename: [Interface2Implementation!] + typename_IN: [Interface2Implementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type Interface2sConnection { @@ -7902,7 +7911,8 @@ describe("Interface Relationships", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - typename_IN: [ContentImplementation!] + typename: [ContentImplementation!] + typename_IN: [ContentImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ContentsConnection { @@ -9198,7 +9208,8 @@ describe("Interface Relationships", () => { title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ProductionsConnection { @@ -9679,7 +9690,8 @@ describe("Interface Relationships", () => { title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ShowImplementation!] + typename: [ShowImplementation!] + typename_IN: [ShowImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ShowsConnection { diff --git a/packages/graphql/tests/schema/interfaces.test.ts b/packages/graphql/tests/schema/interfaces.test.ts index c64cf65584..9b5a04d583 100644 --- a/packages/graphql/tests/schema/interfaces.test.ts +++ b/packages/graphql/tests/schema/interfaces.test.ts @@ -322,7 +322,8 @@ describe("Interfaces", () => { movies_SINGLE: MovieWhere \\"\\"\\"Return MovieNodes where some of the related Movies match this filter\\"\\"\\" movies_SOME: MovieWhere - typename_IN: [MovieNodeImplementation!] + typename: [MovieNodeImplementation!] + typename_IN: [MovieNodeImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type MovieNodesConnection { @@ -751,7 +752,8 @@ describe("Interfaces", () => { movies_SINGLE: MovieWhere \\"\\"\\"Return MovieNodes where some of the related Movies match this filter\\"\\"\\" movies_SOME: MovieWhere - typename_IN: [MovieNodeImplementation!] + typename: [MovieNodeImplementation!] + typename_IN: [MovieNodeImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type MovieNodesConnection { diff --git a/packages/graphql/tests/schema/issues/2377.test.ts b/packages/graphql/tests/schema/issues/2377.test.ts index 89de492033..634b04c43b 100644 --- a/packages/graphql/tests/schema/issues/2377.test.ts +++ b/packages/graphql/tests/schema/issues/2377.test.ts @@ -421,7 +421,8 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { type: ResourceType @deprecated(reason: \\"Please use the explicit _EQ version\\") type_EQ: ResourceType type_IN: [ResourceType!] - typename_IN: [ResourceEntityImplementation!] + typename: [ResourceEntityImplementation!] + typename_IN: [ResourceEntityImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } input ResourceOnCreateInput { diff --git a/packages/graphql/tests/schema/issues/2993.test.ts b/packages/graphql/tests/schema/issues/2993.test.ts index 3e9c3903d1..fe6fdae3c0 100644 --- a/packages/graphql/tests/schema/issues/2993.test.ts +++ b/packages/graphql/tests/schema/issues/2993.test.ts @@ -206,7 +206,8 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { id_EQ: ID id_IN: [ID!] id_STARTS_WITH: ID - typename_IN: [ProfileImplementation!] + typename: [ProfileImplementation!] + typename_IN: [ProfileImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") userName: String @deprecated(reason: \\"Please use the explicit _EQ version\\") userName_CONTAINS: String userName_ENDS_WITH: String diff --git a/packages/graphql/tests/schema/issues/3439.test.ts b/packages/graphql/tests/schema/issues/3439.test.ts index a93b767a17..298f861a39 100644 --- a/packages/graphql/tests/schema/issues/3439.test.ts +++ b/packages/graphql/tests/schema/issues/3439.test.ts @@ -423,7 +423,8 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { id_EQ: String id_IN: [String!] id_STARTS_WITH: String - typename_IN: [INodeImplementation!] + typename: [INodeImplementation!] + typename_IN: [INodeImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type INodesConnection { @@ -503,7 +504,8 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name_EQ: String name_IN: [String!] name_STARTS_WITH: String - typename_IN: [IProductImplementation!] + typename: [IProductImplementation!] + typename_IN: [IProductImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type IProductsConnection { @@ -1502,7 +1504,8 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name_EQ: String name_IN: [String!] name_STARTS_WITH: String - typename_IN: [IProductImplementation!] + typename: [IProductImplementation!] + typename_IN: [IProductImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type IProductsConnection { @@ -2703,7 +2706,8 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name_EQ: String name_IN: [String!] name_STARTS_WITH: String - typename_IN: [IProductImplementation!] + typename: [IProductImplementation!] + typename_IN: [IProductImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type IProductsConnection { @@ -4028,7 +4032,8 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name_EQ: String name_IN: [String!] name_STARTS_WITH: String - typename_IN: [IProductImplementation!] + typename: [IProductImplementation!] + typename_IN: [IProductImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type IProductsConnection { diff --git a/packages/graphql/tests/schema/issues/3698.test.ts b/packages/graphql/tests/schema/issues/3698.test.ts index 253229b2ad..227ff03606 100644 --- a/packages/graphql/tests/schema/issues/3698.test.ts +++ b/packages/graphql/tests/schema/issues/3698.test.ts @@ -467,7 +467,8 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { name_EQ: String name_IN: [String!] name_STARTS_WITH: String - typename_IN: [IProductImplementation!] + typename: [IProductImplementation!] + typename_IN: [IProductImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type IProductsConnection { @@ -1354,7 +1355,8 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { name_EQ: String name_IN: [String!] name_STARTS_WITH: String - typename_IN: [IProductImplementation!] + typename: [IProductImplementation!] + typename_IN: [IProductImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type IProductsConnection { @@ -2224,7 +2226,8 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { name_EQ: String name_IN: [String!] name_STARTS_WITH: String - typename_IN: [IProductImplementation!] + typename: [IProductImplementation!] + typename_IN: [IProductImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type IProductsConnection { diff --git a/packages/graphql/tests/schema/issues/4511.test.ts b/packages/graphql/tests/schema/issues/4511.test.ts index 85b28f1f2f..0725b4fcd7 100644 --- a/packages/graphql/tests/schema/issues/4511.test.ts +++ b/packages/graphql/tests/schema/issues/4511.test.ts @@ -224,7 +224,8 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { movies: ProductionWhere moviesAggregate: CreatureMoviesAggregateInput moviesConnection: CreatureMoviesConnectionWhere - typename_IN: [CreatureImplementation!] + typename: [CreatureImplementation!] + typename_IN: [CreatureImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type CreaturesConnection { @@ -691,7 +692,8 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ProductionsConnection { diff --git a/packages/graphql/tests/schema/issues/4615.test.ts b/packages/graphql/tests/schema/issues/4615.test.ts index b6c4877e43..09365f764c 100644 --- a/packages/graphql/tests/schema/issues/4615.test.ts +++ b/packages/graphql/tests/schema/issues/4615.test.ts @@ -1061,7 +1061,8 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ShowImplementation!] + typename: [ShowImplementation!] + typename_IN: [ShowImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ShowsConnection { diff --git a/packages/graphql/tests/schema/math.test.ts b/packages/graphql/tests/schema/math.test.ts index 822d14217b..727fab1f21 100644 --- a/packages/graphql/tests/schema/math.test.ts +++ b/packages/graphql/tests/schema/math.test.ts @@ -1625,7 +1625,8 @@ describe("Algebraic", () => { AND: [ProductionWhere!] NOT: ProductionWhere OR: [ProductionWhere!] - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") viewers: Int @deprecated(reason: \\"Please use the explicit _EQ version\\") viewers_EQ: Int viewers_GT: Int diff --git a/packages/graphql/tests/schema/remove-deprecated/comments.test.ts b/packages/graphql/tests/schema/remove-deprecated/comments.test.ts index 7f16bc16bc..1cba3db813 100644 --- a/packages/graphql/tests/schema/remove-deprecated/comments.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/comments.test.ts @@ -1145,7 +1145,8 @@ describe("Comments", () => { title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ProductionsConnection { diff --git a/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts b/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts index 61a0b6e648..76def32693 100644 --- a/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts @@ -769,7 +769,8 @@ describe("Deprecated directed argument", () => { title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ProductionsConnection { diff --git a/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts b/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts index de3ec214da..3f2caa2cd4 100644 --- a/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts @@ -721,7 +721,8 @@ describe("Deprecated options argument", () => { title_EQ: String title_IN: [String!] title_STARTS_WITH: String - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ProductionsConnection { diff --git a/packages/graphql/tests/schema/remove-deprecated/typename_IN.test.ts b/packages/graphql/tests/schema/remove-deprecated/typename_IN.test.ts new file mode 100644 index 0000000000..5682ca732b --- /dev/null +++ b/packages/graphql/tests/schema/remove-deprecated/typename_IN.test.ts @@ -0,0 +1,377 @@ +/* + * 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("typename_IN", () => { + test("should remove typename_IN", async () => { + const typeDefs = /* GraphQL */ ` + type Series implements Production @node { + id: ID! + title: String! + numberOfEpisodes: Int! + } + + type Movie implements Production @node { + id: ID! + title: String! + } + + interface Production { + id: ID! + title: String! + } + `; + const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { + excludeDeprecatedFields: { + typename_IN: true, + }, + }, + }); + + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" + type CreateInfo { + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreateMoviesMutationResponse { + info: CreateInfo! + movies: [Movie!]! + } + + type CreateSeriesMutationResponse { + info: CreateInfo! + series: [Series!]! + } + + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" + type DeleteInfo { + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelection { + longest: ID + shortest: ID + } + + type IntAggregateSelection { + average: Float + max: Int + min: Int + sum: Int + } + + type Movie implements Production { + id: ID! + title: String! + } + + type MovieAggregateSelection { + count: Int! + id: IDAggregateSelection! + title: StringAggregateSelection! + } + + input MovieCreateInput { + id: ID! + title: String! + } + + type MovieEdge { + cursor: String! + node: Movie! + } + + input MovieOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more MovieSort objects to sort Movies by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [MovieSort!] + } + + \\"\\"\\" + Fields to sort Movies by. The order in which sorts are applied is not guaranteed when specifying many fields in one MovieSort object. + \\"\\"\\" + input MovieSort { + id: SortDirection + title: SortDirection + } + + input MovieUpdateInput { + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String + } + + input MovieWhere { + AND: [MovieWhere!] + NOT: MovieWhere + OR: [MovieWhere!] + id: ID @deprecated(reason: \\"Please use the explicit _EQ version\\") + id_CONTAINS: ID + id_ENDS_WITH: ID + id_EQ: ID + id_IN: [ID!] + id_STARTS_WITH: ID + title: String @deprecated(reason: \\"Please use the explicit _EQ version\\") + title_CONTAINS: String + title_ENDS_WITH: String + title_EQ: String + title_IN: [String!] + title_STARTS_WITH: String + } + + type MoviesConnection { + edges: [MovieEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Mutation { + createMovies(input: [MovieCreateInput!]!): CreateMoviesMutationResponse! + createSeries(input: [SeriesCreateInput!]!): CreateSeriesMutationResponse! + deleteMovies(where: MovieWhere): DeleteInfo! + deleteSeries(where: SeriesWhere): DeleteInfo! + updateMovies(update: MovieUpdateInput, where: MovieWhere): UpdateMoviesMutationResponse! + updateSeries(update: SeriesUpdateInput, where: SeriesWhere): UpdateSeriesMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + interface Production { + id: ID! + title: String! + } + + type ProductionAggregateSelection { + count: Int! + id: IDAggregateSelection! + title: StringAggregateSelection! + } + + type ProductionEdge { + cursor: String! + node: Production! + } + + enum ProductionImplementation { + Movie + Series + } + + input ProductionOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more ProductionSort objects to sort Productions by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [ProductionSort!] + } + + \\"\\"\\" + Fields to sort Productions by. The order in which sorts are applied is not guaranteed when specifying many fields in one ProductionSort object. + \\"\\"\\" + input ProductionSort { + id: SortDirection + title: SortDirection + } + + input ProductionWhere { + AND: [ProductionWhere!] + NOT: ProductionWhere + OR: [ProductionWhere!] + id: ID @deprecated(reason: \\"Please use the explicit _EQ version\\") + id_CONTAINS: ID + id_ENDS_WITH: ID + id_EQ: ID + id_IN: [ID!] + id_STARTS_WITH: ID + title: String @deprecated(reason: \\"Please use the explicit _EQ version\\") + title_CONTAINS: String + title_ENDS_WITH: String + title_EQ: String + title_IN: [String!] + title_STARTS_WITH: String + typename: [ProductionImplementation!] + } + + type ProductionsConnection { + edges: [ProductionEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Query { + movies(limit: Int, offset: Int, options: MovieOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [MovieSort!], where: MovieWhere): [Movie!]! + moviesAggregate(where: MovieWhere): MovieAggregateSelection! + moviesConnection(after: String, first: Int, sort: [MovieSort!], where: MovieWhere): MoviesConnection! + productions(limit: Int, offset: Int, options: ProductionOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [ProductionSort!], where: ProductionWhere): [Production!]! + productionsAggregate(where: ProductionWhere): ProductionAggregateSelection! + productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection! + series(limit: Int, offset: Int, options: SeriesOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [SeriesSort!], where: SeriesWhere): [Series!]! + seriesAggregate(where: SeriesWhere): SeriesAggregateSelection! + seriesConnection(after: String, first: Int, sort: [SeriesSort!], where: SeriesWhere): SeriesConnection! + } + + type Series implements Production { + id: ID! + numberOfEpisodes: Int! + title: String! + } + + type SeriesAggregateSelection { + count: Int! + id: IDAggregateSelection! + numberOfEpisodes: IntAggregateSelection! + title: StringAggregateSelection! + } + + type SeriesConnection { + edges: [SeriesEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input SeriesCreateInput { + id: ID! + numberOfEpisodes: Int! + title: String! + } + + type SeriesEdge { + cursor: String! + node: Series! + } + + input SeriesOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more SeriesSort objects to sort Series by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [SeriesSort!] + } + + \\"\\"\\" + Fields to sort Series by. The order in which sorts are applied is not guaranteed when specifying many fields in one SeriesSort object. + \\"\\"\\" + input SeriesSort { + id: SortDirection + numberOfEpisodes: SortDirection + title: SortDirection + } + + input SeriesUpdateInput { + id: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + id_SET: ID + numberOfEpisodes: Int @deprecated(reason: \\"Please use the explicit _SET field\\") + numberOfEpisodes_DECREMENT: Int + numberOfEpisodes_INCREMENT: Int + numberOfEpisodes_SET: Int + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String + } + + input SeriesWhere { + AND: [SeriesWhere!] + NOT: SeriesWhere + OR: [SeriesWhere!] + id: ID @deprecated(reason: \\"Please use the explicit _EQ version\\") + id_CONTAINS: ID + id_ENDS_WITH: ID + id_EQ: ID + id_IN: [ID!] + id_STARTS_WITH: ID + numberOfEpisodes: Int @deprecated(reason: \\"Please use the explicit _EQ version\\") + numberOfEpisodes_EQ: Int + numberOfEpisodes_GT: Int + numberOfEpisodes_GTE: Int + numberOfEpisodes_IN: [Int!] + numberOfEpisodes_LT: Int + numberOfEpisodes_LTE: Int + title: String @deprecated(reason: \\"Please use the explicit _EQ version\\") + title_CONTAINS: String + title_ENDS_WITH: String + title_EQ: String + title_IN: [String!] + title_STARTS_WITH: String + } + + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type StringAggregateSelection { + longest: String + shortest: String + } + + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" + type UpdateInfo { + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdateMoviesMutationResponse { + info: UpdateInfo! + movies: [Movie!]! + } + + type UpdateSeriesMutationResponse { + info: UpdateInfo! + series: [Series!]! + }" + `); + }); +}); diff --git a/packages/graphql/tests/schema/subscriptions.test.ts b/packages/graphql/tests/schema/subscriptions.test.ts index 9275bb34fb..c8b15263e6 100644 --- a/packages/graphql/tests/schema/subscriptions.test.ts +++ b/packages/graphql/tests/schema/subscriptions.test.ts @@ -5040,7 +5040,8 @@ describe("Subscriptions", () => { movies: ProductionWhere moviesAggregate: CreatureMoviesAggregateInput moviesConnection: CreatureMoviesConnectionWhere - typename_IN: [CreatureImplementation!] + typename: [CreatureImplementation!] + typename_IN: [CreatureImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type CreaturesConnection { @@ -5507,7 +5508,8 @@ describe("Subscriptions", () => { id_EQ: ID id_IN: [ID] id_STARTS_WITH: ID - typename_IN: [ProductionImplementation!] + typename: [ProductionImplementation!] + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ProductionsConnection { diff --git a/packages/graphql/tests/schema/union-interface-relationship.test.ts b/packages/graphql/tests/schema/union-interface-relationship.test.ts index 4b4f2fef32..adbac516f9 100644 --- a/packages/graphql/tests/schema/union-interface-relationship.test.ts +++ b/packages/graphql/tests/schema/union-interface-relationship.test.ts @@ -1753,7 +1753,8 @@ describe("Union Interface Relationships", () => { reviewerId_IN: [Int] reviewerId_LT: Int reviewerId_LTE: Int - typename_IN: [ReviewerImplementation!] + typename: [ReviewerImplementation!] + typename_IN: [ReviewerImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") } type ReviewersConnection { From c666adcf06e26a93687ee1732e386b84752dc5c7 Mon Sep 17 00:00:00 2001 From: MacondoExpress Date: Thu, 9 Jan 2025 13:47:01 +0000 Subject: [PATCH 2/7] Create fluffy-schools-promise.md --- .changeset/fluffy-schools-promise.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .changeset/fluffy-schools-promise.md diff --git a/.changeset/fluffy-schools-promise.md b/.changeset/fluffy-schools-promise.md new file mode 100644 index 0000000000..842a12077b --- /dev/null +++ b/.changeset/fluffy-schools-promise.md @@ -0,0 +1,13 @@ +--- +"@neo4j/graphql": minor +--- + +Introduced the `typename` filter that superseded the `typename_IN` filter. +As part of the change, the flag `typename_IN` has been added to the `excludeDeprecatedFields` setting. + +```js +const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { excludeDeprecatedFields: { typename_IN: true } }, +}); +``` From 9a87192c21b18c2b38d7b9b420ee1caa470d08a9 Mon Sep 17 00:00:00 2001 From: MacondoExpress Date: Thu, 9 Jan 2025 14:34:04 +0000 Subject: [PATCH 3/7] change deprecation message --- packages/graphql/src/schema/constants.ts | 2 +- .../graphql/tests/schema/comments.test.ts | 2 +- .../schema/connections/interfaces.test.ts | 4 ++-- .../tests/schema/directive-preserve.test.ts | 6 ++--- .../schema/directives/customResolver.test.ts | 2 +- .../tests/schema/directives/cypher.test.ts | 2 +- .../tests/schema/directives/default.test.ts | 2 +- .../schema/directives/filterable.test.ts | 6 ++--- .../tests/schema/directives/private.test.ts | 4 ++-- .../directives/relationship-aggregate.test.ts | 4 ++-- .../relationship-nested-operations.test.ts | 16 ++++++------- .../schema/directives/selectable.test.ts | 4 ++-- .../tests/schema/directives/settable.test.ts | 8 +++---- .../graphql/tests/schema/inheritance.test.ts | 2 +- .../schema/interface-relationships.test.ts | 24 +++++++++---------- .../graphql/tests/schema/interfaces.test.ts | 4 ++-- .../graphql/tests/schema/issues/2377.test.ts | 2 +- .../graphql/tests/schema/issues/2993.test.ts | 2 +- .../graphql/tests/schema/issues/3439.test.ts | 10 ++++---- .../graphql/tests/schema/issues/3698.test.ts | 6 ++--- .../graphql/tests/schema/issues/4511.test.ts | 4 ++-- .../graphql/tests/schema/issues/4615.test.ts | 2 +- packages/graphql/tests/schema/math.test.ts | 2 +- .../schema/remove-deprecated/comments.test.ts | 2 +- .../directed-argument.test.ts | 2 +- .../options-argument.test.ts | 2 +- .../tests/schema/subscriptions.test.ts | 4 ++-- .../union-interface-relationship.test.ts | 2 +- 28 files changed, 66 insertions(+), 66 deletions(-) diff --git a/packages/graphql/src/schema/constants.ts b/packages/graphql/src/schema/constants.ts index 39659c8447..60965a7e76 100644 --- a/packages/graphql/src/schema/constants.ts +++ b/packages/graphql/src/schema/constants.ts @@ -64,6 +64,6 @@ export const DEPRECATE_OVERWRITE = { export const DEPRECATE_TYPENAME_IN = { name: DEPRECATED, args: { - reason: "The typename_IN filter is deprecated, please use the typename filters instead", + reason: "The typename_IN filter is deprecated, please use the typename filter instead", }, }; diff --git a/packages/graphql/tests/schema/comments.test.ts b/packages/graphql/tests/schema/comments.test.ts index 666f8f6f21..0de2abff2a 100644 --- a/packages/graphql/tests/schema/comments.test.ts +++ b/packages/graphql/tests/schema/comments.test.ts @@ -1140,7 +1140,7 @@ describe("Comments", () => { title_IN: [String!] title_STARTS_WITH: String typename: [ProductionImplementation!] - typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ProductionsConnection { diff --git a/packages/graphql/tests/schema/connections/interfaces.test.ts b/packages/graphql/tests/schema/connections/interfaces.test.ts index fcd4b882fa..dd7337da23 100644 --- a/packages/graphql/tests/schema/connections/interfaces.test.ts +++ b/packages/graphql/tests/schema/connections/interfaces.test.ts @@ -244,7 +244,7 @@ describe("Connection with interfaces", () => { moviesAggregate: CreatureMoviesAggregateInput moviesConnection: CreatureMoviesConnectionWhere typename: [CreatureImplementation!] - typename_IN: [CreatureImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [CreatureImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type CreaturesConnection { @@ -806,7 +806,7 @@ describe("Connection with interfaces", () => { id_IN: [ID] id_STARTS_WITH: ID typename: [ProductionImplementation!] - typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ProductionsConnection { diff --git a/packages/graphql/tests/schema/directive-preserve.test.ts b/packages/graphql/tests/schema/directive-preserve.test.ts index 71e2ba4981..6c491a8dc9 100644 --- a/packages/graphql/tests/schema/directive-preserve.test.ts +++ b/packages/graphql/tests/schema/directive-preserve.test.ts @@ -1604,7 +1604,7 @@ describe("Directive-preserve", () => { title_IN: [String!] title_STARTS_WITH: String typename: [ProductionImplementation!] - typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ProductionsConnection { @@ -2519,7 +2519,7 @@ describe("Directive-preserve", () => { title_IN: [String!] title_STARTS_WITH: String typename: [ProductionImplementation!] - typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ProductionsConnection { @@ -3457,7 +3457,7 @@ describe("Directive-preserve", () => { title_IN: [String!] title_STARTS_WITH: String typename: [ProductionImplementation!] - typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ProductionsConnection { diff --git a/packages/graphql/tests/schema/directives/customResolver.test.ts b/packages/graphql/tests/schema/directives/customResolver.test.ts index 862aa27751..0b480d4860 100644 --- a/packages/graphql/tests/schema/directives/customResolver.test.ts +++ b/packages/graphql/tests/schema/directives/customResolver.test.ts @@ -202,7 +202,7 @@ describe("@customResolver directive", () => { customResolver_IN: [String] customResolver_STARTS_WITH: String typename: [UserInterfaceImplementation!] - typename_IN: [UserInterfaceImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [UserInterfaceImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type UserInterfacesConnection { diff --git a/packages/graphql/tests/schema/directives/cypher.test.ts b/packages/graphql/tests/schema/directives/cypher.test.ts index 4187665fa6..9cc6eff8be 100644 --- a/packages/graphql/tests/schema/directives/cypher.test.ts +++ b/packages/graphql/tests/schema/directives/cypher.test.ts @@ -1355,7 +1355,7 @@ describe("Cypher", () => { NOT: ProductionWhere OR: [ProductionWhere!] typename: [ProductionImplementation!] - typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ProductionsConnection { diff --git a/packages/graphql/tests/schema/directives/default.test.ts b/packages/graphql/tests/schema/directives/default.test.ts index 181f3b128c..2beaa7d927 100644 --- a/packages/graphql/tests/schema/directives/default.test.ts +++ b/packages/graphql/tests/schema/directives/default.test.ts @@ -256,7 +256,7 @@ describe("@default directive", () => { toBeOverridden_IN: [String!] toBeOverridden_STARTS_WITH: String typename: [UserInterfaceImplementation!] - typename_IN: [UserInterfaceImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [UserInterfaceImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type UserInterfacesConnection { diff --git a/packages/graphql/tests/schema/directives/filterable.test.ts b/packages/graphql/tests/schema/directives/filterable.test.ts index e35a173e21..66508076e1 100644 --- a/packages/graphql/tests/schema/directives/filterable.test.ts +++ b/packages/graphql/tests/schema/directives/filterable.test.ts @@ -5892,7 +5892,7 @@ describe("@filterable directive", () => { NOT: PersonWhere OR: [PersonWhere!] typename: [PersonImplementation!] - typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") username: String @deprecated(reason: \\"Please use the explicit _EQ version\\") username_CONTAINS: String username_ENDS_WITH: String @@ -6589,7 +6589,7 @@ describe("@filterable directive", () => { NOT: PersonWhere OR: [PersonWhere!] typename: [PersonImplementation!] - typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") username: String @deprecated(reason: \\"Please use the explicit _EQ version\\") username_CONTAINS: String username_ENDS_WITH: String @@ -7251,7 +7251,7 @@ describe("@filterable directive", () => { NOT: PersonWhere OR: [PersonWhere!] typename: [PersonImplementation!] - typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") username: String @deprecated(reason: \\"Please use the explicit _EQ version\\") username_CONTAINS: String username_ENDS_WITH: String diff --git a/packages/graphql/tests/schema/directives/private.test.ts b/packages/graphql/tests/schema/directives/private.test.ts index d0d031c6dc..9e9f64d540 100644 --- a/packages/graphql/tests/schema/directives/private.test.ts +++ b/packages/graphql/tests/schema/directives/private.test.ts @@ -180,7 +180,7 @@ describe("@private directive", () => { id_IN: [ID] id_STARTS_WITH: ID typename: [UserInterfaceImplementation!] - typename_IN: [UserInterfaceImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [UserInterfaceImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type UserInterfacesConnection { @@ -395,7 +395,7 @@ describe("@private directive", () => { id_IN: [ID] id_STARTS_WITH: ID typename: [UserInterfaceImplementation!] - typename_IN: [UserInterfaceImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [UserInterfaceImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type UserInterfacesConnection { diff --git a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts index 2993e4e732..7567cc23ea 100644 --- a/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-aggregate.test.ts @@ -1382,7 +1382,7 @@ describe("@relationship directive, aggregate argument", () => { password_IN: [String!] password_STARTS_WITH: String typename: [PersonImplementation!] - typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") username: String @deprecated(reason: \\"Please use the explicit _EQ version\\") username_CONTAINS: String username_ENDS_WITH: String @@ -1851,7 +1851,7 @@ describe("@relationship directive, aggregate argument", () => { password_IN: [String!] password_STARTS_WITH: String typename: [PersonImplementation!] - typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") username: String @deprecated(reason: \\"Please use the explicit _EQ version\\") username_CONTAINS: String username_ENDS_WITH: String diff --git a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts index f2a21061dd..fe79fc5421 100644 --- a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts @@ -8351,7 +8351,7 @@ describe("Relationship nested operations", () => { name_IN: [String] name_STARTS_WITH: String typename: [PersonImplementation!] - typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type Query { @@ -8839,7 +8839,7 @@ describe("Relationship nested operations", () => { name_IN: [String] name_STARTS_WITH: String typename: [PersonImplementation!] - typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type Query { @@ -9326,7 +9326,7 @@ describe("Relationship nested operations", () => { name_IN: [String] name_STARTS_WITH: String typename: [PersonImplementation!] - typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type Query { @@ -9809,7 +9809,7 @@ describe("Relationship nested operations", () => { name_IN: [String] name_STARTS_WITH: String typename: [PersonImplementation!] - typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type Query { @@ -10291,7 +10291,7 @@ describe("Relationship nested operations", () => { name_IN: [String] name_STARTS_WITH: String typename: [PersonImplementation!] - typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type Query { @@ -10769,7 +10769,7 @@ describe("Relationship nested operations", () => { name_IN: [String] name_STARTS_WITH: String typename: [PersonImplementation!] - typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type Query { @@ -11395,7 +11395,7 @@ describe("Relationship nested operations", () => { name_IN: [String] name_STARTS_WITH: String typename: [PersonImplementation!] - typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type Query { @@ -11997,7 +11997,7 @@ describe("Relationship nested operations", () => { name_IN: [String] name_STARTS_WITH: String typename: [PersonImplementation!] - typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type Query { diff --git a/packages/graphql/tests/schema/directives/selectable.test.ts b/packages/graphql/tests/schema/directives/selectable.test.ts index 5961ecedee..91d6ec5a8f 100644 --- a/packages/graphql/tests/schema/directives/selectable.test.ts +++ b/packages/graphql/tests/schema/directives/selectable.test.ts @@ -2852,7 +2852,7 @@ describe("@selectable", () => { title_IN: [String!] title_STARTS_WITH: String typename: [ProductionImplementation!] - typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ProductionsConnection { @@ -3413,7 +3413,7 @@ describe("@selectable", () => { title_IN: [String!] title_STARTS_WITH: String typename: [ProductionImplementation!] - typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ProductionsConnection { diff --git a/packages/graphql/tests/schema/directives/settable.test.ts b/packages/graphql/tests/schema/directives/settable.test.ts index e19be6f6f9..be8ef975fd 100644 --- a/packages/graphql/tests/schema/directives/settable.test.ts +++ b/packages/graphql/tests/schema/directives/settable.test.ts @@ -5031,7 +5031,7 @@ describe("@settable", () => { title_IN: [String!] title_STARTS_WITH: String typename: [ProductionImplementation!] - typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ProductionsConnection { @@ -5568,7 +5568,7 @@ describe("@settable", () => { title_IN: [String!] title_STARTS_WITH: String typename: [ProductionImplementation!] - typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ProductionsConnection { @@ -6347,7 +6347,7 @@ describe("@settable", () => { title_IN: [String!] title_STARTS_WITH: String typename: [ProductionImplementation!] - typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ProductionsConnection { @@ -7267,7 +7267,7 @@ describe("@settable", () => { title_IN: [String!] title_STARTS_WITH: String typename: [ProductionImplementation!] - typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ProductionsConnection { diff --git a/packages/graphql/tests/schema/inheritance.test.ts b/packages/graphql/tests/schema/inheritance.test.ts index 419275a8d2..74057cb385 100644 --- a/packages/graphql/tests/schema/inheritance.test.ts +++ b/packages/graphql/tests/schema/inheritance.test.ts @@ -583,7 +583,7 @@ describe("inheritance", () => { name_IN: [String] name_STARTS_WITH: String typename: [PersonImplementation!] - typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [PersonImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type Query { diff --git a/packages/graphql/tests/schema/interface-relationships.test.ts b/packages/graphql/tests/schema/interface-relationships.test.ts index 4f8815a050..d031898995 100644 --- a/packages/graphql/tests/schema/interface-relationships.test.ts +++ b/packages/graphql/tests/schema/interface-relationships.test.ts @@ -511,7 +511,7 @@ describe("Interface Relationships", () => { title_IN: [String!] title_STARTS_WITH: String typename: [ProductionImplementation!] - typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ProductionsConnection { @@ -1683,7 +1683,7 @@ describe("Interface Relationships", () => { title_IN: [String!] title_STARTS_WITH: String typename: [ProductionImplementation!] - typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ProductionsConnection { @@ -3159,7 +3159,7 @@ describe("Interface Relationships", () => { title_IN: [String!] title_STARTS_WITH: String typename: [ProductionImplementation!] - typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ProductionsConnection { @@ -3916,7 +3916,7 @@ describe("Interface Relationships", () => { \\"\\"\\" interface2_SOME: Interface2Where typename: [Interface1Implementation!] - typename_IN: [Interface1Implementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [Interface1Implementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type Interface1sConnection { @@ -3985,7 +3985,7 @@ describe("Interface Relationships", () => { field2_IN: [String] field2_STARTS_WITH: String typename: [Interface2Implementation!] - typename_IN: [Interface2Implementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [Interface2Implementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type Interface2sConnection { @@ -5101,7 +5101,7 @@ describe("Interface Relationships", () => { \\"\\"\\" interface2_SOME: Interface2Where typename: [Interface1Implementation!] - typename_IN: [Interface1Implementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [Interface1Implementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type Interface1sConnection { @@ -5170,7 +5170,7 @@ describe("Interface Relationships", () => { field2_IN: [String] field2_STARTS_WITH: String typename: [Interface2Implementation!] - typename_IN: [Interface2Implementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [Interface2Implementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type Interface2sConnection { @@ -6393,7 +6393,7 @@ describe("Interface Relationships", () => { \\"\\"\\" interface2_SOME: Interface2Where typename: [Interface1Implementation!] - typename_IN: [Interface1Implementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [Interface1Implementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type Interface1sConnection { @@ -6462,7 +6462,7 @@ describe("Interface Relationships", () => { field2_IN: [String] field2_STARTS_WITH: String typename: [Interface2Implementation!] - typename_IN: [Interface2Implementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [Interface2Implementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type Interface2sConnection { @@ -7912,7 +7912,7 @@ describe("Interface Relationships", () => { id_IN: [ID] id_STARTS_WITH: ID typename: [ContentImplementation!] - typename_IN: [ContentImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ContentImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ContentsConnection { @@ -9209,7 +9209,7 @@ describe("Interface Relationships", () => { title_IN: [String!] title_STARTS_WITH: String typename: [ProductionImplementation!] - typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ProductionsConnection { @@ -9691,7 +9691,7 @@ describe("Interface Relationships", () => { title_IN: [String!] title_STARTS_WITH: String typename: [ShowImplementation!] - typename_IN: [ShowImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ShowImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ShowsConnection { diff --git a/packages/graphql/tests/schema/interfaces.test.ts b/packages/graphql/tests/schema/interfaces.test.ts index 9b5a04d583..b6d58de823 100644 --- a/packages/graphql/tests/schema/interfaces.test.ts +++ b/packages/graphql/tests/schema/interfaces.test.ts @@ -323,7 +323,7 @@ describe("Interfaces", () => { \\"\\"\\"Return MovieNodes where some of the related Movies match this filter\\"\\"\\" movies_SOME: MovieWhere typename: [MovieNodeImplementation!] - typename_IN: [MovieNodeImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [MovieNodeImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type MovieNodesConnection { @@ -753,7 +753,7 @@ describe("Interfaces", () => { \\"\\"\\"Return MovieNodes where some of the related Movies match this filter\\"\\"\\" movies_SOME: MovieWhere typename: [MovieNodeImplementation!] - typename_IN: [MovieNodeImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [MovieNodeImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type MovieNodesConnection { diff --git a/packages/graphql/tests/schema/issues/2377.test.ts b/packages/graphql/tests/schema/issues/2377.test.ts index 634b04c43b..b4598bcbfe 100644 --- a/packages/graphql/tests/schema/issues/2377.test.ts +++ b/packages/graphql/tests/schema/issues/2377.test.ts @@ -422,7 +422,7 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { type_EQ: ResourceType type_IN: [ResourceType!] typename: [ResourceEntityImplementation!] - typename_IN: [ResourceEntityImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ResourceEntityImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } input ResourceOnCreateInput { diff --git a/packages/graphql/tests/schema/issues/2993.test.ts b/packages/graphql/tests/schema/issues/2993.test.ts index fe6fdae3c0..8d90c43b12 100644 --- a/packages/graphql/tests/schema/issues/2993.test.ts +++ b/packages/graphql/tests/schema/issues/2993.test.ts @@ -207,7 +207,7 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { id_IN: [ID!] id_STARTS_WITH: ID typename: [ProfileImplementation!] - typename_IN: [ProfileImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProfileImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") userName: String @deprecated(reason: \\"Please use the explicit _EQ version\\") userName_CONTAINS: String userName_ENDS_WITH: String diff --git a/packages/graphql/tests/schema/issues/3439.test.ts b/packages/graphql/tests/schema/issues/3439.test.ts index 298f861a39..e382ec6dac 100644 --- a/packages/graphql/tests/schema/issues/3439.test.ts +++ b/packages/graphql/tests/schema/issues/3439.test.ts @@ -424,7 +424,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { id_IN: [String!] id_STARTS_WITH: String typename: [INodeImplementation!] - typename_IN: [INodeImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [INodeImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type INodesConnection { @@ -505,7 +505,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name_IN: [String!] name_STARTS_WITH: String typename: [IProductImplementation!] - typename_IN: [IProductImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [IProductImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type IProductsConnection { @@ -1505,7 +1505,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name_IN: [String!] name_STARTS_WITH: String typename: [IProductImplementation!] - typename_IN: [IProductImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [IProductImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type IProductsConnection { @@ -2707,7 +2707,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name_IN: [String!] name_STARTS_WITH: String typename: [IProductImplementation!] - typename_IN: [IProductImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [IProductImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type IProductsConnection { @@ -4033,7 +4033,7 @@ describe("https://github.com/neo4j/graphql/issues/3439", () => { name_IN: [String!] name_STARTS_WITH: String typename: [IProductImplementation!] - typename_IN: [IProductImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [IProductImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type IProductsConnection { diff --git a/packages/graphql/tests/schema/issues/3698.test.ts b/packages/graphql/tests/schema/issues/3698.test.ts index 227ff03606..32a30bf166 100644 --- a/packages/graphql/tests/schema/issues/3698.test.ts +++ b/packages/graphql/tests/schema/issues/3698.test.ts @@ -468,7 +468,7 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { name_IN: [String!] name_STARTS_WITH: String typename: [IProductImplementation!] - typename_IN: [IProductImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [IProductImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type IProductsConnection { @@ -1356,7 +1356,7 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { name_IN: [String!] name_STARTS_WITH: String typename: [IProductImplementation!] - typename_IN: [IProductImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [IProductImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type IProductsConnection { @@ -2227,7 +2227,7 @@ describe("https://github.com/neo4j/graphql/issues/3698", () => { name_IN: [String!] name_STARTS_WITH: String typename: [IProductImplementation!] - typename_IN: [IProductImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [IProductImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type IProductsConnection { diff --git a/packages/graphql/tests/schema/issues/4511.test.ts b/packages/graphql/tests/schema/issues/4511.test.ts index 0725b4fcd7..56de23a577 100644 --- a/packages/graphql/tests/schema/issues/4511.test.ts +++ b/packages/graphql/tests/schema/issues/4511.test.ts @@ -225,7 +225,7 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { moviesAggregate: CreatureMoviesAggregateInput moviesConnection: CreatureMoviesConnectionWhere typename: [CreatureImplementation!] - typename_IN: [CreatureImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [CreatureImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type CreaturesConnection { @@ -693,7 +693,7 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { id_IN: [ID] id_STARTS_WITH: ID typename: [ProductionImplementation!] - typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ProductionsConnection { diff --git a/packages/graphql/tests/schema/issues/4615.test.ts b/packages/graphql/tests/schema/issues/4615.test.ts index 09365f764c..eb03d11b3b 100644 --- a/packages/graphql/tests/schema/issues/4615.test.ts +++ b/packages/graphql/tests/schema/issues/4615.test.ts @@ -1062,7 +1062,7 @@ describe("https://github.com/neo4j/graphql/issues/4615", () => { title_IN: [String!] title_STARTS_WITH: String typename: [ShowImplementation!] - typename_IN: [ShowImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ShowImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ShowsConnection { diff --git a/packages/graphql/tests/schema/math.test.ts b/packages/graphql/tests/schema/math.test.ts index 727fab1f21..324654311f 100644 --- a/packages/graphql/tests/schema/math.test.ts +++ b/packages/graphql/tests/schema/math.test.ts @@ -1626,7 +1626,7 @@ describe("Algebraic", () => { NOT: ProductionWhere OR: [ProductionWhere!] typename: [ProductionImplementation!] - typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") viewers: Int @deprecated(reason: \\"Please use the explicit _EQ version\\") viewers_EQ: Int viewers_GT: Int diff --git a/packages/graphql/tests/schema/remove-deprecated/comments.test.ts b/packages/graphql/tests/schema/remove-deprecated/comments.test.ts index 1cba3db813..c7142cd826 100644 --- a/packages/graphql/tests/schema/remove-deprecated/comments.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/comments.test.ts @@ -1146,7 +1146,7 @@ describe("Comments", () => { title_IN: [String!] title_STARTS_WITH: String typename: [ProductionImplementation!] - typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ProductionsConnection { diff --git a/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts b/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts index 76def32693..15c7f3d190 100644 --- a/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts @@ -770,7 +770,7 @@ describe("Deprecated directed argument", () => { title_IN: [String!] title_STARTS_WITH: String typename: [ProductionImplementation!] - typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ProductionsConnection { diff --git a/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts b/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts index 3f2caa2cd4..f2ec7ac07b 100644 --- a/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts @@ -722,7 +722,7 @@ describe("Deprecated options argument", () => { title_IN: [String!] title_STARTS_WITH: String typename: [ProductionImplementation!] - typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ProductionsConnection { diff --git a/packages/graphql/tests/schema/subscriptions.test.ts b/packages/graphql/tests/schema/subscriptions.test.ts index c8b15263e6..295e2ec027 100644 --- a/packages/graphql/tests/schema/subscriptions.test.ts +++ b/packages/graphql/tests/schema/subscriptions.test.ts @@ -5041,7 +5041,7 @@ describe("Subscriptions", () => { moviesAggregate: CreatureMoviesAggregateInput moviesConnection: CreatureMoviesConnectionWhere typename: [CreatureImplementation!] - typename_IN: [CreatureImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [CreatureImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type CreaturesConnection { @@ -5509,7 +5509,7 @@ describe("Subscriptions", () => { id_IN: [ID] id_STARTS_WITH: ID typename: [ProductionImplementation!] - typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ProductionImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ProductionsConnection { diff --git a/packages/graphql/tests/schema/union-interface-relationship.test.ts b/packages/graphql/tests/schema/union-interface-relationship.test.ts index adbac516f9..3918fb36bf 100644 --- a/packages/graphql/tests/schema/union-interface-relationship.test.ts +++ b/packages/graphql/tests/schema/union-interface-relationship.test.ts @@ -1754,7 +1754,7 @@ describe("Union Interface Relationships", () => { reviewerId_LT: Int reviewerId_LTE: Int typename: [ReviewerImplementation!] - typename_IN: [ReviewerImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filters instead\\") + typename_IN: [ReviewerImplementation!] @deprecated(reason: \\"The typename_IN filter is deprecated, please use the typename filter instead\\") } type ReviewersConnection { From e3c7dce6d1bd6474c1fbca0d14b9e35761dc1e85 Mon Sep 17 00:00:00 2001 From: MacondoExpress Date: Fri, 10 Jan 2025 16:12:02 +0000 Subject: [PATCH 4/7] add ID aggregation deprecations --- .../model-adapters/AttributeAdapter.ts | 19 +- .../aggregations/aggregation-types-mapper.ts | 4 +- .../field-aggregation-composer.ts | 23 ++- packages/graphql/src/schema/constants.ts | 9 + .../src/schema/generation/aggregate-types.ts | 30 ++- .../graphql/tests/schema/aggregations.test.ts | 114 ++++++----- .../tests/schema/array-methods.test.ts | 24 +-- packages/graphql/tests/schema/arrays.test.ts | 2 +- .../tests/schema/authorization.test.ts | 48 ++--- .../graphql/tests/schema/comments.test.ts | 8 +- .../tests/schema/connect-or-create-id.test.ts | 72 +++---- .../schema/connections/interfaces.test.ts | 116 +++++------ .../tests/schema/custom-mutations.test.ts | 2 +- .../tests/schema/directive-preserve.test.ts | 2 +- .../schema/directives/autogenerate.test.ts | 2 +- .../schema/directives/customResolver.test.ts | 2 +- .../tests/schema/directives/cypher.test.ts | 4 +- .../tests/schema/directives/default.test.ts | 2 +- .../schema/directives/populatedBy.test.ts | 100 ++++----- .../tests/schema/directives/private.test.ts | 8 +- .../relationship-nested-operations.test.ts | 84 ++++---- .../relationship-properties.test.ts | 48 ++--- .../schema/directives/relationship.test.ts | 26 +-- .../schema/directives/timestamps.test.ts | 2 +- packages/graphql/tests/schema/extend.test.ts | 2 +- .../graphql/tests/schema/global-node.test.ts | 2 +- packages/graphql/tests/schema/inputs.test.ts | 2 +- .../schema/interface-relationships.test.ts | 138 ++++++------- .../graphql/tests/schema/interfaces.test.ts | 92 ++++----- .../graphql/tests/schema/issues/1182.test.ts | 26 +-- .../graphql/tests/schema/issues/162.test.ts | 26 +-- .../graphql/tests/schema/issues/200.test.ts | 2 +- .../graphql/tests/schema/issues/2377.test.ts | 26 +-- .../graphql/tests/schema/issues/2969.test.ts | 24 +-- .../graphql/tests/schema/issues/2993.test.ts | 26 +-- .../graphql/tests/schema/issues/3428.test.ts | 28 +-- .../graphql/tests/schema/issues/3817.test.ts | 24 +-- .../graphql/tests/schema/issues/4511.test.ts | 48 ++--- .../graphql/tests/schema/issues/872.test.ts | 46 ++--- packages/graphql/tests/schema/math.test.ts | 32 +-- packages/graphql/tests/schema/null.test.ts | 2 +- .../remove-deprecated/array-methods.test.ts | 24 +-- .../schema/remove-deprecated/comments.test.ts | 8 +- .../directed-argument.test.ts | 2 +- .../implicit-equality.test.ts | 24 +-- .../remove-deprecated/implicit-set.test.ts | 24 +-- .../options-argument.test.ts | 2 +- packages/graphql/tests/schema/scalar.test.ts | 2 +- packages/graphql/tests/schema/simple.test.ts | 2 +- .../tests/schema/subscriptions.test.ts | 192 +++++++++--------- .../graphql/tests/schema/types/date.test.ts | 2 +- .../tests/schema/types/datetime.test.ts | 2 +- .../tests/schema/types/duration.test.ts | 2 +- .../tests/schema/types/localdatetime.test.ts | 2 +- .../tests/schema/types/localtime.test.ts | 2 +- .../graphql/tests/schema/types/time.test.ts | 2 +- packages/graphql/tests/schema/unions.test.ts | 4 +- 57 files changed, 825 insertions(+), 768 deletions(-) diff --git a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts index 7ef2dabff7..26e1b252d1 100644 --- a/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts +++ b/packages/graphql/src/schema-model/attribute/model-adapters/AttributeAdapter.ts @@ -192,17 +192,24 @@ export class AttributeAdapter { isAggregableField(): boolean { return ( - !this.typeHelper.isList() && (this.typeHelper.isScalar() || this.typeHelper.isEnum()) && this.isAggregable() + !this.typeHelper.isList() && + //uncomment me on 7.x !this.typeHelper.isID() && + (this.typeHelper.isScalar() || this.typeHelper.isEnum()) && + this.isAggregable() ); } isAggregationWhereField(): boolean { - const isGraphQLBuiltInScalarWithoutBoolean = - this.typeHelper.isGraphQLBuiltInScalar() && !this.typeHelper.isBoolean(); - const isTemporalWithoutDate = this.typeHelper.isTemporal() && !this.typeHelper.isDate(); + if ( + this.typeHelper.isList() || + // uncomment me on 7.x this.typeHelper.isID() || + this.typeHelper.isBoolean() || + this.typeHelper.isDate() + ) { + return false; + } return ( - !this.typeHelper.isList() && - (isGraphQLBuiltInScalarWithoutBoolean || isTemporalWithoutDate || this.typeHelper.isBigInt()) && + (this.typeHelper.isGraphQLBuiltInScalar() || this.typeHelper.isTemporal() || this.typeHelper.isBigInt()) && this.isAggregationFilterable() ); } diff --git a/packages/graphql/src/schema/aggregations/aggregation-types-mapper.ts b/packages/graphql/src/schema/aggregations/aggregation-types-mapper.ts index e77e162b61..555a373453 100644 --- a/packages/graphql/src/schema/aggregations/aggregation-types-mapper.ts +++ b/packages/graphql/src/schema/aggregations/aggregation-types-mapper.ts @@ -50,7 +50,7 @@ export class AggregationTypesMapper { resolve: numericalResolver, args: {}, }; - + // TODO: REMOVE ID FIELD ON 7.x const composeId = { type: "ID", resolve: idResolver, @@ -64,6 +64,7 @@ export class AggregationTypesMapper { fields?: Record; directives?: string[]; }> = [ + // TODO: REMOVE ID FIELD ON 7.x { name: "ID", fields: { @@ -140,6 +141,7 @@ export class AggregationTypesMapper { }): ObjectTypeComposer { return composer.getOrCreateOTC(`${name}AggregateSelection`, (tc) => { tc.addFields(fields ?? { min: name, max: name }); + for (const directive of directives) { tc.setDirectiveByName(directive); } diff --git a/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts b/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts index 582b8d4262..c339d339fc 100644 --- a/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts +++ b/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts @@ -18,13 +18,14 @@ */ import { GraphQLInt, GraphQLNonNull } from "graphql"; -import type { ObjectTypeComposer, SchemaComposer } from "graphql-compose"; +import type { ObjectTypeComposer, ObjectTypeComposerFieldConfigMapDefinition, SchemaComposer } from "graphql-compose"; import type { Subgraph } from "../../classes/Subgraph"; import type { ConcreteEntityAdapter } from "../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-adapters/InterfaceEntityAdapter"; import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; import { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { RelationshipDeclarationAdapter } from "../../schema-model/relationship/model-adapters/RelationshipDeclarationAdapter"; +import { DEPRECATE_ID_AGGREGATION } from "../constants"; import { numericalResolver } from "../resolvers/field/numerical"; import { AggregationTypesMapper } from "./aggregation-types-mapper"; @@ -39,14 +40,12 @@ export class FieldAggregationComposer { private createAggregationField( name: string, - fields: Record + fields: ObjectTypeComposerFieldConfigMapDefinition ): ObjectTypeComposer | undefined { if (Object.keys(fields).length > 0) { return this.composer.createObjectTC({ name, - fields: { - ...fields, - }, + fields, }); } return undefined; @@ -95,13 +94,19 @@ export class FieldAggregationComposer { private getAggregationFields( entity: RelationshipAdapter | ConcreteEntityAdapter | InterfaceEntityAdapter - ): Record { + ): ObjectTypeComposerFieldConfigMapDefinition { return entity.aggregableFields.reduce((res, field) => { const objectTypeComposer = this.aggregationTypesMapper.getAggregationType(field.getTypeName()); - if (!objectTypeComposer) return res; - - res[field.name] = objectTypeComposer.NonNull; + if (!objectTypeComposer) { + return res; + } + // TODO: REMOVE ID FIELD ON 7.x + if (field.typeHelper.isID()) { + res[field.name] = { type: objectTypeComposer.NonNull, directives: [DEPRECATE_ID_AGGREGATION] }; + } else { + res[field.name] = objectTypeComposer.NonNull; + } return res; }, {}); diff --git a/packages/graphql/src/schema/constants.ts b/packages/graphql/src/schema/constants.ts index ba1cb77d64..9d53b484e0 100644 --- a/packages/graphql/src/schema/constants.ts +++ b/packages/graphql/src/schema/constants.ts @@ -60,3 +60,12 @@ export const DEPRECATE_OVERWRITE = { reason: "The overwrite argument is deprecated and will be removed", }, }; + + +export const DEPRECATE_ID_AGGREGATION = { + name: DEPRECATED, + args: { + reason: "aggregation of ID fields are deprecated and will be removed", + }, +}; + diff --git a/packages/graphql/src/schema/generation/aggregate-types.ts b/packages/graphql/src/schema/generation/aggregate-types.ts index e402ab5516..cc6ff39774 100644 --- a/packages/graphql/src/schema/generation/aggregate-types.ts +++ b/packages/graphql/src/schema/generation/aggregate-types.ts @@ -33,7 +33,7 @@ import type { RelationshipAdapter } from "../../schema-model/relationship/model- import { RelationshipDeclarationAdapter } from "../../schema-model/relationship/model-adapters/RelationshipDeclarationAdapter"; import type { Neo4jFeaturesSettings } from "../../types"; import type { AggregationTypesMapper } from "../aggregations/aggregation-types-mapper"; -import { DEPRECATE_IMPLICIT_EQUAL_FILTERS } from "../constants"; +import { DEPRECATE_ID_AGGREGATION, DEPRECATE_IMPLICIT_EQUAL_FILTERS } from "../constants"; import { numericalResolver } from "../resolvers/field/numerical"; import { graphqlDirectivesToCompose } from "../to-compose"; import { shouldAddDeprecatedFields } from "./utils"; @@ -76,7 +76,15 @@ function makeAggregableFields({ for (const attribute of aggregableAttributes) { const objectTypeComposer = aggregationTypesMapper.getAggregationType(attribute.getTypeName()); if (objectTypeComposer) { - aggregableFields[attribute.name] = objectTypeComposer.NonNull; + // TODO: REMOVE ID FIELD ON 7.x + if (attribute.typeHelper.isID()) { + aggregableFields[attribute.name] = { + type: objectTypeComposer.NonNull, + directives: [DEPRECATE_ID_AGGREGATION], + }; + continue; + } + aggregableFields[attribute.name] = { type: objectTypeComposer.NonNull }; } } return aggregableFields; @@ -211,6 +219,7 @@ function addAggregationFieldsByType( const deprecatedDirectives = graphqlDirectivesToCompose( (directivesOnField || []).filter((d) => d.name.value === DEPRECATED) ); + if (attribute.typeHelper.isString()) { for (const operator of AGGREGATION_COMPARISON_OPERATORS) { fields[`${attribute.name}_AVERAGE_LENGTH_${operator}`] = { @@ -251,13 +260,26 @@ function addAggregationFieldsByType( const averageType = attribute.typeHelper.isBigInt() ? "BigInt" : attribute.typeHelper.isDuration() - ? "Duration" - : GraphQLFloat; + ? "Duration" + : GraphQLFloat; fields[`${attribute.name}_AVERAGE_${operator}`] = { type: averageType, directives: deprecatedDirectives }; } return fields; } for (const operator of AGGREGATION_COMPARISON_OPERATORS) { + // TODO: REMOVE ID FIELD ON 7.x + if (attribute.typeHelper.isID()) { + fields[`${attribute.name}_MIN_${operator}`] = { + type: attribute.getTypeName(), + directives: deprecatedDirectives.length ? deprecatedDirectives : [DEPRECATE_ID_AGGREGATION], + }; + fields[`${attribute.name}_MAX_${operator}`] = { + type: attribute.getTypeName(), + directives: deprecatedDirectives.length ? deprecatedDirectives : [DEPRECATE_ID_AGGREGATION], + }; + continue; + } + fields[`${attribute.name}_MIN_${operator}`] = { type: attribute.getTypeName(), directives: deprecatedDirectives, diff --git a/packages/graphql/tests/schema/aggregations.test.ts b/packages/graphql/tests/schema/aggregations.test.ts index f1c1d1a59b..bbdd87d28a 100644 --- a/packages/graphql/tests/schema/aggregations.test.ts +++ b/packages/graphql/tests/schema/aggregations.test.ts @@ -18,13 +18,12 @@ */ import { printSchemaWithDirectives } from "@graphql-tools/utils"; -import { gql } from "graphql-tag"; import { lexicographicSortSchema } from "graphql/utilities"; import { Neo4jGraphQL } from "../../src"; describe("Aggregations", () => { test("Top Level Aggregations", async () => { - const typeDefs = gql` + const typeDefs = /* GraphQL */ ` type Movie @node { id: ID isbn: String! @@ -151,7 +150,7 @@ describe("Aggregations", () => { type MovieAggregateSelection { count: Int! createdAt: DateTimeAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") imdbRating: FloatAggregateSelection! isbn: StringAggregateSelection! screenTime: DurationAggregateSelection! @@ -386,9 +385,9 @@ describe("Aggregations", () => { }); test("Where Level Aggregations", async () => { - const typeDefs = gql` + const typeDefs = /* GraphQL */ ` type User @node { - someId: ID + someID: ID someString: String someFloat: Float someInt: Int @@ -401,12 +400,13 @@ describe("Aggregations", () => { } type Post @node { + someID: ID title: String likes: [User!]! @relationship(type: "LIKES", direction: IN, properties: "Likes") } type Likes @relationshipProperties { - someId: ID + someID: ID someString: String someFloat: Float someInt: Int @@ -509,7 +509,7 @@ describe("Aggregations", () => { someDateTime: DateTime someDuration: Duration someFloat: Float - someId: ID + someID: ID someInt: Int someLocalDateTime: LocalDateTime someLocalTime: LocalTime @@ -586,16 +586,16 @@ describe("Aggregations", () => { someFloat_SUM_GTE: Float someFloat_SUM_LT: Float someFloat_SUM_LTE: Float - someId_MAX_EQUAL: ID - someId_MAX_GT: ID - someId_MAX_GTE: ID - someId_MAX_LT: ID - someId_MAX_LTE: ID - someId_MIN_EQUAL: ID - someId_MIN_GT: ID - someId_MIN_GTE: ID - someId_MIN_LT: ID - someId_MIN_LTE: ID + someID_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") someInt_AVERAGE_EQUAL: Float someInt_AVERAGE_GT: Float someInt_AVERAGE_GTE: Float @@ -668,7 +668,7 @@ describe("Aggregations", () => { someDateTime: DateTime someDuration: Duration someFloat: Float - someId: ID + someID: ID someInt: Int someLocalDateTime: LocalDateTime someLocalTime: LocalTime @@ -681,7 +681,7 @@ describe("Aggregations", () => { someDateTime: SortDirection someDuration: SortDirection someFloat: SortDirection - someId: SortDirection + someID: SortDirection someInt: SortDirection someLocalDateTime: SortDirection someLocalTime: SortDirection @@ -704,8 +704,8 @@ describe("Aggregations", () => { someFloat_MULTIPLY: Float someFloat_SET: Float someFloat_SUBTRACT: Float - someId: ID @deprecated(reason: \\"Please use the explicit _SET field\\") - someId_SET: ID + someID: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + someID_SET: ID someInt: Int @deprecated(reason: \\"Please use the explicit _SET field\\") someInt_DECREMENT: Int someInt_INCREMENT: Int @@ -752,12 +752,12 @@ describe("Aggregations", () => { someFloat_IN: [Float] someFloat_LT: Float someFloat_LTE: Float - someId: ID @deprecated(reason: \\"Please use the explicit _EQ version\\") - someId_CONTAINS: ID - someId_ENDS_WITH: ID - someId_EQ: ID - someId_IN: [ID] - someId_STARTS_WITH: ID + someID: ID @deprecated(reason: \\"Please use the explicit _EQ version\\") + someID_CONTAINS: ID + someID_ENDS_WITH: ID + someID_EQ: ID + someID_IN: [ID] + someID_STARTS_WITH: ID someInt: Int @deprecated(reason: \\"Please use the explicit _EQ version\\") someInt_EQ: Int someInt_GT: Int @@ -833,16 +833,19 @@ describe("Aggregations", () => { likes(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! likesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: UserWhere): PostUserLikesAggregationSelection likesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! + someID: ID title: String } type PostAggregateSelection { count: Int! + someID: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") title: StringAggregateSelection! } input PostCreateInput { likes: PostLikesFieldInput + someID: ID title: String } @@ -984,16 +987,16 @@ describe("Aggregations", () => { someFloat_SUM_GTE: Float someFloat_SUM_LT: Float someFloat_SUM_LTE: Float - someId_MAX_EQUAL: ID - someId_MAX_GT: ID - someId_MAX_GTE: ID - someId_MAX_LT: ID - someId_MAX_LTE: ID - someId_MIN_EQUAL: ID - someId_MIN_GT: ID - someId_MIN_GTE: ID - someId_MIN_LT: ID - someId_MIN_LTE: ID + someID_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + someID_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") someInt_AVERAGE_EQUAL: Float someInt_AVERAGE_GT: Float someInt_AVERAGE_GTE: Float @@ -1094,11 +1097,14 @@ describe("Aggregations", () => { 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 { + someID: SortDirection title: SortDirection } input PostUpdateInput { likes: [PostLikesUpdateFieldInput!] + someID: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + someID_SET: ID title: String @deprecated(reason: \\"Please use the explicit _SET field\\") title_SET: String } @@ -1114,7 +1120,7 @@ describe("Aggregations", () => { someDateTime: DateTimeAggregateSelection! someDuration: DurationAggregateSelection! someFloat: FloatAggregateSelection! - someId: IDAggregateSelection! + someID: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") someInt: IntAggregateSelection! someLocalDateTime: LocalDateTimeAggregateSelection! someLocalTime: LocalTimeAggregateSelection! @@ -1127,7 +1133,7 @@ describe("Aggregations", () => { someDateTime: DateTimeAggregateSelection! someDuration: DurationAggregateSelection! someFloat: FloatAggregateSelection! - someId: IDAggregateSelection! + someID: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") someInt: IntAggregateSelection! someLocalDateTime: LocalDateTimeAggregateSelection! someLocalTime: LocalTimeAggregateSelection! @@ -1164,6 +1170,12 @@ describe("Aggregations", () => { likes_SINGLE: UserWhere \\"\\"\\"Return Posts where some of the related Users match this filter\\"\\"\\" likes_SOME: UserWhere + someID: ID @deprecated(reason: \\"Please use the explicit _EQ version\\") + someID_CONTAINS: ID + someID_ENDS_WITH: ID + someID_EQ: ID + someID_IN: [ID] + someID_STARTS_WITH: ID title: String @deprecated(reason: \\"Please use the explicit _EQ version\\") title_CONTAINS: String title_ENDS_WITH: String @@ -1233,7 +1245,7 @@ describe("Aggregations", () => { someDateTime: DateTime someDuration: Duration someFloat: Float - someId: ID + someID: ID someInt: Int someLocalDateTime: LocalDateTime someLocalTime: LocalTime @@ -1247,7 +1259,7 @@ describe("Aggregations", () => { someDateTime: DateTimeAggregateSelection! someDuration: DurationAggregateSelection! someFloat: FloatAggregateSelection! - someId: IDAggregateSelection! + someID: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") someInt: IntAggregateSelection! someLocalDateTime: LocalDateTimeAggregateSelection! someLocalTime: LocalTimeAggregateSelection! @@ -1264,7 +1276,7 @@ describe("Aggregations", () => { someDateTime: DateTime someDuration: Duration someFloat: Float - someId: ID + someID: ID someInt: Int someLocalDateTime: LocalDateTime someLocalTime: LocalTime @@ -1294,7 +1306,7 @@ describe("Aggregations", () => { someDateTime: SortDirection someDuration: SortDirection someFloat: SortDirection - someId: SortDirection + someID: SortDirection someInt: SortDirection someLocalDateTime: SortDirection someLocalTime: SortDirection @@ -1317,8 +1329,8 @@ describe("Aggregations", () => { someFloat_MULTIPLY: Float someFloat_SET: Float someFloat_SUBTRACT: Float - someId: ID @deprecated(reason: \\"Please use the explicit _SET field\\") - someId_SET: ID + someID: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + someID_SET: ID someInt: Int @deprecated(reason: \\"Please use the explicit _SET field\\") someInt_DECREMENT: Int someInt_INCREMENT: Int @@ -1365,12 +1377,12 @@ describe("Aggregations", () => { someFloat_IN: [Float] someFloat_LT: Float someFloat_LTE: Float - someId: ID @deprecated(reason: \\"Please use the explicit _EQ version\\") - someId_CONTAINS: ID - someId_ENDS_WITH: ID - someId_EQ: ID - someId_IN: [ID] - someId_STARTS_WITH: ID + someID: ID @deprecated(reason: \\"Please use the explicit _EQ version\\") + someID_CONTAINS: ID + someID_ENDS_WITH: ID + someID_EQ: ID + someID_IN: [ID] + someID_STARTS_WITH: ID someInt: Int @deprecated(reason: \\"Please use the explicit _EQ version\\") someInt_EQ: Int someInt_GT: Int diff --git a/packages/graphql/tests/schema/array-methods.test.ts b/packages/graphql/tests/schema/array-methods.test.ts index 22b3acf806..e161f35c93 100644 --- a/packages/graphql/tests/schema/array-methods.test.ts +++ b/packages/graphql/tests/schema/array-methods.test.ts @@ -176,16 +176,16 @@ describe("Arrays Methods", () => { averageRating_SUM_GTE: Float averageRating_SUM_LT: Float averageRating_SUM_LTE: Float - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type ActorActedInRelationship { @@ -246,7 +246,7 @@ describe("Arrays Methods", () => { type ActorMovieActedInNodeAggregateSelection { averageRating: FloatAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input ActorOptions { @@ -476,7 +476,7 @@ describe("Arrays Methods", () => { type MovieAggregateSelection { averageRating: FloatAggregateSelection! count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieConnectInput { diff --git a/packages/graphql/tests/schema/arrays.test.ts b/packages/graphql/tests/schema/arrays.test.ts index 0d45cf1286..8b80ec9628 100644 --- a/packages/graphql/tests/schema/arrays.test.ts +++ b/packages/graphql/tests/schema/arrays.test.ts @@ -82,7 +82,7 @@ describe("Arrays", () => { type MovieAggregateSelection { averageRating: FloatAggregateSelection! count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { diff --git a/packages/graphql/tests/schema/authorization.test.ts b/packages/graphql/tests/schema/authorization.test.ts index 779bbb1ccd..9d13211209 100644 --- a/packages/graphql/tests/schema/authorization.test.ts +++ b/packages/graphql/tests/schema/authorization.test.ts @@ -105,7 +105,7 @@ describe("Authorization", () => { type PostAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! } @@ -171,16 +171,16 @@ describe("Authorization", () => { AND: [PostAuthorNodeAggregationWhereInput!] NOT: PostAuthorNodeAggregationWhereInput OR: [PostAuthorNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name_AVERAGE_LENGTH_EQUAL: Float name_AVERAGE_LENGTH_GT: Float name_AVERAGE_LENGTH_GTE: Float @@ -262,7 +262,7 @@ describe("Authorization", () => { } type PostUserAuthorNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! } @@ -345,7 +345,7 @@ describe("Authorization", () => { type UserAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! } @@ -447,16 +447,16 @@ describe("Authorization", () => { AND: [UserPostsNodeAggregationWhereInput!] NOT: UserPostsNodeAggregationWhereInput OR: [UserPostsNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name_AVERAGE_LENGTH_EQUAL: Float name_AVERAGE_LENGTH_GT: Float name_AVERAGE_LENGTH_GTE: Float @@ -514,7 +514,7 @@ describe("Authorization", () => { } type UserUserPostsNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! } diff --git a/packages/graphql/tests/schema/comments.test.ts b/packages/graphql/tests/schema/comments.test.ts index 8707f970c1..1aa8a769c0 100644 --- a/packages/graphql/tests/schema/comments.test.ts +++ b/packages/graphql/tests/schema/comments.test.ts @@ -136,7 +136,7 @@ describe("Comments", () => { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -507,7 +507,7 @@ describe("Comments", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -1330,7 +1330,7 @@ describe("Comments", () => { type GenreAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input GenreConnectWhere { @@ -1399,7 +1399,7 @@ describe("Comments", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieConnectInput { diff --git a/packages/graphql/tests/schema/connect-or-create-id.test.ts b/packages/graphql/tests/schema/connect-or-create-id.test.ts index 2c0c269162..34baa5f066 100644 --- a/packages/graphql/tests/schema/connect-or-create-id.test.ts +++ b/packages/graphql/tests/schema/connect-or-create-id.test.ts @@ -76,7 +76,7 @@ describe("connect or create with id", () => { } type ActorMovieMoviesNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") title: StringAggregateSelection! } @@ -149,16 +149,16 @@ describe("connect or create with id", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") title_AVERAGE_LENGTH_EQUAL: Float title_AVERAGE_LENGTH_GT: Float title_AVERAGE_LENGTH_GTE: Float @@ -298,7 +298,7 @@ describe("connect or create with id", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") title: StringAggregateSelection! } @@ -528,7 +528,7 @@ describe("connect or create with id", () => { content: StringAggregateSelection! count: Int! createdAt: DateTimeAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input PostConnectInput { @@ -622,16 +622,16 @@ describe("connect or create with id", () => { AND: [PostCreatorNodeAggregationWhereInput!] NOT: PostCreatorNodeAggregationWhereInput OR: [PostCreatorNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name_AVERAGE_LENGTH_EQUAL: Float name_AVERAGE_LENGTH_GT: Float name_AVERAGE_LENGTH_GTE: Float @@ -726,7 +726,7 @@ describe("connect or create with id", () => { } type PostUserCreatorNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! } @@ -816,7 +816,7 @@ describe("connect or create with id", () => { type UserAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! } @@ -871,7 +871,7 @@ describe("connect or create with id", () => { type UserPostPostsNodeAggregateSelection { content: StringAggregateSelection! createdAt: DateTimeAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input UserPostsAggregateInput { @@ -971,16 +971,16 @@ describe("connect or create with id", () => { createdAt_MIN_GTE: DateTime createdAt_MIN_LT: DateTime createdAt_MIN_LTE: DateTime - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type UserPostsRelationship { diff --git a/packages/graphql/tests/schema/connections/interfaces.test.ts b/packages/graphql/tests/schema/connections/interfaces.test.ts index 9449e0510d..bd5099ed1b 100644 --- a/packages/graphql/tests/schema/connections/interfaces.test.ts +++ b/packages/graphql/tests/schema/connections/interfaces.test.ts @@ -93,7 +93,7 @@ describe("Connection with interfaces", () => { type CreatureAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input CreatureConnectInput { @@ -178,16 +178,16 @@ describe("Connection with interfaces", () => { AND: [CreatureMoviesNodeAggregationWhereInput!] NOT: CreatureMoviesNodeAggregationWhereInput OR: [CreatureMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type CreatureMoviesRelationship { @@ -282,7 +282,7 @@ describe("Connection with interfaces", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") title: StringAggregateSelection! } @@ -298,7 +298,7 @@ describe("Connection with interfaces", () => { } type MovieCreatureDirectorNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieDeleteInput { @@ -346,16 +346,16 @@ describe("Connection with interfaces", () => { AND: [MovieDirectorNodeAggregationWhereInput!] NOT: MovieDirectorNodeAggregationWhereInput OR: [MovieDirectorNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieDirectorUpdateConnectionInput { @@ -485,7 +485,7 @@ describe("Connection with interfaces", () => { type PersonAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input PersonCreateInput { @@ -543,16 +543,16 @@ describe("Connection with interfaces", () => { AND: [PersonMoviesNodeAggregationWhereInput!] NOT: PersonMoviesNodeAggregationWhereInput OR: [PersonMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input PersonMoviesUpdateConnectionInput { @@ -583,7 +583,7 @@ describe("Connection with interfaces", () => { } type PersonProductionMoviesNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } \\"\\"\\" @@ -622,7 +622,7 @@ describe("Connection with interfaces", () => { type ProductionAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input ProductionConnectInput { @@ -695,16 +695,16 @@ describe("Connection with interfaces", () => { AND: [ProductionDirectorNodeAggregationWhereInput!] NOT: ProductionDirectorNodeAggregationWhereInput OR: [ProductionDirectorNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type ProductionDirectorRelationship { @@ -843,7 +843,7 @@ describe("Connection with interfaces", () => { type SeriesAggregateSelection { count: Int! episode: IntAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") title: StringAggregateSelection! } @@ -866,7 +866,7 @@ describe("Connection with interfaces", () => { } type SeriesCreatureDirectorNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input SeriesDeleteInput { @@ -914,16 +914,16 @@ describe("Connection with interfaces", () => { AND: [SeriesDirectorNodeAggregationWhereInput!] NOT: SeriesDirectorNodeAggregationWhereInput OR: [SeriesDirectorNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input SeriesDirectorUpdateConnectionInput { diff --git a/packages/graphql/tests/schema/custom-mutations.test.ts b/packages/graphql/tests/schema/custom-mutations.test.ts index 8a5bbdebac..3680a0dcae 100644 --- a/packages/graphql/tests/schema/custom-mutations.test.ts +++ b/packages/graphql/tests/schema/custom-mutations.test.ts @@ -94,7 +94,7 @@ describe("Custom-mutations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { diff --git a/packages/graphql/tests/schema/directive-preserve.test.ts b/packages/graphql/tests/schema/directive-preserve.test.ts index 1c862adf74..96b45292d5 100644 --- a/packages/graphql/tests/schema/directive-preserve.test.ts +++ b/packages/graphql/tests/schema/directive-preserve.test.ts @@ -78,7 +78,7 @@ describe("Directive-preserve", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { diff --git a/packages/graphql/tests/schema/directives/autogenerate.test.ts b/packages/graphql/tests/schema/directives/autogenerate.test.ts index d4c053771b..8e2ea3b380 100644 --- a/packages/graphql/tests/schema/directives/autogenerate.test.ts +++ b/packages/graphql/tests/schema/directives/autogenerate.test.ts @@ -72,7 +72,7 @@ describe("Autogenerate", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! } diff --git a/packages/graphql/tests/schema/directives/customResolver.test.ts b/packages/graphql/tests/schema/directives/customResolver.test.ts index b8c1d1861e..a6a65f27f3 100644 --- a/packages/graphql/tests/schema/directives/customResolver.test.ts +++ b/packages/graphql/tests/schema/directives/customResolver.test.ts @@ -141,7 +141,7 @@ describe("@customResolver directive", () => { type UserAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") password: StringAggregateSelection! username: StringAggregateSelection! } diff --git a/packages/graphql/tests/schema/directives/cypher.test.ts b/packages/graphql/tests/schema/directives/cypher.test.ts index f3a0ccc8fa..6c3cd4b7a7 100644 --- a/packages/graphql/tests/schema/directives/cypher.test.ts +++ b/packages/graphql/tests/schema/directives/cypher.test.ts @@ -302,7 +302,7 @@ describe("Cypher", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -1805,7 +1805,7 @@ describe("Cypher", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { diff --git a/packages/graphql/tests/schema/directives/default.test.ts b/packages/graphql/tests/schema/directives/default.test.ts index 4da2ac7559..7cdb8ad74a 100644 --- a/packages/graphql/tests/schema/directives/default.test.ts +++ b/packages/graphql/tests/schema/directives/default.test.ts @@ -177,7 +177,7 @@ describe("@default directive", () => { type UserAggregateSelection { count: Int! fromInterface: StringAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! numberOfFriends: IntAggregateSelection! rating: FloatAggregateSelection! diff --git a/packages/graphql/tests/schema/directives/populatedBy.test.ts b/packages/graphql/tests/schema/directives/populatedBy.test.ts index 2eadf7a961..734ca1c724 100644 --- a/packages/graphql/tests/schema/directives/populatedBy.test.ts +++ b/packages/graphql/tests/schema/directives/populatedBy.test.ts @@ -200,7 +200,7 @@ describe("@populatedBy tests", () => { callback2: StringAggregateSelection! callback3: StringAggregateSelection! count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -405,7 +405,7 @@ describe("@populatedBy tests", () => { callback2: IntAggregateSelection! callback3: IntAggregateSelection! count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -741,7 +741,7 @@ describe("@populatedBy tests", () => { type GenreAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input GenreConnectWhere { @@ -810,7 +810,7 @@ describe("@populatedBy tests", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -837,11 +837,11 @@ describe("@populatedBy tests", () => { callback1: StringAggregateSelection! callback2: StringAggregateSelection! callback3: StringAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type MovieGenreGenresNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieGenresAggregateInput { @@ -908,16 +908,16 @@ describe("@populatedBy tests", () => { AND: [MovieGenresNodeAggregationWhereInput!] NOT: MovieGenresNodeAggregationWhereInput OR: [MovieGenresNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type MovieGenresRelationship { @@ -1091,16 +1091,16 @@ describe("@populatedBy tests", () => { callback3_SHORTEST_LENGTH_GTE: Int callback3_SHORTEST_LENGTH_LT: Int callback3_SHORTEST_LENGTH_LTE: Int - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input RelPropertiesCreateInput { @@ -1263,7 +1263,7 @@ describe("@populatedBy tests", () => { type GenreAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input GenreConnectWhere { @@ -1339,7 +1339,7 @@ describe("@populatedBy tests", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -1366,11 +1366,11 @@ describe("@populatedBy tests", () => { callback1: IntAggregateSelection! callback2: IntAggregateSelection! callback3: IntAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type MovieGenreGenresNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieGenresAggregateInput { @@ -1437,16 +1437,16 @@ describe("@populatedBy tests", () => { AND: [MovieGenresNodeAggregationWhereInput!] NOT: MovieGenresNodeAggregationWhereInput OR: [MovieGenresNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type MovieGenresRelationship { @@ -1635,16 +1635,16 @@ describe("@populatedBy tests", () => { callback3_SUM_GTE: Int callback3_SUM_LT: Int callback3_SUM_LTE: Int - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input RelPropertiesCreateInput { diff --git a/packages/graphql/tests/schema/directives/private.test.ts b/packages/graphql/tests/schema/directives/private.test.ts index bad7f55fcd..131f6e7696 100644 --- a/packages/graphql/tests/schema/directives/private.test.ts +++ b/packages/graphql/tests/schema/directives/private.test.ts @@ -123,7 +123,7 @@ describe("@private directive", () => { type UserAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input UserCreateInput { @@ -141,7 +141,7 @@ describe("@private directive", () => { type UserInterfaceAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type UserInterfaceEdge { @@ -335,7 +335,7 @@ describe("@private directive", () => { type UserAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") private: StringAggregateSelection! } @@ -355,7 +355,7 @@ describe("@private directive", () => { type UserInterfaceAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type UserInterfaceEdge { 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 bf85743f78..02ce7e476b 100644 --- a/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-nested-operations.test.ts @@ -146,7 +146,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -478,7 +478,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -816,7 +816,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -1150,7 +1150,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -1479,7 +1479,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -1812,7 +1812,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -2133,7 +2133,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -2443,16 +2443,16 @@ describe("Relationship nested operations", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name_AVERAGE_LENGTH_EQUAL: Float name_AVERAGE_LENGTH_GT: Float name_AVERAGE_LENGTH_GTE: Float @@ -2482,7 +2482,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -2510,7 +2510,7 @@ describe("Relationship nested operations", () => { } type MoviePersonActorsNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! } @@ -2600,7 +2600,7 @@ describe("Relationship nested operations", () => { type PersonAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! } @@ -2868,7 +2868,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -3314,7 +3314,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -3726,7 +3726,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -4137,7 +4137,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -4550,7 +4550,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -4958,7 +4958,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -5362,7 +5362,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -5765,7 +5765,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -6142,7 +6142,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -6566,7 +6566,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -6672,7 +6672,7 @@ describe("Relationship nested operations", () => { type PersonOneAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! } @@ -6751,7 +6751,7 @@ describe("Relationship nested operations", () => { type PersonTwoAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") nameTwo: StringAggregateSelection! } @@ -7073,7 +7073,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -7579,7 +7579,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -8071,7 +8071,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -8551,7 +8551,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -9038,7 +9038,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -9520,7 +9520,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -10002,7 +10002,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -10483,7 +10483,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -10989,7 +10989,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -11599,7 +11599,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { diff --git a/packages/graphql/tests/schema/directives/relationship-properties.test.ts b/packages/graphql/tests/schema/directives/relationship-properties.test.ts index 4acaf29ab2..57d687d396 100644 --- a/packages/graphql/tests/schema/directives/relationship-properties.test.ts +++ b/packages/graphql/tests/schema/directives/relationship-properties.test.ts @@ -713,16 +713,16 @@ describe("Relationship-properties", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") screenTime_AVERAGE_EQUAL: Float screenTime_AVERAGE_GT: Float screenTime_AVERAGE_GTE: Float @@ -843,7 +843,7 @@ describe("Relationship-properties", () => { } type ActorMovieMoviesEdgeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") screenTime: IntAggregateSelection! timestamp: DateTimeAggregateSelection! } @@ -1081,7 +1081,7 @@ describe("Relationship-properties", () => { } type MovieActorActorsEdgeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") screenTime: IntAggregateSelection! timestamp: DateTimeAggregateSelection! } @@ -1391,16 +1391,16 @@ describe("Relationship-properties", () => { AND: [ActedInAggregationWhereInput!] NOT: ActedInAggregationWhereInput OR: [ActedInAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") timestamp_MAX_EQUAL: DateTime timestamp_MAX_GT: DateTime timestamp_MAX_GTE: DateTime @@ -1482,7 +1482,7 @@ describe("Relationship-properties", () => { } type ActorMovieMoviesEdgeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") timestamp: DateTimeAggregateSelection! } @@ -1709,7 +1709,7 @@ describe("Relationship-properties", () => { } type MovieActorActorsEdgeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") timestamp: DateTimeAggregateSelection! } diff --git a/packages/graphql/tests/schema/directives/relationship.test.ts b/packages/graphql/tests/schema/directives/relationship.test.ts index 5fd2c5c73d..07b502b68a 100644 --- a/packages/graphql/tests/schema/directives/relationship.test.ts +++ b/packages/graphql/tests/schema/directives/relationship.test.ts @@ -247,7 +247,7 @@ describe("Relationship", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -455,7 +455,7 @@ describe("Relationship", () => { } type ActorMovieMoviesNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input ActorMoviesAggregateInput { @@ -520,16 +520,16 @@ describe("Relationship", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type ActorMoviesRelationship { @@ -761,7 +761,7 @@ describe("Relationship", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieConnectInput { diff --git a/packages/graphql/tests/schema/directives/timestamps.test.ts b/packages/graphql/tests/schema/directives/timestamps.test.ts index 9da0dd2ca1..06473882b8 100644 --- a/packages/graphql/tests/schema/directives/timestamps.test.ts +++ b/packages/graphql/tests/schema/directives/timestamps.test.ts @@ -83,7 +83,7 @@ describe("Timestamps", () => { type MovieAggregateSelection { count: Int! createdAt: DateTimeAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") updatedAt: DateTimeAggregateSelection! } diff --git a/packages/graphql/tests/schema/extend.test.ts b/packages/graphql/tests/schema/extend.test.ts index 3d1b3ba1db..80f6787d49 100644 --- a/packages/graphql/tests/schema/extend.test.ts +++ b/packages/graphql/tests/schema/extend.test.ts @@ -75,7 +75,7 @@ describe("Extend", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! } diff --git a/packages/graphql/tests/schema/global-node.test.ts b/packages/graphql/tests/schema/global-node.test.ts index 5743b78d45..264af12eaa 100644 --- a/packages/graphql/tests/schema/global-node.test.ts +++ b/packages/graphql/tests/schema/global-node.test.ts @@ -73,7 +73,7 @@ describe("Node Interface Types", () => { type MovieAggregateSelection { count: Int! - imdb: IDAggregateSelection! + imdb: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") title: StringAggregateSelection! } diff --git a/packages/graphql/tests/schema/inputs.test.ts b/packages/graphql/tests/schema/inputs.test.ts index 15fb4acd5a..3d21e8ac0b 100644 --- a/packages/graphql/tests/schema/inputs.test.ts +++ b/packages/graphql/tests/schema/inputs.test.ts @@ -78,7 +78,7 @@ describe("Inputs", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { diff --git a/packages/graphql/tests/schema/interface-relationships.test.ts b/packages/graphql/tests/schema/interface-relationships.test.ts index 8fdc7f5446..d275ffad70 100644 --- a/packages/graphql/tests/schema/interface-relationships.test.ts +++ b/packages/graphql/tests/schema/interface-relationships.test.ts @@ -7420,7 +7420,7 @@ describe("Interface Relationships", () => { type CommentAggregateSelection { content: StringAggregateSelection! count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input CommentConnectInput { @@ -7474,16 +7474,16 @@ describe("Interface Relationships", () => { AND: [CommentCreatorNodeAggregationWhereInput!] NOT: CommentCreatorNodeAggregationWhereInput OR: [CommentCreatorNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name_AVERAGE_LENGTH_EQUAL: Float name_AVERAGE_LENGTH_GT: Float name_AVERAGE_LENGTH_GTE: Float @@ -7615,16 +7615,16 @@ describe("Interface Relationships", () => { content_SHORTEST_LENGTH_GTE: Int content_SHORTEST_LENGTH_LT: Int content_SHORTEST_LENGTH_LTE: Int - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type CommentPostPostAggregationSelection { @@ -7634,7 +7634,7 @@ describe("Interface Relationships", () => { type CommentPostPostNodeAggregateSelection { content: StringAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type CommentPostRelationship { @@ -7678,7 +7678,7 @@ describe("Interface Relationships", () => { } type CommentUserCreatorNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! } @@ -7722,7 +7722,7 @@ describe("Interface Relationships", () => { type ContentAggregateSelection { content: StringAggregateSelection! count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input ContentConnectInput { @@ -7795,16 +7795,16 @@ describe("Interface Relationships", () => { AND: [ContentCreatorNodeAggregationWhereInput!] NOT: ContentCreatorNodeAggregationWhereInput OR: [ContentCreatorNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name_AVERAGE_LENGTH_EQUAL: Float name_AVERAGE_LENGTH_GT: Float name_AVERAGE_LENGTH_GTE: Float @@ -7981,7 +7981,7 @@ describe("Interface Relationships", () => { type PostAggregateSelection { content: StringAggregateSelection! count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type PostCommentCommentsAggregationSelection { @@ -7991,7 +7991,7 @@ describe("Interface Relationships", () => { type PostCommentCommentsNodeAggregateSelection { content: StringAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input PostCommentsAggregateInput { @@ -8071,16 +8071,16 @@ describe("Interface Relationships", () => { content_SHORTEST_LENGTH_GTE: Int content_SHORTEST_LENGTH_LT: Int content_SHORTEST_LENGTH_LTE: Int - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type PostCommentsRelationship { @@ -8152,16 +8152,16 @@ describe("Interface Relationships", () => { AND: [PostCreatorNodeAggregationWhereInput!] NOT: PostCreatorNodeAggregationWhereInput OR: [PostCreatorNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name_AVERAGE_LENGTH_EQUAL: Float name_AVERAGE_LENGTH_GT: Float name_AVERAGE_LENGTH_GTE: Float @@ -8239,7 +8239,7 @@ describe("Interface Relationships", () => { } type PostUserCreatorNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! } @@ -8358,7 +8358,7 @@ describe("Interface Relationships", () => { type UserAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! } @@ -8412,7 +8412,7 @@ describe("Interface Relationships", () => { type UserContentContentNodeAggregateSelection { content: StringAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input UserContentCreateFieldInput { @@ -8453,16 +8453,16 @@ describe("Interface Relationships", () => { content_SHORTEST_LENGTH_GTE: Int content_SHORTEST_LENGTH_LT: Int content_SHORTEST_LENGTH_LTE: Int - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type UserContentRelationship { diff --git a/packages/graphql/tests/schema/interfaces.test.ts b/packages/graphql/tests/schema/interfaces.test.ts index c64cf65584..a865724ac9 100644 --- a/packages/graphql/tests/schema/interfaces.test.ts +++ b/packages/graphql/tests/schema/interfaces.test.ts @@ -91,7 +91,7 @@ describe("Interfaces", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieConnectInput { @@ -126,7 +126,7 @@ describe("Interfaces", () => { } type MovieMovieMoviesNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieMoviesAggregateInput { @@ -164,16 +164,16 @@ describe("Interfaces", () => { AND: [MovieMoviesNodeAggregationWhereInput!] NOT: MovieMoviesNodeAggregationWhereInput OR: [MovieMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieMoviesUpdateConnectionInput { @@ -198,7 +198,7 @@ describe("Interfaces", () => { type MovieNodeAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type MovieNodeEdge { @@ -254,16 +254,16 @@ describe("Interfaces", () => { AND: [MovieNodeMoviesNodeAggregationWhereInput!] NOT: MovieNodeMoviesNodeAggregationWhereInput OR: [MovieNodeMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type MovieNodeMoviesRelationship { @@ -520,7 +520,7 @@ describe("Interfaces", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieConnectInput { @@ -555,7 +555,7 @@ describe("Interfaces", () => { } type MovieMovieMoviesNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieMoviesAggregateInput { @@ -593,16 +593,16 @@ describe("Interfaces", () => { AND: [MovieMoviesNodeAggregationWhereInput!] NOT: MovieMoviesNodeAggregationWhereInput OR: [MovieMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieMoviesUpdateConnectionInput { @@ -627,7 +627,7 @@ describe("Interfaces", () => { type MovieNodeAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type MovieNodeEdge { @@ -683,16 +683,16 @@ describe("Interfaces", () => { AND: [MovieNodeMoviesNodeAggregationWhereInput!] NOT: MovieNodeMoviesNodeAggregationWhereInput OR: [MovieNodeMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type MovieNodeMoviesRelationship { diff --git a/packages/graphql/tests/schema/issues/1182.test.ts b/packages/graphql/tests/schema/issues/1182.test.ts index fb34caae33..16dc6b1296 100644 --- a/packages/graphql/tests/schema/issues/1182.test.ts +++ b/packages/graphql/tests/schema/issues/1182.test.ts @@ -57,7 +57,7 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { type ActorAggregateSelection { count: Int! dob: DateTimeAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! } @@ -212,7 +212,7 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { type MovieActorActorsNodeAggregateSelection { dob: DateTimeAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! } @@ -295,16 +295,16 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { dob_MIN_GTE: DateTime dob_MIN_LT: DateTime dob_MIN_LTE: DateTime - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name_AVERAGE_LENGTH_EQUAL: Float name_AVERAGE_LENGTH_GT: Float name_AVERAGE_LENGTH_GTE: Float @@ -343,7 +343,7 @@ describe("https://github.com/neo4j/graphql/issues/1182", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") title: StringAggregateSelection! } diff --git a/packages/graphql/tests/schema/issues/162.test.ts b/packages/graphql/tests/schema/issues/162.test.ts index 9ff9aa17b6..a58c06f962 100644 --- a/packages/graphql/tests/schema/issues/162.test.ts +++ b/packages/graphql/tests/schema/issues/162.test.ts @@ -162,7 +162,7 @@ describe("162", () => { type TigerJawLevel2AggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input TigerJawLevel2CreateInput { @@ -210,7 +210,7 @@ describe("162", () => { type TigerJawLevel2Part1AggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input TigerJawLevel2Part1ConnectFieldInput { @@ -288,16 +288,16 @@ describe("162", () => { AND: [TigerJawLevel2Part1NodeAggregationWhereInput!] NOT: TigerJawLevel2Part1NodeAggregationWhereInput OR: [TigerJawLevel2Part1NodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input TigerJawLevel2Part1Options { @@ -482,7 +482,7 @@ describe("162", () => { } type TigerJawLevel2TigerJawLevel2Part1Part1NodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input TigerJawLevel2UpdateInput { diff --git a/packages/graphql/tests/schema/issues/200.test.ts b/packages/graphql/tests/schema/issues/200.test.ts index dac74d7d9a..870bd950d3 100644 --- a/packages/graphql/tests/schema/issues/200.test.ts +++ b/packages/graphql/tests/schema/issues/200.test.ts @@ -55,7 +55,7 @@ describe("200", () => { } type CategoryAggregateSelection { - categoryId: IDAggregateSelection! + categoryId: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") count: Int! description: StringAggregateSelection! name: StringAggregateSelection! diff --git a/packages/graphql/tests/schema/issues/2377.test.ts b/packages/graphql/tests/schema/issues/2377.test.ts index 89de492033..efa61a43bc 100644 --- a/packages/graphql/tests/schema/issues/2377.test.ts +++ b/packages/graphql/tests/schema/issues/2377.test.ts @@ -168,7 +168,7 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { type ResourceAggregateSelection { count: Int! createdAt: DateTimeAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! updatedAt: DateTimeAggregateSelection! } @@ -267,16 +267,16 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { createdAt_MIN_GTE: DateTime createdAt_MIN_LT: DateTime createdAt_MIN_LTE: DateTime - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name_AVERAGE_LENGTH_EQUAL: Float name_AVERAGE_LENGTH_GT: Float name_AVERAGE_LENGTH_GTE: Float @@ -365,7 +365,7 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { type ResourceEntityAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! } @@ -450,7 +450,7 @@ describe("https://github.com/neo4j/graphql/issues/2377", () => { type ResourceResourceContainedByNodeAggregateSelection { createdAt: DateTimeAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! updatedAt: DateTimeAggregateSelection! } diff --git a/packages/graphql/tests/schema/issues/2969.test.ts b/packages/graphql/tests/schema/issues/2969.test.ts index 4dfe5a9e87..daf9ccf34a 100644 --- a/packages/graphql/tests/schema/issues/2969.test.ts +++ b/packages/graphql/tests/schema/issues/2969.test.ts @@ -167,16 +167,16 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { AND: [PostAuthorNodeAggregationWhereInput!] NOT: PostAuthorNodeAggregationWhereInput OR: [PostAuthorNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name_AVERAGE_LENGTH_EQUAL: Float name_AVERAGE_LENGTH_GT: Float name_AVERAGE_LENGTH_GTE: Float @@ -266,7 +266,7 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { } type PostUserAuthorNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! } @@ -343,7 +343,7 @@ describe("https://github.com/neo4j/graphql/issues/2969", () => { type UserAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! } diff --git a/packages/graphql/tests/schema/issues/2993.test.ts b/packages/graphql/tests/schema/issues/2993.test.ts index 3e9c3903d1..501fecbf74 100644 --- a/packages/graphql/tests/schema/issues/2993.test.ts +++ b/packages/graphql/tests/schema/issues/2993.test.ts @@ -151,7 +151,7 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { type ProfileAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") userName: StringAggregateSelection! } @@ -268,7 +268,7 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { type UserAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") userName: StringAggregateSelection! } @@ -344,16 +344,16 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { AND: [UserFollowingNodeAggregationWhereInput!] NOT: UserFollowingNodeAggregationWhereInput OR: [UserFollowingNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") userName_AVERAGE_LENGTH_EQUAL: Float userName_AVERAGE_LENGTH_GT: Float userName_AVERAGE_LENGTH_GTE: Float @@ -411,7 +411,7 @@ describe("https://github.com/neo4j/graphql/issues/2993", () => { } type UserProfileFollowingNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") userName: StringAggregateSelection! } diff --git a/packages/graphql/tests/schema/issues/3428.test.ts b/packages/graphql/tests/schema/issues/3428.test.ts index d105ebfce7..f337b8317b 100644 --- a/packages/graphql/tests/schema/issues/3428.test.ts +++ b/packages/graphql/tests/schema/issues/3428.test.ts @@ -116,16 +116,16 @@ describe("Relationship nested operations", () => { AND: [MovieActorsNodeAggregationWhereInput!] NOT: MovieActorsNodeAggregationWhereInput OR: [MovieActorsNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name_AVERAGE_LENGTH_EQUAL: Float name_AVERAGE_LENGTH_GT: Float name_AVERAGE_LENGTH_GTE: Float @@ -150,7 +150,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -177,7 +177,7 @@ describe("Relationship nested operations", () => { } type MoviePersonActorsNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! } @@ -266,7 +266,7 @@ describe("Relationship nested operations", () => { type PersonAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! } @@ -463,7 +463,7 @@ describe("Relationship nested operations", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { diff --git a/packages/graphql/tests/schema/issues/3817.test.ts b/packages/graphql/tests/schema/issues/3817.test.ts index 7cded22c70..25b25c2373 100644 --- a/packages/graphql/tests/schema/issues/3817.test.ts +++ b/packages/graphql/tests/schema/issues/3817.test.ts @@ -171,7 +171,7 @@ describe("3817", () => { type PersonAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input PersonConnectInput { @@ -278,16 +278,16 @@ describe("3817", () => { AND: [PersonFriendsNodeAggregationWhereInput!] NOT: PersonFriendsNodeAggregationWhereInput OR: [PersonFriendsNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type PersonFriendsRelationship { @@ -338,7 +338,7 @@ describe("3817", () => { } type PersonPersonFriendsNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } \\"\\"\\" diff --git a/packages/graphql/tests/schema/issues/4511.test.ts b/packages/graphql/tests/schema/issues/4511.test.ts index 85b28f1f2f..374b912118 100644 --- a/packages/graphql/tests/schema/issues/4511.test.ts +++ b/packages/graphql/tests/schema/issues/4511.test.ts @@ -178,16 +178,16 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { AND: [CreatureMoviesNodeAggregationWhereInput!] NOT: CreatureMoviesNodeAggregationWhereInput OR: [CreatureMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type CreatureMoviesRelationship { @@ -271,7 +271,7 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") title: StringAggregateSelection! } @@ -495,16 +495,16 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { AND: [PersonMoviesNodeAggregationWhereInput!] NOT: PersonMoviesNodeAggregationWhereInput OR: [PersonMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input PersonMoviesUpdateConnectionInput { @@ -531,7 +531,7 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { } type PersonProductionMoviesNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input PersonUpdateInput { @@ -560,7 +560,7 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { type ProductionAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input ProductionConnectInput { @@ -730,7 +730,7 @@ describe("https://github.com/neo4j/graphql/issues/4511", () => { type SeriesAggregateSelection { count: Int! episode: IntAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") title: StringAggregateSelection! } diff --git a/packages/graphql/tests/schema/issues/872.test.ts b/packages/graphql/tests/schema/issues/872.test.ts index f3e8929c93..b0aaf37f45 100644 --- a/packages/graphql/tests/schema/issues/872.test.ts +++ b/packages/graphql/tests/schema/issues/872.test.ts @@ -88,7 +88,7 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { } type Actor2MovieMoviesNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") title: StringAggregateSelection! } @@ -161,16 +161,16 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { AND: [Actor2MoviesNodeAggregationWhereInput!] NOT: Actor2MoviesNodeAggregationWhereInput OR: [Actor2MoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") title_AVERAGE_LENGTH_EQUAL: Float title_AVERAGE_LENGTH_GT: Float title_AVERAGE_LENGTH_GTE: Float @@ -297,7 +297,7 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { } type ActorMovieMoviesNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") title: StringAggregateSelection! } @@ -370,16 +370,16 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") title_AVERAGE_LENGTH_EQUAL: Float title_AVERAGE_LENGTH_GT: Float title_AVERAGE_LENGTH_GTE: Float @@ -524,7 +524,7 @@ describe("https://github.com/neo4j/graphql/issues/872", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") title: StringAggregateSelection! } diff --git a/packages/graphql/tests/schema/math.test.ts b/packages/graphql/tests/schema/math.test.ts index 822d14217b..f9e36283a6 100644 --- a/packages/graphql/tests/schema/math.test.ts +++ b/packages/graphql/tests/schema/math.test.ts @@ -78,7 +78,7 @@ describe("Algebraic", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") viewers: IntAggregateSelection! } @@ -248,7 +248,7 @@ describe("Algebraic", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") viewers: BigIntAggregateSelection! } @@ -414,7 +414,7 @@ describe("Algebraic", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") viewers: FloatAggregateSelection! } @@ -664,16 +664,16 @@ describe("Algebraic", () => { AND: [DirectorDirectsNodeAggregationWhereInput!] NOT: DirectorDirectsNodeAggregationWhereInput OR: [DirectorDirectsNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") viewers_AVERAGE_EQUAL: Float viewers_AVERAGE_GT: Float viewers_AVERAGE_GTE: Float @@ -729,7 +729,7 @@ describe("Algebraic", () => { } type DirectorMovieDirectsNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") viewers: IntAggregateSelection! } @@ -820,7 +820,7 @@ describe("Algebraic", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") viewers: IntAggregateSelection! } @@ -1146,7 +1146,7 @@ describe("Algebraic", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") viewers: IntAggregateSelection! } diff --git a/packages/graphql/tests/schema/null.test.ts b/packages/graphql/tests/schema/null.test.ts index 52afbf578b..ee6bddb691 100644 --- a/packages/graphql/tests/schema/null.test.ts +++ b/packages/graphql/tests/schema/null.test.ts @@ -119,7 +119,7 @@ describe("Null", () => { averageRating: FloatAggregateSelection! count: Int! createdAt: DateTimeAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") name: StringAggregateSelection! } diff --git a/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts b/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts index 6d2c85c173..8918610362 100644 --- a/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/array-methods.test.ts @@ -178,16 +178,16 @@ describe("Arrays Methods", () => { averageRating_SUM_GTE: Float averageRating_SUM_LT: Float averageRating_SUM_LTE: Float - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type ActorActedInRelationship { @@ -248,7 +248,7 @@ describe("Arrays Methods", () => { type ActorMovieActedInNodeAggregateSelection { averageRating: FloatAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input ActorOptions { @@ -478,7 +478,7 @@ describe("Arrays Methods", () => { type MovieAggregateSelection { averageRating: FloatAggregateSelection! count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieConnectInput { diff --git a/packages/graphql/tests/schema/remove-deprecated/comments.test.ts b/packages/graphql/tests/schema/remove-deprecated/comments.test.ts index 7f16bc16bc..33094149dc 100644 --- a/packages/graphql/tests/schema/remove-deprecated/comments.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/comments.test.ts @@ -138,7 +138,7 @@ describe("Comments", () => { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -511,7 +511,7 @@ describe("Comments", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -1338,7 +1338,7 @@ describe("Comments", () => { type GenreAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input GenreConnectWhere { @@ -1407,7 +1407,7 @@ describe("Comments", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieConnectInput { diff --git a/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts b/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts index 61a0b6e648..17317b8445 100644 --- a/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/directed-argument.test.ts @@ -421,7 +421,7 @@ describe("Deprecated directed argument", () => { type GenreAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input GenreCreateInput { diff --git a/packages/graphql/tests/schema/remove-deprecated/implicit-equality.test.ts b/packages/graphql/tests/schema/remove-deprecated/implicit-equality.test.ts index 7130b17448..861eafb088 100644 --- a/packages/graphql/tests/schema/remove-deprecated/implicit-equality.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/implicit-equality.test.ts @@ -158,7 +158,7 @@ describe("Implicit Equality filters", () => { } type ActorMovieMoviesNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input ActorMoviesAggregateInput { @@ -228,16 +228,16 @@ describe("Implicit Equality filters", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type ActorMoviesRelationship { @@ -474,7 +474,7 @@ describe("Implicit Equality filters", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieConnectInput { diff --git a/packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts b/packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts index c1e8f61169..6873ef3c9f 100644 --- a/packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/implicit-set.test.ts @@ -157,7 +157,7 @@ describe("Implicit SET field", () => { } type ActorMovieMoviesNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input ActorMoviesAggregateInput { @@ -227,16 +227,16 @@ describe("Implicit SET field", () => { AND: [ActorMoviesNodeAggregationWhereInput!] NOT: ActorMoviesNodeAggregationWhereInput OR: [ActorMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type ActorMoviesRelationship { @@ -481,7 +481,7 @@ describe("Implicit SET field", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieConnectInput { diff --git a/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts b/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts index de3ec214da..0cb77ad920 100644 --- a/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/options-argument.test.ts @@ -400,7 +400,7 @@ describe("Deprecated options argument", () => { type GenreAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input GenreCreateInput { diff --git a/packages/graphql/tests/schema/scalar.test.ts b/packages/graphql/tests/schema/scalar.test.ts index c79e44c318..fde3ef35ed 100644 --- a/packages/graphql/tests/schema/scalar.test.ts +++ b/packages/graphql/tests/schema/scalar.test.ts @@ -80,7 +80,7 @@ describe("Scalar", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { diff --git a/packages/graphql/tests/schema/simple.test.ts b/packages/graphql/tests/schema/simple.test.ts index b677f9b71f..08a7cc95f0 100644 --- a/packages/graphql/tests/schema/simple.test.ts +++ b/packages/graphql/tests/schema/simple.test.ts @@ -92,7 +92,7 @@ describe("Simple", () => { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { diff --git a/packages/graphql/tests/schema/subscriptions.test.ts b/packages/graphql/tests/schema/subscriptions.test.ts index 9275bb34fb..558068cb92 100644 --- a/packages/graphql/tests/schema/subscriptions.test.ts +++ b/packages/graphql/tests/schema/subscriptions.test.ts @@ -319,7 +319,7 @@ describe("Subscriptions", () => { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -643,7 +643,7 @@ describe("Subscriptions", () => { type ActorMovieMoviesNodeAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input ActorMoviesAggregateInput { @@ -748,16 +748,16 @@ describe("Subscriptions", () => { averageRating_SUM_GTE: Float averageRating_SUM_LT: Float averageRating_SUM_LTE: Float - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type ActorMoviesRelationship { @@ -971,7 +971,7 @@ describe("Subscriptions", () => { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieConnectInput { @@ -1461,7 +1461,7 @@ describe("Subscriptions", () => { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieConnectInput { @@ -1721,7 +1721,7 @@ describe("Subscriptions", () => { type PersonMovieMoviesNodeAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input PersonMoviesAggregateInput { @@ -1826,16 +1826,16 @@ describe("Subscriptions", () => { averageRating_SUM_GTE: Float averageRating_SUM_LT: Float averageRating_SUM_LTE: Float - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type PersonMoviesRelationship { @@ -1981,7 +1981,7 @@ describe("Subscriptions", () => { type StarMovieMoviesNodeAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input StarMoviesAggregateInput { @@ -2086,16 +2086,16 @@ describe("Subscriptions", () => { averageRating_SUM_GTE: Float averageRating_SUM_LT: Float averageRating_SUM_LTE: Float - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type StarMoviesRelationship { @@ -2356,7 +2356,7 @@ describe("Subscriptions", () => { type ActorMovieMoviesNodeAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input ActorMoviesAggregateInput { @@ -2461,16 +2461,16 @@ describe("Subscriptions", () => { averageRating_SUM_GTE: Float averageRating_SUM_LT: Float averageRating_SUM_LTE: Float - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type ActorMoviesRelationship { @@ -2699,7 +2699,7 @@ describe("Subscriptions", () => { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieConnectInput { @@ -3241,7 +3241,7 @@ describe("Subscriptions", () => { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { @@ -4108,7 +4108,7 @@ describe("Subscriptions", () => { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieConnectInput { @@ -4368,7 +4368,7 @@ describe("Subscriptions", () => { type PersonMovieMoviesNodeAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input PersonMoviesAggregateInput { @@ -4473,16 +4473,16 @@ describe("Subscriptions", () => { averageRating_SUM_GTE: Float averageRating_SUM_LT: Float averageRating_SUM_LTE: Float - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type PersonMoviesRelationship { @@ -4618,7 +4618,7 @@ describe("Subscriptions", () => { type StarMovieMoviesNodeAggregateSelection { actorCount: IntAggregateSelection! averageRating: FloatAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input StarMoviesAggregateInput { @@ -4723,16 +4723,16 @@ describe("Subscriptions", () => { averageRating_SUM_GTE: Float averageRating_SUM_LT: Float averageRating_SUM_LTE: Float - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type StarMoviesRelationship { @@ -4994,16 +4994,16 @@ describe("Subscriptions", () => { AND: [CreatureMoviesNodeAggregationWhereInput!] NOT: CreatureMoviesNodeAggregationWhereInput OR: [CreatureMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } type CreatureMoviesRelationship { @@ -5087,7 +5087,7 @@ describe("Subscriptions", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") title: StringAggregateSelection! } @@ -5311,16 +5311,16 @@ describe("Subscriptions", () => { AND: [PersonMoviesNodeAggregationWhereInput!] NOT: PersonMoviesNodeAggregationWhereInput OR: [PersonMoviesNodeAggregationWhereInput!] - id_MAX_EQUAL: ID - id_MAX_GT: ID - id_MAX_GTE: ID - id_MAX_LT: ID - id_MAX_LTE: ID - id_MIN_EQUAL: ID - id_MIN_GT: ID - id_MIN_GTE: ID - id_MIN_LT: ID - id_MIN_LTE: ID + id_MAX_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MAX_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_EQUAL: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_GTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LT: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") + id_MIN_LTE: ID @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input PersonMoviesUpdateConnectionInput { @@ -5347,7 +5347,7 @@ describe("Subscriptions", () => { } type PersonProductionMoviesNodeAggregateSelection { - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input PersonUpdateInput { @@ -5376,7 +5376,7 @@ describe("Subscriptions", () => { type ProductionAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input ProductionConnectInput { @@ -5546,7 +5546,7 @@ describe("Subscriptions", () => { type SeriesAggregateSelection { count: Int! episode: IntAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") title: StringAggregateSelection! } diff --git a/packages/graphql/tests/schema/types/date.test.ts b/packages/graphql/tests/schema/types/date.test.ts index c179640df1..af7ea0876e 100644 --- a/packages/graphql/tests/schema/types/date.test.ts +++ b/packages/graphql/tests/schema/types/date.test.ts @@ -75,7 +75,7 @@ describe("Date", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { diff --git a/packages/graphql/tests/schema/types/datetime.test.ts b/packages/graphql/tests/schema/types/datetime.test.ts index 49aeebb1df..0932a7c88e 100644 --- a/packages/graphql/tests/schema/types/datetime.test.ts +++ b/packages/graphql/tests/schema/types/datetime.test.ts @@ -81,7 +81,7 @@ describe("Datetime", () => { type MovieAggregateSelection { count: Int! datetime: DateTimeAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { diff --git a/packages/graphql/tests/schema/types/duration.test.ts b/packages/graphql/tests/schema/types/duration.test.ts index 31c2485760..15d0333d9c 100644 --- a/packages/graphql/tests/schema/types/duration.test.ts +++ b/packages/graphql/tests/schema/types/duration.test.ts @@ -81,7 +81,7 @@ describe("Duration", () => { type MovieAggregateSelection { count: Int! duration: DurationAggregateSelection! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieCreateInput { diff --git a/packages/graphql/tests/schema/types/localdatetime.test.ts b/packages/graphql/tests/schema/types/localdatetime.test.ts index 500cfe2898..74ebcae80e 100644 --- a/packages/graphql/tests/schema/types/localdatetime.test.ts +++ b/packages/graphql/tests/schema/types/localdatetime.test.ts @@ -80,7 +80,7 @@ describe("Localdatetime", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") localDT: LocalDateTimeAggregateSelection! } diff --git a/packages/graphql/tests/schema/types/localtime.test.ts b/packages/graphql/tests/schema/types/localtime.test.ts index 0c675a9019..8adf888974 100644 --- a/packages/graphql/tests/schema/types/localtime.test.ts +++ b/packages/graphql/tests/schema/types/localtime.test.ts @@ -82,7 +82,7 @@ describe("Localtime", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") time: LocalTimeAggregateSelection! } diff --git a/packages/graphql/tests/schema/types/time.test.ts b/packages/graphql/tests/schema/types/time.test.ts index bc6c8d27c8..423c6ade93 100644 --- a/packages/graphql/tests/schema/types/time.test.ts +++ b/packages/graphql/tests/schema/types/time.test.ts @@ -72,7 +72,7 @@ describe("Time", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") time: TimeAggregateSelection! } diff --git a/packages/graphql/tests/schema/unions.test.ts b/packages/graphql/tests/schema/unions.test.ts index cc032b32f5..a72e80dcb0 100644 --- a/packages/graphql/tests/schema/unions.test.ts +++ b/packages/graphql/tests/schema/unions.test.ts @@ -78,7 +78,7 @@ describe("Unions", () => { type GenreAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input GenreConnectWhere { @@ -147,7 +147,7 @@ describe("Unions", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") } input MovieConnectInput { From a11f98a2f147f2fd689de91cc7a7cd4099f9e4ec Mon Sep 17 00:00:00 2001 From: MacondoExpress Date: Fri, 10 Jan 2025 16:38:16 +0000 Subject: [PATCH 5/7] add idAggregations to excludeDeprecatedFields --- .../field-aggregation-composer.ts | 17 +- .../create-relationship-fields.ts | 5 +- .../src/schema/generation/aggregate-types.ts | 51 +- .../src/schema/make-augmented-schema.ts | 2 + packages/graphql/src/types/index.ts | 1 + .../remove-deprecated/aggregations.test.ts | 495 ++++++++++++++++++ 6 files changed, 548 insertions(+), 23 deletions(-) create mode 100644 packages/graphql/tests/schema/remove-deprecated/aggregations.test.ts diff --git a/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts b/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts index c339d339fc..a4ae375e54 100644 --- a/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts +++ b/packages/graphql/src/schema/aggregations/field-aggregation-composer.ts @@ -25,7 +25,9 @@ import type { InterfaceEntityAdapter } from "../../schema-model/entity/model-ada import { UnionEntityAdapter } from "../../schema-model/entity/model-adapters/UnionEntityAdapter"; import { RelationshipAdapter } from "../../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { RelationshipDeclarationAdapter } from "../../schema-model/relationship/model-adapters/RelationshipDeclarationAdapter"; +import type { Neo4jFeaturesSettings } from "../../types"; import { DEPRECATE_ID_AGGREGATION } from "../constants"; +import { shouldAddDeprecatedFields } from "../generation/utils"; import { numericalResolver } from "../resolvers/field/numerical"; import { AggregationTypesMapper } from "./aggregation-types-mapper"; @@ -52,7 +54,8 @@ export class FieldAggregationComposer { } public createAggregationTypeObject( - relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter + relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter, + features: Neo4jFeaturesSettings | undefined ): ObjectTypeComposer { let aggregateSelectionEdge: ObjectTypeComposer | undefined; @@ -60,7 +63,7 @@ export class FieldAggregationComposer { throw new Error("UnionEntityAdapter not implemented"); } - const aggregateSelectionNodeFields = this.getAggregationFields(relationshipAdapter.target); + const aggregateSelectionNodeFields = this.getAggregationFields(relationshipAdapter.target, features); const aggregateSelectionNodeName = relationshipAdapter.operations.getAggregationFieldTypename("node"); const aggregateSelectionNode = this.createAggregationField( @@ -69,7 +72,7 @@ export class FieldAggregationComposer { ); if (relationshipAdapter instanceof RelationshipAdapter && relationshipAdapter.attributes.size > 0) { - const aggregateSelectionEdgeFields = this.getAggregationFields(relationshipAdapter); + const aggregateSelectionEdgeFields = this.getAggregationFields(relationshipAdapter, features); const aggregateSelectionEdgeName = relationshipAdapter.operations.getAggregationFieldTypename("edge"); aggregateSelectionEdge = this.createAggregationField( @@ -93,7 +96,8 @@ export class FieldAggregationComposer { } private getAggregationFields( - entity: RelationshipAdapter | ConcreteEntityAdapter | InterfaceEntityAdapter + entity: RelationshipAdapter | ConcreteEntityAdapter | InterfaceEntityAdapter, + features: Neo4jFeaturesSettings | undefined ): ObjectTypeComposerFieldConfigMapDefinition { return entity.aggregableFields.reduce((res, field) => { const objectTypeComposer = this.aggregationTypesMapper.getAggregationType(field.getTypeName()); @@ -103,7 +107,10 @@ export class FieldAggregationComposer { } // TODO: REMOVE ID FIELD ON 7.x if (field.typeHelper.isID()) { - res[field.name] = { type: objectTypeComposer.NonNull, directives: [DEPRECATE_ID_AGGREGATION] }; + if (shouldAddDeprecatedFields(features, "idAggregations")) { + res[field.name] = { type: objectTypeComposer.NonNull, directives: [DEPRECATE_ID_AGGREGATION] }; + } + return res; } else { res[field.name] = objectTypeComposer.NonNull; } 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 16e9f7538c..34c9b0e1c2 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 @@ -259,7 +259,10 @@ export function createRelationshipFields({ // make a new fn augmentObjectTypeWithAggregationField const fieldAggregationComposer = new FieldAggregationComposer(schemaComposer, subgraph); - const aggregationTypeObject = fieldAggregationComposer.createAggregationTypeObject(relationshipAdapter); + const aggregationTypeObject = fieldAggregationComposer.createAggregationTypeObject( + relationshipAdapter, + features + ); const aggregationFieldsBaseArgs = { where: relationshipTarget.operations.whereInputTypeName, diff --git a/packages/graphql/src/schema/generation/aggregate-types.ts b/packages/graphql/src/schema/generation/aggregate-types.ts index cc6ff39774..6240c8230a 100644 --- a/packages/graphql/src/schema/generation/aggregate-types.ts +++ b/packages/graphql/src/schema/generation/aggregate-types.ts @@ -43,11 +43,13 @@ export function withAggregateSelectionType({ aggregationTypesMapper, propagatedDirectives, composer, + features, }: { entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter; aggregationTypesMapper: AggregationTypesMapper; propagatedDirectives: DirectiveNode[]; composer: SchemaComposer; + features: Neo4jFeaturesSettings | undefined; }): ObjectTypeComposer { const aggregateSelection = composer.createObjectTC({ name: entityAdapter.operations.aggregateTypeNames.selection, @@ -60,16 +62,18 @@ export function withAggregateSelectionType({ }, directives: graphqlDirectivesToCompose(propagatedDirectives), }); - aggregateSelection.addFields(makeAggregableFields({ entityAdapter, aggregationTypesMapper })); + aggregateSelection.addFields(makeAggregableFields({ entityAdapter, aggregationTypesMapper, features })); return aggregateSelection; } function makeAggregableFields({ entityAdapter, aggregationTypesMapper, + features, }: { entityAdapter: ConcreteEntityAdapter | InterfaceEntityAdapter; aggregationTypesMapper: AggregationTypesMapper; + features: Neo4jFeaturesSettings | undefined; }): ObjectTypeComposerFieldConfigMapDefinition { const aggregableFields: ObjectTypeComposerFieldConfigMapDefinition = {}; const aggregableAttributes = entityAdapter.aggregableFields; @@ -78,10 +82,12 @@ function makeAggregableFields({ if (objectTypeComposer) { // TODO: REMOVE ID FIELD ON 7.x if (attribute.typeHelper.isID()) { - aggregableFields[attribute.name] = { - type: objectTypeComposer.NonNull, - directives: [DEPRECATE_ID_AGGREGATION], - }; + if (shouldAddDeprecatedFields(features, "idAggregations")) { + aggregableFields[attribute.name] = { + type: objectTypeComposer.NonNull, + directives: [DEPRECATE_ID_AGGREGATION], + }; + } continue; } aggregableFields[attribute.name] = { type: objectTypeComposer.NonNull }; @@ -159,6 +165,7 @@ function withAggregationWhereInputType({ entityAdapter, composer, userDefinedDirectivesOnTargetFields, + features, }: { relationshipAdapter: RelationshipAdapter | RelationshipDeclarationAdapter; entityAdapter: @@ -194,18 +201,24 @@ function withAggregationWhereInputType({ NOT: aggregationInput, }); - const aggrFields = makeAggregationFields(aggregationFields, userDefinedDirectivesOnTargetFields); + const aggrFields = makeAggregationFields(aggregationFields, userDefinedDirectivesOnTargetFields, features); aggregationInput.addFields(aggrFields); return aggregationInput; } function makeAggregationFields( attributes: AttributeAdapter[], - userDefinedDirectivesOnTargetFields: Map | undefined + userDefinedDirectivesOnTargetFields: Map | undefined, + features: Neo4jFeaturesSettings | undefined ): InputTypeComposerFieldConfigMapDefinition { const fields: InputTypeComposerFieldConfigMapDefinition = {}; for (const attribute of attributes) { - addAggregationFieldsByType(attribute, userDefinedDirectivesOnTargetFields?.get(attribute.name), fields); + addAggregationFieldsByType( + attribute, + userDefinedDirectivesOnTargetFields?.get(attribute.name), + fields, + features + ); } return fields; } @@ -214,7 +227,8 @@ function makeAggregationFields( function addAggregationFieldsByType( attribute: AttributeAdapter, directivesOnField: DirectiveNode[] | undefined, - fields: InputTypeComposerFieldConfigMapDefinition + fields: InputTypeComposerFieldConfigMapDefinition, + features: Neo4jFeaturesSettings | undefined ): InputTypeComposerFieldConfigMapDefinition { const deprecatedDirectives = graphqlDirectivesToCompose( (directivesOnField || []).filter((d) => d.name.value === DEPRECATED) @@ -269,14 +283,17 @@ function addAggregationFieldsByType( for (const operator of AGGREGATION_COMPARISON_OPERATORS) { // TODO: REMOVE ID FIELD ON 7.x if (attribute.typeHelper.isID()) { - fields[`${attribute.name}_MIN_${operator}`] = { - type: attribute.getTypeName(), - directives: deprecatedDirectives.length ? deprecatedDirectives : [DEPRECATE_ID_AGGREGATION], - }; - fields[`${attribute.name}_MAX_${operator}`] = { - type: attribute.getTypeName(), - directives: deprecatedDirectives.length ? deprecatedDirectives : [DEPRECATE_ID_AGGREGATION], - }; + if (shouldAddDeprecatedFields(features, "idAggregations")) { + fields[`${attribute.name}_MIN_${operator}`] = { + type: attribute.getTypeName(), + directives: deprecatedDirectives.length ? deprecatedDirectives : [DEPRECATE_ID_AGGREGATION], + }; + fields[`${attribute.name}_MAX_${operator}`] = { + type: attribute.getTypeName(), + directives: deprecatedDirectives.length ? deprecatedDirectives : [DEPRECATE_ID_AGGREGATION], + }; + } + continue; } diff --git a/packages/graphql/src/schema/make-augmented-schema.ts b/packages/graphql/src/schema/make-augmented-schema.ts index 8c1f3cc4ea..974c140bdf 100644 --- a/packages/graphql/src/schema/make-augmented-schema.ts +++ b/packages/graphql/src/schema/make-augmented-schema.ts @@ -577,6 +577,7 @@ function generateObjectType({ aggregationTypesMapper, propagatedDirectives, composer, + features, }); composer.Query.addFields({ @@ -716,6 +717,7 @@ function generateInterfaceObjectType({ aggregationTypesMapper, propagatedDirectives, composer, + features, }); composer.Query.addFields({ diff --git a/packages/graphql/src/types/index.ts b/packages/graphql/src/types/index.ts index e6d9f34efb..787765d446 100644 --- a/packages/graphql/src/types/index.ts +++ b/packages/graphql/src/types/index.ts @@ -453,6 +453,7 @@ export type Neo4jFeaturesSettings = { deprecatedOptionsArgument?: boolean; directedArgument?: boolean; connectOrCreate?: boolean; + idAggregations?: boolean; }; vector?: Neo4jVectorSettings; }; diff --git a/packages/graphql/tests/schema/remove-deprecated/aggregations.test.ts b/packages/graphql/tests/schema/remove-deprecated/aggregations.test.ts new file mode 100644 index 0000000000..5a681f045d --- /dev/null +++ b/packages/graphql/tests/schema/remove-deprecated/aggregations.test.ts @@ -0,0 +1,495 @@ +/* + * 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("Aggregations", () => { + test("should remove ID Aggregations", async () => { + const typeDefs = /* GraphQL */ ` + type User @node { + someID: ID + someString: String + } + + type Post @node { + someID: ID + 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: { idAggregations: true } }, + }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + \\"\\"\\" + Information about the number of nodes and relationships created during a create mutation + \\"\\"\\" + type CreateInfo { + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreatePostsMutationResponse { + info: CreateInfo! + posts: [Post!]! + } + + type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! + } + + \\"\\"\\" + Information about the number of nodes and relationships deleted during a delete mutation + \\"\\"\\" + type DeleteInfo { + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + \\"\\"\\" + The edge properties for the following fields: + * Post.likes + \\"\\"\\" + type Likes { + someID: ID + someString: String + } + + input LikesAggregationWhereInput { + AND: [LikesAggregationWhereInput!] + NOT: LikesAggregationWhereInput + OR: [LikesAggregationWhereInput!] + someString_AVERAGE_LENGTH_EQUAL: Float + someString_AVERAGE_LENGTH_GT: Float + someString_AVERAGE_LENGTH_GTE: Float + someString_AVERAGE_LENGTH_LT: Float + someString_AVERAGE_LENGTH_LTE: Float + someString_LONGEST_LENGTH_EQUAL: Int + someString_LONGEST_LENGTH_GT: Int + someString_LONGEST_LENGTH_GTE: Int + someString_LONGEST_LENGTH_LT: Int + someString_LONGEST_LENGTH_LTE: Int + someString_SHORTEST_LENGTH_EQUAL: Int + someString_SHORTEST_LENGTH_GT: Int + someString_SHORTEST_LENGTH_GTE: Int + someString_SHORTEST_LENGTH_LT: Int + someString_SHORTEST_LENGTH_LTE: Int + } + + input LikesCreateInput { + someID: ID + someString: String + } + + input LikesSort { + someID: SortDirection + someString: SortDirection + } + + input LikesUpdateInput { + someID: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + someID_SET: ID + someString: String @deprecated(reason: \\"Please use the explicit _SET field\\") + someString_SET: String + } + + input LikesWhere { + AND: [LikesWhere!] + NOT: LikesWhere + OR: [LikesWhere!] + someID: ID @deprecated(reason: \\"Please use the explicit _EQ version\\") + someID_CONTAINS: ID + someID_ENDS_WITH: ID + someID_EQ: ID + someID_IN: [ID] + someID_STARTS_WITH: ID + someString: String @deprecated(reason: \\"Please use the explicit _EQ version\\") + someString_CONTAINS: String + someString_ENDS_WITH: String + someString_EQ: String + someString_IN: [String] + someString_STARTS_WITH: String + } + + type Mutation { + createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! + deleteUsers(where: UserWhere): DeleteInfo! + updatePosts(update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! + updateUsers(update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Post { + likes(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! + likesAggregate(directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), where: UserWhere): PostUserLikesAggregationSelection + likesConnection(after: String, directed: Boolean = true @deprecated(reason: \\"The directed argument is deprecated, and the direction of the field will be configured in the GraphQL server\\"), first: Int, sort: [PostLikesConnectionSort!], where: PostLikesConnectionWhere): PostLikesConnection! + someID: ID + title: String + } + + type PostAggregateSelection { + count: Int! + title: StringAggregateSelection! + } + + input PostCreateInput { + likes: PostLikesFieldInput + someID: ID + title: String + } + + input PostDeleteInput { + likes: [PostLikesDeleteFieldInput!] + } + + type PostEdge { + cursor: String! + node: Post! + } + + input PostLikesAggregateInput { + AND: [PostLikesAggregateInput!] + NOT: PostLikesAggregateInput + OR: [PostLikesAggregateInput!] + count: Int @deprecated(reason: \\"Please use the explicit _EQ version\\") + count_EQ: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + edge: LikesAggregationWhereInput + node: PostLikesNodeAggregationWhereInput + } + + input PostLikesConnectFieldInput { + edge: LikesCreateInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. + \\"\\"\\" + overwrite: Boolean! = true @deprecated(reason: \\"The overwrite argument is deprecated and will be removed\\") + where: UserConnectWhere + } + + type PostLikesConnection { + edges: [PostLikesRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PostLikesConnectionSort { + edge: LikesSort + node: UserSort + } + + input PostLikesConnectionWhere { + AND: [PostLikesConnectionWhere!] + NOT: PostLikesConnectionWhere + OR: [PostLikesConnectionWhere!] + edge: LikesWhere + node: UserWhere + } + + input PostLikesCreateFieldInput { + edge: LikesCreateInput + node: UserCreateInput! + } + + input PostLikesDeleteFieldInput { + where: PostLikesConnectionWhere + } + + input PostLikesDisconnectFieldInput { + where: PostLikesConnectionWhere + } + + input PostLikesFieldInput { + connect: [PostLikesConnectFieldInput!] + create: [PostLikesCreateFieldInput!] + } + + input PostLikesNodeAggregationWhereInput { + AND: [PostLikesNodeAggregationWhereInput!] + NOT: PostLikesNodeAggregationWhereInput + OR: [PostLikesNodeAggregationWhereInput!] + someString_AVERAGE_LENGTH_EQUAL: Float + someString_AVERAGE_LENGTH_GT: Float + someString_AVERAGE_LENGTH_GTE: Float + someString_AVERAGE_LENGTH_LT: Float + someString_AVERAGE_LENGTH_LTE: Float + someString_LONGEST_LENGTH_EQUAL: Int + someString_LONGEST_LENGTH_GT: Int + someString_LONGEST_LENGTH_GTE: Int + someString_LONGEST_LENGTH_LT: Int + someString_LONGEST_LENGTH_LTE: Int + someString_SHORTEST_LENGTH_EQUAL: Int + someString_SHORTEST_LENGTH_GT: Int + someString_SHORTEST_LENGTH_GTE: Int + someString_SHORTEST_LENGTH_LT: Int + someString_SHORTEST_LENGTH_LTE: Int + } + + type PostLikesRelationship { + cursor: String! + node: User! + properties: Likes! + } + + input PostLikesUpdateConnectionInput { + edge: LikesUpdateInput + node: UserUpdateInput + } + + input PostLikesUpdateFieldInput { + connect: [PostLikesConnectFieldInput!] + create: [PostLikesCreateFieldInput!] + delete: [PostLikesDeleteFieldInput!] + disconnect: [PostLikesDisconnectFieldInput!] + update: PostLikesUpdateConnectionInput + where: PostLikesConnectionWhere + } + + input PostOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more PostSort objects to sort Posts by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [PostSort!] + } + + \\"\\"\\" + Fields to sort Posts by. The order in which sorts are applied is not guaranteed when specifying many fields in one PostSort object. + \\"\\"\\" + input PostSort { + someID: SortDirection + title: SortDirection + } + + input PostUpdateInput { + likes: [PostLikesUpdateFieldInput!] + someID: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + someID_SET: ID + title: String @deprecated(reason: \\"Please use the explicit _SET field\\") + title_SET: String + } + + type PostUserLikesAggregationSelection { + count: Int! + edge: PostUserLikesEdgeAggregateSelection + node: PostUserLikesNodeAggregateSelection + } + + type PostUserLikesEdgeAggregateSelection { + someString: StringAggregateSelection! + } + + type PostUserLikesNodeAggregateSelection { + someString: StringAggregateSelection! + } + + input PostWhere { + AND: [PostWhere!] + NOT: PostWhere + OR: [PostWhere!] + likesAggregate: PostLikesAggregateInput + \\"\\"\\" + Return Posts where all of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_ALL: PostLikesConnectionWhere + \\"\\"\\" + Return Posts where none of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_NONE: PostLikesConnectionWhere + \\"\\"\\" + Return Posts where one of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_SINGLE: PostLikesConnectionWhere + \\"\\"\\" + Return Posts where some of the related PostLikesConnections match this filter + \\"\\"\\" + likesConnection_SOME: PostLikesConnectionWhere + \\"\\"\\"Return Posts where all of the related Users match this filter\\"\\"\\" + likes_ALL: UserWhere + \\"\\"\\"Return Posts where none of the related Users match this filter\\"\\"\\" + likes_NONE: UserWhere + \\"\\"\\"Return Posts where one of the related Users match this filter\\"\\"\\" + likes_SINGLE: UserWhere + \\"\\"\\"Return Posts where some of the related Users match this filter\\"\\"\\" + likes_SOME: UserWhere + someID: ID @deprecated(reason: \\"Please use the explicit _EQ version\\") + someID_CONTAINS: ID + someID_ENDS_WITH: ID + someID_EQ: ID + someID_IN: [ID] + someID_STARTS_WITH: ID + title: String @deprecated(reason: \\"Please use the explicit _EQ version\\") + title_CONTAINS: String + title_ENDS_WITH: String + title_EQ: String + title_IN: [String] + title_STARTS_WITH: String + } + + type PostsConnection { + edges: [PostEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Query { + posts(limit: Int, offset: Int, options: PostOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [PostSort!], where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): PostAggregateSelection! + postsConnection(after: String, first: Int, sort: [PostSort!], where: PostWhere): PostsConnection! + users(limit: Int, offset: Int, options: UserOptions @deprecated(reason: \\"Query options argument is deprecated, please use pagination arguments like limit, offset and sort instead.\\"), sort: [UserSort!], where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort!], where: UserWhere): UsersConnection! + } + + \\"\\"\\"An enum for sorting in either ascending or descending order.\\"\\"\\" + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type StringAggregateSelection { + longest: String + shortest: String + } + + \\"\\"\\" + Information about the number of nodes and relationships created and deleted during an update mutation + \\"\\"\\" + type UpdateInfo { + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdatePostsMutationResponse { + info: UpdateInfo! + posts: [Post!]! + } + + type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! + } + + type User { + someID: ID + someString: String + } + + type UserAggregateSelection { + count: Int! + someString: StringAggregateSelection! + } + + input UserConnectWhere { + node: UserWhere! + } + + input UserCreateInput { + someID: ID + someString: String + } + + type UserEdge { + cursor: String! + node: User! + } + + input UserOptions { + limit: Int + offset: Int + \\"\\"\\" + Specify one or more UserSort objects to sort Users by. The sorts will be applied in the order in which they are arranged in the array. + \\"\\"\\" + sort: [UserSort!] + } + + \\"\\"\\" + Fields to sort Users by. The order in which sorts are applied is not guaranteed when specifying many fields in one UserSort object. + \\"\\"\\" + input UserSort { + someID: SortDirection + someString: SortDirection + } + + input UserUpdateInput { + someID: ID @deprecated(reason: \\"Please use the explicit _SET field\\") + someID_SET: ID + someString: String @deprecated(reason: \\"Please use the explicit _SET field\\") + someString_SET: String + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + someID: ID @deprecated(reason: \\"Please use the explicit _EQ version\\") + someID_CONTAINS: ID + someID_ENDS_WITH: ID + someID_EQ: ID + someID_IN: [ID] + someID_STARTS_WITH: ID + someString: String @deprecated(reason: \\"Please use the explicit _EQ version\\") + someString_CONTAINS: String + someString_ENDS_WITH: String + someString_EQ: String + someString_IN: [String] + someString_STARTS_WITH: String + } + + type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + }" + `); + }); +}); From 7f1bc6577d7512086658e06481b4f9989381956d Mon Sep 17 00:00:00 2001 From: MacondoExpress Date: Fri, 10 Jan 2025 16:48:53 +0000 Subject: [PATCH 6/7] add changeset --- .changeset/beige-beds-push.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .changeset/beige-beds-push.md diff --git a/.changeset/beige-beds-push.md b/.changeset/beige-beds-push.md new file mode 100644 index 0000000000..d3c03ed6ce --- /dev/null +++ b/.changeset/beige-beds-push.md @@ -0,0 +1,13 @@ +--- +"@neo4j/graphql": patch +--- + +Aggregations on ID fields are now deprecated. +As part of the change, the flag `idAggregations` has been added to the `excludeDeprecatedFields` setting. + +```js +const neoSchema = new Neo4jGraphQL({ + typeDefs, + features: { excludeDeprecatedFields: { idAggregations: true } }, +}); +``` From 290210b6fd2e118c345a7d0d76de7530d4c7bff6 Mon Sep 17 00:00:00 2001 From: MacondoExpress Date: Mon, 13 Jan 2025 14:47:06 +0000 Subject: [PATCH 7/7] update schema snaposhots --- .../tests/schema/remove-deprecated/typename_IN.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/graphql/tests/schema/remove-deprecated/typename_IN.test.ts b/packages/graphql/tests/schema/remove-deprecated/typename_IN.test.ts index 5682ca732b..0b875f0fe3 100644 --- a/packages/graphql/tests/schema/remove-deprecated/typename_IN.test.ts +++ b/packages/graphql/tests/schema/remove-deprecated/typename_IN.test.ts @@ -102,7 +102,7 @@ describe("typename_IN", () => { type MovieAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") title: StringAggregateSelection! } @@ -188,7 +188,7 @@ describe("typename_IN", () => { type ProductionAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") title: StringAggregateSelection! } @@ -264,7 +264,7 @@ describe("typename_IN", () => { type SeriesAggregateSelection { count: Int! - id: IDAggregateSelection! + id: IDAggregateSelection! @deprecated(reason: \\"aggregation of ID fields are deprecated and will be removed\\") numberOfEpisodes: IntAggregateSelection! title: StringAggregateSelection! }