groq-js
groq-js copied to clipboard
GroqQueryError: Cannot determine property key for type: PipeFuncCall
* [some filters] {
arrayField[] -> {...}, // works everywhere
arrayField[] | order (field) -> {...}, // should work, but does not
"arrayField": arrayField[] | order (field) -> {...}, // workaround
}
@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