Closed doanthai closed 3 years ago
Hello @doanthai,
thank you for the report. However it's kinda difficult to know what's going on without a reproducible example.
Are you using apollo-server standalone ? which are your package versions?
If possible, could you please provide one?
At least on our automated tests everything is working fine.
Thank you
Hello @cabelitos , I'm having the same problems.
I'm using standalone, the version of profusion is this "@ profusion / apollo-federation-upload": "^ 2.2.1" and the error you are generating is this:
"TypeError: this.fetcher is not a function",
"at FileUploadDataSource.
[Edit]: When checking the RemoteGraphQLDataSource so that I could create mine because of the problem that is appearing, I saw that it has a fetch from a package.
import {fetch} from 'apollo-server-env
.
So I installed the same in your implementation and made the substitution from httpResponse = yield this.fetcher(httpRequest)
to httpResponse = yield fetch(httpRequest)
. And to my delight it worked.
I'll take a look. ty for the report.
@yuregl keep in mind that the fetcher function for apollo-gateway was introduced in recent versions. What version are you using for @apollo/gateway ?
@cabelitos The version I'm currently using is "@apollo/gateway": "^0.16.0".
@yuregl Bingo, this is the problem. You should use at least "@apollo/gateway": "^0.24.4" . I bet npm/yarn display a bunch of warnings about peerDependencies that were not met.
I'm closing this, since @yuregl is using an outdated version of @apollo/gateway.
When I upload file, a error occur below: this.fetcher is not a function I see fetcher function don't existed in your code. That may be fetch function of core javascript. Please fix it.