Skip to content

Commit 5741ea7

Browse files
committed
[RFC] Implementations of interfaces can include additional field arguments
This proposal extends the definition of a legal implementation of an interface to allow for additional field arguments, provided that those arguments are not required. ``` interface I { field(arg: String): String } type T implements I { field(arg: String, other: String): String } type T implements I { field(arg: String, other String!): String } ```
1 parent d8a52f1 commit 5741ea7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spec/Section 3 -- Type System.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,10 +410,12 @@ of rules must be adhered to by every Object type in a GraphQL schema.
410410
defined in an interface.
411411
1. The object field must be of a type which is equal to the
412412
interface field (invariant).
413-
2. The object field must include the exact same set of named arguments as
414-
defined by the interface field.
413+
2. The object field must include an argument of the same name for every
414+
argument defined in the interface field.
415415
1. The object field argument must accept the same type (invariant) as
416416
the interface field argument.
417+
3. The object field may include additional arguments not defined in the
418+
interface field, but any additional argument must not be required.
417419

418420

419421
### Interfaces

0 commit comments

Comments
 (0)