Code Monkey home page Code Monkey logo

graphql-schema-utils's People

Contributors

heneryville avatar tyratox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

graphql-schema-utils's Issues

Optional to Required should be backwards compatible

I've just seen an issue where a backwards incompatible change has been detected, when a field went from optional to required in the API output.

I'm not sure that this should be backwards incompatible?

Field type changed on field User.cart from : `"Cart"` to `"Cart!"`.

On the wire, this will be either null or an object. Clients using checks or even codegen may be currently supporting this as optional (i.e. with a Maybe(Cart) type), but given that the format on the wire looks identical in the required case, I think it's fully backwards compatible.

Would be keen to understand if this is not backwards compatible in the general case, or get a fix out if it is.

Incorrectly detected backwards compatibility

Field type changed on field MarkAllIdeasAsSeenInput.ideaIds from : "[ID!]!" to "[ID!]".

I just got this output from some tooling that we use built around graphql-schema-utils. To my understanding, an input field changing from required to not-required is a backwards compatible change, so this looks like a bug.

Could you confirm whether this is expected or not, am I missing details about backwards compatibility here?

Adding new types to a Union should be backwards compatible

Given that GraphQL's type/interface matching syntax provides powerful control over the format of returned data, I believe adding types to a GraphQL Union should be considered backwards compatible.

I could see the option for adding a strict mode where this case, and potentially also the addition of new values to enums, are considered backwards incompatible, but with the affordances given by GraphQL'- structure, semantics, and syntax, I believe the default behaviour here should be to be backwards compatible.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.