-
-
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
Deep filtering not working with Many to Any relationships #22474
Comments
Did I presume correctly that this is GraphQL related? Can you please share your full query, because afaik there are some intricacies when using queries and filters with M2A relations in GraphQL. |
Hey, no this is actually via the Javascript sdk. The config I have provided is what I pass to the readItem/readItems functions. |
Ah, you see, I was initially talking about GraphQL, because the So in your case, the query that should work, look like deep: {
links_right: {
// Filter only published links_right
_filter: {
'item:navigation_links': {
status: { _eq: 'published' }
}
},
// Filter translations of navigation_links by language
'item:navigation_links': {
translations: {
_filter: {
languages_code: { _icontains: language }
}
}
}
}
} But it seems like there is some undocumented behavior happening here, as filter queries apparently do get converted internally to the colon notation, if they contain Let me know, if that fixes it for you! |
Describe the Bug
Below query is not working in the directus sdk, usually if the query isn't possible it throws an error, but this doesn't throw an error at all and just doesn't do the filter. The underlying properties are all correctly named, i verified it with individual queries to those collections.
To Reproduce
Directus Version
v10.10.7
Hosting Strategy
Self-Hosted (Docker Image)
The text was updated successfully, but these errors were encountered: