Performances
Dataloader-sequelize
list: {
before: (findOptions, args, context, info) => {
// DO NOT DO THIS that way!!!
if (typeof findOptions.where === 'undefined') {
findOptions.where = {}
}
// DO NOT DO THIS that way!!!
findOptions.where = {
[Op.and]: [findOptions.where, { companyId: context.user.companyId }]
}
return findOptions
}
},Last updated