We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Say I have the following Mutation object:
type Mutation { createMovies: [Movie!]! updateMovies: [Movie!]! createActors: [Actor!]! updateActors: [Actor!]! }
It doesn't appear to be possible to add a rule to any Mutation fields beginning "create".
Additional wildcard functionality that allows you to use "*" in any string key.
Given the above type definitions, I would like to be able to do the following:
const isCreator = rule()(async (parent, args, ctx, info) => { return ctx.roles.includes("CREATOR"); }); const permissions = shield({ Mutation: { "create*": isCreator, }, });
This would add a check for the role "CREATOR" when hitting either the createMovies or createActors Mutation.
createMovies
createActors
Thanks!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Feature request
Is your feature request related to a problem? Please describe
Say I have the following Mutation object:
It doesn't appear to be possible to add a rule to any Mutation fields beginning "create".
Describe the solution you'd like
Additional wildcard functionality that allows you to use "*" in any string key.
Given the above type definitions, I would like to be able to do the following:
This would add a check for the role "CREATOR" when hitting either the
createMovies
orcreateActors
Mutation.Thanks!
The text was updated successfully, but these errors were encountered: