Feat | clarifying DefinitionsGeneratorOptions#defaultTypeMapping
supported types
#3210
Open
1 task done
Labels
Is there an existing issue that is already proposing this?
Is your feature request related to a problem? Please describe it
Using the schema first approach, I was caught on a small issue related to
DefinitionsGeneratorOptions#defaultTypeMapping
.Yes, I passed the wrong type
nomber
instead ofnumber
to one of my scalar fields.But I wonder if it will be better to just have clear type definitions for those scalar fields...
Describe the solution you'd like
inside the
DefinitionsGeneratorOptions
type, graphql-ast.explorer.ts#L66-L72 instead of defining thedefaultTypeMapping
property as follows:We can define a better definition like:
Teachability, documentation, adoption, migration strategy
No response
What is the motivation / use case for changing the behavior?
As I mentioned in the above section, I made a mistake when I was defining the
defaultTypeMapping
.I noticed the error very quickly and took me half of a second to solve it. However, I could have avoided it just with my
typescript
highlighter or with an error message.This is just a very small improvement and maybe there's a reason behind this definition type choice, but I'll be grateful to receive your thoughts about this one.
The text was updated successfully, but these errors were encountered: