Skip to content

Commit 8e9813f

Browse files
authored
Fix stream directive validation error message (#4044)
Fixes the error message created by the DeferStreamDirectiveOnValidOperationsRule for the stream directive.
1 parent 13f84cd commit 8e9813f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/validation/__tests__/DeferStreamDirectiveOnValidOperationsRule-test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ describe('Validate: Defer/Stream directive on valid operations', () => {
241241
`).toDeepEqual([
242242
{
243243
message:
244-
'Stream directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`.',
244+
'Stream directive not supported on subscription operations. Disable `@stream` by setting the `if` argument to `false`.',
245245
locations: [{ line: 4, column: 20 }],
246246
},
247247
]);
@@ -259,7 +259,7 @@ describe('Validate: Defer/Stream directive on valid operations', () => {
259259
`).toDeepEqual([
260260
{
261261
message:
262-
'Stream directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`.',
262+
'Stream directive not supported on subscription operations. Disable `@stream` by setting the `if` argument to `false`.',
263263
locations: [{ line: 8, column: 18 }],
264264
},
265265
]);
@@ -301,7 +301,7 @@ describe('Validate: Defer/Stream directive on valid operations', () => {
301301
`).toDeepEqual([
302302
{
303303
message:
304-
'Stream directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`.',
304+
'Stream directive not supported on subscription operations. Disable `@stream` by setting the `if` argument to `false`.',
305305
locations: [{ line: 15, column: 18 }],
306306
},
307307
]);

src/validation/rules/DeferStreamDirectiveOnValidOperationsRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export function DeferStreamDirectiveOnValidOperationsRule(
7070
if (!ifArgumentCanBeFalse(node)) {
7171
context.reportError(
7272
new GraphQLError(
73-
'Stream directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`.',
73+
'Stream directive not supported on subscription operations. Disable `@stream` by setting the `if` argument to `false`.',
7474
{ nodes: node },
7575
),
7676
);

0 commit comments

Comments
 (0)