allow unions to declare implementation of interfaces#3527
allow unions to declare implementation of interfaces#3527yaacovCR wants to merge 1 commit intographql:nextfrom
Conversation
✅ Deploy Preview for compassionate-pike-271cb3 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
|
Hi @yaacovCR, I'm @github-actions bot happy to help you with this PR 👋 Supported commandsPlease post this commands in separate comments and only one per comment:
|
- Spec PR: graphql/graphql-spec#939 - graphql-js PR (WIP): graphql/graphql-js#3527
* add agenda item for unions implementing interfaces - Spec PR: graphql/graphql-spec#939 - graphql-js PR (WIP): graphql/graphql-js#3527 * Update agendas/2022/2022-04-07.md Co-authored-by: Benjie Gillam <benjie@jemjie.com>
So, this rule would possibly need to be updated for a union to find the field on one of the interfaces it implements! |
Intersections of unions and interfaces can be considered to "implement" their unions and interface members. A type with a field of type Intersection will satisfy an interface where the field defined in the interface is one of the member types of the intersection. Alternative to graphql#3527
Intersections of unions and interfaces can be considered to "implement" their unions and interface members. A type with a field of type Intersection will satisfy an interface where the field defined in the interface is one of the member types of the intersection. Alternative to graphql#3527
Intersections of unions and interfaces can be considered to "implement" their unions and interface members. A type with a field of type Intersection will satisfy an interface where the field defined in the interface is one of the member types of the intersection. Alternative to graphql#3527
Intersections of unions and interfaces can be considered to "implement" their unions and interface members. A type with a field of type Intersection will satisfy an interface where the field defined in the interface is one of the member types of the intersection. Alternative to graphql#3527
Intersections of unions and interfaces can be considered to "implement" their unions and interface members. A type with a field of type Intersection will satisfy an interface where the field defined in the interface is one of the member types of the intersection. Alternative to graphql#3527
Intersections of unions and interfaces can be considered to "implement" their unions and interface members. A type with a field of type Intersection will satisfy an interface where the field defined in the interface is one of the member types of the intersection. Alternative to graphql#3527
Intersections of unions and interfaces can be considered to "implement" their unions and interface members. A type with a field of type Intersection will satisfy an interface where the field defined in the interface is one of the member types of the intersection. Alternative to graphql#3527
Intersections of unions and interfaces can be considered to "implement" their unions and interface members. A type with a field of type Intersection will satisfy an interface where the field defined in the interface is one of the member types of the intersection. Alternative to graphql#3527
Intersections of unions and interfaces can be considered to "implement" their unions and interface members. A type with a field of type Intersection will satisfy an interface where the field defined in the interface is one of the member types of the intersection. Alternative to graphql#3527
Intersections of unions and interfaces can be considered to "implement" their unions and interface members. A type with a field of type Intersection will satisfy an interface where the field defined in the interface is one of the member types of the intersection. Alternative to graphql#3527
Intersections of unions and interfaces can be considered to "implement" their unions and interface members. A type with a field of type Intersection will satisfy an interface where the field defined in the interface is one of the member types of the intersection. Alternative to graphql#3527
6f229f7 to
ecd0e3c
Compare
|
Decision Record We decided at the last WG that if unions implement interfaces, then they have directly querable fields. This PR and the spec PR have been updated with the changes for introspection, validation. Now all composite types have a |
WIP: more tests required complete code coverage is already there, but goal is to have a test where union implements an interface wherever there is a test for an interface implementing interface
|
Actually, this naive field copying from the interfaces to the Union does not account for different interfaces with valid overlapping fields like new arguments with defaults. Work to do! |
* add agenda item for unions implementing interfaces - Spec PR: graphql/graphql-spec#939 - graphql-js PR (WIP): graphql/graphql-js#3527 * Update agendas/2022/2022-04-07.md Co-authored-by: Benjie Gillam <benjie@jemjie.com>
|
closing this old, stale spec PR. still available for reference |
See: graphql/graphql-spec#939