Send parameters and file for graphql

In the project https://lighthouse-php.com they have an example of sending files with Curl. How can I represent the same in Postman?

```
curl localhost/graphql \
  -F operations='{ "query": "mutation ($file: Upload!) { upload(file: $file) }", "variables": { "file": null } }' \
  -F map='{ "0": ["variables.file"] }' \
  -F 0=@my_file.txt
```

I don’t think Postman currently supports file uploads with GraphQL.

I ran into this issue using graphene-file-upload==1.2.2 as the upload handler and found it extremely complex to prepare the correct payload as the request included additional parameters to the upload file, so I hope this helps:

Please note: the 0 key field type is β€œFile”, not β€œText”, you’ll need to hover over the Key field right side for Postman to show the field type so you can change it.

This is the curl equivalent request for reference:

curl --location --request POST '<REDACTED>/graphql' \
--header 'Authorization: Bearer <REDACTED>' \
--form '0=@"/home/user/Downloads/Five.pdf"' \
--form 'map="{\"0\": [\"variables.data.attachments\"]}"' \
--form 'operations="{
    \"query\": \"mutation AddPOAttachments($data: AddProductAttachmentsInput!) { add_product_attachments(data: $data) { attachments { id url purpose file_info { name type size_in_bytes} __typename } __typename }}\",
    \"variables\":
    {
        \"data\":
        {
            \"sku\": \"123456sku\",
            \"attachments\": null,
            \"purpose\": \"Test\"
        }
    }
}"'

What about sending array of files
do you have any examples or documentation?

Found answer here: