Tag: graphql-python

  • How to stream file upload using python gql client for GraphQL

    How to stream file upload using python gql client for GraphQL

    0 I am using python gql client to upload files using GraphQL request as below: https://gql.readthedocs.io/en/latest/usage/file_upload.html I am using asynchronous transport transport = AIOHTTPTransport(url=’YOUR_URL’) async with Client(transport=transport) as client: query = gql(”’ mutation singleUpload($file: Upload!) { singleUpload(file: $file) { id } } ”’) async def file_sender(file_name): async with aiofiles.open(file_name, ‘rb’) as f: chunk = await…