Skip to content

Commit 5350f28

Browse files
committed
add explanation about argument name uniqueness.
1 parent ffb1fcc commit 5350f28

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

spec/Section 3 -- Type System.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -873,9 +873,11 @@ of rules must be adhered to by every Object type in a GraphQL schema.
873873
characters {"__"} (two underscores).
874874
3. The field must return a type where {IsOutputType(fieldType)} returns {true}.
875875
4. For each argument of the field:
876-
1. The argument must not have a name which begins with the
876+
1. The argument must have a unique name within that field;
877+
no two arguments may share the same name.
878+
2. The argument must not have a name which begins with the
877879
characters {"__"} (two underscores).
878-
2. The argument must accept a type where {IsInputType(argumentType)}
880+
3. The argument must accept a type where {IsInputType(argumentType)}
879881
returns {true}.
880882
3. An object type may declare that it implements one or more unique interfaces.
881883
4. An object type must be a super-set of all interfaces it implements:
@@ -1217,9 +1219,11 @@ Interface types have the potential to be invalid if incorrectly defined.
12171219
3. The field must return a type where {IsOutputType(fieldType)}
12181220
returns {true}.
12191221
4. For each argument of the field:
1220-
1. The argument must not have a name which begins with the
1222+
1. The argument must have a unique name within that field;
1223+
no two arguments may share the same name.
1224+
2. The argument must not have a name which begins with the
12211225
characters {"__"} (two underscores).
1222-
2. The argument must accept a type where {IsInputType(argumentType)}
1226+
3. The argument must accept a type where {IsInputType(argumentType)}
12231227
returns {true}.
12241228
3. An interface type may declare that it implements one or more unique
12251229
interfaces, but may not implement itself.
@@ -1981,9 +1985,11 @@ repeatable directives.
19811985
3. The directive must not have a name which begins with the characters
19821986
{"__"} (two underscores).
19831987
4. For each argument of the directive:
1984-
1. The argument must not have a name which begins with the
1988+
1. The argument must have a unique name within that directive;
1989+
no two arguments may share the same name.
1990+
2. The argument must not have a name which begins with the
19851991
characters {"__"} (two underscores).
1986-
2. The argument must accept a type where {IsInputType(argumentType)}
1992+
3. The argument must accept a type where {IsInputType(argumentType)}
19871993
returns {true}.
19881994

19891995
### @skip

0 commit comments

Comments
 (0)