At a glance
- Identifier: #939
- Stage: RFC 1 / Proposal
- Champion: @yaacovCR
- Latest activity: Added to WG agenda on 2022-06-02
- Spec PR: https://github.com/graphql/graphql-spec/pull/939
- Related:
Spec PR description
Cf. https://github.com/graphql/graphql-spec/pull/373#issuecomment-375489730
# generic types
interface Node {
id: ID!
}
interface Connection {
pageInfo: PageInfo!
edges: [Edge]
}
interface Edge {
cursor: String
node: Node
}
type PageInfo {
hasPreviousPage: Boolean
hasNextPage: Boolean
startCursor: String
endCursor: String
}
# schema-specific types
interface Pet {
id: ID!
name: String
}
type Cat implements Pet & Node {
id: ID!
name: String
}
type Dog implements Pet & Node {
id: ID!
name: String
}
union HousePet implements Pet & Node = Cat | Dog
# house-pet-specific types
type HousePetEdge implements Edge {
cursor: String
node: HousePet # <<< This is what is unlocked by this PR
}
type HousePetConnection implements Connection {
pageInfo: PageInfo!
edges: [HousePetEdge]
}
# query
type Query {
housePets: HousePetConnection
}
Timeline
- Added to WG agenda on 2022-06-02
- Mentioned in WG notes on 2022-06-02
- Commit pushed on 2022-05-23 by yaacovCR: unions implementing interfaces have fields
- Added to WG agenda on 2022-04-07
- Mentioned in WG notes on 2022-04-07
- 2 commits pushed on 2022-04-06:
- yaacovCR committed "review feedback"
- yaacovCR committed "adjust validation text"
- Spec PR created on 2022-04-05 by yaacovCR
- Commit pushed on 2022-04-05 by yaacovCR: Add spec text for unions implementing interfaces