Disabled cypther logs and added DEBUG env var

This commit is contained in:
Grzegorz Leoniec 2019-01-09 13:12:37 +01:00
parent 7798c9fafd
commit 2571d82447
No known key found for this signature in database
GPG Key ID: 3AA43686D4EB1377
3 changed files with 6 additions and 4 deletions

View File

@ -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)) {

View File

@ -36,5 +36,5 @@ export default async function (client) {
}
})
/* eslint-disable-next-line no-console */
console.log('Seeded Data', data)
console.log('Seeded Data...')
}

View File

@ -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
}