-
Notifications
You must be signed in to change notification settings - Fork 17
Docs: added "Cheat Sheet" #392
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
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
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
)