Skip to content

Federation is not generating the good query with variables #2890

@hugues33

Description

@hugues33

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions