Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.
Releases
@graphql-inspector/[email protected]
Major Changes
cf9c40cThanks @jdolle! - major upgrade to diff command which modifies paths,
severity levels, and adds support for directives. See changelog for diff-command package for more
insights.
Minor Changes
2fc8b25Thanks @emileriksson! - Apollo Federation v2 support.
Introduced built-in Federation v2 directives and a new CLI flag --federationV2 to enable
processing schemas that use them.
Patch Changes
[
2fc8b25,ef13125,6a8add5]:@graphql-inspector/[email protected]
Major Changes
#2893
ef13125Thanks @jdolle! - Added option to include nested changes. Use
--rule verboseChanges. Enabling this will output nested changes. I.e. if adding a new type, thenverboseChangeswill also include the addition of the fields on that type. By default, thesechanges are excluded from the output because they don't impact the outcome and create a lot of
noise.
Added better directive support.
Adjusted severity level for conditionally safe changes:
Minor Changes
6a8add5Thanks @Tohaker! - Allow TypeScript rules to be applied to diff
commands from the CLI
Patch Changes
[
2fc8b25,ef13125]:@graphql-inspector/[email protected]
Major Changes
#2893
ef13125Thanks @jdolle! - This is a major change to
@graphql-inspector/coreand introduces a new
@graphql-inspector/patchpackage, which applies changes output fromdiffon top of a schema -- essentially rebasing these changes onto any schema.
These changes include:
indicating if the change applies to a new type or an existing type.
node being changed. For example,
EnumValueDeprecationReasonAdded's path previously referencedthe enumValue (e.g.
EnumName.value), not the deprecated directive (e.g.EnumName.value.@deprecated).function to apply changes accurately.
diffoutput when a new node is added. This can dramaticallyincrease the number of changes listed which can be noisy, but it makes it possible for
"@graphql-inspector/patch" to apply all changes from a schema. This can be optionally filtered
using a newly exported
DiffRule.simplifyChangesrule.For example, given an existing schema:
And a diff schema:
Then previously the output would be:
[ { "criticality": { "level": "NON_BREAKING" }, "message": "Type 'Address' was added", "meta": { "addedTypeKind": "ObjectTypeDefinition", "addedTypeName": "Address" }, "path": "Address", "type": "TYPE_ADDED" }, { "criticality": { "level": "NON_BREAKING" }, "message": "Field 'address' was added to object type 'User'", "meta": { "addedFieldName": "address", "addedFieldReturnType": "Address", "typeName": "User", "typeType": "object type" }, "path": "User.address", "type": "FIELD_ADDED" } ]But now the output also includes the fields inside the new
Addresstype:[ { "criticality": { "level": "NON_BREAKING" }, "message": "Type 'Address' was added", "meta": { "addedTypeKind": "ObjectTypeDefinition", "addedTypeName": "Address" }, "path": "Address", "type": "TYPE_ADDED" }, { "criticality": { "level": "NON_BREAKING" }, "message": "Field 'line1' was added to object type 'Address'", "meta": { "addedFieldName": "line1", "addedFieldReturnType": "String!", "typeName": "Address", "typeType": "object type" }, "path": "Address.line1", "type": "FIELD_ADDED" }, { "criticality": { "level": "NON_BREAKING" }, "message": "Field 'line2' was added to object type 'Address'", "meta": { "addedFieldName": "line2", "addedFieldReturnType": "String!", "typeName": "Address", "typeType": "object type" }, "path": "Address.line2", "type": "FIELD_ADDED" }, { "criticality": { "level": "NON_BREAKING" }, "message": "Field 'address' was added to object type 'User'", "meta": { "addedFieldName": "address", "addedFieldReturnType": "Address", "typeName": "User", "typeType": "object type" }, "path": "User.address", "type": "FIELD_ADDED" } ]These additional changes can be filtered using a new rule:
Minor Changes
2fc8b25Thanks @emileriksson! - Apollo Federation v2 support.
Introduced built-in Federation v2 directives and a new CLI flag --federationV2 to enable
processing schemas that use them.
@graphql-inspector/[email protected]
Minor Changes
2fc8b25Thanks @emileriksson! - Apollo Federation v2 support.
Introduced built-in Federation v2 directives and a new CLI flag --federationV2 to enable
processing schemas that use them.
Patch Changes
[
2fc8b25]:@graphql-inspector/[email protected]
Minor Changes
2fc8b25Thanks @emileriksson! - Apollo Federation v2 support.
Introduced built-in Federation v2 directives and a new CLI flag --federationV2 to enable
processing schemas that use them.
@graphql-inspector/[email protected]
Patch Changes
[
2fc8b25,ef13125]:@graphql-inspector/[email protected]
Patch Changes
[
2fc8b25]:@graphql-inspector/[email protected]
Patch Changes
[
2fc8b25,ef13125]:@graphql-inspector/[email protected]
Patch Changes
[
2fc8b25,ef13125]:@graphql-inspector/[email protected]
Patch Changes
[
2fc8b25]:@graphql-inspector/[email protected]
Patch Changes
[
2fc8b25,ef13125]:@graphql-inspector/[email protected]
Patch Changes
[
2fc8b25]:@graphql-inspector/[email protected]
Patch Changes
[
2fc8b25,ef13125]:@graphql-inspector/[email protected]
Patch Changes
[
2fc8b25,ef13125]:@graphql-inspector/[email protected]
Patch Changes
#2893
ef13125Thanks @jdolle! - Initial release. Patch applies a list of changes
(output from
@graphql-inspector/core'sdiff) to a GraphQL Schema.Example usage:
If working from an AST, you may alternatively use the exported
patchfunction. But be careful tomake sure directives are included in your AST or those changes will be missed.