👀 See Sanity in action: Watch product demo now →

GraphQL - Field is Required but Schema Does Not

2 replies
Last updated: Apr 22, 2020
Hello guys! It seems that even though i make a field required in sanity studio, it's type in the equivalent graphql schema does not become required/non-null. Is this a bug or intentional?
Apr 22, 2020, 9:13 AM
Hi! That’s intentional I’m afraid, for now at least. From the validation page:
Validation is currently only done client side (within the content studio). In the future, non-custom rules will be synchronized and run on the server as well. This is why we recommend you use the built-in validation methods as much as possible, resorting to custom validation only where absolutely necessary.
Apr 22, 2020, 9:18 AM
alright, thanks for the heads-up!
Apr 22, 2020, 9:19 AM

Sanity.io – build remarkable experiences at scale

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

Categorized in