charlypoly / graphql-to-json-schema

GraphQL Schema to JSON Schema
MIT License
196 stars 24 forks source link

Support complex default values #69

Closed newhouse closed 2 years ago

newhouse commented 2 years ago

For complex default values, the string being passed to JSON.parse might look like '{foo: "bar"}', which is a lax/incorrect JSON representation. Keys require "double quotes".

The json5 package seemed to be the best solution for handling this fact/situation. I don't love adding another dependency, but I don't think that (re-)implementing it here is a great idea. It also gets over 57mm downloads a week, so it seems solid.

Fixes https://github.com/charlypoly/graphql-to-json-schema/issues/67

newhouse commented 2 years ago

bump @charlypoly

charlypoly commented 2 years ago

Published in graphql-2-json-schema@0.9.1