Skip to content

Commit ea3c6ef

Browse files
authored
Ensure validation of directive arguments (#463)
naming requirements and input type
1 parent a7fca2d commit ea3c6ef

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

spec/Section 3 -- Type System.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,8 @@ of rules must be adhered to by every Object type in a GraphQL schema.
801801
4. For each argument of the field:
802802
1. The argument must not have a name which begins with the
803803
characters {"__"} (two underscores).
804-
2. The argument must accept a type where {IsInputType(argumentType)} returns {true}.
804+
2. The argument must accept a type where {IsInputType(argumentType)}
805+
returns {true}.
805806
4. An object type may declare that it implements one or more unique interfaces.
806807
5. An object type must be a super-set of all interfaces it implements:
807808
1. The object type must include a field of the same name for every field
@@ -1698,7 +1699,13 @@ directive @invalidExample(arg: String @invalidExample) on ARGUMENT_DEFINITION
16981699
2. A directive definition must not contain the use of a directive which
16991700
references itself indirectly by referencing a Type or Directive which
17001701
transitively includes a reference to this directive.
1701-
1702+
3. The directive must not have a name which begins with the characters
1703+
{"__"} (two underscores).
1704+
4. For each argument of the directive:
1705+
1. The argument must not have a name which begins with the
1706+
characters {"__"} (two underscores).
1707+
2. The argument must accept a type where {IsInputType(argumentType)}
1708+
returns {true}.
17021709

17031710
### @skip
17041711

0 commit comments

Comments
 (0)