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

Improve typechecks on nested args #1290

Conversation

polleuretan
Copy link
Contributor

@polleuretan polleuretan commented Nov 20, 2023

This PR adds check to see if the variable type matches the argument type for nested arguments. Currently this check works only for "top level" arguments, but misses the ones used inside input objects (see the test case in PR).

Specifically, documents of the form:

  mutation ($value: String) {
    updateThing(id: "foo", thing: {value: $value}) {
      name
      value
    }
  }

where the variable $value is used inside of an input object literal were not checked properly prior to this PR.

This is a bugfix, but will have the effect that some previously valid documents are now marked as invalid.

Copy link
Contributor

@benwilson512 benwilson512 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent catch, thank you! I have updated the PR body a bit to elaborate more.

@benwilson512 benwilson512 merged commit d8644ff into absinthe-graphql:main Nov 23, 2023
@gsychev
Copy link

gsychev commented Jan 21, 2025

This is a breaking change and it was a misleading thing to release it in patch version bump. This must've been an at least minor version bump.

This thing has consumed days of work from several engineers in my project and we were very close to breaking production.

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

Successfully merging this pull request may close these issues.

3 participants