Skip to content

Commit

Permalink
Fix stream directive validation error message (#4044)
Browse files Browse the repository at this point in the history
Fixes the error message created by the
DeferStreamDirectiveOnValidOperationsRule for the stream directive.
  • Loading branch information
Cito authored Apr 7, 2024
1 parent 13f84cd commit 8e9813f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ describe('Validate: Defer/Stream directive on valid operations', () => {
`).toDeepEqual([
{
message:
'Stream directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`.',
'Stream directive not supported on subscription operations. Disable `@stream` by setting the `if` argument to `false`.',
locations: [{ line: 4, column: 20 }],
},
]);
Expand All @@ -259,7 +259,7 @@ describe('Validate: Defer/Stream directive on valid operations', () => {
`).toDeepEqual([
{
message:
'Stream directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`.',
'Stream directive not supported on subscription operations. Disable `@stream` by setting the `if` argument to `false`.',
locations: [{ line: 8, column: 18 }],
},
]);
Expand Down Expand Up @@ -301,7 +301,7 @@ describe('Validate: Defer/Stream directive on valid operations', () => {
`).toDeepEqual([
{
message:
'Stream directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`.',
'Stream directive not supported on subscription operations. Disable `@stream` by setting the `if` argument to `false`.',
locations: [{ line: 15, column: 18 }],
},
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function DeferStreamDirectiveOnValidOperationsRule(
if (!ifArgumentCanBeFalse(node)) {
context.reportError(
new GraphQLError(
'Stream directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`.',
'Stream directive not supported on subscription operations. Disable `@stream` by setting the `if` argument to `false`.',
{ nodes: node },
),
);
Expand Down

0 comments on commit 8e9813f

Please sign in to comment.