graphql-schema
graphql-schema copied to clipboard
feat: add types for known scalars
Description
Scalars that are of type string
according to their documentation are now also of type string
in the generated typescript defintions.
By default, new scalars will now be of type unknown
.
Known scalars are defined in codegen.json
with their respective type.
Context
Using any
is discuraged and should avoided.
Using the type safe unknown
is encouraged. (see here).
The new defaultScalarType
is now unknown
, scalars with a specific underlying type can be added to codegen.json
to have their correct typescript type.
Closes #560
I cannot answer to wether the scalars are strings. Otherwise it looks good.
Unfortunately, the JS octokit packages don't have an active maintainer anymore, so we cannot update release new changes.
You can check out this discussion for further updates
@jbreckel Are you still interested in moving this forward? There have been some changes, can you rebase your branch