Skip to content

Consider reducing the criticality of adding new union members?Β #2877

@martinbonnin

Description

@martinbonnin

graphql-inspector currently considers adding new members to an union as Dangerous.

While this could break some clients, I believe there are ways to guard against this on the client side and adding new union members is an important tool for schema evolution that we should encourage as a community.

What about introducing a new less scary ADVISORY criticality level?

export enum CriticalityLevel {
  NonBreaking = 'NON_BREAKING',
  Advisory = 'ADVISORY',
  Dangerous = 'DANGEROUS',
  Breaking = 'BREAKING',
}

This, coupled with best practices how to handle unkown types/enum values on the client, would allow teams to update their schemas much more confidently.

Thoughts?

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