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
I need to check the value has been provided for a Id, but I cannot define it as mandatory to be able to define auth:
categoryId: ID @assert(condition: ".length() > 1 && .matches(\"^\\w+$\")") @auth( rules: [ { allow: owner, provider: userPools, operations: [create, update, read] } { allow: groups groups: ["Supers", "Admins", "Employees"] provider: userPools operations: [create, update, read] } ] )
But the assertion only file when user provides something, it means null is acceptable
The text was updated successfully, but these errors were encountered:
Also for type String it happen only when value is provided, so length does not check in null
Sorry, something went wrong.
How can I check for not null?
categoryId: ID @assert(condition: ". != null") @auth( rules: [ { allow: owner, provider: userPools, operations: [create, update, read] } { allow: groups groups: ["Supers", "Admins", "Employees"] provider: userPools operations: [create, update, read] } ] )
Does not work!
You just need to require it in GraphQL:
categoryId: ID! @auth( rules: [ { allow: owner, provider: userPools, operations: [create, update, read] } { allow: groups groups: ["Supers", "Admins", "Employees"] provider: userPools operations: [create, update, read] } ] )
using exclamation mark after the field type.
No branches or pull requests
I need to check the value has been provided for a Id, but I cannot define it as mandatory to be able to define auth:
But the assertion only file when user provides something, it means null is acceptable
The text was updated successfully, but these errors were encountered: