Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support complex default values #69

Merged

Conversation

newhouse
Copy link
Collaborator

@newhouse newhouse commented Mar 2, 2022

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 #67

@newhouse
Copy link
Collaborator Author

newhouse commented Mar 3, 2022

bump @charlypoly

@charlypoly charlypoly merged commit 16f26ff into charlypoly:master Mar 4, 2022
@newhouse newhouse deleted the newhouse/67/complex-default-values branch March 4, 2022 16:08
@charlypoly
Copy link
Owner

Published in graphql-2-json-schema@0.9.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default values for complex object types
2 participants