Skip to content

Variables not resolved in nested queries #3404

@MedHeikelBouzayene

Description

@MedHeikelBouzayene

Prerequisites

  • I have checked the existing issues to ensure this is not a duplicate.
  • I am running the latest version of Tailcall.

Describe the bug

Variables in nested GraphQL fields are not resolved or included in the query.

Steps to reproduce

I used this query:

query QueryUser($id: ID) {
    queryUser {
        address
        age
        locationId
        name
        post(id: $id) {
            description
            id
        }
    }
}

variables:

{
   "id": "id1"
}

Expected behavior

The $id variable should be resolved to "id1", and the query sent as:

{ "query": "query { user { address age locationId name post(id: \"id1\") { description id } } }" }

Actual behavior

The query is sent with the unresolved variable:

{ "query": "query { user { address age locationId name post(id: $id) { description id } } }" }

Metadata

Metadata

Assignees

No one assigned

    Labels

    state: inactiveNo current action needed/possible; issue fixed, out of scope, or superseded.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions