Do uploads work with mergeSchemas or only stitchSchemas? #4615
-
I'm trying to follow the example in this test, but our gateway currently uses Right now, when I send a request from Postman, it just spins and nothing happens, timing out after a few minutes. If I send the request directly to the downstream service and not through the gateway, it works as expected. This schema and resolver are added during export const uploadScalarSchema = buildSchema(`
scalar Upload
`);
export const uploadResolver = {
Upload: GraphQLUpload // from this lib, NOT graphql-upload
};
mergeSchemas({
mergeDirectives: true,
schemas: [
// ... our remote schemas go here
uploadScalarSchema
],
resolvers: {
// stitched resolvers go here
...uploadResolver
}
}); And during setup I have: import { graphqlUploadExpress } from "graphql-upload";
...
app.use(graphqlUploadExpress); edit edit2: Now I'm getting edit3: I think I need to construct the link differently? makeRemoteExecutableSchema({
schema,
link: buildLink(uri, this.serviceName_, metadata)
}), Do I need to use edit4: using
There's some sort of loop trying to read the file. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I ended up using |
Beta Was this translation helpful? Give feedback.
I ended up using
graphql-upload-minimal
to supplygraphqlUploadExpress
instead of the built-ingraphql-upload
and also had to upgrade node. Working now.