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

is OPTIONAL_ARG_ADDED a breaking change ? #3829

Closed
spydercavern opened this issue Jan 16, 2023 · 3 comments
Closed

is OPTIONAL_ARG_ADDED a breaking change ? #3829

spydercavern opened this issue Jan 16, 2023 · 3 comments

Comments

@spydercavern
Copy link

OPTIONAL_ARG_ADDED a breaking change ?

Can any one help regarding the rational for OPTIONAL_ARG_ADDED as a breaking change ?

it('should detect if an optional field argument was added', () => {
const oldSchema = buildSchema(type Type1 { field1(arg1: String): String });

const newSchema = buildSchema(`
  type Type1 {
    field1(arg1: String, arg2: String): String
  }
`);

expect(findDangerousChanges(oldSchema, newSchema)).to.deep.equal([
  {
    type: DangerousChangeType.OPTIONAL_ARG_ADDED,
    description: 'An optional arg arg2 on Type1.field1 was added.',
  },
]);

https://www.apollographql.com/docs/graphos/delivery/schema-checks/#schema-additions implementation list this change as non breaking change as well, which i agree too as well.

@yaacovCR
Copy link
Contributor

yaacovCR commented Mar 7, 2023

It is listed as a dangerous change, rather than breaking, right?

I am not sure why it is called "dangerous" as opposed to simply a change, but that is the only other category. :)

@JoviDeCroock
Copy link
Member

It shouldn't be marked as a breaking change, I don't think it should even be marked as a dangerous change. I guess the dangerous change could be justified if we say that we split up functionality, however that's on the resolver/logic side.

@yaacovCR
Copy link
Contributor

yaacovCR commented Oct 6, 2024

Backstory here: #1096 The idea was that you might have to update client code.

@yaacovCR yaacovCR closed this as completed Oct 6, 2024
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

No branches or pull requests

3 participants