fixing console log issues

This commit is contained in:
Grzegorz Leoniec 2018-12-07 20:30:40 +01:00
parent e22f950c48
commit 034fea3f47
No known key found for this signature in database
GPG Key ID: 3AA43686D4EB1377
4 changed files with 9 additions and 1 deletions

View File

@ -9,5 +9,6 @@ const serverConfig = {
}
server.start(serverConfig, options => {
/* eslint-disable-next-line no-console */
console.log(`Server ready at ${process.env.GRAPHQL_URI} 🚀`)
})

View File

@ -31,8 +31,10 @@ export default async function (client) {
})
data[key] = Object.assign(data[key] || {}, res.data)
} catch (err) {
/* eslint-disable-next-line no-console */
console.error(err)
}
})
/* eslint-disable-next-line no-console */
console.log('Seeded Data', data)
}

View File

@ -12,8 +12,10 @@ const driver = neo4j().getDriver()
const session = driver.session()
query('MATCH (n) DETACH DELETE n', session).then(() => {
/* eslint-disable-next-line no-console */
console.log('Successfully deleted all nodes and relations!')
}).catch((err) => {
/* eslint-disable-next-line no-console */
console.log(`Error occurred deleting the nodes and relations (reset the db)\n\n${err}`)
}).finally(() => {
if (session) {

View File

@ -23,6 +23,7 @@ let schema = makeExecutableSchema({
const driver = neo4j().getDriver()
const MOCK = (process.env.MOCK === 'true')
/* eslint-disable-next-line no-console */
console.log('MOCK:', MOCK)
schema = augmentSchema(schema, {
@ -45,7 +46,9 @@ const server = new GraphQLServer({
try {
const token = payload.req.headers.authorization.replace('Bearer ', '')
payload.user = await jwt.verify(token, process.env.JWT_SECRET)
} catch (err) {}
} catch (err) {
// nothing
}
return payload
},