Closed
Description
Using the AST provided by the library, I'm doing some introspection on the queries to extract the default values passed in to a query.
I noticed that the IntValueNode
and FloatValueNode
types both use string
to store the value instead of number
.
graphql-js/src/language/ast.ts
Lines 478 to 482 in 2aedf25
graphql-js/src/language/ast.ts
Lines 484 to 488 in 2aedf25
This seems a bit counter-intuitive to me, and would require me to write some custom parsing code on top of the existing parsing that graphql-js does.
Is this an intentional decision to store the values in a string instead of a number, or is it something that should be changed?
Metadata
Metadata
Assignees
Labels
No labels