You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This could potentially lead to problems when the user actually has a field named item__<something> and wants to filter that field. This conversion was initially introduced in #15162 as fix to not being able to filter M2A relations in GraphQL.
This functionality needs to be retained, but either pulled out of parseFilter or only optionally apply, if we know that the filters are coming from GraphQL (and are actually within a M2A? Cause otherwise the same problem persists in GraphQL. Or that is then just an inherent restriction of GraphQL, similar to reserved keywords or collections starting with underscore).
Additionally, this simple replacement breaks if the user uses a different field name, other than item in their M2A relation setup.
To Reproduce
N/A
Directus Version
v10.11.0
Hosting Strategy
Self-Hosted (Docker Image)
Database
No response
The text was updated successfully, but these errors were encountered:
Describe the Bug
The
parseFilter
utility function always converts filter entry names that start withitem__
and are objects toitem:
:directus/packages/utils/shared/parse-filter.ts
Lines 119 to 120 in 333ec52
This could potentially lead to problems when the user actually has a field named
item__<something>
and wants to filter that field. This conversion was initially introduced in #15162 as fix to not being able to filter M2A relations in GraphQL.This functionality needs to be retained, but either pulled out of
parseFilter
or only optionally apply, if we know that the filters are coming from GraphQL (and are actually within a M2A? Cause otherwise the same problem persists in GraphQL. Or that is then just an inherent restriction of GraphQL, similar to reserved keywords or collections starting with underscore).Additionally, this simple replacement breaks if the user uses a different field name, other than
item
in their M2A relation setup.To Reproduce
N/A
Directus Version
v10.11.0
Hosting Strategy
Self-Hosted (Docker Image)
Database
No response
The text was updated successfully, but these errors were encountered: