Send a file #36
Replies: 2 comments
-
Hi @miguellz67, I'm afraid I didn't make it possible yet to attach a file to a gql request. For now I would suggest to send a link to the document instead of the file, and then on your graphql server you can download the document by that link. |
Beta Was this translation helpful? Give feedback.
-
I did some research on sending files via GraphQL API and decided to not implement it as part of this library. I assume so because I couldn't find anything about file uploads in the GQL specification. As a workaround, you can simply accept a base64 string on your GQL server as a parameter and send your file content in base64 format. |
Beta Was this translation helpful? Give feedback.
-
I need to send a mutation that takes three variable arguments and one of them is a file, which is mandatory, so I would like to know how I can send this file.
mutation CreateDocumentMutation($document: DocumentInput!, $signers: [SignerInput!]!, $file: Upload!) {createDocument(document: $document, signers: $signers, file: $file) {id name refusable sortable created_at signatures { public_id name email created_at action { name } link { short_link } user { id name email }}}}
Beta Was this translation helpful? Give feedback.
All reactions