diff --git a/.changeset/breezy-cameras-shop.md b/.changeset/breezy-cameras-shop.md new file mode 100644 index 0000000000..1a5412f8a0 --- /dev/null +++ b/.changeset/breezy-cameras-shop.md @@ -0,0 +1,5 @@ +--- +"@neo4j/graphql": major +--- + +Remove aggregation fields for relationships to a single node (non-List relationships) - these serve no functional utility diff --git a/packages/graphql/src/schema/create-relationship-fields/index.ts b/packages/graphql/src/schema/create-relationship-fields/index.ts index 2294394b2f..548ef5499f 100644 --- a/packages/graphql/src/schema/create-relationship-fields/index.ts +++ b/packages/graphql/src/schema/create-relationship-fields/index.ts @@ -334,9 +334,7 @@ function createRelationshipFields({ node: `${n.name}CreateInput!`, ...(hasNonGeneratedProperties ? { - edge: `${rel.properties}CreateInput${ - hasNonNullNonGeneratedProperties ? `!` : "" - }`, + edge: `${rel.properties}CreateInput${hasNonNullNonGeneratedProperties ? `!` : ""}`, } : {}), }, @@ -370,16 +368,12 @@ function createRelationshipFields({ where: connectWhereName, ...(n.relationFields.length ? { - connect: rel.typeMeta.array - ? `[${n.name}ConnectInput!]` - : `${n.name}ConnectInput`, + connect: rel.typeMeta.array ? `[${n.name}ConnectInput!]` : `${n.name}ConnectInput`, } : {}), ...(hasNonGeneratedProperties ? { - edge: `${rel.properties}CreateInput${ - hasNonNullNonGeneratedProperties ? `!` : "" - }`, + edge: `${rel.properties}CreateInput${hasNonNullNonGeneratedProperties ? `!` : ""}`, } : {}), }, @@ -571,167 +565,167 @@ function createRelationshipFields({ const connectionUpdateInputName = `${rel.connectionPrefix}${upperFirst(rel.fieldName)}UpdateConnectionInput`; const relationshipWhereTypeInputName = `${sourceName}${upperFirst(rel.fieldName)}AggregateInput`; - const [nodeWhereAggregationInput, edgeWhereAggregationInput] = [n, relFields].map((nodeOrRelFields) => { - if (!nodeOrRelFields) { - return; - } - - const fields = WHERE_AGGREGATION_TYPES.reduce((r, t) => { - const f = [...nodeOrRelFields.primitiveFields, ...nodeOrRelFields.temporalFields].filter( - (y) => !y.typeMeta.array && y.typeMeta.name === t - ); + whereInput.addFields({ + [rel.fieldName]: { + type: `${n.name}Where`, + }, + [`${rel.fieldName}_NOT`]: { + type: `${n.name}Where`, + }, + }); - if (!f.length) { - return r; + if (rel.typeMeta.array) { + const [nodeWhereAggregationInput, edgeWhereAggregationInput] = [n, relFields].map((nodeOrRelFields) => { + if (!nodeOrRelFields) { + return; } - return r.concat(f); - }, []); - - if (!fields.length) { - return; - } - - const name = `${sourceName}${upperFirst(rel.fieldName)}${ - nodeOrRelFields instanceof Node ? `Node` : `Edge` - }AggregationWhereInput`; + const fields = WHERE_AGGREGATION_TYPES.reduce((r, t) => { + const f = [...nodeOrRelFields.primitiveFields, ...nodeOrRelFields.temporalFields].filter( + (y) => !y.typeMeta.array && y.typeMeta.name === t + ); - const aggregationInput = schemaComposer.createInputTC({ - name, - fields: { - AND: `[${name}!]`, - OR: `[${name}!]`, - NOT: name, - }, - }); + if (!f.length) { + return r; + } - fields.forEach((field) => { - if (field.typeMeta.name === "ID") { - aggregationInput.addFields({ - [`${field.fieldName}_EQUAL`]: { - type: `ID`, - directives: [DEPRECATE_INVALID_AGGREGATION_FILTERS], - }, - }); + return r.concat(f); + }, []); + if (!fields.length) { return; } - if (field.typeMeta.name === "String") { - aggregationInput.addFields( - AGGREGATION_COMPARISON_OPERATORS.reduce((res, operator) => { - return { - ...res, - [`${field.fieldName}_${operator}`]: { - type: `${operator === "EQUAL" ? "String" : "Int"}`, - directives: [DEPRECATE_INVALID_AGGREGATION_FILTERS], - }, - [`${field.fieldName}_AVERAGE_${operator}`]: { - type: "Float", - directives: [DEPRECATE_IMPLICIT_LENGTH_AGGREGATION_FILTERS], - }, - [`${field.fieldName}_LONGEST_${operator}`]: { - type: "Int", - directives: [DEPRECATE_IMPLICIT_LENGTH_AGGREGATION_FILTERS], - }, - [`${field.fieldName}_SHORTEST_${operator}`]: { - type: "Int", - directives: [DEPRECATE_IMPLICIT_LENGTH_AGGREGATION_FILTERS], - }, - [`${field.fieldName}_AVERAGE_LENGTH_${operator}`]: "Float", - [`${field.fieldName}_LONGEST_LENGTH_${operator}`]: "Int", - [`${field.fieldName}_SHORTEST_LENGTH_${operator}`]: "Int", - }; - }, {}) - ); + const name = `${sourceName}${upperFirst(rel.fieldName)}${ + nodeOrRelFields instanceof Node ? `Node` : `Edge` + }AggregationWhereInput`; - return; - } + const aggregationInput = schemaComposer.createInputTC({ + name, + fields: { + AND: `[${name}!]`, + OR: `[${name}!]`, + NOT: name, + }, + }); - if (WHERE_AGGREGATION_AVERAGE_TYPES.includes(field.typeMeta.name)) { - aggregationInput.addFields( - AGGREGATION_COMPARISON_OPERATORS.reduce((res, operator) => { - let averageType = "Float"; + fields.forEach((field) => { + if (field.typeMeta.name === "ID") { + aggregationInput.addFields({ + [`${field.fieldName}_EQUAL`]: { + type: `ID`, + directives: [DEPRECATE_INVALID_AGGREGATION_FILTERS], + }, + }); + + return; + } - if (field.typeMeta.name === "BigInt") { - averageType = "BigInt"; - } + if (field.typeMeta.name === "String") { + aggregationInput.addFields( + AGGREGATION_COMPARISON_OPERATORS.reduce((res, operator) => { + return { + ...res, + [`${field.fieldName}_${operator}`]: { + type: `${operator === "EQUAL" ? "String" : "Int"}`, + directives: [DEPRECATE_INVALID_AGGREGATION_FILTERS], + }, + [`${field.fieldName}_AVERAGE_${operator}`]: { + type: "Float", + directives: [DEPRECATE_IMPLICIT_LENGTH_AGGREGATION_FILTERS], + }, + [`${field.fieldName}_LONGEST_${operator}`]: { + type: "Int", + directives: [DEPRECATE_IMPLICIT_LENGTH_AGGREGATION_FILTERS], + }, + [`${field.fieldName}_SHORTEST_${operator}`]: { + type: "Int", + directives: [DEPRECATE_IMPLICIT_LENGTH_AGGREGATION_FILTERS], + }, + [`${field.fieldName}_AVERAGE_LENGTH_${operator}`]: "Float", + [`${field.fieldName}_LONGEST_LENGTH_${operator}`]: "Int", + [`${field.fieldName}_SHORTEST_LENGTH_${operator}`]: "Int", + }; + }, {}) + ); + + return; + } - if (field.typeMeta.name === "Duration") { - averageType = "Duration"; - } + if (WHERE_AGGREGATION_AVERAGE_TYPES.includes(field.typeMeta.name)) { + aggregationInput.addFields( + AGGREGATION_COMPARISON_OPERATORS.reduce((res, operator) => { + let averageType = "Float"; + + if (field.typeMeta.name === "BigInt") { + averageType = "BigInt"; + } + + if (field.typeMeta.name === "Duration") { + averageType = "Duration"; + } + + return { + ...res, + [`${field.fieldName}_${operator}`]: { + type: field.typeMeta.name, + directives: [DEPRECATE_INVALID_AGGREGATION_FILTERS], + }, + [`${field.fieldName}_AVERAGE_${operator}`]: averageType, + [`${field.fieldName}_MIN_${operator}`]: field.typeMeta.name, + [`${field.fieldName}_MAX_${operator}`]: field.typeMeta.name, + ...(field.typeMeta.name !== "Duration" + ? { [`${field.fieldName}_SUM_${operator}`]: field.typeMeta.name } + : {}), + }; + }, {}) + ); + + return; + } - return { + aggregationInput.addFields( + AGGREGATION_COMPARISON_OPERATORS.reduce( + (res, operator) => ({ ...res, [`${field.fieldName}_${operator}`]: { type: field.typeMeta.name, directives: [DEPRECATE_INVALID_AGGREGATION_FILTERS], }, - [`${field.fieldName}_AVERAGE_${operator}`]: averageType, [`${field.fieldName}_MIN_${operator}`]: field.typeMeta.name, [`${field.fieldName}_MAX_${operator}`]: field.typeMeta.name, - ...(field.typeMeta.name !== "Duration" - ? { [`${field.fieldName}_SUM_${operator}`]: field.typeMeta.name } - : {}), - }; - }, {}) + }), + {} + ) ); + }); - return; - } - - aggregationInput.addFields( - AGGREGATION_COMPARISON_OPERATORS.reduce( - (res, operator) => ({ - ...res, - [`${field.fieldName}_${operator}`]: { - type: field.typeMeta.name, - directives: [DEPRECATE_INVALID_AGGREGATION_FILTERS], - }, - [`${field.fieldName}_MIN_${operator}`]: field.typeMeta.name, - [`${field.fieldName}_MAX_${operator}`]: field.typeMeta.name, - }), - {} - ) - ); + return aggregationInput; }); - return aggregationInput; - }); - - const whereAggregateInput = schemaComposer.createInputTC({ - name: relationshipWhereTypeInputName, - fields: { - count: "Int", - count_LT: "Int", - count_LTE: "Int", - count_GT: "Int", - count_GTE: "Int", - AND: `[${relationshipWhereTypeInputName}!]`, - OR: `[${relationshipWhereTypeInputName}!]`, - NOT: relationshipWhereTypeInputName, - ...(nodeWhereAggregationInput ? { node: nodeWhereAggregationInput } : {}), - ...(edgeWhereAggregationInput ? { edge: edgeWhereAggregationInput } : {}), - }, - }); - - whereInput.addFields({ - ...{ - [rel.fieldName]: { - type: `${n.name}Where`, - }, - [`${rel.fieldName}_NOT`]: { - type: `${n.name}Where`, + const whereAggregateInput = schemaComposer.createInputTC({ + name: relationshipWhereTypeInputName, + fields: { + count: "Int", + count_LT: "Int", + count_LTE: "Int", + count_GT: "Int", + count_GTE: "Int", + AND: `[${relationshipWhereTypeInputName}!]`, + OR: `[${relationshipWhereTypeInputName}!]`, + NOT: relationshipWhereTypeInputName, + ...(nodeWhereAggregationInput ? { node: nodeWhereAggregationInput } : {}), + ...(edgeWhereAggregationInput ? { edge: edgeWhereAggregationInput } : {}), }, + }); + + whereInput.addFields({ [`${rel.fieldName}Aggregate`]: { type: whereAggregateInput, directives: deprecatedDirectives, }, - }, - }); + }); - // n..m Relationships - if (rel.typeMeta.array) { addRelationshipArrayFilters({ whereInput, fieldName: rel.fieldName, @@ -805,7 +799,7 @@ function createRelationshipFields({ [rel.fieldName]: relationshipField, }); - if (composeNode instanceof ObjectTypeComposer) { + if (composeNode instanceof ObjectTypeComposer && rel.typeMeta.array) { const baseTypeName = `${sourceName}${n.name}${upperFirst(rel.fieldName)}`; const fieldAggregationComposer = new FieldAggregationComposer(schemaComposer, subgraph); 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 3e1bc27eab..c03351acc8 100644 --- a/packages/graphql/tests/schema/connect-or-create-id.test.ts +++ b/packages/graphql/tests/schema/connect-or-create-id.test.ts @@ -548,7 +548,6 @@ describe("connect or create with id", () => { content: String! createdAt: DateTime! creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! - creatorAggregate(directed: Boolean = true, where: UserWhere): PostUserCreatorAggregationSelection creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostCreatorConnectionSort!], where: PostCreatorConnectionWhere): PostCreatorConnection! id: ID! } @@ -583,18 +582,6 @@ describe("connect or create with id", () => { id: ID! } - input PostCreatorAggregateInput { - AND: [PostCreatorAggregateInput!] - NOT: PostCreatorAggregateInput - OR: [PostCreatorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: PostCreatorNodeAggregationWhereInput - } - input PostCreatorConnectFieldInput { connect: UserConnectInput \\"\\"\\" @@ -651,48 +638,6 @@ describe("connect or create with id", () => { create: PostCreatorCreateFieldInput } - input PostCreatorNodeAggregationWhereInput { - AND: [PostCreatorNodeAggregationWhereInput!] - NOT: PostCreatorNodeAggregationWhereInput - OR: [PostCreatorNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - type PostCreatorRelationship { cursor: String! node: User! @@ -764,16 +709,6 @@ describe("connect or create with id", () => { id: ID } - type PostUserCreatorAggregationSelection { - count: Int! - node: PostUserCreatorNodeAggregateSelection - } - - type PostUserCreatorNodeAggregateSelection { - id: IDAggregateSelectionNonNullable! - name: StringAggregateSelectionNonNullable! - } - input PostWhere { AND: [PostWhere!] NOT: PostWhere @@ -797,7 +732,6 @@ describe("connect or create with id", () => { createdAt_NOT: DateTime @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") createdAt_NOT_IN: [DateTime!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") creator: UserWhere - creatorAggregate: PostCreatorAggregateInput creatorConnection: PostCreatorConnectionWhere creatorConnection_NOT: PostCreatorConnectionWhere creator_NOT: UserWhere diff --git a/packages/graphql/tests/schema/federation.test.ts b/packages/graphql/tests/schema/federation.test.ts index bda8c7f4d2..efa04d0a53 100644 --- a/packages/graphql/tests/schema/federation.test.ts +++ b/packages/graphql/tests/schema/federation.test.ts @@ -110,7 +110,6 @@ describe("Apollo Federation", () => { type Post { author: User! - authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! content: String! } @@ -120,18 +119,6 @@ describe("Apollo Federation", () => { count: Int! } - input PostAuthorAggregateInput { - AND: [PostAuthorAggregateInput!] - NOT: PostAuthorAggregateInput - OR: [PostAuthorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: PostAuthorNodeAggregationWhereInput - } - input PostAuthorConnectFieldInput { connect: UserConnectInput \\"\\"\\" @@ -178,47 +165,6 @@ describe("Apollo Federation", () => { create: PostAuthorCreateFieldInput } - input PostAuthorNodeAggregationWhereInput { - AND: [PostAuthorNodeAggregationWhereInput!] - NOT: PostAuthorNodeAggregationWhereInput - OR: [PostAuthorNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - type PostAuthorRelationship { cursor: String! node: User! @@ -288,21 +234,11 @@ describe("Apollo Federation", () => { content: String } - type PostUserAuthorAggregationSelection { - count: Int! - node: PostUserAuthorNodeAggregateSelection - } - - type PostUserAuthorNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - input PostWhere { AND: [PostWhere!] NOT: PostWhere OR: [PostWhere!] author: UserWhere - authorAggregate: PostAuthorAggregateInput authorConnection: PostAuthorConnectionWhere authorConnection_NOT: PostAuthorConnectionWhere author_NOT: UserWhere @@ -705,7 +641,6 @@ describe("Apollo Federation", () => { type Post { author: User! - authorAggregate(directed: Boolean = true, where: UserWhere): PostUserAuthorAggregationSelection authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! content: String! } @@ -715,18 +650,6 @@ describe("Apollo Federation", () => { count: Int! } - input PostAuthorAggregateInput { - AND: [PostAuthorAggregateInput!] - NOT: PostAuthorAggregateInput - OR: [PostAuthorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: PostAuthorNodeAggregationWhereInput - } - input PostAuthorConnectFieldInput { \\"\\"\\" Whether or not to overwrite any matching relationship with the new properties. Will default to \`false\` in 4.0.0. @@ -770,47 +693,6 @@ describe("Apollo Federation", () => { create: PostAuthorCreateFieldInput } - input PostAuthorNodeAggregationWhereInput { - AND: [PostAuthorNodeAggregationWhereInput!] - NOT: PostAuthorNodeAggregationWhereInput - OR: [PostAuthorNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - type PostAuthorRelationship { cursor: String! node: User! @@ -876,21 +758,11 @@ describe("Apollo Federation", () => { content: String } - type PostUserAuthorAggregationSelection { - count: Int! - node: PostUserAuthorNodeAggregateSelection - } - - type PostUserAuthorNodeAggregateSelection { - name: StringAggregateSelectionNonNullable! - } - input PostWhere { AND: [PostWhere!] NOT: PostWhere OR: [PostWhere!] author: UserWhere - authorAggregate: PostAuthorAggregateInput authorConnection: PostAuthorConnectionWhere authorConnection_NOT: PostAuthorConnectionWhere author_NOT: UserWhere diff --git a/packages/graphql/tests/schema/interface-relationships.test.ts b/packages/graphql/tests/schema/interface-relationships.test.ts index 57b8d4bb8b..949f2e007b 100644 --- a/packages/graphql/tests/schema/interface-relationships.test.ts +++ b/packages/graphql/tests/schema/interface-relationships.test.ts @@ -841,7 +841,6 @@ describe("Interface Relationships", () => { type Episode { runtime: Int! series(directed: Boolean = true, options: SeriesOptions, where: SeriesWhere): Series! - seriesAggregate(directed: Boolean = true, where: SeriesWhere): EpisodeSeriesSeriesAggregationSelection seriesConnection(after: String, directed: Boolean = true, first: Int, sort: [EpisodeSeriesConnectionSort!], where: EpisodeSeriesConnectionWhere): EpisodeSeriesConnection! } @@ -889,18 +888,6 @@ describe("Interface Relationships", () => { series: EpisodeSeriesCreateFieldInput } - input EpisodeSeriesAggregateInput { - AND: [EpisodeSeriesAggregateInput!] - NOT: EpisodeSeriesAggregateInput - OR: [EpisodeSeriesAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: EpisodeSeriesNodeAggregationWhereInput - } - input EpisodeSeriesConnectFieldInput { connect: SeriesConnectInput \\"\\"\\" @@ -947,87 +934,11 @@ describe("Interface Relationships", () => { create: EpisodeSeriesCreateFieldInput } - input EpisodeSeriesNodeAggregationWhereInput { - AND: [EpisodeSeriesNodeAggregationWhereInput!] - NOT: EpisodeSeriesNodeAggregationWhereInput - OR: [EpisodeSeriesNodeAggregationWhereInput!] - episodeCount_AVERAGE_EQUAL: Float - episodeCount_AVERAGE_GT: Float - episodeCount_AVERAGE_GTE: Float - episodeCount_AVERAGE_LT: Float - episodeCount_AVERAGE_LTE: Float - episodeCount_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - episodeCount_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - episodeCount_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - episodeCount_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - episodeCount_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - episodeCount_MAX_EQUAL: Int - episodeCount_MAX_GT: Int - episodeCount_MAX_GTE: Int - episodeCount_MAX_LT: Int - episodeCount_MAX_LTE: Int - episodeCount_MIN_EQUAL: Int - episodeCount_MIN_GT: Int - episodeCount_MIN_GTE: Int - episodeCount_MIN_LT: Int - episodeCount_MIN_LTE: Int - episodeCount_SUM_EQUAL: Int - episodeCount_SUM_GT: Int - episodeCount_SUM_GTE: Int - episodeCount_SUM_LT: Int - episodeCount_SUM_LTE: Int - title_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LENGTH_EQUAL: Float - title_AVERAGE_LENGTH_GT: Float - title_AVERAGE_LENGTH_GTE: Float - title_AVERAGE_LENGTH_LT: Float - title_AVERAGE_LENGTH_LTE: Float - title_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LENGTH_EQUAL: Int - title_LONGEST_LENGTH_GT: Int - title_LONGEST_LENGTH_GTE: Int - title_LONGEST_LENGTH_LT: Int - title_LONGEST_LENGTH_LTE: Int - title_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - title_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LENGTH_EQUAL: Int - title_SHORTEST_LENGTH_GT: Int - title_SHORTEST_LENGTH_GTE: Int - title_SHORTEST_LENGTH_LT: Int - title_SHORTEST_LENGTH_LTE: Int - title_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - title_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - type EpisodeSeriesRelationship { cursor: String! node: Series! } - type EpisodeSeriesSeriesAggregationSelection { - count: Int! - node: EpisodeSeriesSeriesNodeAggregateSelection - } - - type EpisodeSeriesSeriesNodeAggregateSelection { - episodeCount: IntAggregateSelectionNonNullable! - title: StringAggregateSelectionNonNullable! - } - input EpisodeSeriesUpdateConnectionInput { node: SeriesUpdateInput } @@ -1068,7 +979,6 @@ describe("Interface Relationships", () => { runtime_NOT: Int @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") runtime_NOT_IN: [Int!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") series: SeriesWhere - seriesAggregate: EpisodeSeriesAggregateInput seriesConnection: EpisodeSeriesConnectionWhere seriesConnection_NOT: EpisodeSeriesConnectionWhere series_NOT: SeriesWhere @@ -3023,11 +2933,9 @@ describe("Interface Relationships", () => { type Comment implements Content { content: String creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! - creatorAggregate(directed: Boolean = true, where: UserWhere): CommentUserCreatorAggregationSelection creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! id: ID post(directed: Boolean = true, options: PostOptions, where: PostWhere): Post! - postAggregate(directed: Boolean = true, where: PostWhere): CommentPostPostAggregationSelection postConnection(after: String, directed: Boolean = true, first: Int, sort: [CommentPostConnectionSort!], where: CommentPostConnectionWhere): CommentPostConnection! } @@ -3053,60 +2961,6 @@ describe("Interface Relationships", () => { post: CommentPostFieldInput } - input CommentCreatorAggregateInput { - AND: [CommentCreatorAggregateInput!] - NOT: CommentCreatorAggregateInput - OR: [CommentCreatorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: CommentCreatorNodeAggregationWhereInput - } - - input CommentCreatorNodeAggregationWhereInput { - AND: [CommentCreatorNodeAggregationWhereInput!] - NOT: CommentCreatorNodeAggregationWhereInput - OR: [CommentCreatorNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - input CommentDeleteInput { creator: ContentCreatorDeleteFieldInput post: CommentPostDeleteFieldInput @@ -3131,18 +2985,6 @@ describe("Interface Relationships", () => { sort: [CommentSort!] } - input CommentPostAggregateInput { - AND: [CommentPostAggregateInput!] - NOT: CommentPostAggregateInput - OR: [CommentPostAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: CommentPostNodeAggregationWhereInput - } - input CommentPostConnectFieldInput { connect: PostConnectInput \\"\\"\\" @@ -3189,58 +3031,6 @@ describe("Interface Relationships", () => { create: CommentPostCreateFieldInput } - input CommentPostNodeAggregationWhereInput { - AND: [CommentPostNodeAggregationWhereInput!] - NOT: CommentPostNodeAggregationWhereInput - OR: [CommentPostNodeAggregationWhereInput!] - content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LENGTH_EQUAL: Float - content_AVERAGE_LENGTH_GT: Float - content_AVERAGE_LENGTH_GTE: Float - content_AVERAGE_LENGTH_LT: Float - content_AVERAGE_LENGTH_LTE: Float - content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LENGTH_EQUAL: Int - content_LONGEST_LENGTH_GT: Int - content_LONGEST_LENGTH_GTE: Int - content_LONGEST_LENGTH_LT: Int - content_LONGEST_LENGTH_LTE: Int - content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LENGTH_EQUAL: Int - content_SHORTEST_LENGTH_GT: Int - content_SHORTEST_LENGTH_GTE: Int - content_SHORTEST_LENGTH_LT: Int - content_SHORTEST_LENGTH_LTE: Int - content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - } - - type CommentPostPostAggregationSelection { - count: Int! - node: CommentPostPostNodeAggregateSelection - } - - type CommentPostPostNodeAggregateSelection { - content: StringAggregateSelectionNullable! - id: IDAggregateSelectionNullable! - } - type CommentPostRelationship { cursor: String! node: Post! @@ -3279,16 +3069,6 @@ describe("Interface Relationships", () => { post: CommentPostUpdateFieldInput } - type CommentUserCreatorAggregationSelection { - count: Int! - node: CommentUserCreatorNodeAggregateSelection - } - - type CommentUserCreatorNodeAggregateSelection { - id: IDAggregateSelectionNullable! - name: StringAggregateSelectionNullable! - } - input CommentWhere { AND: [CommentWhere!] NOT: CommentWhere @@ -3304,7 +3084,6 @@ describe("Interface Relationships", () => { content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") content_STARTS_WITH: String creator: UserWhere - creatorAggregate: CommentCreatorAggregateInput creatorConnection: ContentCreatorConnectionWhere creatorConnection_NOT: ContentCreatorConnectionWhere creator_NOT: UserWhere @@ -3319,7 +3098,6 @@ describe("Interface Relationships", () => { id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") id_STARTS_WITH: ID post: PostWhere - postAggregate: CommentPostAggregateInput postConnection: CommentPostConnectionWhere postConnection_NOT: CommentPostConnectionWhere post_NOT: PostWhere @@ -3352,18 +3130,6 @@ describe("Interface Relationships", () => { Post: PostCreateInput } - input ContentCreatorAggregateInput { - AND: [ContentCreatorAggregateInput!] - NOT: ContentCreatorAggregateInput - OR: [ContentCreatorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: ContentCreatorNodeAggregationWhereInput - } - input ContentCreatorConnectFieldInput { connect: UserConnectInput \\"\\"\\" @@ -3410,48 +3176,6 @@ describe("Interface Relationships", () => { create: ContentCreatorCreateFieldInput } - input ContentCreatorNodeAggregationWhereInput { - AND: [ContentCreatorNodeAggregationWhereInput!] - NOT: ContentCreatorNodeAggregationWhereInput - OR: [ContentCreatorNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - type ContentCreatorRelationship { cursor: String! node: User! @@ -3542,7 +3266,6 @@ describe("Interface Relationships", () => { content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") content_STARTS_WITH: String creator: UserWhere - creatorAggregate: ContentCreatorAggregateInput creatorConnection: ContentCreatorConnectionWhere creatorConnection_NOT: ContentCreatorConnectionWhere creator_NOT: UserWhere @@ -3616,7 +3339,6 @@ describe("Interface Relationships", () => { commentsConnection(after: String, directed: Boolean = true, first: Int, sort: [PostCommentsConnectionSort!], where: PostCommentsConnectionWhere): PostCommentsConnection! content: String creator(directed: Boolean = true, options: UserOptions, where: UserWhere): User! - creatorAggregate(directed: Boolean = true, where: UserWhere): PostUserCreatorAggregationSelection creatorConnection(after: String, directed: Boolean = true, first: Int, sort: [ContentCreatorConnectionSort!], where: ContentCreatorConnectionWhere): ContentCreatorConnection! id: ID } @@ -3771,60 +3493,6 @@ describe("Interface Relationships", () => { id: ID } - input PostCreatorAggregateInput { - AND: [PostCreatorAggregateInput!] - NOT: PostCreatorAggregateInput - OR: [PostCreatorAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: PostCreatorNodeAggregationWhereInput - } - - input PostCreatorNodeAggregationWhereInput { - AND: [PostCreatorNodeAggregationWhereInput!] - NOT: PostCreatorNodeAggregationWhereInput - OR: [PostCreatorNodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - input PostDeleteInput { comments: [PostCommentsDeleteFieldInput!] creator: ContentCreatorDeleteFieldInput @@ -3869,16 +3537,6 @@ describe("Interface Relationships", () => { id: ID } - type PostUserCreatorAggregationSelection { - count: Int! - node: PostUserCreatorNodeAggregateSelection - } - - type PostUserCreatorNodeAggregateSelection { - id: IDAggregateSelectionNullable! - name: StringAggregateSelectionNullable! - } - input PostWhere { AND: [PostWhere!] NOT: PostWhere @@ -3923,7 +3581,6 @@ describe("Interface Relationships", () => { content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") content_STARTS_WITH: String creator: UserWhere - creatorAggregate: PostCreatorAggregateInput creatorConnection: ContentCreatorConnectionWhere creatorConnection_NOT: ContentCreatorConnectionWhere creator_NOT: UserWhere diff --git a/packages/graphql/tests/schema/issues/162.test.ts b/packages/graphql/tests/schema/issues/162.test.ts index 1a96b86ab9..f216259914 100644 --- a/packages/graphql/tests/schema/issues/162.test.ts +++ b/packages/graphql/tests/schema/issues/162.test.ts @@ -151,7 +151,6 @@ describe("162", () => { type TigerJawLevel2 { id: ID part1(directed: Boolean = true, options: TigerJawLevel2Part1Options, where: TigerJawLevel2Part1Where): TigerJawLevel2Part1! - part1Aggregate(directed: Boolean = true, where: TigerJawLevel2Part1Where): TigerJawLevel2TigerJawLevel2Part1Part1AggregationSelection part1Connection(after: String, directed: Boolean = true, first: Int, sort: [TigerJawLevel2Part1ConnectionSort!], where: TigerJawLevel2Part1ConnectionWhere): TigerJawLevel2Part1Connection! } @@ -194,22 +193,9 @@ describe("162", () => { type TigerJawLevel2Part1 { id: ID tiger(directed: Boolean = true, options: TigerOptions, where: TigerWhere): Tiger! - tigerAggregate(directed: Boolean = true, where: TigerWhere): TigerJawLevel2Part1TigerTigerAggregationSelection tigerConnection(after: String, directed: Boolean = true, first: Int, sort: [TigerJawLevel2Part1TigerConnectionSort!], where: TigerJawLevel2Part1TigerConnectionWhere): TigerJawLevel2Part1TigerConnection! } - input TigerJawLevel2Part1AggregateInput { - AND: [TigerJawLevel2Part1AggregateInput!] - NOT: TigerJawLevel2Part1AggregateInput - OR: [TigerJawLevel2Part1AggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: TigerJawLevel2Part1NodeAggregationWhereInput - } - type TigerJawLevel2Part1AggregateSelection { count: Int! id: IDAggregateSelectionNullable! @@ -287,13 +273,6 @@ describe("162", () => { create: TigerJawLevel2Part1CreateFieldInput } - input TigerJawLevel2Part1NodeAggregationWhereInput { - AND: [TigerJawLevel2Part1NodeAggregationWhereInput!] - NOT: TigerJawLevel2Part1NodeAggregationWhereInput - OR: [TigerJawLevel2Part1NodeAggregationWhereInput!] - id_EQUAL: ID @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - } - input TigerJawLevel2Part1Options { limit: Int offset: Int @@ -319,18 +298,6 @@ describe("162", () => { id: SortDirection } - input TigerJawLevel2Part1TigerAggregateInput { - AND: [TigerJawLevel2Part1TigerAggregateInput!] - NOT: TigerJawLevel2Part1TigerAggregateInput - OR: [TigerJawLevel2Part1TigerAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: TigerJawLevel2Part1TigerNodeAggregationWhereInput - } - input TigerJawLevel2Part1TigerConnectFieldInput { \\"\\"\\" Whether or not to overwrite any matching relationship with the new properties. Will default to \`false\` in 4.0.0. @@ -374,51 +341,11 @@ describe("162", () => { create: TigerJawLevel2Part1TigerCreateFieldInput } - input TigerJawLevel2Part1TigerNodeAggregationWhereInput { - AND: [TigerJawLevel2Part1TigerNodeAggregationWhereInput!] - NOT: TigerJawLevel2Part1TigerNodeAggregationWhereInput - OR: [TigerJawLevel2Part1TigerNodeAggregationWhereInput!] - x_AVERAGE_EQUAL: Float - x_AVERAGE_GT: Float - x_AVERAGE_GTE: Float - x_AVERAGE_LT: Float - x_AVERAGE_LTE: Float - x_EQUAL: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - x_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - x_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - x_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - x_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - x_MAX_EQUAL: Int - x_MAX_GT: Int - x_MAX_GTE: Int - x_MAX_LT: Int - x_MAX_LTE: Int - x_MIN_EQUAL: Int - x_MIN_GT: Int - x_MIN_GTE: Int - x_MIN_LT: Int - x_MIN_LTE: Int - x_SUM_EQUAL: Int - x_SUM_GT: Int - x_SUM_GTE: Int - x_SUM_LT: Int - x_SUM_LTE: Int - } - type TigerJawLevel2Part1TigerRelationship { cursor: String! node: Tiger! } - type TigerJawLevel2Part1TigerTigerAggregationSelection { - count: Int! - node: TigerJawLevel2Part1TigerTigerNodeAggregateSelection - } - - type TigerJawLevel2Part1TigerTigerNodeAggregateSelection { - x: IntAggregateSelectionNullable! - } - input TigerJawLevel2Part1TigerUpdateConnectionInput { node: TigerUpdateInput } @@ -465,7 +392,6 @@ describe("162", () => { id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") id_STARTS_WITH: ID tiger: TigerWhere - tigerAggregate: TigerJawLevel2Part1TigerAggregateInput tigerConnection: TigerJawLevel2Part1TigerConnectionWhere tigerConnection_NOT: TigerJawLevel2Part1TigerConnectionWhere tiger_NOT: TigerWhere @@ -488,15 +414,6 @@ describe("162", () => { id: SortDirection } - type TigerJawLevel2TigerJawLevel2Part1Part1AggregationSelection { - count: Int! - node: TigerJawLevel2TigerJawLevel2Part1Part1NodeAggregateSelection - } - - type TigerJawLevel2TigerJawLevel2Part1Part1NodeAggregateSelection { - id: IDAggregateSelectionNullable! - } - input TigerJawLevel2UpdateInput { id: ID part1: TigerJawLevel2Part1UpdateFieldInput @@ -517,7 +434,6 @@ describe("162", () => { id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") id_STARTS_WITH: ID part1: TigerJawLevel2Part1Where - part1Aggregate: TigerJawLevel2Part1AggregateInput part1Connection: TigerJawLevel2Part1ConnectionWhere part1Connection_NOT: TigerJawLevel2Part1ConnectionWhere part1_NOT: TigerJawLevel2Part1Where diff --git a/packages/graphql/tests/schema/issues/2969.test.ts b/packages/graphql/tests/schema/issues/2969.test.ts new file mode 100644 index 0000000000..e4ddd0c42e --- /dev/null +++ b/packages/graphql/tests/schema/issues/2969.test.ts @@ -0,0 +1,539 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { printSchemaWithDirectives } from "@graphql-tools/utils"; +import { lexicographicSortSchema } from "graphql/utilities"; +import { gql } from "apollo-server"; +import { Neo4jGraphQL } from "../../../src"; + +describe("https://github.com/neo4j/graphql/issues/2969", () => { + test("authorAggregate should not be generated", async () => { + const typeDefs = gql` + type Post { + content: String! + author: User! @relationship(type: "HAS_AUTHOR", direction: OUT) + } + + type User { + id: ID! + name: String! + posts: [Post!]! @relationship(type: "HAS_AUTHOR", direction: IN) + } + `; + const neoSchema = new Neo4jGraphQL({ typeDefs }); + const printedSchema = printSchemaWithDirectives(lexicographicSortSchema(await neoSchema.getSchema())); + + expect(printedSchema).toMatchInlineSnapshot(` + "schema { + query: Query + mutation: Mutation + } + + type CreateInfo { + bookmark: String + nodesCreated: Int! + relationshipsCreated: Int! + } + + type CreatePostsMutationResponse { + info: CreateInfo! + posts: [Post!]! + } + + type CreateUsersMutationResponse { + info: CreateInfo! + users: [User!]! + } + + type DeleteInfo { + bookmark: String + nodesDeleted: Int! + relationshipsDeleted: Int! + } + + type IDAggregateSelectionNonNullable { + longest: ID! + shortest: ID! + } + + type Mutation { + createPosts(input: [PostCreateInput!]!): CreatePostsMutationResponse! + createUsers(input: [UserCreateInput!]!): CreateUsersMutationResponse! + deletePosts(delete: PostDeleteInput, where: PostWhere): DeleteInfo! + deleteUsers(delete: UserDeleteInput, where: UserWhere): DeleteInfo! + updatePosts(connect: PostConnectInput, create: PostRelationInput, delete: PostDeleteInput, disconnect: PostDisconnectInput, update: PostUpdateInput, where: PostWhere): UpdatePostsMutationResponse! + updateUsers(connect: UserConnectInput, create: UserRelationInput, delete: UserDeleteInput, disconnect: UserDisconnectInput, update: UserUpdateInput, where: UserWhere): UpdateUsersMutationResponse! + } + + \\"\\"\\"Pagination information (Relay)\\"\\"\\" + type PageInfo { + endCursor: String + hasNextPage: Boolean! + hasPreviousPage: Boolean! + startCursor: String + } + + type Post { + author(directed: Boolean = true, options: UserOptions, where: UserWhere): User! + authorConnection(after: String, directed: Boolean = true, first: Int, sort: [PostAuthorConnectionSort!], where: PostAuthorConnectionWhere): PostAuthorConnection! + content: String! + } + + type PostAggregateSelection { + content: StringAggregateSelectionNonNullable! + count: Int! + } + + input PostAuthorConnectFieldInput { + connect: UserConnectInput + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. Will default to \`false\` in 4.0.0. + \\"\\"\\" + overwrite: Boolean! = true + where: UserConnectWhere + } + + type PostAuthorConnection { + edges: [PostAuthorRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input PostAuthorConnectionSort { + node: UserSort + } + + input PostAuthorConnectionWhere { + AND: [PostAuthorConnectionWhere!] + NOT: PostAuthorConnectionWhere + OR: [PostAuthorConnectionWhere!] + node: UserWhere + node_NOT: UserWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input PostAuthorCreateFieldInput { + node: UserCreateInput! + } + + input PostAuthorDeleteFieldInput { + delete: UserDeleteInput + where: PostAuthorConnectionWhere + } + + input PostAuthorDisconnectFieldInput { + disconnect: UserDisconnectInput + where: PostAuthorConnectionWhere + } + + input PostAuthorFieldInput { + connect: PostAuthorConnectFieldInput + create: PostAuthorCreateFieldInput + } + + type PostAuthorRelationship { + cursor: String! + node: User! + } + + input PostAuthorUpdateConnectionInput { + node: UserUpdateInput + } + + input PostAuthorUpdateFieldInput { + connect: PostAuthorConnectFieldInput + create: PostAuthorCreateFieldInput + delete: PostAuthorDeleteFieldInput + disconnect: PostAuthorDisconnectFieldInput + update: PostAuthorUpdateConnectionInput + where: PostAuthorConnectionWhere + } + + input PostConnectInput { + author: PostAuthorConnectFieldInput + } + + input PostConnectWhere { + node: PostWhere! + } + + input PostCreateInput { + author: PostAuthorFieldInput + content: String! + } + + input PostDeleteInput { + author: PostAuthorDeleteFieldInput + } + + input PostDisconnectInput { + author: PostAuthorDisconnectFieldInput + } + + type PostEdge { + cursor: String! + node: Post! + } + + 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!] + } + + input PostRelationInput { + author: PostAuthorCreateFieldInput + } + + \\"\\"\\" + 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 { + content: SortDirection + } + + input PostUpdateInput { + author: PostAuthorUpdateFieldInput + content: String + } + + input PostWhere { + AND: [PostWhere!] + NOT: PostWhere + OR: [PostWhere!] + author: UserWhere + authorConnection: PostAuthorConnectionWhere + authorConnection_NOT: PostAuthorConnectionWhere + author_NOT: UserWhere + content: String + content_CONTAINS: String + content_ENDS_WITH: String + content_IN: [String!] + content_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + content_STARTS_WITH: String + } + + type PostsConnection { + edges: [PostEdge!]! + pageInfo: PageInfo! + totalCount: Int! + } + + type Query { + posts(options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(where: PostWhere): PostAggregateSelection! + postsConnection(after: String, first: Int, sort: [PostSort], where: PostWhere): PostsConnection! + users(options: UserOptions, where: UserWhere): [User!]! + usersAggregate(where: UserWhere): UserAggregateSelection! + usersConnection(after: String, first: Int, sort: [UserSort], where: UserWhere): UsersConnection! + } + + enum SortDirection { + \\"\\"\\"Sort by field values in ascending order.\\"\\"\\" + ASC + \\"\\"\\"Sort by field values in descending order.\\"\\"\\" + DESC + } + + type StringAggregateSelectionNonNullable { + longest: String! + shortest: String! + } + + type UpdateInfo { + bookmark: String + nodesCreated: Int! + nodesDeleted: Int! + relationshipsCreated: Int! + relationshipsDeleted: Int! + } + + type UpdatePostsMutationResponse { + info: UpdateInfo! + posts: [Post!]! + } + + type UpdateUsersMutationResponse { + info: UpdateInfo! + users: [User!]! + } + + type User { + id: ID! + name: String! + posts(directed: Boolean = true, options: PostOptions, where: PostWhere): [Post!]! + postsAggregate(directed: Boolean = true, where: PostWhere): UserPostPostsAggregationSelection + postsConnection(after: String, directed: Boolean = true, first: Int, sort: [UserPostsConnectionSort!], where: UserPostsConnectionWhere): UserPostsConnection! + } + + type UserAggregateSelection { + count: Int! + id: IDAggregateSelectionNonNullable! + name: StringAggregateSelectionNonNullable! + } + + input UserConnectInput { + posts: [UserPostsConnectFieldInput!] + } + + input UserConnectWhere { + node: UserWhere! + } + + input UserCreateInput { + id: ID! + name: String! + posts: UserPostsFieldInput + } + + input UserDeleteInput { + posts: [UserPostsDeleteFieldInput!] + } + + input UserDisconnectInput { + posts: [UserPostsDisconnectFieldInput!] + } + + 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!] + } + + type UserPostPostsAggregationSelection { + count: Int! + node: UserPostPostsNodeAggregateSelection + } + + type UserPostPostsNodeAggregateSelection { + content: StringAggregateSelectionNonNullable! + } + + input UserPostsAggregateInput { + AND: [UserPostsAggregateInput!] + NOT: UserPostsAggregateInput + OR: [UserPostsAggregateInput!] + count: Int + count_GT: Int + count_GTE: Int + count_LT: Int + count_LTE: Int + node: UserPostsNodeAggregationWhereInput + } + + input UserPostsConnectFieldInput { + connect: [PostConnectInput!] + \\"\\"\\" + Whether or not to overwrite any matching relationship with the new properties. Will default to \`false\` in 4.0.0. + \\"\\"\\" + overwrite: Boolean! = true + where: PostConnectWhere + } + + type UserPostsConnection { + edges: [UserPostsRelationship!]! + pageInfo: PageInfo! + totalCount: Int! + } + + input UserPostsConnectionSort { + node: PostSort + } + + input UserPostsConnectionWhere { + AND: [UserPostsConnectionWhere!] + NOT: UserPostsConnectionWhere + OR: [UserPostsConnectionWhere!] + node: PostWhere + node_NOT: PostWhere @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + } + + input UserPostsCreateFieldInput { + node: PostCreateInput! + } + + input UserPostsDeleteFieldInput { + delete: PostDeleteInput + where: UserPostsConnectionWhere + } + + input UserPostsDisconnectFieldInput { + disconnect: PostDisconnectInput + where: UserPostsConnectionWhere + } + + input UserPostsFieldInput { + connect: [UserPostsConnectFieldInput!] + create: [UserPostsCreateFieldInput!] + } + + input UserPostsNodeAggregationWhereInput { + AND: [UserPostsNodeAggregationWhereInput!] + NOT: UserPostsNodeAggregationWhereInput + OR: [UserPostsNodeAggregationWhereInput!] + content_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LENGTH_EQUAL: Float + content_AVERAGE_LENGTH_GT: Float + content_AVERAGE_LENGTH_GTE: Float + content_AVERAGE_LENGTH_LT: Float + content_AVERAGE_LENGTH_LTE: Float + content_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LENGTH_EQUAL: Int + content_LONGEST_LENGTH_GT: Int + content_LONGEST_LENGTH_GTE: Int + content_LONGEST_LENGTH_LT: Int + content_LONGEST_LENGTH_LTE: Int + content_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") + content_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LENGTH_EQUAL: Int + content_SHORTEST_LENGTH_GT: Int + content_SHORTEST_LENGTH_GTE: Int + content_SHORTEST_LENGTH_LT: Int + content_SHORTEST_LENGTH_LTE: Int + content_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + content_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") + } + + type UserPostsRelationship { + cursor: String! + node: Post! + } + + input UserPostsUpdateConnectionInput { + node: PostUpdateInput + } + + input UserPostsUpdateFieldInput { + connect: [UserPostsConnectFieldInput!] + create: [UserPostsCreateFieldInput!] + delete: [UserPostsDeleteFieldInput!] + disconnect: [UserPostsDisconnectFieldInput!] + update: UserPostsUpdateConnectionInput + where: UserPostsConnectionWhere + } + + input UserRelationInput { + posts: [UserPostsCreateFieldInput!] + } + + \\"\\"\\" + 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 { + id: SortDirection + name: SortDirection + } + + input UserUpdateInput { + id: ID + name: String + posts: [UserPostsUpdateFieldInput!] + } + + input UserWhere { + AND: [UserWhere!] + NOT: UserWhere + OR: [UserWhere!] + id: ID + id_CONTAINS: ID + id_ENDS_WITH: ID + id_IN: [ID!] + id_NOT: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_CONTAINS: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_ENDS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_IN: [ID!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_NOT_STARTS_WITH: ID @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + id_STARTS_WITH: ID + name: String + name_CONTAINS: String + name_ENDS_WITH: String + name_IN: [String!] + name_NOT: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_CONTAINS: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_ENDS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_IN: [String!] @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") + name_STARTS_WITH: String + posts: PostWhere @deprecated(reason: \\"Use \`posts_SOME\` instead.\\") + postsAggregate: UserPostsAggregateInput + postsConnection: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_SOME\` instead.\\") + \\"\\"\\" + Return Users where all of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_ALL: UserPostsConnectionWhere + \\"\\"\\" + Return Users where none of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_NONE: UserPostsConnectionWhere + postsConnection_NOT: UserPostsConnectionWhere @deprecated(reason: \\"Use \`postsConnection_NONE\` instead.\\") + \\"\\"\\" + Return Users where one of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_SINGLE: UserPostsConnectionWhere + \\"\\"\\" + Return Users where some of the related UserPostsConnections match this filter + \\"\\"\\" + postsConnection_SOME: UserPostsConnectionWhere + \\"\\"\\"Return Users where all of the related Posts match this filter\\"\\"\\" + posts_ALL: PostWhere + \\"\\"\\"Return Users where none of the related Posts match this filter\\"\\"\\" + posts_NONE: PostWhere + posts_NOT: PostWhere @deprecated(reason: \\"Use \`posts_NONE\` instead.\\") + \\"\\"\\"Return Users where one of the related Posts match this filter\\"\\"\\" + posts_SINGLE: PostWhere + \\"\\"\\"Return Users where some of the related Posts match this filter\\"\\"\\" + posts_SOME: PostWhere + } + + type UsersConnection { + edges: [UserEdge!]! + pageInfo: PageInfo! + totalCount: Int! + }" + `); + }); +}); diff --git a/packages/graphql/tests/schema/math.test.ts b/packages/graphql/tests/schema/math.test.ts index 4eee768243..f9b8e5ef6b 100644 --- a/packages/graphql/tests/schema/math.test.ts +++ b/packages/graphql/tests/schema/math.test.ts @@ -803,7 +803,6 @@ describe("Algebraic", () => { type Movie { directedBy(directed: Boolean = true, options: DirectorOptions, where: DirectorWhere): Director - directedByAggregate(directed: Boolean = true, where: DirectorWhere): MovieDirectorDirectedByAggregationSelection directedByConnection(after: String, directed: Boolean = true, first: Int, sort: [MovieDirectedByConnectionSort!], where: MovieDirectedByConnectionWhere): MovieDirectedByConnection! id: ID viewers: Int! @@ -833,18 +832,6 @@ describe("Algebraic", () => { directedBy: MovieDirectedByDeleteFieldInput } - input MovieDirectedByAggregateInput { - AND: [MovieDirectedByAggregateInput!] - NOT: MovieDirectedByAggregateInput - OR: [MovieDirectedByAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: MovieDirectedByNodeAggregationWhereInput - } - input MovieDirectedByConnectFieldInput { connect: DirectorConnectInput \\"\\"\\" @@ -891,47 +878,6 @@ describe("Algebraic", () => { create: MovieDirectedByCreateFieldInput } - input MovieDirectedByNodeAggregationWhereInput { - AND: [MovieDirectedByNodeAggregationWhereInput!] - NOT: MovieDirectedByNodeAggregationWhereInput - OR: [MovieDirectedByNodeAggregationWhereInput!] - lastName_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_AVERAGE_LENGTH_EQUAL: Float - lastName_AVERAGE_LENGTH_GT: Float - lastName_AVERAGE_LENGTH_GTE: Float - lastName_AVERAGE_LENGTH_LT: Float - lastName_AVERAGE_LENGTH_LTE: Float - lastName_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - lastName_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - lastName_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - lastName_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_LONGEST_LENGTH_EQUAL: Int - lastName_LONGEST_LENGTH_GT: Int - lastName_LONGEST_LENGTH_GTE: Int - lastName_LONGEST_LENGTH_LT: Int - lastName_LONGEST_LENGTH_LTE: Int - lastName_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - lastName_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - lastName_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_SHORTEST_LENGTH_EQUAL: Int - lastName_SHORTEST_LENGTH_GT: Int - lastName_SHORTEST_LENGTH_GTE: Int - lastName_SHORTEST_LENGTH_LT: Int - lastName_SHORTEST_LENGTH_LTE: Int - lastName_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - lastName_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - type MovieDirectedByRelationship { cursor: String! node: Director! @@ -950,15 +896,6 @@ describe("Algebraic", () => { where: MovieDirectedByConnectionWhere } - type MovieDirectorDirectedByAggregationSelection { - count: Int! - node: MovieDirectorDirectedByNodeAggregateSelection - } - - type MovieDirectorDirectedByNodeAggregateSelection { - lastName: StringAggregateSelectionNonNullable! - } - input MovieDisconnectInput { directedBy: MovieDirectedByDisconnectFieldInput } @@ -1002,7 +939,6 @@ describe("Algebraic", () => { NOT: MovieWhere OR: [MovieWhere!] directedBy: DirectorWhere - directedByAggregate: MovieDirectedByAggregateInput directedByConnection: MovieDirectedByConnectionWhere directedByConnection_NOT: MovieDirectedByConnectionWhere directedBy_NOT: DirectorWhere diff --git a/packages/graphql/tests/schema/subscriptions.test.ts b/packages/graphql/tests/schema/subscriptions.test.ts index 46d01aa1f2..0920bf15c6 100644 --- a/packages/graphql/tests/schema/subscriptions.test.ts +++ b/packages/graphql/tests/schema/subscriptions.test.ts @@ -3912,7 +3912,6 @@ describe("Subscriptions", () => { id: Int! name: String owner(directed: Boolean = true, options: UserOptions, where: UserWhere): User - ownerAggregate(directed: Boolean = true, where: UserWhere): AgreementUserOwnerAggregationSelection ownerConnection(after: String, directed: Boolean = true, first: Int, sort: [AgreementOwnerConnectionSort!], where: AgreementOwnerConnectionWhere): AgreementOwnerConnection! } @@ -3971,18 +3970,6 @@ describe("Subscriptions", () => { sort: [AgreementSort!] } - input AgreementOwnerAggregateInput { - AND: [AgreementOwnerAggregateInput!] - NOT: AgreementOwnerAggregateInput - OR: [AgreementOwnerAggregateInput!] - count: Int - count_GT: Int - count_GTE: Int - count_LT: Int - count_LTE: Int - node: AgreementOwnerNodeAggregationWhereInput - } - input AgreementOwnerConnectFieldInput { \\"\\"\\" Whether or not to overwrite any matching relationship with the new properties. Will default to \`false\` in 4.0.0. @@ -4026,82 +4013,6 @@ describe("Subscriptions", () => { create: AgreementOwnerCreateFieldInput } - input AgreementOwnerNodeAggregationWhereInput { - AND: [AgreementOwnerNodeAggregationWhereInput!] - NOT: AgreementOwnerNodeAggregationWhereInput - OR: [AgreementOwnerNodeAggregationWhereInput!] - name_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LENGTH_EQUAL: Float - name_AVERAGE_LENGTH_GT: Float - name_AVERAGE_LENGTH_GTE: Float - name_AVERAGE_LENGTH_LT: Float - name_AVERAGE_LENGTH_LTE: Float - name_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LENGTH_EQUAL: Int - name_LONGEST_LENGTH_GT: Int - name_LONGEST_LENGTH_GTE: Int - name_LONGEST_LENGTH_LT: Int - name_LONGEST_LENGTH_LTE: Int - name_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - name_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LENGTH_EQUAL: Int - name_SHORTEST_LENGTH_GT: Int - name_SHORTEST_LENGTH_GTE: Int - name_SHORTEST_LENGTH_LT: Int - name_SHORTEST_LENGTH_LTE: Int - name_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - name_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_EQUAL: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_GTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LENGTH_EQUAL: Float - username_AVERAGE_LENGTH_GT: Float - username_AVERAGE_LENGTH_GTE: Float - username_AVERAGE_LENGTH_LT: Float - username_AVERAGE_LENGTH_LTE: Float - username_AVERAGE_LT: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_AVERAGE_LTE: Float @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_EQUAL: String @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_GTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LONGEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LENGTH_EQUAL: Int - username_LONGEST_LENGTH_GT: Int - username_LONGEST_LENGTH_GTE: Int - username_LONGEST_LENGTH_LT: Int - username_LONGEST_LENGTH_LTE: Int - username_LONGEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LONGEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_LT: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_LTE: Int @deprecated(reason: \\"Aggregation filters that are not relying on an aggregating function will be deprecated.\\") - username_SHORTEST_EQUAL: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_GTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LENGTH_EQUAL: Int - username_SHORTEST_LENGTH_GT: Int - username_SHORTEST_LENGTH_GTE: Int - username_SHORTEST_LENGTH_LT: Int - username_SHORTEST_LENGTH_LTE: Int - username_SHORTEST_LT: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - username_SHORTEST_LTE: Int @deprecated(reason: \\"Please use the explicit _LENGTH version for string aggregation.\\") - } - type AgreementOwnerRelationship { cursor: String! node: User! @@ -4193,16 +4104,6 @@ describe("Subscriptions", () => { updatedAgreement: AgreementEventPayload! } - type AgreementUserOwnerAggregationSelection { - count: Int! - node: AgreementUserOwnerNodeAggregateSelection - } - - type AgreementUserOwnerNodeAggregateSelection { - name: StringAggregateSelectionNullable! - username: StringAggregateSelectionNonNullable! - } - input AgreementWhere { AND: [AgreementWhere!] NOT: AgreementWhere @@ -4226,7 +4127,6 @@ describe("Subscriptions", () => { name_NOT_STARTS_WITH: String @deprecated(reason: \\"Negation filters will be deprecated, use the NOT operator to achieve the same behavior\\") name_STARTS_WITH: String owner: UserWhere - ownerAggregate: AgreementOwnerAggregateInput ownerConnection: AgreementOwnerConnectionWhere ownerConnection_NOT: AgreementOwnerConnectionWhere owner_NOT: UserWhere diff --git a/packages/graphql/tests/tck/issues/2925.test.ts b/packages/graphql/tests/tck/issues/2925.test.ts index b51a25b9a4..61b42418b6 100644 --- a/packages/graphql/tests/tck/issues/2925.test.ts +++ b/packages/graphql/tests/tck/issues/2925.test.ts @@ -55,7 +55,7 @@ describe("https://github.com/neo4j/graphql/issues/2925", () => { expect(formatCypher(result.cypher)).toMatchInlineSnapshot(` "MATCH (this:\`User\`) - WHERE single(this0 IN [(this)-[:HAS_GROUP]->(this0:\`Group\`) WHERE this0.name IN $param0 | 1] WHERE true) + WHERE single(this0 IN [(this)-[:\`HAS_GROUP\`]->(this0:\`Group\`) WHERE this0.name IN $param0 | 1] WHERE true) RETURN this { .name } AS this" `); diff --git a/packages/ogm/tests/issues/635.test.ts b/packages/ogm/tests/issues/635.test.ts index afa7f7a721..e604faeaab 100644 --- a/packages/ogm/tests/issues/635.test.ts +++ b/packages/ogm/tests/issues/635.test.ts @@ -232,7 +232,6 @@ describe("issues/635", () => { noWrite: true, })) as string; - expect(generated).toContain(`export type CompanyClockSettingsAggregateInput`); expect(generated).not.toContain(`export interface CompanyClockSettingsAggregateInput`); expect(generated).toContain(`export interface CompanyClockSettingsAggregateSelectionInput`);