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
You'll see that applying a scalar config to the scalar constructor erases the type information associated with the underlying types on either side of the scalar parse/serialize.
If you expose the configs (done by the typings, not by the compiled js) then it allows typescript programmers to use those configs in places where they want to maintain type safe interactions with data coming in through these scalars.
Hopefully this is a small ask, happy to open a PR if you can point me in the right direction what to change.
The text was updated successfully, but these errors were encountered:
@beezee This would be nice! But currently I don't think we have that strong type safety in our scalar configuration for all of them. We need to move the configurations of each of them to a seperate variable.
If you look here - https://github.com/graphql/graphql-js/blob/607345275f60e07dba1b7156a23b9ddf8b086fc9/src/type/definition.d.ts#L319
You'll see that applying a scalar config to the scalar constructor erases the type information associated with the underlying types on either side of the scalar parse/serialize.
If you expose the configs (done by the typings, not by the compiled js) then it allows typescript programmers to use those configs in places where they want to maintain type safe interactions with data coming in through these scalars.
Hopefully this is a small ask, happy to open a PR if you can point me in the right direction what to change.
The text was updated successfully, but these errors were encountered: