-
Notifications
You must be signed in to change notification settings - Fork 1.2k
add initial outline for field extensions #1196
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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 | ||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
|
||||||||||
| 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 | ||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
| 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”) | ||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Beware of typographic quotes!
Suggested change
|
||||||||||
| ``` | ||||||||||
|
|
||||||||||
| ** Field Validation ** | ||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The "Type" here relates to "type" as in "type-system" rather than
Suggested change
|
||||||||||
|
|
||||||||||
| Field validation have the potential to be invalid if incorrectly defined. | ||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
|
||||||||||
| 1. MemberCoordinate must be resolved to an existing field on a object or | ||||||||||
| interface type. | ||||||||||
|
Comment on lines
+1129
to
+1130
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
| 2. Any non-repeatable directives provided must not already apply to the previous | ||||||||||
| field. | ||||||||||
|
|
||||||||||
| ## Interfaces | ||||||||||
|
|
||||||||||
| InterfaceTypeDefinition : | ||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description is contentious, let's remove it for now.