luckycatfactory / esbuild-graphql-loader

An esbuild Plugin Allowing for GraphQL File imports
44 stars 8 forks source link

fix(index.ts): prevent stripping of undefined from serialized Documen… #2

Closed louisscruz closed 3 years ago

louisscruz commented 3 years ago

…tNode

JSON.stringify is used to produce a string of the AST. Unfortunately, that meant that descriptions, which are sometimes undefined, were getting stripped from the AST objects. That unlikely would have any impact on any users of the package, but out of principle we shouldn't be removing altering the serialized AST in any way by default. This commit also improves the testing tooling.

BREAKING CHANGE: Previously, the definition property on ASTNodes would be removed if it had a value of undefined. This change makes it such that the property will exist with a value of undefined. Any code relying on the number of properties or the existence of the definition key to exist could begin breaking as a result of this change.

github-actions[bot] commented 3 years ago

:tada: This PR is included in version 2.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: