Skip to content

Commit

Permalink
Make @stream initialCount NonNull (#4322)
Browse files Browse the repository at this point in the history
Updated to reflect spec draft
graphql/graphql-spec#1132

Also changed the argument order to match the spec draft
  • Loading branch information
robrichard authored Jan 12, 2025
1 parent 9e39e59 commit 555e2ac
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/type/directives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,11 @@ export const GraphQLStreamDirective = new GraphQLDirective({
'Directs the executor to stream plural fields when the `if` argument is true or undefined.',
locations: [DirectiveLocation.FIELD],
args: {
initialCount: {
default: { value: 0 },
type: new GraphQLNonNull(GraphQLInt),
description: 'Number of items to return immediately',
},
if: {
type: new GraphQLNonNull(GraphQLBoolean),
description: 'Stream when true or undefined.',
Expand All @@ -213,11 +218,6 @@ export const GraphQLStreamDirective = new GraphQLDirective({
type: GraphQLString,
description: 'Unique name',
},
initialCount: {
default: { value: 0 },
type: GraphQLInt,
description: 'Number of items to return immediately',
},
},
});

Expand Down

0 comments on commit 555e2ac

Please sign in to comment.