Skip to content

InputFieldAddedChange rule flag adding non-null fields with default values as breaking #2880

Open
@janeli1

Description

@janeli1

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

  • 1. The issue provides a reproduction available on GitHub, Stackblitz or CodeSandbox

    Make sure to fork this template and run pnpm generate in the terminal.

    Please make sure the Codegen and plugins version under package.json matches yours.

  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

Describe the bug

InputFieldAddedChange rule flag adding non-null fields with default values as breaking, however, adding such fields should be flagged as not breaking.

To Reproduce Steps to reproduce the behavior:
old schema:

        input Foo {
          a: String!
          b: String!
        }

new schema:

        input Foo {
          a: String!
          b: String!
          c: String! = "Eee"
        }

use command: graphql-inspector diff old_schema new_schema

Expected behavior
Adding such fields should be flagged as not breaking.

Environment:

  • OS:
  • @graphql-inspector/...:
  • graphql:
  • NodeJS:

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions