You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Currently on v3.4.0 when uploading files, a mimetype is not being provided. This seems to default files as text/plain, at least on the Apollo GraphQL server implementation I've testing against.
The transport I'm currently using is requests, however, it's probably the case on other transports as well:
Option 2. should be done another way as we are detecting the files by checking their type, and now the provided value is a tuple instead of a File object.
One way to do it would be to add a new parameter to the file object and use it if it is present.
Something like this:
Describe the bug
Currently on
v3.4.0
when uploading files, a mimetype is not being provided. This seems to default files astext/plain
, at least on the Apollo GraphQL server implementation I've testing against.The transport I'm currently using is
requests
, however, it's probably the case on other transports as well:https://github.com/graphql-python/gql/blob/master/gql/transport/requests.py#L185-L187
https://github.com/graphql-python/gql/blob/master/gql/transport/aiohttp.py#L276-L278
Changing the following will work for my use case (
requests
transport):To Reproduce
Same as above
Expected behavior
I suspect there's two ways about this:
System info (please complete the following information):
The text was updated successfully, but these errors were encountered: