Skip to content

Commit fe6fd14

Browse files
committed
Fix stream directive validation error message
Replicates graphql/graphql-js@8e9813f
1 parent 4659d0a commit fe6fd14

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/graphql/validation/rules/defer_stream_directive_on_valid_operations_rule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,6 @@ def enter_directive(
8080
if not if_argument_can_be_false(node):
8181
msg = (
8282
"Stream directive not supported on subscription operations."
83-
" Disable `@defer` by setting the `if` argument to `false`."
83+
" Disable `@stream` by setting the `if` argument to `false`."
8484
)
8585
self.report_error(GraphQLError(msg, node))

tests/validation/test_defer_stream_directive_on_valid_operations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def stream_on_subscription_field():
274274
{
275275
"message": "Stream directive not supported"
276276
" on subscription operations."
277-
" Disable `@defer` by setting the `if` argument to `false`.",
277+
" Disable `@stream` by setting the `if` argument to `false`.",
278278
"locations": [(4, 26)],
279279
},
280280
],
@@ -296,7 +296,7 @@ def stream_on_fragment_on_subscription_field():
296296
{
297297
"message": "Stream directive not supported"
298298
" on subscription operations."
299-
" Disable `@defer` by setting the `if` argument to `false`.",
299+
" Disable `@stream` by setting the `if` argument to `false`.",
300300
"locations": [(8, 24)],
301301
},
302302
],
@@ -344,7 +344,7 @@ def stream_on_subscription_in_multi_operation_document():
344344
{
345345
"message": "Stream directive not supported"
346346
" on subscription operations."
347-
" Disable `@defer` by setting the `if` argument to `false`.",
347+
" Disable `@stream` by setting the `if` argument to `false`.",
348348
"locations": [(15, 24)],
349349
},
350350
],

0 commit comments

Comments
 (0)