apollographql / meteor-integration

🚀 meteor add apollo
http://dev.apollodata.com/core/meteor.html
108 stars 45 forks source link

meteor-apollo-gateway #127

Closed adrianflda closed 6 years ago

adrianflda commented 6 years ago
**meteor-apollo-gateway**

hello every one, i want an api gateway where merge all my remotes schemas, any example??? thanks

lorensr commented 6 years ago

Hey, instructions for doing so with apollo server should work—don't need anything Meteor-specific.

adrianflda commented 6 years ago

(async function () { try { //promise.all to grab all remote schemas at the same time, we do not care what order they come back but rather just when they finish allSchemas = await Promise.all(endpoints.map(ep => getIntrospectSchema(ep))); //create function for /graphql endpoint and merge all the schemas app.use('/graphql', bodyParser.json(), graphqlExpress({ schema: mergeSchemas({ schemas: allSchemas }) })); //start up a graphql endpoint for our main server app.listen(PORT, () => console.log('GraphQL API listening on port:' + PORT)); } catch (error) { console.log('ERROR: Failed to grab introspection queries', error); } })();

i found this but not run over meteor

lorensr commented 6 years ago

I'm not sure what the issue is, but you could try stack overflow

adrianflda commented 6 years ago

ok thanks, i just ask any help for my project