From 486e01ddce9579e93a1a38b38f94bf16b3d621e4 Mon Sep 17 00:00:00 2001 From: Mike Aono Date: Sat, 5 Jan 2019 18:57:24 +0300 Subject: [PATCH 1/6] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 1eb8cc528..8b600351f 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,9 @@ Connect with other developers over [Discord](https://discord.gg/6ub73U3) ## Quick Start +### Forking the repository +Before you start, fork the repository using the fork button above, then clone it to your local machine using `git clone https://github.com/your-username/Nitro-Backend.git` + ### Installation with Docker Run: From b6511b9a03c6b1c039f64b8403ef266100c3b86d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 7 Jan 2019 16:06:35 +0000 Subject: [PATCH 2/6] Bump apollo-client from 2.4.7 to 2.4.8 Bumps [apollo-client](https://github.com/apollographql/apollo-client) from 2.4.7 to 2.4.8. - [Release notes](https://github.com/apollographql/apollo-client/releases) - [Changelog](https://github.com/apollographql/apollo-client/blob/master/CHANGELOG.md) - [Commits](https://github.com/apollographql/apollo-client/commits) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 7dc67ec26..5636e1283 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "license": "MIT", "dependencies": { "apollo-cache-inmemory": "~1.3.11", - "apollo-client": "~2.4.7", + "apollo-client": "~2.4.8", "apollo-link-http": "~1.5.9", "apollo-server": "~2.3.1", "bcryptjs": "~2.4.3", diff --git a/yarn.lock b/yarn.lock index 9855f96c8..1d861e0e6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1023,23 +1023,23 @@ apollo-cache-inmemory@~1.3.11: apollo-utilities "^1.0.26" optimism "^0.6.6" -apollo-cache@1.1.21, apollo-cache@^1.1.21: - version "1.1.21" - resolved "https://registry.yarnpkg.com/apollo-cache/-/apollo-cache-1.1.21.tgz#950025e2272741ba8e5064419906e3ac4072925d" - integrity sha512-5ErNb78KHtrJNimkDBTEigcvHkIqUmS7QJIk4lpZZ+XLVVgvk2fD+GhD1PLP+s8vHfAKVbO6vdbRxCCjGGrh5w== +apollo-cache@1.1.22, apollo-cache@^1.1.21: + version "1.1.22" + resolved "https://registry.yarnpkg.com/apollo-cache/-/apollo-cache-1.1.22.tgz#d4682ea6e8b2508a934f61c2fd9e36b4a65041d9" + integrity sha512-8PoxhQLISj2oHwT7i/r4l+ly4y3RKZls+dtXzAewu3U77P9dNZKhYkRNAhx9iEfsrNoHgXBV8vMp64hb1uYh+g== dependencies: - apollo-utilities "^1.0.26" + apollo-utilities "^1.0.27" -apollo-client@~2.4.7: - version "2.4.7" - resolved "https://registry.yarnpkg.com/apollo-client/-/apollo-client-2.4.7.tgz#b6712fd4c9ba346e3c44cfec7e6868e532b6a957" - integrity sha512-6aAm+16AFBYZhJF8eKxrup6AbYni01InDiwTfZhMMTP2xaXQWjsQnfaHbI2oE+hd3+AZFy1drkse8RZKghR/WQ== +apollo-client@~2.4.8: + version "2.4.8" + resolved "https://registry.yarnpkg.com/apollo-client/-/apollo-client-2.4.8.tgz#3a798f1076243465a59061d44d11bd030b68deb9" + integrity sha512-OAFbCTnGPtaIv0j+EZYzY20d+MD2JNbJ/YXZ4s0/oZlSg87bb0gjcIbccw2lnytipymZcZNr5ArFFeh0saGEwA== dependencies: "@types/zen-observable" "^0.8.0" - apollo-cache "1.1.21" + apollo-cache "1.1.22" apollo-link "^1.0.0" apollo-link-dedup "^1.0.0" - apollo-utilities "1.0.26" + apollo-utilities "1.0.27" symbol-observable "^1.0.2" zen-observable "^0.8.0" optionalDependencies: @@ -1307,10 +1307,10 @@ apollo-upload-server@^5.0.0: busboy "^0.2.14" object-path "^0.11.4" -apollo-utilities@1.0.26, apollo-utilities@^1.0.0, apollo-utilities@^1.0.1, apollo-utilities@^1.0.26: - version "1.0.26" - resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.0.26.tgz#589c66bf4d16223531351cf667a230c787def1da" - integrity sha512-URw7o3phymliqYCYatcird2YRPUU2eWCNvip64U9gQrX56mEfK4m99yBIDCMTpmcvOFsKLii1sIEZsHIs/bvnw== +apollo-utilities@1.0.27, apollo-utilities@^1.0.0, apollo-utilities@^1.0.1, apollo-utilities@^1.0.26, apollo-utilities@^1.0.27: + version "1.0.27" + resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.0.27.tgz#77c550f9086552376eca3a48e234a1466b5b057e" + integrity sha512-nzrMQ89JMpNmYnVGJ4t8zN75gQbql27UDhlxNi+3OModp0Masx5g+fQmQJ5B4w2dpRuYOsdwFLmj3lQbwOKV1Q== dependencies: fast-json-stable-stringify "^2.0.0" From ae39c189805b639cf107f6f8ad7d42256321b1c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Tue, 8 Jan 2019 14:55:33 +0100 Subject: [PATCH 3/6] Run all backend tests I accidently left `describe.only` in the test suite. That usually runs only one block of tests instead of all tests. My fault, sorry --- src/graphql-schema.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graphql-schema.test.js b/src/graphql-schema.test.js index 4956c3ab0..a58fb3599 100644 --- a/src/graphql-schema.test.js +++ b/src/graphql-schema.test.js @@ -19,7 +19,7 @@ afterEach(async () => { await app.close() }) -describe.only('login', () => { +describe('login', () => { const mutation = (params) => { const { email, password } = params return ` From 1dd852ee9f17ed4e4c6b0682788b00850696d4ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 9 Jan 2019 04:30:55 +0000 Subject: [PATCH 4/6] Bump neo4j-graphql-js from 2.1.1 to 2.2.0 Bumps [neo4j-graphql-js](https://github.com/neo4j-graphql/neo4j-graphql-js) from 2.1.1 to 2.2.0. - [Release notes](https://github.com/neo4j-graphql/neo4j-graphql-js/releases) - [Changelog](https://github.com/neo4j-graphql/neo4j-graphql-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/neo4j-graphql/neo4j-graphql-js/commits) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 5636e1283..12df68317 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "lodash": "~4.17.11", "ms": "~2.1.1", "neo4j-driver": "~1.7.2", - "neo4j-graphql-js": "~2.1.1", + "neo4j-graphql-js": "~2.2.0", "node-fetch": "~2.3.0", "npm-run-all": "~4.1.5", "passport": "~0.4.0", diff --git a/yarn.lock b/yarn.lock index 1d861e0e6..ee9b4a0df 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5393,10 +5393,10 @@ neo4j-driver@^1.7.2, neo4j-driver@~1.7.2: text-encoding "^0.6.4" uri-js "^4.2.1" -neo4j-graphql-js@~2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/neo4j-graphql-js/-/neo4j-graphql-js-2.1.1.tgz#bdb1af2fb45d1058492852ed9307586f6deab37d" - integrity sha512-OcDaFIfOKZF02jmxnWWTLQr64mu79RGAtDULfciwElW59GjRF425M2Yf4gLJuQFscnh7d+Qk/+Ng+jVbz+V4lA== +neo4j-graphql-js@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/neo4j-graphql-js/-/neo4j-graphql-js-2.2.0.tgz#f0d934b376e9476ef2aa1600e86eb1f8a74c10a2" + integrity sha512-DyYRE6wAVPKxDAHkRwiZmNYx+Vv3KVFQp2Ul1Ay4f2ahW52mWzwMFe/Rlbau3phFYSZZAeaRCT7XLBy++sg/cQ== dependencies: graphql "^14.0.2" lodash "^4.17.11" From 2571d82447acd2747e890119af38eb7bc81a705b Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Wed, 9 Jan 2019 13:12:37 +0100 Subject: [PATCH 5/6] Disabled cypther logs and added DEBUG env var --- src/graphql-schema.js | 2 +- src/seed/data/index.js | 2 +- src/server.js | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/graphql-schema.js b/src/graphql-schema.js index 9cee7ad51..33fc8b4c1 100644 --- a/src/graphql-schema.js +++ b/src/graphql-schema.js @@ -102,7 +102,7 @@ export const resolvers = { .then(async (result) => { session.close() const [currentUser] = await result.records.map(function (record) { - console.log(record.get('user')) + // console.log(record.get('user')) return record.get('user') }) if (currentUser && await bcrypt.compareSync(password, currentUser.password)) { diff --git a/src/seed/data/index.js b/src/seed/data/index.js index e66342fe3..e50fececc 100644 --- a/src/seed/data/index.js +++ b/src/seed/data/index.js @@ -36,5 +36,5 @@ export default async function (client) { } }) /* eslint-disable-next-line no-console */ - console.log('Seeded Data', data) + console.log('Seeded Data...') } diff --git a/src/server.js b/src/server.js index 3b0e0a561..9a27aeb35 100644 --- a/src/server.js +++ b/src/server.js @@ -21,6 +21,7 @@ let schema = makeExecutableSchema({ }) const driver = neo4j().getDriver() +const debug = process.env.NODE_ENV !== 'production' && process.env.DEBUG === 'true' schema = augmentSchema(schema, { query: { @@ -28,7 +29,8 @@ schema = augmentSchema(schema, { }, mutation: { exclude: ['Statistics', 'LoggedInUser'] - } + }, + debug: debug }) schema = applyScalars(applyDirectives(schema)) @@ -50,7 +52,7 @@ const createServer = (options) => { return payload }, schema: schema, - tracing: true, + tracing: debug, middlewares: middleware(schema), mocks: (process.env.MOCK === 'true') ? mocks : false } From 86c7b9338653fb7afcfd68ef172084ccf03f6641 Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Wed, 9 Jan 2019 13:14:18 +0100 Subject: [PATCH 6/6] Removed unneeded log --- src/graphql-schema.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/graphql-schema.js b/src/graphql-schema.js index 33fc8b4c1..95a62cb99 100644 --- a/src/graphql-schema.js +++ b/src/graphql-schema.js @@ -102,7 +102,6 @@ export const resolvers = { .then(async (result) => { session.close() const [currentUser] = await result.records.map(function (record) { - // console.log(record.get('user')) return record.get('user') }) if (currentUser && await bcrypt.compareSync(password, currentUser.password)) {