I am having trouble with GraphQL queries made in python. It says that the signal $ that determine a variable in the query cannot be parsed.
Error message:
{"errors":[{"message":"Parse error on \"$\" (VAR_SIGN) at [3, 3]","locations":[{"line":3,"column":3}]}]}
Is there other way to use variables in this kind of request?
Here is my query, I didn't paste the fragment because I think it's not the problem
query ApplicationIndexQuery(
$status: Boolean!
$page: Int
$perPage: Int
$filters: ApplicationFilter
$sort: String
) {
allOpportunityApplication(page: $page, per_page: $perPage, filters: $filters, sort: $sort) {
...ApplicationList_list
}
}
variables = {
"status": True,
"page": 1,
"perPage": 517,
"filters": {
"date_realized": {
"from": "2018-12-01",
"to": "2019-03-31"
},
"person_home_mc": 1535,
"programmes": 5
}
query
should be at the top level, but it seems like in your example it's enclosed in curly braces. See below:
https://github.com/apollographql/graphql-tag/issues/180#issuecomment-386540792
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With