๐Ÿ”ฎ Sanity Create is here. Writing is reinvented. Try now, no developer setup

How to Express 'OR' in a GraphQL Query

1 replies
Last updated: Aug 7, 2020
Hi everyone! ๐Ÿ‘‹ ๐Ÿ™‚ Is there a way to express โ€˜ORโ€™ in a GraphQL query? Canโ€™t see an option for that in the docs: https://www.sanity.io/docs/graphql#filters-reference-ba117ddb05ce
Aug 7, 2020, 8:08 AM
Aha, I hacked something workable by using a couple of GraphQL aliases with slightly different filters, and then merging it in code. https://graphql.org/learn/queries/#aliases
Aug 7, 2020, 8:49 AM

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?