-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
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
Add support of logical operations #13
Comments
Open for discussion on the |
E.g.: @constraint("not(multipleOf: 3)") or @constraint("not(startsWith: 'foo')") or @constraint("not(endsWith: 'foo')") Moreover, implementing |
I propose the syntax similar to the syntax that is used in Prisma: https://www.prisma.io/docs/prisma-graphql-api/reference/queries-qwe1/#combining-multiple-filters. |
input BookInput {
title: String! @constraint(minLength: 5) @constraint(format: "email")
} I was wrong. According to https://facebook.github.io/graphql/June2018/#sec-Directives-Are-Unique-Per-Location, it's not possible to use more than one directive of the same name for the same location. |
That's interesting, because it's definitely supported within graphql and is the current behaviour |
|
In current implementation rules inside
@constraint
directive are combined by logical (boolean)AND
:Custom directives in GraphQL are also combined by
AND
:What about adding support of logic operations (
AND
,OR
andNOT
) for nest rules (similar to https://github.com/maticzav/graphql-shield#and-or-not)? Something like (the syntax is subject to discussion):or
The text was updated successfully, but these errors were encountered: