next-sanity icon indicating copy to clipboard operation
next-sanity copied to clipboard

Exclude document types from dataset streamed to browser

Open heggemsnes opened this issue 3 years ago • 1 comments
trafficstars

Hi!

We use the usePreviewSubscription a lot, but as we use Sanity more and more we have document types that doesn't really need preview. Example is like a "comment" document type. Removing these would make the dataset much lighter as these document types are several thousand but the "previewable" documents are usually a lot fewer.

I understand that this would mean that this content could not be shown in the preview at all.

heggemsnes avatar Sep 01 '22 07:09 heggemsnes

Hi! We're looking into this, but it's “not that simple.” First and foremost, we have to figure out what should happen if you reference a document that aren't available (https://github.com/sanity-io/groq-store/pull/2)

kmelve avatar Sep 01 '22 08:09 kmelve

Hi, this is now possible in v1.1.0 by using the includeTypes option 😄

stipsan avatar Nov 16 '22 03:11 stipsan