graphql-python / graphql-python/graphql-core-legacy

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

Aperta
#262 1 commento 0 reazioni 1 assegnatario Rivendicata da @Cito Vedi su GitHub
need test case
Lingua principale
Python
Stelle
372
Fork
175
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I'm using python graphql 2.2.1 with python 3.7. And here is my query:
```gql
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:
```json
{
"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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.