Conversation
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| .filterRaw('count((categories[]->slug.current)[@ in ["action", "thriller"]]) > 0') // documents that reference categories with slugs of "action" or "thriller" | ||
| .filterRaw('count((categories[]->slug.current)[@ in ["action", "thriller"]]) == 2') // documents that reference categories with slugs of "action" and "thriller" | ||
| .filterRaw('defined(awardWinner)') // has been assigned an award winner status (any kind of value) | ||
| .filterRaw('!defined(awardWinner)') // has not been assigned an award winner status (any kind of value) |
There was a problem hiding this comment.
Looking for feedback on something …
This file is a copy of Sanity’s “GROQ Cheat Sheet” page, which has a lot of examples of GROQ queries.
I’m really happy with showing this ton of examples. But one concern is that a lot of these Sanity examples are “edge cases” and so I’m forced to wrap a lot of them with .raw or .filterRaw.
Should I leave these examples in there, so that I have 1:1 parity with the Sanity docs? Or should I remove/minimize them, so that this doc is focused on just GroqD examples?
There was a problem hiding this comment.
I think it's good to have parity with the sanity docs. Then it becomes clear what groqd can not be solved with groqd (yet).
Adds a "Cheat Sheet".
This document was copied from Sanity's own Cheat Sheet docs and adapted for GroqD.
Testing
Review this doc here:
https://groqd-git-cheat-sheet-formidable-labs.vercel.app/docs/API/groqd-cheat-sheet
TODO:
raw)