You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Fix typo (whereby should be one word; not two) (graphql#570)
Before: "where by default types do not include "null" unless explicitly declared."After: "whereby default types do not include "null" unless explicitly declared."
Copy file name to clipboardExpand all lines: site/learn/BestPractice-Introduction.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ In contrast, GraphQL only returns the data that's explicitly requested, so new c
45
45
46
46
###Nullability
47
47
48
-
Most type systems which recognise "null" provide both the common type, and the*nullable* version of that type,where by default types do not include "null" unless explicitly declared. However 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.
48
+
Most type systems which recognise "null" provide both the common type, and the*nullable* version of that type,whereby default types do not include "null" unless explicitly declared. However 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.
49
49
50
50
By defaulting every field to*nullable*, any of these reasons may result in just that field returned "null" rather than having a complete failure for the request. Instead, GraphQL provides[non-null](/learn/schema/#lists-and-non-null) variants of types which make a guarantee to clients that if requested, the field will never return "null". Instead, if an error occurs, the previous parent field will be "null" instead.