Get inspired at ContentCon. Learn more and register today
Get inspired at ContentCon. Learn more and register today
Contentstack.comAcademyLogin
CS-log-dark.svgCS-log-dark.svg
  • Changelog
  • APIs
  • SDKs

Platform

  • Solution Center
  • Marketplace
  • Changelog
  • Developers & IT
  • Business users
  • Digital leaders
  • Developer Fast Track
  • Plans & Pricing

Solutions

  • Retail
  • Travel and tourism
  • Financial services
  • Technology
  • Manufacturing
  • E-commerce
  • Localization
  • Personalization
  • Portals and knowledge bases

Resources

  • Academy
  • Docs
  • Product updates
  • Contentstack on Contentstack
  • Blog
  • Insights and analyst reports
  • Webinars
  • Podcasts
  • Glossary
  • Content generative library
  • Community
  • Headless CMS
  • Composable AXP
  • Personalization
  • CDP

Customers

  • Case Studies
  • Customer Care
  • Contentstack Experience Awards
  • Customer support

Partners

  • Overview
  • Find a partner
  • Login

Company

  • About us
  • News
  • Customer support portal
  • Contact

Social

  • Facebook
  • LinkedIn
  • Instagram
  • GitHub
  • YouTube
  • Discord
  • X
LegalTermsPrivacyTrust Center

Cookie settings

Copyright © 2026 Contentstack Inc. All rights reserved.
/
  1. Home
  2. APIs
  3. GraphQL Content Delivery API
  4. Non-Nullable Fields

Non-Nullable Fields

markdownView as Markdown

In GraphQL, fields can be marked as mandatory (non-nullable), meaning they must always return a value. If a non-nullable field is queried and the API cannot provide data, it will return an error. This prevents unexpected null values in responses and ensures data integrity.

To enable strict type checks for non-nullable fields include the following header in your GraphQL API request:

x-graphql-strict-type-checks: true

NoteReach out to our support team to enable this feature for your organization.

When non-nullability is enabled, the GraphQL schema will reflect the strict type enforcement. Below is a comparison of how field types change:

Field TypeGraphQL (Nullable)GraphQL (Non-Nullable)
Text

String

String!

Number

Int

Int!

Date

ISODate

ISODate!

Link

Link

Link!

Reference

[CTReferenceEdge]

[CTReferenceEdge!]!

System

EntrySystemField

EntrySystemField!

Enabling non-nullable fields ensures more predictable API responses and prevents missing mandatory field data in queries.