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

Syntax for deep filter #42

Open
the-nicolas opened this issue Aug 18, 2024 · 0 comments
Open

Syntax for deep filter #42

the-nicolas opened this issue Aug 18, 2024 · 0 comments

Comments

@the-nicolas
Copy link

the-nicolas commented Aug 18, 2024

I added generated typescript types to my code and created client as written:
const client = createDirectus<CustomDirectusTypes>("<directus url>").with(rest());

It works well, but how is now the correct typed syntax to do deep filters? I also get type mismatch errors:

return directus.request(
      readItems("collection", {
        deep: {
          translations: {
            _filter: {
              _and: [
                {
                  languages_code: { _eq: languageCode },
                },
              ],
            },
          },
        },
        ...

Is there any full sample?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant