Skip to content

Commit 3fcc954

Browse files
committed
add explanation about argument name uniquess.
1 parent c976d31 commit 3fcc954

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
@@ -814,9 +814,11 @@ of rules must be adhered to by every Object type in a GraphQL schema.
814814
characters {"__"} (two underscores).
815815
3. The field must return a type where {IsOutputType(fieldType)} returns {true}.
816816
4. For each argument of the field:
817-
1. The argument must not have a name which begins with the
817+
1. The argument must have a unique name within that field;
818+
no two arguments may share the same name.
819+
2. The argument must not have a name which begins with the
818820
characters {"__"} (two underscores).
819-
2. The argument must accept a type where {IsInputType(argumentType)}
821+
3. The argument must accept a type where {IsInputType(argumentType)}
820822
returns {true}.
821823
3. An object type may declare that it implements one or more unique interfaces.
822824
4. An object type must be a super-set of all interfaces it implements:
@@ -1156,9 +1158,11 @@ Interface types have the potential to be invalid if incorrectly defined.
11561158
3. The field must return a type where {IsOutputType(fieldType)}
11571159
returns {true}.
11581160
4. For each argument of the field:
1159-
1. The argument must not have a name which begins with the
1161+
1. The argument must have a unique name within that field;
1162+
no two arguments may share the same name.
1163+
2. The argument must not have a name which begins with the
11601164
characters {"__"} (two underscores).
1161-
2. The argument must accept a type where {IsInputType(argumentType)}
1165+
3. The argument must accept a type where {IsInputType(argumentType)}
11621166
returns {true}.
11631167
3. An interface type may declare that it implements one or more unique
11641168
interfaces, but may not implement itself.
@@ -1844,9 +1848,11 @@ repeatable directives.
18441848
3. The directive must not have a name which begins with the characters
18451849
{"__"} (two underscores).
18461850
4. For each argument of the directive:
1847-
1. The argument must not have a name which begins with the
1851+
1. The argument must have a unique name within that directive;
1852+
no two arguments may share the same name.
1853+
2. The argument must not have a name which begins with the
18481854
characters {"__"} (two underscores).
1849-
2. The argument must accept a type where {IsInputType(argumentType)}
1855+
3. The argument must accept a type where {IsInputType(argumentType)}
18501856
returns {true}.
18511857

18521858
### @skip

0 commit comments

Comments
 (0)