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
The ID scalar type represents a unique identifier, often used to refetch an object or as the key for a cache. The ID type is serialized in the same way as a String; however, it is not intended to be human-readable. While it is often numeric, it should always serialize as a String.
I think this should should have been must, but the main point is an ID type should never come back from the server with typeof id === 'number', it will always be typeof id === 'string' (or null).
Reproduction
No response
gql.tada version
main branch
Validations
I can confirm that this is a bug report, and not a feature request, RFC, question, or discussion, for which GitHub Discussions should be used
Describe the bug
gql.tada specifies the default scalar
ID
asstring | number
:gql.tada/src/introspection.ts
Lines 112 to 113 in e882036
From the GraphQL Specification, 3.5.5
ID
(emphasis mine):I think this
should
should have beenmust
, but the main point is anID
type should never come back from the server withtypeof id === 'number'
, it will always betypeof id === 'string'
(ornull
).Reproduction
No response
gql.tada version
main
branchValidations
The text was updated successfully, but these errors were encountered: