how to Upload file from Metor with Apollo server 3.
As far as I know, file upload has also changed in apollo server 3.
May I know how to set the next code in meter?
async function startServer() {
const server = new ApolloServer({
typeDefs,
resolvers,
});
await server.start();
const app = express();
// This middleware should be added before calling `applyMiddleware`.
app.use(graphqlUploadExpress());
server.applyMiddleware({ app });
await new Promise(r => app.listen({ port: 4000 }, r));
console.log(`🚀 Server ready at http://localhost:4000${server.graphqlPath}`);
}
I setup meteor and apollo as follows.
But I don’t know how to set graphql-upload.
If you know how to setup graphql-upload in a meteor with apollo environment, please help.
I have set the graphql-upload in meteor+apollo based on the apollo document as follows.
However, the file is not being uploaded.
Can I know what the problem is?