Skip to content

Commit 68547ec

Browse files
lilianammmatosrobrichard
authored andcommitted
add label arg to defer directive
1 parent 624e6fe commit 68547ec

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/type/directives.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,18 @@ export const GraphQLDeferDirective = new GraphQLDirective({
176176
'Directs the executor to defer this fragment when the `if` argument is true or undefined.',
177177
locations: [
178178
DirectiveLocation.FRAGMENT_SPREAD,
179+
// TODO: Do we want to support on inline fragments? (Can we? How would you make label unique?)
179180
DirectiveLocation.INLINE_FRAGMENT,
180181
],
181182
args: {
182183
if: {
183184
type: GraphQLBoolean,
184-
description: 'Defer fragment when true or undefined.',
185+
description: 'Deferred when true or undefined.',
186+
},
187+
label: {
188+
type: GraphQLNonNull(GraphQLString),
189+
description: 'Unique name',
190+
// TODO: Add defaultValue for label?
185191
},
186192
},
187193
});

0 commit comments

Comments
 (0)