Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Nov 11, 2025

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

  • #2913
    cf9c40c
    Thanks @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

  • #2900
    2fc8b25
    Thanks @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

@graphql-inspector/[email protected]

Major Changes

  • #2893
    ef13125
    Thanks @jdolle! - Added option to include nested changes. Use
    --rule verboseChanges. Enabling this will output nested changes. I.e. if adding a new type, then
    verboseChanges will also include the addition of the fields on that type. By default, these
    changes 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:

    • Adding or removing deprecated directive is considered non-breaking
    • Adding an interface to a new type is non-breaking
    • Adding an argument to a new field is non-breaking
    • Adding a directive to a new object (type, interface, etc..) is non-breaking

Minor Changes

  • #2910
    6a8add5
    Thanks @Tohaker! - Allow TypeScript rules to be applied to diff
    commands from the CLI

Patch Changes

@graphql-inspector/[email protected]

Major Changes

  • #2893
    ef13125
    Thanks @jdolle! - This is a major change to @graphql-inspector/core
    and introduces a new @graphql-inspector/patch package, which applies changes output from diff
    on top of a schema -- essentially rebasing these changes onto any schema.

    These changes include:

    • Numerous adjustments to Change types to create more accurate severity levels, such as a boolean
      indicating if the change applies to a new type or an existing type.
    • Adjustmented the "path" on several change types in order to consistently map to the exact AST
      node being changed. For example, EnumValueDeprecationReasonAdded's path previously referenced
      the enumValue (e.g. EnumName.value), not the deprecated directive (e.g.
      EnumName.value.@deprecated).
    • Added new attributes in order to provide enough context for a new "@graphql-inspector/patch"
      function to apply changes accurately.
    • Added support for repeatable directives
    • Includes all nested changes in diff output when a new node is added. This can dramatically
      increase 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.simplifyChanges rule.

    For example, given an existing schema:

    type User {
      id: ID!
      name: String!
    }

    And a diff schema:

    type User {
      id: ID!
      name: String!
      address: Address
    }
    
    type Address {
      line1: String!
      line2: String!
    }

    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 Address type:

    [
      {
        "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:

    import { diff, DiffRule } from '@graphql-inspector/core'
    
    const changes = await diff(a, b, [DiffRule.simplifyChanges])

Minor Changes

  • #2900
    2fc8b25
    Thanks @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

  • #2900
    2fc8b25
    Thanks @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

@graphql-inspector/[email protected]

Minor Changes

  • #2900
    2fc8b25
    Thanks @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

@graphql-inspector/[email protected]

Patch Changes

@graphql-inspector/[email protected]

Patch Changes

@graphql-inspector/[email protected]

Patch Changes

@graphql-inspector/[email protected]

Patch Changes

@graphql-inspector/[email protected]

Patch Changes

@graphql-inspector/[email protected]

Patch Changes

@graphql-inspector/[email protected]

Patch Changes

@graphql-inspector/[email protected]

Patch Changes

@graphql-inspector/[email protected]

Patch Changes

  • #2893
    ef13125
    Thanks @jdolle! - Initial release. Patch applies a list of changes
    (output from @graphql-inspector/core's diff) to a GraphQL Schema.

    Example usage:

    import { buildSchema } from 'graphql'
    import { diff } from '@graphql-inspector/core'
    import { patchSchema } from '@graphql-inspector/patch'
    
    const schemaA = buildSchema(before, { assumeValid: true, assumeValidSDL: true })
    const schemaB = buildSchema(after, { assumeValid: true, assumeValidSDL: true })
    
    const changes = await diff(schemaA, schemaB)
    const patched = patchSchema(schemaA, changes)

    If working from an AST, you may alternatively use the exported patch function. But be careful to
    make sure directives are included in your AST or those changes will be missed.

@github-actions github-actions bot force-pushed the changeset-release/master branch 3 times, most recently from 842f6dc to f3e7e0d Compare November 11, 2025 22:44
@github-actions github-actions bot force-pushed the changeset-release/master branch from f3e7e0d to 6efeb6c Compare November 11, 2025 22:44
@jdolle jdolle merged commit eae6e1e into master Nov 11, 2025
@jdolle jdolle deleted the changeset-release/master branch November 11, 2025 23:47
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.

1 participant