File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -94,10 +94,14 @@ lines and uniform indentation with {BlockStringValue()}.
94
94
Document : Definition+
95
95
96
96
Definition :
97
+ - DocumentDirective
97
98
- ExecutableDefinition
98
99
- TypeSystemDefinition
99
100
- TypeSystemExtension
100
101
102
+ DocumentDirective :
103
+ - Directive[ Const]
104
+
101
105
ExecutableDefinition :
102
106
- OperationDefinition
103
107
- FragmentDefinition
Original file line number Diff line number Diff line change @@ -172,6 +172,7 @@ characters to support interoperation with as many other systems as possible.
172
172
Document : Definition+
173
173
174
174
Definition :
175
+ - DocumentDirective
175
176
- ExecutableDefinition
176
177
- TypeSystemDefinition
177
178
- TypeSystemExtension
@@ -1094,3 +1095,24 @@ and operations.
1094
1095
1095
1096
As future versions of GraphQL adopt new configurable execution capabilities,
1096
1097
they may be exposed via directives.
1098
+
1099
+
1100
+ ## Document Directives
1101
+
1102
+ DocumentDirective :
1103
+ - Directive[ Const]
1104
+
1105
+ {DocumentDirective} is special kind of {Definition} and should be handled
1106
+ on AST level by implementation in similar way like {TypeSystemDefinition}
1107
+ or {ExecutableDefinition}.
1108
+
1109
+ Documents of any kind may contain zero or more {DocumentDirective}s.
1110
+ Same directive may be repeated multiple times at document level:
1111
+
1112
+ ``` graphql example
1113
+ @import (from : " ./common" )
1114
+ @import (from : " ./user" )
1115
+ ```
1116
+
1117
+ Unknown directives may be ignored , but it is recommended for services to fail
1118
+ if directive is not recognized .
You can’t perform that action at this time.
0 commit comments