-
Notifications
You must be signed in to change notification settings - Fork 422
Open
Labels
Description
Is there an existing issue that is already proposing this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe it
Description
The September 2025 Edition of the GraphQL Specification has been released,
and a new feature(OneOf Input Objects) has been officially introduced.
However, it requires discussion on how this should be implemented and exposed for usage.
Adapter support status
- ✅ Apollo Server is supported, but I couldn't find related documentation
- ❓ I couldn’t find any reference for Mercurius
Describe the solution you'd like
This is just a suggestion and should be open for discussion.
Suggestion example
// New `isOneOf` property
@InputType({ isOneOf: true })
export class UserByInput {
@Field(type => ID)
id: string;
@Field(type => String)
email: string;
@Field(type => String)
username: string;
}
@Resolver(of => User)
export class UserResolver {
@Query(type => User)
user(@Args("by") by: UserByInput) {
// ...
}
}
input UserByInput @oneOf {
id: ID
email: String
username: String
}
type Query {
user(by: UserByInput!): User
}
Teachability, documentation, adoption, migration strategy
No response
What is the motivation / use case for changing the behavior?
New GraphQL Specification