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
We are using typescript in our project and noticed that most types are defined with X | undefined. Is it possible to update those types to have them defined as X | null. Using them we noticed they are never undefined but "null"
types for account is Account | undefined but I noticed that there is never a case where it is actually "undefined" if an error happens type is actually null.
Same with networkError, type is String | undefned but inspecting networkError when there is a gql error networkError is null and not undefined.
Our code has to test for both undefined and null using double != to accomodate typescript for undefined and real life with null for query.error?.networkError != null
but it would be nicer if we could use query.error?.networkError !== null.
Same applies for account to test for errors if (account?.data != null)
Thanks for this Graphql library!
The text was updated successfully, but these errors were encountered:
We are using typescript in our project and noticed that most types are defined with
X | undefined
. Is it possible to update those types to have them defined asX | null
. Using them we noticed they are never undefined but "null"For example as a result of an account query
types for
account
isAccount | undefined
but I noticed that there is never a case where it is actually "undefined" if an error happens type is actually null.Same with networkError, type is
String | undefned
but inspecting networkError when there is a gql error networkError is null and not undefined.Our code has to test for both undefined and null using double
!=
to accomodate typescript for undefined and real life with null forquery.error?.networkError != null
but it would be nicer if we could use
query.error?.networkError !== null
.Same applies for account to test for errors
if (account?.data != null)
Thanks for this Graphql library!
The text was updated successfully, but these errors were encountered: