Improving User Experiences with a Nullable Schema - Ernie Turner, Coinbase
Improving User Experiences with a Nullable Schema - Ernie Turner, Coinbase When designing a GraphQL schema, it’s tempting to mark every field as non-null using the "!" operator. While it may seem convenient and simplifies code readability, this seemingly innocuous choice can have unforeseen consequences for your applications, especially during service disruptions. Moreover, these downsides might not become apparent until a significant portion of your schema has been marked as non-nullable. In this talk, we will: - Challenge the traditional server-centric approach and advocate for shifting the responsibility of field nullability to the client. - Explore the reasons behind this paradigm shift and introduce existing and upcoming tools that empower clients to determine whether a field can be null or not. - Delve into the Client Controlled Nullability proposal, demonstrating its potential in GraphQL workflows. - Provide practical methods and best practices to safely migrate away from a non-null schema, ensuring compatibility with existing clients without causing disruptions. GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools. Get Started Here: https://graphql.org/