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

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

Open
SimonSapin opened this issue Nov 25, 2024 · 2 comments
Labels
apollo-compiler issues/PRs pertaining to semantic analysis & validation apollo-compiler-2.0 Potential breaking API changes

Comments

@SimonSapin
Copy link
Contributor

PR #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 SimonSapin added the apollo-compiler issues/PRs pertaining to semantic analysis & validation label Nov 25, 2024
@SimonSapin
Copy link
Contributor Author

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

SimonSapin added a commit that referenced this issue Nov 25, 2024
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.

See #928
@SimonSapin
Copy link
Contributor Author

Revert PR #929

SimonSapin added a commit that referenced this issue Nov 25, 2024
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.

See #928
@SimonSapin SimonSapin added the apollo-compiler-2.0 Potential breaking API changes label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apollo-compiler issues/PRs pertaining to semantic analysis & validation apollo-compiler-2.0 Potential breaking API changes
Projects
None yet
Development

No branches or pull requests

1 participant