Open coratgerl opened 1 month ago
We need to add an util that take in param a WabeContext and return the same context with isRoot: true for root queries. This will avoid this very common pattern
isRoot: true
const user = await context.wabe.controllers.database.getObjects({ className: 'User', where: { email: { equalTo: input.email, }, }, fields: ['id'], first: 1, context: { ...context, isRoot: true, }, })
Need to replace all occurence of the above pattern with the new utils. Something like that: context: contextWithRoot(context)
context: contextWithRoot(context)
Is your feature request related to a problem? Please describe.
We need to add an util that take in param a WabeContext and return the same context with
isRoot: true
for root queries. This will avoid this very common patternAdditional context
Need to replace all occurence of the above pattern with the new utils. Something like that:
context: contextWithRoot(context)