How do I post a mutation query to the API when it's not valid JSON?

New Member
3 0 0

I'm trying to post my query to  /admin/api/2019-10/graphql.json with the data parameter containing my mutation query. If I do this as a python string I get error 822 unexpected token errors. I assume the API accepts only JSON data passed to data, but I can't load my query as a JSON because it's not valid. 


The query I'm using works on the GraphiQL app and I can post it here if needed but it's rather long. Instead this mutation query from the tutorial is also not valid JSON.


How would I post this to /admin/api/2019-10/graphql.json?