1
Allow string / number primitive values on many to one filtering in GraphQL
Source: directus/directus#24867 · opened by @braco
@rijkvanzanten's note: The GraphQL spec doesn't support input union types, so Directus defaults to the nested filter input type for m2o fields. However, primitive filters should be allowed on those fields as well
---
Describe the Bug
Using the graphql interface, how do you find all records that _don't have a file_ in a certain field?
Queries like { fileField: { _empty: true } } yield
"message": "Field "_empty" is not defined by type "directus_files_filter".",
Queries like { fileField: { id { _empty: true } } } yield
message: '"uuid" field type does not contain the "_empty" filter operator',
I found a temporary workaround by checking if the fileField { filesize } field is null, but this seems hacky?
To Reproduce
see above
Directus Version
v10.2.0
Hosting Strategy
Self-Hosted (Docker Image)
---
Describe the Bug
Using the graphql interface, how do you find all records that _don't have a file_ in a certain field?
Queries like { fileField: { _empty: true } } yield
"message": "Field "_empty" is not defined by type "directus_files_filter".",
Queries like { fileField: { id { _empty: true } } } yield
message: '"uuid" field type does not contain the "_empty" filter operator',
I found a temporary workaround by checking if the fileField { filesize } field is null, but this seems hacky?
To Reproduce
see above
Directus Version
v10.2.0
Hosting Strategy
Self-Hosted (Docker Image)
No pledges yet. Be the first to back this.
Comments
Similar requests
Websocket based live-preview
35 votes · 0 comments
Facets: Streamlined Filtering and Advanced Search Integration for Directus Collections
38 votes · 0 comments
Default Field Values per Language
2 votes · 0 comments
Dynamic max/min values
18 votes · 0 comments
Improve Translation Strings management
7 votes · 0 comments
No comments yet.