sikanhe / gqtx

Code-first Typescript GraphQL Server without codegen or metaprogramming
458 stars 13 forks source link

Use `unknown` instead of `JSON` for `parseValue` in `scalarType` #45

Closed zachasme closed 3 years ago

zachasme commented 3 years ago

Hi! We're testing gqtx as a replacement for nexus and while migrating our scalar types I found that parseValue expects a value of type JSON (any object with a .toString() method AFAICT). I'm not sure if this is because I need to define my scalars differently or it is simply the JSON type being weird.

For now I've explicitly set the input type to unknown, and this PR does the same. Please let me know if this makes sense at all or I should be doing something else. 😃

sikanhe commented 3 years ago

This makes sense - thanks @zachasme !