At a glance
- Identifier: #883
- Stage: RFC X / Rejected
- Champion: @IvanGoncharov
- Latest activity: Advanced to RFC 1 on 2025-06-12
- Spec PR: https://github.com/graphql/graphql-spec/pull/883
Spec PR description
At the moment covariance rules for interfaces are incompatible with validation rule for overlapping fragments. For example, if we have schema like this:
interface AddressInterface {
country_code: String
}
type Port implements AddressInterface {
country_code: String!
}
type Warehouse implements AddressInterface {
country_code: String
}
type Query {
addressInterface: AddressInterface
}
This query is valid:
query {
addressInterface {
country_code
}
}
But if you expand interface field into inline fragments will cause a validation error:
query {
addressInterface {
... on Port {
country_code
}
... on Warehouse {
country_code
}
}
}
This PR fixes this issue.
Timeline
June 2025
- Advanced to RFC 1 on 2025-06-12 by benjie
January 2022
- Spec PR closed on 2022-01-06
September 2021
- Advanced to RFC 1 on 2021-09-04 by IvanGoncharov
- Top comment edited on 2021-09-02 by IvanGoncharov
- Spec PR created on 2021-09-02 by IvanGoncharov
- @IvanGoncharov committed "Relax SameResponseShape algorith to be compatible with covariant fields" on 2021-09-02
- Advanced to RFC 0 on 2021-09-02 by IvanGoncharov
- Added to WG agenda on 2021-09-02
- Mentioned in WG notes on 2021-09-02