Closed Designer023 closed 4 months ago
I've figured it out:
q(`*`)
.filter(`slug.current == $slug`)
.grab$({
body: q("body[]").filter().select({
"_type == 'placedImage'": q("@").grab({
image: q.sanityImage("image", { withAsset: ["blurHash"], }),
}),
})
})
The middle example in the docs here gave me the clue: https://commerce.nearform.com/open-source/groqd/docs/query-building#args
Hopefully this will help someone else in the future 👍
Is there an existing issue for this?
Code of Conduct
Question
Running the query in the playground yields:
Error: keyValidator._parse is not a function
.How can I (re)write my query so that I can get the assets back for the image. I'm specifically looking for the
blurHash
property underbody[].placedImage.image.assets->(ref).metadata.blurHash
and I have the problem with the reference (->
) in the middle of the query.Any help/suggestions would be greatly appreciated 🙏