conf-talks
conf-talks copied to clipboard
GraphQL fields are nullable by design
The GraphQL documentation provides this explanation:
... in a GraphQL type system, every field is nullable by default. This is because there are many things which can go awry in a networked service backed by databases and other services. A database could go down, an asynchronous action could fail, an exception could be thrown. Beyond simply system failures, authorization can often be granular, where individual fields within a request can have different authorization rules.
Вобщем тут графкуэль добряк – вернуть хоть что-нибудь. Старается вернуть как можно больше, даже если что-то где-то отвалилось.
Nullability in GraphQL unlocks improvements in resiliency, graceful UI degradation, frictionless user workflows, and other benefits
Read more https://medium.com/expedia-group-tech/nullability-in-graphql-b8d06fbd8a3c