-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
_and filter doesn't work as expected #21169
Comments
Instead of |
Thanks for quick reply! I've put the Also, I saw |
Judging from the returned results you're working with an many-to-many not a one-to-many right? (else there would be nothing to filter because an m2o can only have 1 item related to it). Oooh i see are you trying to filter inside the relation? if so you'll want to use a |
Yeah, I am trying to filter inside the relation. Since Rentals
Calendars
CalendarDays
|
You're very right indeed but graphql does requires it's own nested filters for that https://docs.directus.io/reference/query.html#examples-6 |
hey @br41nslug Here is my latest query and it doesn't work. I think it's not about |
The result looks correct (even tho counter intuitive at first). This is where the previously mentioned Not sure if you can currently achieve this with graphql #14228 |
Thank you for your help @br41nslug. Knowing that I've tried another approach for this but it still didn't work as expected Directus is a great tool and helped to me on lots of projects, I can't thank you guys enough for this awesome tool, but I have to say I'm very surprised that this relational filter is an issue with directus even though it's out there for years. I've planned everything relying on Directus because of it's awesome features (insights, flows, a great dashboard) and never thought I would face this type of issue |
Describe the Bug
Hi, I'll try my best to explain it with screenshots.
As you can see on the first query, even though I wrapped entire filter with
_and
, it still returns a response when it shouldn't since there is a_neq
filter for date 2023-12-122Here is another approach for this query but still returns a data
Lastly, I've tried to narrow the
_and
filter but I got an error this timeTo Reproduce
Just make a search for a date field with
_and
filterDirectus Version
v10.8.2
Hosting Strategy
Self-Hosted (Docker Image)
The text was updated successfully, but these errors were encountered: