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

Add explanation about argument name uniqueness. #891

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 10 additions & 4 deletions spec/Section 3 -- Type System.md
Expand Up @@ -878,9 +878,11 @@ of rules must be adhered to by every Object type in a GraphQL schema.
4. For each argument of the field:
1. The argument must not have a name which begins with the characters
{"\_\_"} (two underscores).
2. The argument must accept a type where {IsInputType(argumentType)}
2. The argument must have a unique name within that field; no two
arguments may share the same name.
3. The argument must accept a type where {IsInputType(argumentType)}
returns {true}.
3. If argument type is Non-Null and a default value is not defined:
4. If argument type is Non-Null and a default value is not defined:
- The `@deprecated` directive must not be applied to this argument.
3. An object type may declare that it implements one or more unique interfaces.
4. An object type must be a super-set of all interfaces it implements:
Expand Down Expand Up @@ -1228,7 +1230,9 @@ Interface types have the potential to be invalid if incorrectly defined.
4. For each argument of the field:
1. The argument must not have a name which begins with the characters
{"\_\_"} (two underscores).
2. The argument must accept a type where {IsInputType(argumentType)}
2. The argument must have a unique name within that field; no two
arguments may share the same name.
3. The argument must accept a type where {IsInputType(argumentType)}
returns {true}.
3. An interface type may declare that it implements one or more unique
interfaces, but may not implement itself.
Expand Down Expand Up @@ -2004,7 +2008,9 @@ repeatable directives.
4. For each argument of the directive:
1. The argument must not have a name which begins with the characters
{"\_\_"} (two underscores).
2. The argument must accept a type where {IsInputType(argumentType)} returns
2. The argument must have a unique name within that directive; no two
arguments may share the same name.
3. The argument must accept a type where {IsInputType(argumentType)} returns
{true}.

### @skip
Expand Down