Skip to content

Commit 6cefeb8

Browse files
committed
chore: update dependencies and fix tests for graphql 16.1
1 parent 5574f2b commit 6cefeb8

File tree

6 files changed

+908
-1369
lines changed

6 files changed

+908
-1369
lines changed

package.json

+15-15
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,28 @@
1818
},
1919
"devDependencies": {
2020
"@types/dedent": "0.7.0",
21-
"@types/glob": "7.1.4",
22-
"@types/jest": "27.0.2",
21+
"@types/glob": "7.2.0",
22+
"@types/jest": "27.0.3",
2323
"@types/lodash.sortby": "^4.7.6",
24-
"@types/node": "16.10.8",
25-
"@typescript-eslint/eslint-plugin": "5.0.0",
26-
"@typescript-eslint/parser": "5.0.0",
27-
"apollo-server": "2.25.0",
28-
"eslint": "7.32.0",
24+
"@types/node": "17.0.0",
25+
"@typescript-eslint/eslint-plugin": "5.7.0",
26+
"@typescript-eslint/parser": "5.7.0",
27+
"apollo-server": "3.5.0",
28+
"eslint": "8.4.1",
2929
"eslint-config-prettier": "8.3.0",
3030
"eslint-plugin-prettier": "4.0.0",
31-
"graphql": "15.6.0",
32-
"graphql-compose": "9.0.3",
33-
"jest": "27.2.5",
31+
"graphql": "16.1.0",
32+
"graphql-compose": "9.0.5",
33+
"jest": "27.4.5",
3434
"jest-junit": "^13.0.0",
3535
"lodash.sortby": "^4.7.0",
36-
"prettier": "2.4.1",
36+
"prettier": "2.5.1",
3737
"rimraf": "3.0.2",
38-
"semantic-release": "17.4.7",
39-
"ts-jest": "27.0.5",
40-
"ts-node": "10.3.0",
38+
"semantic-release": "18.0.1",
39+
"ts-jest": "27.1.1",
40+
"ts-node": "10.4.0",
4141
"ts-node-dev": "1.1.8",
42-
"typescript": "4.4.4"
42+
"typescript": "4.5.4"
4343
},
4444
"scripts": {
4545
"watch": "jest --watch",

src/__tests__/__snapshots__/astToSchema-test.ts.snap

+2-3
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ type MutationLogsNested {
6363
}
6464
6565
type MutationAuth {
66-
# Login operation
66+
\\"\\"\\"Login operation\\"\\"\\"
6767
login(email: String, password: String): Boolean
6868
logout: Boolean
6969
nested: MutationAuthNested
@@ -76,6 +76,5 @@ type MutationAuthNested {
7676
type MutationUser {
7777
create: Boolean
7878
update: Boolean
79-
}
80-
"
79+
}"
8180
`;

src/__tests__/astToSchema-test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('astToSchema()', () => {
1515
});
1616

1717
it('schema', async () => {
18-
const printedSchema = await printSchema(sc.buildSchema(), { commentDescriptions: true });
18+
const printedSchema = await printSchema(sc.buildSchema());
1919
expect(printedSchema).toMatchSnapshot();
2020
});
2121
});

src/__tests__/astVisitor-test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -194,16 +194,16 @@ describe('astVisitor', () => {
194194
},
195195
});
196196
const schema = astToSchema(ast).buildSchema();
197-
const result = await graphql(
197+
const result = await graphql({
198198
schema,
199-
`
199+
source: `
200200
mutation {
201201
auth {
202202
login(email: "[email protected]", password: "123")
203203
}
204204
}
205-
`
206-
);
205+
`,
206+
});
207207
expect(result).toEqual({ data: { auth: { login: true } } });
208208
expect(logs).toEqual([
209209
{

src/testHelpers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export async function testOperationData(
115115
throw new Error((res?.errors?.[0] as any) || 'GraphQL Error');
116116
}
117117

118-
return res?.data?.field;
118+
return res?.data?.field as any;
119119
}
120120

121121
export async function testOperationErrors(

0 commit comments

Comments
 (0)