Closed
Description
How can I use this library to send the data as form-data instead of application/json and add a file?
I want to implement this interface: https://developer.clearfacts.be/?shell#upload-a-sales-invoice-through-a-mutation
I have a Stream-object with the PDF-file and this:
var uploadRequest = new GraphQLRequest {
Query = @"
mutation upload {
vatnumber: $vat,
filename: $name,
invoicetype: $invoicetype
}",
OperationName = "upload",
Variables = new {
name = filename,
vat = "1234",
invoicetype = "SALE"
}
};
var graphQLUploadResponse = await graphQLClient.SendMutationAsync<File>(uploadRequest);