Skip to content

Commit 02eb9c8

Browse files
committed
fix: update graphql till v15.0.0 and other dependencies
1 parent 07226af commit 02eb9c8

File tree

5 files changed

+621
-591
lines changed

5 files changed

+621
-591
lines changed

package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,23 @@
1919
"devDependencies": {
2020
"@types/dedent": "0.7.0",
2121
"@types/glob": "7.1.1",
22-
"@types/jest": "25.1.2",
23-
"@types/node": "13.7.1",
24-
"@typescript-eslint/eslint-plugin": "2.19.2",
25-
"@typescript-eslint/parser": "2.19.2",
26-
"apollo-server": "2.10.1",
22+
"@types/jest": "25.2.1",
23+
"@types/node": "13.11.0",
24+
"@typescript-eslint/eslint-plugin": "2.26.0",
25+
"@typescript-eslint/parser": "2.26.0",
26+
"apollo-server": "2.11.0",
2727
"eslint": "6.8.0",
28-
"eslint-config-prettier": "6.10.0",
28+
"eslint-config-prettier": "6.10.1",
2929
"eslint-plugin-prettier": "3.1.2",
30-
"graphql": "14.6.0",
31-
"graphql-compose": "7.12.0",
32-
"jest": "25.1.0",
33-
"prettier": "1.19.1",
30+
"graphql": "15.0.0",
31+
"graphql-compose": "7.14.1",
32+
"jest": "25.2.7",
33+
"prettier": "2.0.2",
3434
"rimraf": "3.0.2",
35-
"semantic-release": "17.0.3",
36-
"ts-jest": "25.2.0",
37-
"ts-node": "8.6.2",
38-
"typescript": "3.7.5"
35+
"semantic-release": "17.0.4",
36+
"ts-jest": "25.3.1",
37+
"ts-node": "8.8.2",
38+
"typescript": "3.8.3"
3939
},
4040
"scripts": {
4141
"watch": "jest --watch",
Lines changed: 43 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,10 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`astToSchema() Schema ./__testSchema__ schema 1`] = `
4-
"type Mutation {
5-
logs: MutationLogs
6-
auth: MutationAuth
7-
user: MutationUser
8-
}
9-
10-
type MutationAuth {
11-
# Login operation
12-
login(email: String, password: String): Boolean
13-
logout: Boolean
14-
nested: MutationAuthNested
15-
}
16-
17-
type MutationAuthNested {
18-
method: Boolean
19-
}
20-
21-
type MutationLogs {
22-
nested: MutationLogsNested
23-
}
24-
25-
type MutationLogsNested {
26-
list: Boolean
27-
}
28-
29-
type MutationUser {
30-
create: Boolean
31-
update: Boolean
4+
"\\"\\"\\"\\"\\"\\"
5+
schema {
6+
query: Query
7+
mutation: Mutation
328
}
339
3410
type Query {
@@ -39,15 +15,6 @@ type Query {
3915
auth: QueryAuth
4016
}
4117
42-
type QueryAuth {
43-
isLoggedIn: Boolean
44-
nested: QueryAuthNested
45-
}
46-
47-
type QueryAuthNested {
48-
method: Boolean
49-
}
50-
5118
type QueryMe {
5219
address: QueryMeAddress
5320
name: String
@@ -77,5 +44,44 @@ type UserAwesomeType {
7744
type UserExtendedData {
7845
starsCount: Int
7946
}
47+
48+
type QueryAuth {
49+
isLoggedIn: Boolean
50+
nested: QueryAuthNested
51+
}
52+
53+
type QueryAuthNested {
54+
method: Boolean
55+
}
56+
57+
type Mutation {
58+
logs: MutationLogs
59+
auth: MutationAuth
60+
user: MutationUser
61+
}
62+
63+
type MutationLogs {
64+
nested: MutationLogsNested
65+
}
66+
67+
type MutationLogsNested {
68+
list: Boolean
69+
}
70+
71+
type MutationAuth {
72+
# Login operation
73+
login(email: String, password: String): Boolean
74+
logout: Boolean
75+
nested: MutationAuthNested
76+
}
77+
78+
type MutationAuthNested {
79+
method: Boolean
80+
}
81+
82+
type MutationUser {
83+
create: Boolean
84+
update: Boolean
85+
}
8086
"
8187
`;

src/__tests__/astToSchema-test.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,13 @@ describe('astToSchema()', () => {
8585
// check that fields from sibling files was added
8686
expect(sc.Query.getFieldOTC('me').getFieldTypeName('name')).toBe('String');
8787
expect((sc.Query.getFieldOTC('me').getFieldConfig('name') as any).resolve()).toBe('nodkz');
88-
expect(
89-
sc.Query.getFieldOTC('me')
90-
.getFieldOTC('address')
91-
.getTypeName()
92-
).toBe('QueryMeAddress');
93-
expect(
94-
sc.Query.getFieldOTC('me')
95-
.getFieldOTC('address')
96-
.getFieldNames()
97-
.sort()
98-
).toEqual(['city', 'street']);
88+
expect(sc.Query.getFieldOTC('me').getFieldOTC('address').getTypeName()).toBe(
89+
'QueryMeAddress'
90+
);
91+
expect(sc.Query.getFieldOTC('me').getFieldOTC('address').getFieldNames().sort()).toEqual([
92+
'city',
93+
'street',
94+
]);
9995
});
10096
});
10197

src/testHelpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function _getArgsForQuery(
8282
};
8383
}
8484

85-
export async function testOperation(opts: RunQueryOpts): Promise<ExecutionResult<any>> {
85+
export async function testOperation(opts: RunQueryOpts): Promise<ExecutionResult> {
8686
const schema = testBuildSchema(opts.fc, opts.schemaComposer);
8787

8888
const res = await graphql({

0 commit comments

Comments
 (0)