Logan
06/19/2023, 8:27 PMQuery Planner API, but I'm curious if there are any examples on how it's used?
A bit more about our setup below:
• node + graphql + mongodb w/ mongoose backend
• We have businesses with users and orders attached to them
◦ business <-> user is an n:m relation
◦ business <-> order is a 1:n relation
• Users are assigned roles on a business by business basis
◦ viewer -> can read all business orders
◦ owner -> can read and update all business orders
◦ contractor -> can read some business orders (contractors are granted read permissions to a specific set of orders on a case by case basis)
Authorizing standard CRUD operations on a single order resource has been straightforward, but I'm not exactly sure how we should go about fetching and paginating a list of orders the a user can view for a given business
Any insight would be helpful!Stephen Raymond Jr
06/19/2023, 8:32 PMLogan
06/19/2023, 8:41 PMDennis (Cerbos)
Logan
06/19/2023, 9:30 PMEmre (Cerbos)
Dennis (Cerbos)
mongodb w/ mongooseAlex Olivier (Cerbos)
@cerbos/orm-mongoose with the PR up here https://github.com/cerbos/query-plan-adapters/pull/16 if you would be willing to try it out