diff --git a/spec/Appendix C -- Grammar Summary.md b/spec/Appendix C -- Grammar Summary.md index cc464a4a6..2d9a82a4d 100644 --- a/spec/Appendix C -- Grammar Summary.md +++ b/spec/Appendix C -- Grammar Summary.md @@ -318,6 +318,11 @@ FieldsDefinition : { FieldDefinition+ } FieldDefinition : Description? Name ArgumentsDefinition? : Type Directives[Const]? +FieldExtension : + +- extend field MemberCoordinate Directives[Const] +- extend field Description MemberCoordinate + ArgumentsDefinition : ( InputValueDefinition+ ) InputValueDefinition : Description? Name : Type DefaultValue? Directives[Const]? diff --git a/spec/Section 3 -- Type System.md b/spec/Section 3 -- Type System.md index 44760852c..85d70dd24 100644 --- a/spec/Section 3 -- Type System.md +++ b/spec/Section 3 -- Type System.md @@ -1105,6 +1105,32 @@ Object type extensions have the potential to be invalid if incorrectly defined. 6. The resulting extended object type must be a super-set of all interfaces it implements. +### Field Extensions + +FieldExtension : + +- extend field MemberCoordinate Directives[Const] +- extend field Description MemberCoordinate + +Field extensions are used to represent a field which has been extended from some +previously defined field. For example this may be a GraphQL service which is +itself an extension of another GraphQL service. + +In this example, we can deprecate the id field on the User type. + +```graphql example +extend field User.name @deprecated(”Some reason”) +``` + +** Field Validation ** + +Field validation have the potential to be invalid if incorrectly defined. + +1. MemberCoordinate must be resolved to an existing field on a object or + interface type. +2. Any non-repeatable directives provided must not already apply to the previous + field. + ## Interfaces InterfaceTypeDefinition :