File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ export {
6262 specifiedDirectives ,
6363 GraphQLIncludeDirective ,
6464 GraphQLSkipDirective ,
65+ GraphQLDeferDirective ,
6566 GraphQLDeprecatedDirective ,
6667 GraphQLSpecifiedByDirective ,
6768 // "Enum" of Type Kinds
Original file line number Diff line number Diff line change @@ -165,6 +165,29 @@ export const GraphQLSkipDirective: GraphQLDirective = new GraphQLDirective({
165165 } ,
166166} ) ;
167167
168+ /**
169+ * Used to conditionally defer fragments.
170+ */
171+ export const GraphQLDeferDirective = new GraphQLDirective ( {
172+ name : 'defer' ,
173+ description :
174+ 'Directs the executor to defer this fragment when the `if` argument is true or undefined.' ,
175+ locations : [
176+ DirectiveLocation . FRAGMENT_SPREAD ,
177+ DirectiveLocation . INLINE_FRAGMENT ,
178+ ] ,
179+ args : {
180+ if : {
181+ type : GraphQLBoolean ,
182+ description : 'Deferred when true or undefined.' ,
183+ } ,
184+ label : {
185+ type : GraphQLString ,
186+ description : 'Unique name' ,
187+ } ,
188+ } ,
189+ } ) ;
190+
168191/**
169192 * Constant string used for default reason for a deprecation.
170193 */
Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ export {
133133 specifiedDirectives ,
134134 GraphQLIncludeDirective ,
135135 GraphQLSkipDirective ,
136+ GraphQLDeferDirective ,
136137 GraphQLDeprecatedDirective ,
137138 GraphQLSpecifiedByDirective ,
138139 // Constant Deprecation Reason
You can’t perform that action at this time.
0 commit comments