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

Gateway does not deduplicate variables #2839

Closed
hannesj opened this issue Jun 13, 2019 · 2 comments · Fixed by #2840
Closed

Gateway does not deduplicate variables #2839

hannesj opened this issue Jun 13, 2019 · 2 comments · Fixed by #2840

Comments

@hannesj
Copy link
Contributor

hannesj commented Jun 13, 2019

When using a federated graph gateway, variable definitions in the query should be deduplicated.

When sending the following query to the gateway:

query TestQuery($size: Int!){
  me {
    id
    name
    profilePicture(size:$size)
    backgroundImage(size:$size)
  }
}

It sends the following query downstream to the service providing me. Note the duplicated size variable definition.

query ($size: Int, $size: Int) {
  me {
    id
    name
    profilePicture(size: $size)
    backgroundImage(size: $size)
  }
}
@hannesj
Copy link
Contributor Author

hannesj commented Jun 13, 2019

Should probably done here

@jbaxleyiii
Copy link
Contributor

@hannesj thanks for the report and the fix!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants