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 {
5454 specifiedDirectives ,
5555 GraphQLIncludeDirective ,
5656 GraphQLSkipDirective ,
57+ GraphQLDeferDirective ,
5758 GraphQLDeprecatedDirective ,
5859 // "Enum" of Type Kinds
5960 TypeKind ,
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ export {
5555 specifiedDirectives ,
5656 GraphQLIncludeDirective ,
5757 GraphQLSkipDirective ,
58+ GraphQLDeferDirective ,
5859 GraphQLDeprecatedDirective ,
5960 // "Enum" of Type Kinds
6061 TypeKind ,
Original file line number Diff line number Diff line change @@ -54,6 +54,11 @@ export const GraphQLIncludeDirective: GraphQLDirective;
5454 */
5555export const GraphQLSkipDirective : GraphQLDirective ;
5656
57+ /**
58+ * Used to conditionally defer fragments.
59+ */
60+ export const GraphQLDeferDirective : GraphQLDirective ;
61+
5762/**
5863 * Constant string used for default reason for a deprecation.
5964 */
Original file line number Diff line number Diff line change @@ -167,6 +167,26 @@ export const GraphQLSkipDirective = new GraphQLDirective({
167167 } ,
168168} ) ;
169169
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+
170190/**
171191 * Constant string used for default reason for a deprecation.
172192 */
@@ -195,6 +215,7 @@ export const GraphQLDeprecatedDirective = new GraphQLDirective({
195215export const specifiedDirectives = Object . freeze ( [
196216 GraphQLIncludeDirective ,
197217 GraphQLSkipDirective ,
218+ GraphQLDeferDirective ,
198219 GraphQLDeprecatedDirective ,
199220] ) ;
200221
Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ export {
114114 specifiedDirectives ,
115115 GraphQLIncludeDirective ,
116116 GraphQLSkipDirective ,
117+ GraphQLDeferDirective ,
117118 GraphQLDeprecatedDirective ,
118119 // Constant Deprecation Reason
119120 DEFAULT_DEPRECATION_REASON ,
Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ export {
7878 specifiedDirectives ,
7979 GraphQLIncludeDirective ,
8080 GraphQLSkipDirective ,
81+ GraphQLDeferDirective ,
8182 GraphQLDeprecatedDirective ,
8283 // Constant Deprecation Reason
8384 DEFAULT_DEPRECATION_REASON ,
You can’t perform that action at this time.
0 commit comments