Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
// Populate the data.
let newContext: any = await fgraphql({
parse,
runTime,
schema,
resolvers,
recordType: 'Nedb2',
query,
options,
})(context);
// Prune and sanitize the data.
if (serializer) {
newContext = serialize(serializer)(newContext);
}
// End the hook.
return newContext;
// !end
}
}
// Populate the data.
let newContext: any = await fgraphql({
parse,
runTime,
schema,
resolvers,
recordType: 'Nedb1',
query,
options,
})(context);
// Prune and sanitize the data.
if (serializer) {
newContext = serialize(serializer)(newContext);
}
// End the hook.
return newContext;
// !end
}
}
// Populate the data.
let newContext = await fgraphql({
parse,
runTime,
schema,
resolvers,
recordType: 'Nedb2',
query,
options,
})(context);
// Prune and sanitize the data.
if (serializer) {
newContext = serialize(serializer)(newContext);
}
// End the hook.
return newContext;
// !end
}
}
// Populate the data.
let newContext = await fgraphql({
parse,
runTime,
schema,
resolvers,
recordType: 'Nedb1',
query,
options,
})(context)
// Prune and sanitize the data.
if (serializer) {
newContext = serialize(serializer)(newContext)
}
// End the hook.
return newContext
// !end
}
],
get: [
commonHooks.populate({ schema }),
commonHooks.serialize(serializeSchema),
],
create: [
sendVerificationEmail(),
verifyHooks.removeVerification()
],
update: [
commonHooks.populate({ schema }),
commonHooks.serialize(serializeSchema),
],
patch: [
commonHooks.populate({ schema }),
commonHooks.serialize(serializeSchema),
],
remove: [
commonHooks.populate({ schema }),
commonHooks.serialize(serializeSchema),
]
},
error: {
all: [],
find: [],
get: [],
create: [],
update: [],
patch: [],
remove: []
}
globalHooks.hasPermission('manageUsers')
]
};
exports.after = {
all: [
hooks.remove('password')
],
find: [
common.populate({ schema }),
common.serialize(serializeSchema),
hooks.remove([ '_computed'])
],
get: [
common.populate({ schema }),
common.serialize(serializeSchema),
hooks.remove([ '_computed'])
],
create: [
globalHooks.sendVerificationEmail(),
verifyHooks.removeVerification(),
],
update: [],
patch: [],
remove: []
};