Why do required fields appear as nullable in the GraphQL graph?

+1 to all of this.

while i understand there are perceived issues with preview and with the introduction of required fields to an existing content type (see @jl1’s share), having a TypeScript schema that doesn’t fit our application’s needs (i.e. an accurate reflection of required vs. optional fields) requires clumsy, crufty workarounds and chips away at the benefit of using GraphQL in our app.

Imagine having to check for an item you know is in the array. Not to mention all of the properties…

Unless I can find a solution, I’m likely going to have to abort my introduction of CF’s GraphQL API into our app. :frowning:

Is there support for Graphql schemas that accurately reflect the production schema?

This is a deal breaker for my team because developer experience is a high priority. It’s incredibly annoying, frustrating, and time consuming to use Contentful with Typescript as it requires a ton of extra checks.

We also tried Contentful with the REST API and it’s even worse DX.

1 Like