Closed gaetandezeiraud closed 6 years ago
As I don't use Meteor I'm not in a good position to help. Looking at https://github.com/jaydenseric/apollo-upload-server/issues/29#issue-282601315 it seems @windgaucho worked it out. Perhaps they can share some tips?
I'm sorry but I did not have much time to try, so I ended up using the meteor-files package (ostrio:files).
Thanks for your answer. Because i don't have many hours to make the project, i simply use Base64 images. And not this extension.
Thanks for your times.
I don't intend to directly support Meteor, but if anyone manages to work out what it takes to get it working feel free to share the solution here 🙏
@Brouilles
meteor usage is fairly simple:
import { createApolloServer } from 'meteor/apollo';
import { apolloUploadExpress } from 'apollo-upload-server';
const schema = makeExecutableSchema(...);
createApolloServer(
{
schema
},
{
graphiql: true,
configServer: expressServer => {
expressServer.use(bodyParser.json({ limit: '5mb' }));
expressServer.use(apolloUploadExpress());
}
}
);
According to the new naming, it's:
import { createApolloServer } from 'meteor/apollo';
import { graphqlUploadExpress } from 'graphql-upload';
const schema = makeExecutableSchema(...);
createApolloServer(
{
schema
},
{
graphiql: true,
configServer: expressServer => {
expressServer.use(bodyParser.json({ limit: '5mb' }));
expressServer.use(graphqlUploadExpress());
}
}
);
Hi, I'm new with Apollo and GraphQL. I see the setup instruction of this module is possible with Express. I believe Apollo create an express app on the server side with Meteor but it is completely opaque.
Any idea about setup apollo-upload-server on the server side with Meteor ? My main server code. (Apollo setup)
Thanks for your answer and great job for this project !