mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
fixing console log issues
This commit is contained in:
parent
e22f950c48
commit
034fea3f47
@ -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} 🚀`)
|
||||
})
|
||||
|
||||
@ -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)
|
||||
}
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user