-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[RFC] Input Objects accepting exactly @oneField #586
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
Changes from all commits
f97b8c5
d08eae1
8bba50b
3c181d1
96182a0
bba008c
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 |
---|---|---|
|
@@ -141,6 +141,9 @@ type __Type { | |
# should be non-null for ENUM only, must be null for the others | ||
enumValues(includeDeprecated: Boolean = false): [__EnumValue!] | ||
|
||
# should be non-null for INPUT_OBJECT only, must be null for the others | ||
requiresExactlyOneField: Boolean! | ||
|
||
# should be non-null for INPUT_OBJECT only, must be null for the others | ||
inputFields: [__InputValue!] | ||
|
||
|
@@ -331,7 +334,12 @@ Fields | |
* `kind` must return `__TypeKind.INPUT_OBJECT`. | ||
* `name` must return a String. | ||
* `description` may return a String or {null}. | ||
* `requiresExactlyOneField` must return a Boolean | ||
* `inputFields`: a list of `InputValue`. | ||
* if `requiresExactlyOneField` is {true}: | ||
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. In other places we have "Type Validation" sub-sections. That would be a better place for this list set |
||
* for each {inputValue} in {inputFields} | ||
* the {type} of {inputValue} must not be Non-Null | ||
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. This answered my question on the call |
||
* the {defaultValue} of {inputValue} must be {null} | ||
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. I think this would be no defaultValue instead of 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. Spot on 👍 |
||
* All other fields must return {null}. | ||
|
||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.