graphql
graphql copied to clipboard
Missing aggregate filter for union relation fields
Given the Schema:
type Movie {
title: String!
isan: String! @unique
}
type Series {
title: String!
isan: String! @unique
}
union Production = Movie | Series
interface ActedIn @relationshipProperties {
screenTime: Int!
}
type Actor {
name: String!
actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn")
}
The following ActorWhere
is generated:
input ActorWhere {
AND: [ActorWhere!]
OR: [ActorWhere!]
actedInConnection: ActorActedInConnectionWhere
actedInConnection_NOT: ActorActedInConnectionWhere
name: String
name_CONTAINS: String
name_ENDS_WITH: String
name_IN: [String]
name_NOT: String
name_NOT_CONTAINS: String
name_NOT_ENDS_WITH: String
name_NOT_IN: [String]
name_NOT_STARTS_WITH: String
name_STARTS_WITH: String
}
see also: https://github.com/neo4j/graphql/blob/dev/packages/graphql/tests/schema/connect-or-create-unions.test.ts#L330-L345
I would expect the additional fields on this input type:
actedIn: ProductionWhere
actedInAggregate: ActorActedInAggregateInput
actedIn_NOT: ProductionWhere
Same question for interface relationships.
I would expect the following fields on an relations of type interface as well:
actedIn: ProductionWhere
actedInAggregate: ActorActedInAggregateInput
actedIn_NOT: ProductionWhere
Many thanks for raising this bug report @Andy2003. :bug: We will now attempt to reproduce the bug based on the steps you have provided.
Please ensure that you've provided the necessary information for a minimal reproduction, including but not limited to:
- Type definitions
- Resolvers
- Query and/or Mutation (or multiple) needed to reproduce
If you have a support agreement with Neo4j, please link this GitHub issue to a new or existing Zendesk ticket.
Thanks again! :pray:
From the example above, actedInAggregate
is all that's missing from the input above now in the 5.0.0
branch.
We've been able to confirm this bug using the steps to reproduce that you provided - many thanks @Andy2003! :pray: We will now prioritise the bug and address it appropriately.