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

GroqQueryError: Cannot determine property key for type: PipeFuncCall #60

Open
runeb opened this issue Jun 17, 2022 · 1 comment
Open

Comments

@runeb
Copy link
Member

runeb commented Jun 17, 2022

* [some filters] {
  arrayField[] -> {...}, // works everywhere
  arrayField[] | order (field) -> {...}, // should work, but does not
  "arrayField": arrayField[] | order (field) -> {...}, // workaround
}
@invinciblemuffi
Copy link

@runeb I faced the same issue and this workaround worked perfectly fine. But there is one more thing I would like to add:
Before Update: issuesList[]-> | order(_updatedAt desc) {...fields}
After Update: "issuesList": issuesList[]-> | order(_updatedAt desc) {...fields}

Before update line works well for me when I was out of draft mode, when I go into draft mode/preview mode then the before update one query threw the mentioned error.

Using Next - 13.5.3, App router setup, Sanity preview mode setup from here - Sanity-Next AppRouter Preview Setup

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