apollographql / apollo-rs

Spec compliant GraphQL Tools in Rust.
Apache License 2.0
577 stars 45 forks source link

Default value validation is a breaking change, do it again in compiler 2.0 #928

Open SimonSapin opened 1 week ago

SimonSapin commented 1 week ago

PR https://github.com/apollographql/apollo-rs/pull/925 includes a change to start validating the default value of input fields and arguments. This turns out to break enough existing schemas (Router rejects them as invalid where it previously accepted them) that we consider it a breaking change. After some discussion, our plan is:

  1. Revert default value validation for now
  2. Publish a new compiler beta without it to unblock current work
  3. Finish up compiler 1.0 stable and use it in Router before its 1.x LTS
  4. Stricter validation, which we consider a breaking change, will be in compiler 2.0which will be used by router 2.0. This is the part tracked by this issue
  5. If needed later, we can backport LTS fixes to compiler 1.x
SimonSapin commented 1 week ago

For reference, graphql-js only recently started validating default input values in https://github.com/graphql/graphql-js/pull/3814. Version 16.x used by router-bridge does not.

SimonSapin commented 1 week ago

Revert PR https://github.com/apollographql/apollo-rs/pull/929