Skip to content

Commit 9e68e32

Browse files
authored
Merge pull request #127 from marmelab/upgrade-deps
Upgrade dependencies
2 parents 8aa8ffd + 8baf908 commit 9e68e32

File tree

6 files changed

+815
-1493
lines changed

6 files changed

+815
-1493
lines changed

package.json

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"@types/jest": "^25.2.1",
3939
"babel-eslint": "^10.0.3",
4040
"babel-jest": "^25.4.0",
41-
"babel-loader": "^8.0.6",
41+
"babel-loader": "^8.2.2",
4242
"babel-plugin-add-module-exports": "^1.0.2",
4343
"eslint": "^6.5.1",
4444
"eslint-config-prettier": "^6.4.0",
@@ -50,19 +50,17 @@
5050
"lint-staged": "^10.1.7",
5151
"prettier": "^2.0.5",
5252
"supertest": "^4.0.2",
53-
"webpack": "^4.41.0",
54-
"webpack-cli": "^3.3.9"
53+
"webpack": "^5.53.0",
54+
"webpack-cli": "^4.8.0"
5555
},
5656
"dependencies": {
57-
"apollo-client": "^2.6.4",
58-
"apollo-test-utils": "^0.3.2",
57+
"@apollo/client": "^3.4.13",
58+
"@graphql-tools/schema": "^8.2.0",
5959
"cors": "^2.8.4",
6060
"express": "^4.17.1",
61-
"express-graphql": "^0.9.0",
62-
"graphql": "^14.5.8",
63-
"graphql-tag": "^2.10.1",
64-
"graphql-tools": "^4.0.5",
65-
"graphql-type-json": "^0.3.0",
61+
"express-graphql": "^0.12.0",
62+
"graphql": "^15.6.0",
63+
"graphql-type-json": "^0.3.2",
6664
"inflection": "^1.12.0",
6765
"lodash.merge": "^4.6.2",
6866
"reify": "^0.20.12",

src/createApolloClient.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/introspection/getSchemaFromData.spec.js

Lines changed: 56 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,11 @@ test('creates three query fields per data type', () => {
129129
expect(queries['Post'].type.name).toEqual(PostType.name);
130130
expect(queries['Post'].args).toEqual([
131131
{
132+
astNode: undefined,
132133
defaultValue: undefined,
133-
description: null,
134+
description: undefined,
135+
deprecationReason: undefined,
136+
extensions: undefined,
134137
name: 'id',
135138
type: new GraphQLNonNull(GraphQLID),
136139
},
@@ -151,8 +154,11 @@ test('creates three query fields per data type', () => {
151154
expect(queries['User'].type.name).toEqual(UserType.name);
152155
expect(queries['User'].args).toEqual([
153156
{
157+
astNode: undefined,
154158
defaultValue: undefined,
155-
description: null,
159+
description: undefined,
160+
deprecationReason: undefined,
161+
extensions: undefined,
156162
name: 'id',
157163
type: new GraphQLNonNull(GraphQLID),
158164
},
@@ -178,87 +184,123 @@ test('creates three mutation fields per data type', () => {
178184
{
179185
name: 'title',
180186
type: new GraphQLNonNull(GraphQLString),
187+
astNode: undefined,
181188
defaultValue: undefined,
182-
description: null,
189+
description: undefined,
190+
deprecationReason: undefined,
191+
extensions: undefined,
183192
},
184193
{
185194
name: 'views',
186195
type: new GraphQLNonNull(GraphQLInt),
196+
astNode: undefined,
187197
defaultValue: undefined,
188-
description: null,
198+
description: undefined,
199+
deprecationReason: undefined,
200+
extensions: undefined,
189201
},
190202
{
191203
name: 'user_id',
192204
type: new GraphQLNonNull(GraphQLID),
205+
astNode: undefined,
193206
defaultValue: undefined,
194-
description: null,
207+
description: undefined,
208+
deprecationReason: undefined,
209+
extensions: undefined,
195210
},
196211
]);
197212
expect(mutations['updatePost'].type.name).toEqual(PostType.name);
198213
expect(mutations['updatePost'].args).toEqual([
199214
{
200215
name: 'id',
201216
type: new GraphQLNonNull(GraphQLID),
217+
astNode: undefined,
202218
defaultValue: undefined,
203-
description: null,
219+
description: undefined,
220+
deprecationReason: undefined,
221+
extensions: undefined,
204222
},
205223
{
206224
name: 'title',
207225
type: GraphQLString,
226+
astNode: undefined,
208227
defaultValue: undefined,
209-
description: null,
228+
description: undefined,
229+
deprecationReason: undefined,
230+
extensions: undefined,
210231
},
211232
{
212233
name: 'views',
213234
type: GraphQLInt,
235+
astNode: undefined,
214236
defaultValue: undefined,
215-
description: null,
237+
description: undefined,
238+
deprecationReason: undefined,
239+
extensions: undefined,
216240
},
217241
{
218242
name: 'user_id',
219243
type: GraphQLID,
244+
astNode: undefined,
220245
defaultValue: undefined,
221-
description: null,
246+
description: undefined,
247+
deprecationReason: undefined,
248+
extensions: undefined,
222249
},
223250
]);
224251
expect(mutations['removePost'].type.name).toEqual(PostType.name);
225252
expect(mutations['removePost'].args).toEqual([
226253
{
227254
name: 'id',
228255
type: new GraphQLNonNull(GraphQLID),
256+
astNode: undefined,
229257
defaultValue: undefined,
230-
description: null,
258+
description: undefined,
259+
deprecationReason: undefined,
260+
extensions: undefined,
231261
},
232262
]);
233263
expect(mutations['createUser'].type.name).toEqual(UserType.name);
234264
expect(mutations['createUser'].args).toEqual([
235265
{
236266
name: 'name',
237267
type: new GraphQLNonNull(GraphQLString),
268+
astNode: undefined,
238269
defaultValue: undefined,
239-
description: null,
270+
description: undefined,
271+
deprecationReason: undefined,
272+
extensions: undefined,
240273
},
241274
]);
242275
expect(mutations['updateUser'].type.name).toEqual(UserType.name);
243276
expect(mutations['updateUser'].args).toEqual([
244277
{
245278
name: 'id',
246279
type: new GraphQLNonNull(GraphQLID),
280+
astNode: undefined,
247281
defaultValue: undefined,
248-
description: null,
282+
description: undefined,
283+
deprecationReason: undefined,
284+
extensions: undefined,
249285
},
250286
{
251287
name: 'name',
252288
type: GraphQLString,
289+
astNode: undefined,
253290
defaultValue: undefined,
254-
description: null,
291+
description: undefined,
292+
deprecationReason: undefined,
293+
extensions: undefined,
255294
},
256295
]);
257296
expect(mutations['removeUser'].type.name).toEqual(UserType.name);
258297
expect(mutations['removeUser'].args).toEqual([
259298
{
299+
astNode: undefined,
260300
defaultValue: undefined,
261-
description: null,
301+
description: undefined,
302+
deprecationReason: undefined,
303+
extensions: undefined,
262304
name: 'id',
263305
type: new GraphQLNonNull(GraphQLID),
264306
},

src/schemaBuilder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { makeExecutableSchema } from 'graphql-tools';
1+
import { makeExecutableSchema } from '@graphql-tools/schema';
22
import { printSchema } from 'graphql';
33
import getSchemaFromData from './introspection/getSchemaFromData';
44
import resolver from './resolver';

webpack.config.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ let plugins = [];
66
let outputFile;
77

88
if (process.env.NODE_ENV === 'production') {
9-
outputFile = target => `${libraryName}.${target}.min.js`;
9+
outputFile = (target) => `${libraryName}.${target}.min.js`;
1010
} else {
11-
outputFile = target => `${libraryName}.${target}.js`;
11+
outputFile = (target) => `${libraryName}.${target}.js`;
1212
}
1313

1414
const defaultConfig = {
@@ -21,6 +21,11 @@ const defaultConfig = {
2121
loader: 'babel-loader',
2222
exclude: /(node_modules|bower_components)/,
2323
},
24+
{
25+
include: /node_modules/,
26+
test: /\.mjs$/,
27+
type: 'javascript/auto',
28+
},
2429
],
2530
},
2631
resolve: {

0 commit comments

Comments
 (0)