Skip to content

Gateway does not deduplicate variables #2839

@hannesj

Description

@hannesj

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)
  }
}

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