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

Get all translated document versions from the current document #113

Open
benjick opened this issue Mar 30, 2023 · 1 comment
Open

Get all translated document versions from the current document #113

benjick opened this issue Mar 30, 2023 · 1 comment

Comments

@benjick
Copy link

benjick commented Mar 30, 2023

Hello!

I'm trying to use the example from here: https://github.com/sanity-io/document-internationalization/blob/main/docs/groq-query-examples.md#get-all-translated-document-versions-from-the-current-document

defined(__i18n_refs) => {
    "translations": __i18n_refs[]->{
        ...,
    }
  },
  defined(__i18n_base) => {
    "translations": *[(_id match ^.__i18n_base._ref + "*" || _id match ^.__i18n_base._ref )&& _id != ^._id]{
        ...,
    }
  }

But this gives me the following error: join condition requires relational operator; "match" not supported

I'm on Sanity 3.8. How can I adjust this query to work? Cheers

Max

@LiamMartens
Copy link
Collaborator

did anything change in the GROQ spec? @SimeonGriggs

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

2 participants