FeatureFuel
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)

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests