Skip to content

Commit

Permalink
directive validation consistency edits
Browse files Browse the repository at this point in the history
- add requirement that DirectiveLocations is non empty
- Validation -> TypeValidation
- s/directive/Directive in most places
  • Loading branch information
jbellenger committed Apr 2, 2024
1 parent 4ab71e3 commit 71a76ed
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions spec/Section 3 -- Type System.md
Original file line number Diff line number Diff line change
Expand Up @@ -2033,19 +2033,20 @@ directive @invalidExample(arg: String @invalidExample) on ARGUMENT_DEFINITION
Note: The order in which directives appear may be significant, including
repeatable directives.

**Validation**
**Type Validation**

1. A directive definition must not contain the use of a directive which
1. A Directive definition must include at least one DirectiveLocation
2. A Directive definition must not contain the use of a Directive which
references itself directly.
2. A directive definition must not contain the use of a directive which
3. A Directive definition must not contain the use of a Directive which
references itself indirectly by referencing a Type or Directive which
transitively includes a reference to this directive.
3. The directive must not have a name which begins with the characters {"\_\_"}
4. The Directive must not have a name which begins with the characters {"\_\_"}
(two underscores).
4. For each argument of the directive:
5. 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 have a unique name within that directive; no two
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}.
Expand Down

0 comments on commit 71a76ed

Please sign in to comment.