Answers from the community about GROQ

Some of the conversations between community members on questions, suggestions and tips for using Sanity. Join our Discord to be a part of it.

TopicCategoriesFeaturedRepliesLast Updated
ClientError: expected '}' following object body in next-sanity createClient16May 18, 2022
How to query and render Sanity rich text/Portable Text as HTML?6May 18, 2022
GraphQL fails after changing slug type from string to slug in Sanity24May 18, 2022
How to create a reference filter in Sanity.io for selecting artwork based on the artist field.4May 17, 2022
getServerSideProps not working in React Router (Next.js vs React)20May 16, 2022
GROQ query inside document preview to check bidirectional reference7May 12, 2022
Should I create a new document type for "shorts" or use existing "article" type?4May 11, 2022
Sanity query returns empty array despite schemas and data in desk10May 11, 2022
Convert String to Object for the Slug Type3May 10, 2022
Error with mapping posts in Next.js and Sanity project, TypeError: Cannot read property 'title' of undefined.38May 9, 2022
How to paginate GROQ query with filtered author reference in blog posts9May 9, 2022
How to handle timezones in Sanity? Looking for date + time + timezone plugin11May 6, 2022
How to programmatically populate fields array using GROQ query data?19May 5, 2022
How to return updated values from a Sanity patch mutation6Apr 29, 2022
Sanity data returns empty array in Next.js getStaticProps16Apr 27, 2022
How to query author bio raw text field in Sanity GraphQL?5Apr 22, 2022
How to show createdAt field in Sanity Studio20Apr 13, 2022
GROQ vs GraphQL: What are the tradeoffs?9Apr 8, 2022