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

Federation is not generating the good query with variables #2890

Closed
hugues33 opened this issue Jun 20, 2019 · 2 comments
Closed

Federation is not generating the good query with variables #2890

hugues33 opened this issue Jun 20, 2019 · 2 comments

Comments

@hugues33
Copy link
Contributor

hugues33 commented Jun 20, 2019

Hello,

I have a problem with the following query :

  query OFFER_QUERY($selectedOffer: String) {
    applicationsCodes
    permissions(applicationCodes: [$selectedOffer])
    applications(applicationCodes: [$selectedOffer]) {
      code
    }

when processed by Gateway, the query becomes :

query ($selectedOffer: String, $selectedOffer: String) {
  applicationsCodes
  permissions(applicationCodes: [$selectedOffer])
  applications(applicationCodes: [$selectedOffer]) {
    code
  }

which generates an error because the variable is defined twice.

@apollo/gateway: 0.6.6

Thanks in advance.

@hannesj
Copy link
Contributor

hannesj commented Jun 21, 2019

Fixed by #2840, which is included on 0.6.7.

@hugues33
Copy link
Contributor Author

It's working fine now!

Thanks

@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

No branches or pull requests

2 participants