Skip to content

Commit dd01564

Browse files
committed
chore: update dependencies
1 parent 346ba26 commit dd01564

File tree

6 files changed

+437
-354
lines changed

6 files changed

+437
-354
lines changed

.vscode/launch.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Jest",
9+
"type": "node",
10+
"request": "launch",
11+
"program": "${workspaceFolder}/node_modules/.bin/jest",
12+
"args": ["--runInBand", "--watch"],
13+
"cwd": "${workspaceFolder}",
14+
"console": "integratedTerminal",
15+
"internalConsoleOptions": "neverOpen",
16+
"disableOptimisticBPs": true
17+
},
18+
{
19+
"name": "Jest Current File",
20+
"type": "node",
21+
"request": "launch",
22+
"program": "${workspaceFolder}/node_modules/.bin/jest",
23+
"args": [
24+
"${fileBasenameNoExtension}",
25+
"--config",
26+
"jest.config.js"
27+
],
28+
"console": "integratedTerminal",
29+
"internalConsoleOptions": "neverOpen",
30+
"disableOptimisticBPs": true
31+
}
32+
]
33+
}

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function addExample(example, uri) {
3939
graphqlHTTP(() => ({
4040
schema: example.schema,
4141
graphiql: true,
42-
formatError: error => ({
42+
customFormatErrorFn: error => ({
4343
message: error.message,
4444
stack: !error.message.match(/for security reason/i) ? error.stack.split('\n') : null,
4545
}),

jest.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
// moduleNameMapper: {
3+
// '^app(.*)$': '<rootDir>/src$1',
4+
// },
5+
moduleFileExtensions: ['js'],
6+
testMatch: ['**/__tests__/**/*-test.(ts|js)'],
7+
roots: ['<rootDir>/examples'],
8+
};

mongooseConnection.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,16 @@ const opts = {
99
autoReconnect: true,
1010
reconnectTries: Number.MAX_VALUE,
1111
reconnectInterval: 1000,
12+
useNewUrlParser: true,
1213
};
1314

14-
mongoose.connect(
15-
mongoUri,
16-
opts
17-
);
15+
mongoose.connect(mongoUri, opts);
1816

1917
export const { connection } = mongoose;
2018
connection.on('error', e => {
2119
if (e.message.code === 'ETIMEDOUT') {
2220
console.log(e);
23-
mongoose.connect(
24-
mongoUri,
25-
opts
26-
);
21+
mongoose.connect(mongoUri, opts);
2722
}
2823
console.log(e);
2924
});

package.json

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -27,50 +27,45 @@
2727
},
2828
"homepage": "https://github.com/nodkz/graphql-compose-examples",
2929
"dependencies": {
30-
"@babel/cli": "^7.4.3",
31-
"@babel/core": "^7.4.3",
30+
"@babel/cli": "^7.4.4",
31+
"@babel/core": "^7.4.4",
3232
"@babel/node": "^7.2.2",
33-
"@babel/plugin-proposal-object-rest-spread": "^7.4.3",
34-
"@babel/plugin-transform-flow-strip-types": "^7.4.0",
35-
"@babel/preset-env": "^7.4.3",
33+
"@babel/plugin-proposal-object-rest-spread": "^7.4.4",
34+
"@babel/plugin-transform-flow-strip-types": "^7.4.4",
35+
"@babel/preset-env": "^7.4.4",
3636
"@babel/preset-flow": "^7.0.0",
37-
"aws-sdk": "^2.437.0",
37+
"aws-sdk": "^2.444.0",
3838
"cors": "^2.8.5",
3939
"elasticsearch": "^15.4.1",
4040
"express": "^4.16.4",
41-
"express-graphql": "^0.7.1",
41+
"express-graphql": "^0.8.0",
4242
"graphql": "14.2.1",
43-
"graphql-compose": "^6.2.0",
44-
"graphql-compose-aws": "^3.0.0",
45-
"graphql-compose-connection": "^5.0.0",
46-
"graphql-compose-elasticsearch": "^3.1.0",
47-
"graphql-compose-mongoose": "^6.1.0",
48-
"graphql-compose-pagination": "^5.1.0",
49-
"graphql-compose-relay": "^4.0.0",
43+
"graphql-compose": "^7.0.1",
44+
"graphql-compose-aws": "^4.0.0",
45+
"graphql-compose-connection": "^6.0.2",
46+
"graphql-compose-elasticsearch": "^4.0.0",
47+
"graphql-compose-mongoose": "^7.0.1",
48+
"graphql-compose-pagination": "^6.0.2",
49+
"graphql-compose-relay": "^5.0.1",
5050
"graphql-playground-middleware-express": "^1.7.12",
51-
"mongoose": "^5.4.22"
51+
"mongoose": "^5.5.4"
5252
},
5353
"devDependencies": {
5454
"babel-core": "^7.0.0-bridge.0",
5555
"babel-eslint": "^10.0.1",
5656
"babel-jest": "^24.7.1",
5757
"eslint": "^5.16.0",
5858
"eslint-config-airbnb-base": "^13.1.0",
59-
"eslint-config-prettier": "^4.1.0",
60-
"eslint-plugin-import": "^2.16.0",
59+
"eslint-config-prettier": "^4.2.0",
60+
"eslint-plugin-import": "^2.17.2",
6161
"eslint-plugin-prettier": "^3.0.1",
62-
"flow-bin": "0.96.0",
62+
"flow-bin": "0.98.0",
6363
"jest": "^24.7.1",
64-
"mongodb-memory-server": "^4.2.2",
65-
"nodemon": "^1.18.10",
66-
"prettier": "^1.16.4",
64+
"mongodb-memory-server": "^5.1.0",
65+
"nodemon": "^1.18.11",
66+
"prettier": "^1.17.0",
6767
"request": "^2.88.0"
6868
},
69-
"jest": {
70-
"roots": [
71-
"<rootDir>/examples"
72-
]
73-
},
7469
"scripts": {
7570
"build": "npm run buildSchema",
7671
"seed": "./node_modules/.bin/babel-node ./scripts/seed.js",

0 commit comments

Comments
 (0)