GraphQL file uploads and cURL: json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 188 (char 187)

53 views Asked by At

I have a graphql-server that is running at localhost:3001 I want to send files to a python flask server together with some variables in a cURL request. Here is what i'm sending

curl http://localhost:3001/graphql/  -F operations='{ "query": "mutation ConvertDocToPDF($input: ConvertWordDocToPDFInputType!){ convertDocToPDF(input: $input){ success } } ", "variables": { "input" : { "file": null, "saveName": "hello" } ] } }' -F map='{ "0": ["variables.input.file"] }' -F [email protected]

Surprisingly I'm getting an error which says:

json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 188 (char 187)
[11/Jan/2023 09:38:31] "POST /graphql/ HTTP/1.1" 500 107387

What may be the problem in this request. Any help input will be appreciated

0

There are 0 answers