Skip to content

Commit 304cef6

Browse files
committed
apply feedback
1 parent 06567d6 commit 304cef6

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

src/validation/__tests__/KnownOperationTypesRules-test.ts

+5-13
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,13 @@ function expectValid(queryStr: string) {
1515
describe('Validate: Known operation types', () => {
1616
it('one known operation', () => {
1717
expectValid(`
18-
{
19-
field
20-
}
18+
{ field }
2119
`);
2220
});
2321

2422
it('one unknown operation', () => {
2523
expectErrors(`
26-
mutation {
27-
field
28-
}
24+
mutation { field }
2925
`).toDeepEqual([
3026
{
3127
message: 'The mutation operation is not supported by the schema.',
@@ -36,16 +32,12 @@ describe('Validate: Known operation types', () => {
3632

3733
it('mixture of known and unknown operations', () => {
3834
expectErrors(`
39-
query {
40-
field
41-
}
42-
mutation {
43-
field
44-
}
35+
query { field }
36+
mutation { field }
4537
`).toDeepEqual([
4638
{
4739
message: 'The mutation operation is not supported by the schema.',
48-
locations: [{ line: 5, column: 7 }],
40+
locations: [{ line: 3, column: 7 }],
4941
},
5042
]);
5143
});

0 commit comments

Comments
 (0)