Lesson
1
Your new favourite query language
Simeon GriggsPrincipal Educator at Sanity
Log in to mark your progress for each Lesson and Task
Sanity provides two methods to query data: GROQ and GraphQL.
Compare GROQ and GraphQL in the documentation
You'll learn GROQ in this module as it powers queries for data and features like user role permissions and GROQ-powered webhooks.
See Roles for how GROQ is used to configure "Content resources"
See GROQ-powered webhooks for how GROQ can fire webhooks based on a document event satisfying a GROQ filter
This module teaches just enough GROQ to perform basic queries.
- You have a Sanity Studio with
event
,artist
andvenue
type documents, just like you created in the Day One with Sanity Studio module. - You won’t need to know any GROQ in advance to complete these exercises.
Here are some great resources already to learn GROQ more fully:
- Visual playground groq.dev
- Free “Introduction to GROQ Query Language” course on Egghead.io