File tree Expand file tree Collapse file tree 6 files changed +30
-0
lines changed Expand file tree Collapse file tree 6 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ export {
54
54
specifiedDirectives ,
55
55
GraphQLIncludeDirective ,
56
56
GraphQLSkipDirective ,
57
+ GraphQLDeferDirective ,
57
58
GraphQLDeprecatedDirective ,
58
59
// "Enum" of Type Kinds
59
60
TypeKind ,
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ export {
55
55
specifiedDirectives ,
56
56
GraphQLIncludeDirective ,
57
57
GraphQLSkipDirective ,
58
+ GraphQLDeferDirective ,
58
59
GraphQLDeprecatedDirective ,
59
60
// "Enum" of Type Kinds
60
61
TypeKind ,
Original file line number Diff line number Diff line change @@ -54,6 +54,11 @@ export const GraphQLIncludeDirective: GraphQLDirective;
54
54
*/
55
55
export const GraphQLSkipDirective : GraphQLDirective ;
56
56
57
+ /**
58
+ * Used to conditionally defer fragments.
59
+ */
60
+ export const GraphQLDeferDirective : GraphQLDirective ;
61
+
57
62
/**
58
63
* Constant string used for default reason for a deprecation.
59
64
*/
Original file line number Diff line number Diff line change @@ -167,6 +167,26 @@ export const GraphQLSkipDirective = new GraphQLDirective({
167
167
} ,
168
168
} ) ;
169
169
170
+ /**
171
+ * Used to conditionally defer fragments.
172
+ */
173
+ export const GraphQLDeferDirective = new GraphQLDirective ( {
174
+ name : 'defer' ,
175
+ description :
176
+ 'Directs the executor to defer fragment when the `if` argument is true.' ,
177
+ locations : [ DirectiveLocation . FRAGMENT_SPREAD ] ,
178
+ args : {
179
+ if : {
180
+ type : GraphQLBoolean ,
181
+ description : 'Deferred when true.' ,
182
+ } ,
183
+ label : {
184
+ type : GraphQLNonNull ( GraphQLString ) ,
185
+ description : 'label' ,
186
+ } ,
187
+ } ,
188
+ } ) ;
189
+
170
190
/**
171
191
* Constant string used for default reason for a deprecation.
172
192
*/
@@ -195,6 +215,7 @@ export const GraphQLDeprecatedDirective = new GraphQLDirective({
195
215
export const specifiedDirectives = Object . freeze ( [
196
216
GraphQLIncludeDirective ,
197
217
GraphQLSkipDirective ,
218
+ GraphQLDeferDirective ,
198
219
GraphQLDeprecatedDirective ,
199
220
] ) ;
200
221
Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ export {
114
114
specifiedDirectives ,
115
115
GraphQLIncludeDirective ,
116
116
GraphQLSkipDirective ,
117
+ GraphQLDeferDirective ,
117
118
GraphQLDeprecatedDirective ,
118
119
// Constant Deprecation Reason
119
120
DEFAULT_DEPRECATION_REASON ,
Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ export {
78
78
specifiedDirectives ,
79
79
GraphQLIncludeDirective ,
80
80
GraphQLSkipDirective ,
81
+ GraphQLDeferDirective ,
81
82
GraphQLDeprecatedDirective ,
82
83
// Constant Deprecation Reason
83
84
DEFAULT_DEPRECATION_REASON ,
You can’t perform that action at this time.
0 commit comments