Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow unions to declare implementation of interfaces #939

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
review feedback
  • Loading branch information
yaacovCR committed Apr 6, 2022
commit 1f0f1e0113f1685c362c77bc8a96cd614a401e61
10 changes: 5 additions & 5 deletions spec/Section 3 -- Type System.md
Original file line number Diff line number Diff line change
Expand Up @@ -1146,9 +1146,9 @@ interface. Querying for `age` is only valid when the result of `entity` is a
**Interfaces Implementing Interfaces**

When defining an interface that implements another interface, the implementing
type must define each field that is specified by the implemented interface. For
example, the interface Resource must define the field id to implement the Node
interface:
interface must define each field that is specified by the implemented interface.
For example, the interface Resource must define the field id to implement the
Node interface:

```raw graphql example
interface Node {
Expand Down Expand Up @@ -1392,7 +1392,7 @@ type Article implements Resource {
title: String
}

type Image implements Resource {
type Photo implements Resource {
url: String
height: Int
width: Int
Expand Down Expand Up @@ -1435,7 +1435,7 @@ Union types have the potential to be invalid if incorrectly defined.
2. The member types of a Union type must all be Object base types; Scalar,
Interface and Union types must not be member types of a Union. Similarly,
wrapping types must not be member types of a Union.
3. An union type may declare that it implements one or more unique interfaces.
3. A union type may declare that it implements one or more unique interfaces.
4. Each member of a union must be a super-set of all union-implemented
interfaces:
1. Let this union type be {implementingType}.
Expand Down