🔮 Sanity Create is here. Writing is reinvented. Try now, no developer setup

How to Remove GraphQL Fields Based on Other Fields in Gatsby

2 replies
Last updated: Aug 9, 2021
How do you remove a GraphQL field based on another field, on a Gatsby page query?

Aug 9, 2021, 3:39 PM
Aug 9, 2021, 3:47 PM
Thanks for your reply! Query Filters seem to only allow to filter fields based on the values of those same fields. I want to remove the URL field based on the sibling “public” field. If the video is not public, remove the URL. Otherwise, include it.
Aug 9, 2021, 5:44 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?