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
Multiple @where directives on a single field #831
Comments
Have you actually tried this in the most recent version of Lighthouse? I agree that this should work. |
It was originally tested using version |
Can you provide a PR with a failing test case in https://github.com/nuwave/lighthouse/blob/master/tests/Integration/Execution/BuilderTest.php please? |
We can enable this feature (and possibly other use cases of applying the same directive repeatedly) once the spec allows it: graphql/graphql-spec#472 |
Is your feature request related to a problem? Please describe.
It would be great if we could apply multiple
@where
directives to a single field.For example:
In this case, only the first directive is applied.
Describe the solution you'd like
I can think of 3 options:
A) Allow multiple instances of the
@where
directive. I don't think any other directive allows this either so there might be a limitation in the core of Lighthouse.B) Allow the
@where
directive to accept an array of conditions, in a similar format to how the Laravel Query Builder does.C) This behaviour already exists somewhere and I just can't see it in the docs.
Curious to see what others think.
The text was updated successfully, but these errors were encountered: