Skip to content

Commit 82be5c7

Browse files
add label arg to defer directive
1 parent 079bf3f commit 82be5c7

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
@@ -179,12 +179,18 @@ export const GraphQLDeferDirective = new GraphQLDirective({
179179
'Directs the executor to defer this fragment when the `if` argument is true or undefined.',
180180
locations: [
181181
DirectiveLocation.FRAGMENT_SPREAD,
182+
// TODO: Do we want to support on inline fragments? (Can we? How would you make label unique?)
182183
DirectiveLocation.INLINE_FRAGMENT,
183184
],
184185
args: {
185186
if: {
186187
type: GraphQLBoolean,
187-
description: 'Defer fragment when true or undefined.',
188+
description: 'Deferred when true or undefined.',
189+
},
190+
label: {
191+
type: GraphQLNonNull(GraphQLString),
192+
description: 'Unique name',
193+
// TODO: Add defaultValue for label?
188194
},
189195
},
190196
});

0 commit comments

Comments
 (0)