close all open sessions

This commit is contained in:
Youri Seichter 2019-11-06 18:32:25 +01:00
parent 2a860297c7
commit d262ed678c
4 changed files with 4 additions and 0 deletions

View File

@ -56,6 +56,7 @@ const createLocation = async (session, mapboxData) => {
query += ' RETURN l.id'
await session.run(query, data)
session.close()
}
const createOrUpdateLocations = async (userId, locationName, driver) => {

View File

@ -72,6 +72,7 @@ const validateReport = async (resolve, root, args, context, info) => {
submitterId: user.id,
},
)
session.close()
const [existingReportedResource] = reportQueryRes.records.map(record => {
return {
label: record.get('label'),

View File

@ -59,6 +59,7 @@ export default {
`,
{ commentId: args.id },
)
session.close()
const [comment] = transactionRes.records.map(record => record.get('comment').properties)
return comment
},

View File

@ -182,6 +182,7 @@ export default {
`,
{ postId: args.id },
)
session.close()
const [post] = transactionRes.records.map(record => record.get('post').properties)
return post
},