You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What if we want to enhance the example to add an OR condition for example (user == ownerUser OR user is in the record's allowed list). Would I need to move this to its own hook that modifies the query?
What if there is an array of ownerUsers and we want to make it so that it checks if the user is included in the ownerUser list?
On a related question about the documentation, there are 2 examples in that section. One called userSchema and one called companySchema. It is weird because they seem identical except the companySchema is in a second query resolver function. What is the purpose of splitting it out into another function?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In the doc https://feathersjs.com/api/schema/resolvers.html#resolvequery
There is an example of filtering data so it only shows if the logged in user == ownerUser
What if we want to enhance the example to add an OR condition for example (user == ownerUser OR user is in the record's allowed list). Would I need to move this to its own hook that modifies the query?
What if there is an array of ownerUsers and we want to make it so that it checks if the user is included in the ownerUser list?
On a related question about the documentation, there are 2 examples in that section. One called userSchema and one called companySchema. It is weird because they seem identical except the companySchema is in a second query resolver function. What is the purpose of splitting it out into another function?
Beta Was this translation helpful? Give feedback.
All reactions