Skip to content

Commit

Permalink
Fix stream directive validation error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito committed Apr 5, 2024
1 parent a81e623 commit a4bb046
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 a4bb046

Please sign in to comment.