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
it would be helpful to allow async queries in fields. In the below example a hypothetical resource server can be queried to return a database filter based on what the user is allowed to do. That way we could inject permission restrictions at query level.
constPostRef=schemaBuilder.drizzleObject("posts",{name: "Post",fields: (t)=>({id: t.exposeInt("id"),content: t.exposeString("content"),author: t.relation("author",{// filter returns a promise which resolves into a query filter depending on the contextquery: async(_args,ctx)=>awaitctx.abilities.users.filter("read"),}),}),});
The text was updated successfully, but these errors were encountered:
Following up on this discussion: #1395 (reply in thread)
it would be helpful to allow async queries in fields. In the below example a hypothetical resource server can be queried to return a database filter based on what the user is allowed to do. That way we could inject permission restrictions at query level.
The text was updated successfully, but these errors were encountered: