✨Discover storytelling in the AI age with Pixar's Matthew Luhn at Sanity Connect, May 8th—register now

I want to add a view with the Structure builder (S.view.component) where I list similar documents based on the title. What would be the best way to use GROQ there?

7 replies
Last updated: Sep 23, 2020
Hi! I want to add a view with the Structure builder (
S.view.component
) where I list similar documents based on the title. What would be the best way to use GROQ there? Should I use the
documentStore
, or is there an easier way?
Sep 23, 2020, 12:32 PM
You could use the approach we're using here to show “incoming comments/references”. QueryContainer is also realtime I believe https://github.com/sanity-io/sanity-template-website-studio/blob/c296116316b1d9d65f99ac56b93cdf5679652f5b/template/studio/src/components/CommentList.js
Sep 23, 2020, 12:39 PM
perfect, exactly what I was looking for
Sep 23, 2020, 12:40 PM
You could use the approach we're using here to show “incoming comments/references”. QueryContainer is also realtime I believe https://github.com/sanity-io/sanity-template-website-studio/blob/c296116316b1d9d65f99ac56b93cdf5679652f5b/template/studio/src/components/CommentList.js
Sep 23, 2020, 12:39 PM
perfect, exactly what I was looking for
Sep 23, 2020, 12:40 PM
schemathon already paying off! 👌
Sep 23, 2020, 1:31 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?