Skip to content

Commit d23e5de

Browse files
authored
Fix comments in defer/stream validation rules (#3781)
1 parent 4a01b69 commit d23e5de

4 files changed

+4
-4
lines changed

src/validation/__tests__/DeferStreamDirectiveOnRootFieldRule-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ describe('Validate: Defer/Stream directive on root field', () => {
160160
expectValid(`
161161
subscription {
162162
subscriptionField {
163-
...nestedFragment
163+
...nestedFragment @defer
164164
}
165165
}
166166
fragment nestedFragment on Message {

src/validation/rules/DeferStreamDirectiveLabelRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
import type { ValidationContext } from '../ValidationContext.js';
1212

1313
/**
14-
* Stream directive on list field
14+
* Defer and stream directive labels are unique
1515
*
1616
* A GraphQL document is only valid if defer and stream directives' label argument is static and unique.
1717
*/

src/validation/rules/DeferStreamDirectiveOnRootFieldRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
import type { ValidationContext } from '../ValidationContext.js';
1111

1212
/**
13-
* Stream directive on list field
13+
* Defer and stream directives are used on valid root field
1414
*
1515
* A GraphQL document is only valid if defer directives are not used on root mutation or subscription types.
1616
*/

src/validation/rules/StreamDirectiveOnListFieldRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { GraphQLStreamDirective } from '../../type/directives.js';
99
import type { ValidationContext } from '../ValidationContext.js';
1010

1111
/**
12-
* Stream directive on list field
12+
* Stream directives are used on list fields
1313
*
1414
* A GraphQL document is only valid if stream directives are used on list fields.
1515
*/

0 commit comments

Comments
 (0)