Skip to content
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

Broken filter types in SDK #10262

Closed
3 tasks done
andrenarchy opened this issue Dec 3, 2021 · 1 comment · Fixed by #10133
Closed
3 tasks done

Broken filter types in SDK #10262

andrenarchy opened this issue Dec 3, 2021 · 1 comment · Fixed by #10133

Comments

@andrenarchy
Copy link

Preflight Checklist

Describe the Bug

In #9965, filter types were adjusted but unfortunately it rendered some filters usable.

To Reproduce

Assume we have a collection test with a string field code. Then the following filters now give type errors:

client.items('test').readMany({ filter: { code: {_in: ['foo', 'bar']} } }) // string[] not assignable to string
client.items('test').readMany({ filter: { code: {_null: true } } }) // true not assignable to string

There are probably more filters that fail since the mentioned change.

Errors Shown

No response

What version of Directus are you using?

9.1.2

What version of Node.js are you using?

16.5.0

What database are you using?

Postgres 13

What browser are you using?

Chrome

What operating system are you using?

Linux

How are you deploying Directus?

locally

@nickrum
Copy link
Member

nickrum commented Dec 3, 2021

I think this has been fixed by #10133.

@nickrum nickrum closed this as completed Dec 3, 2021
@nickrum nickrum linked a pull request Dec 3, 2021 that will close this issue
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants