groq-js icon indicating copy to clipboard operation
groq-js copied to clipboard

GroqQueryError: Cannot determine property key for type: PipeFuncCall

Open runeb opened this issue 2 years ago • 1 comments

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

runeb avatar Jun 17 '22 15:06 runeb

@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

invinciblemuffi avatar Oct 03 '23 13:10 invinciblemuffi