Skip to content

Bug: Using a variable in multiple queries only works for first query #262

Description

@hamidfzm

I'm using python graphql 2.2.1 with python 3.7. And here is my query:

query allPhotos($page: Int, $perPage: Int, $sortField: String, $sortOrder: String, $filter: PhotoFilter) {
  items: allPhotos(page: $page, perPage: $perPage, sortField: $sortField, sortOrder: $sortOrder, filter: $filter) {
    id
    photographer_id
    event_id
    source
    thumbnail
    created_at
    updated_at
    __typename
  }
  total: _allPhotosMeta(page: $page, perPage: $perPage, filter: $filter) {
    count
    __typename
  }

}

with the following variable:

{
  "filter": {"userId": "1"}
}

So here is what happens:
filter variable is only populated in allPhotos query and _allPhotosMeta filter variable is None. But if I add a new variable like filter2 equal to filter I get the correct result. This only happens in Python. It's ok in NodeJS.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions