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: remove explicit type for GraphQLScalarType (#1920)
Removing the explicit type helps with type inference. For example
Before this change `GraphQLDate` is of type `GraphQLScalarType<unknown, unknown>`
After this change `GraphQLDate` is of type `GraphQLScalarType<Date, string>`
The alternative to this is to duplicate the types from the `GraphQLScalarTypeConfig`
By adding the `TInternal` and `TExternal` generics to the explicit type
These types are useful when adding scalars with a code first apporach such as
in @pothos/core where scalar types are defined for the `SchemaBuilder`
Co-authored-by: James Macfie <[email protected]>
0 commit comments