Closed SergenN closed 3 years ago
apollo-client
doesn't support file upload and hence apollo-angular
doesn't support it too.
you have to do a classical POST request here or try to find the Apollo link component that will do a multipart upload for you.
I know only apollo-upload-client
which uses fetch
internally and hence isn't compatible with Angular
some more information on this issue here https://github.com/apollographql/apollo-client/issues/6010
Is this on the roadmap for this plugin? Seems to be a very relevant feature and crucial for many people.
@PhilippS93 I agree that it's very often used functionality but it should appear in apollo-client
first to be available for us
Describe the bug
I'm trying to upload a file with angular-apollo but the file in the request is always an empty object:
To Reproduce Steps to reproduce the behavior:
i'm initializing apollo as following:
In the component i have the following:
My query:
Expected behavior
I expect the image to be uploaded correctly instead of an empty object.
Environment:
@apollo/client
: 3.0.0apollo-angular
: 2.1.0graphql
: 15.4.0@angular/core
: 9.1.6@angular/cli
: 9.1.6typescript
: 3.8.3Additional context