cloudflare / workers-graphql-server

🔥Lightning-fast, globally distributed Apollo GraphQL server, deployed at the edge using Cloudflare Workers
https://graphql-on-workers.signalnerve.com/___graphql
MIT License
678 stars 483 forks source link

Example Apollo Federation with Apollo Gateway #12

Open g3rd opened 5 years ago

g3rd commented 5 years ago

I am working on setting up ApolloGateway, but can't seem to figure out how to plug it into the workers-graphql-server.

Has anyone done something similar?

Following: https://github.com/apollographql/federation-demo Reference: https://www.apollographql.com/docs/apollo-server/federation/introduction/

My long term goal is:

  1. ApolloGateway worker on my base domain
  2. External GraphQL API
  3. Standard GraphQL worker pointing to a REST API
  4. Standard GraphQL worker pointing to Neo4j GraphQL

I am currently working on No. 1 connecting to No. 2. I have a somewhat working No. 4 locally, haven't refactored it into a worker yet.

Any advice, examples, or words of encouragement is greatly appreciated!

PS - I'm willing to create a workers-graphql-gateway-server template to work alongside this project.

kristianfreeman commented 5 years ago

hey @g3rd! sounds interesting, i've seen gateway mentioned in the docs but haven't played around with it myself. from my basic understanding, you should just be able to point apollo at your GraphQL route - does that not work? if you want to put together a test repo, i'd love to try and help get it working :)

g3rd commented 5 years ago

Awesome. Working on it now. 🤞

g3rd commented 5 years ago

Base workers-graphql-gateway-server

jopo11 commented 4 years ago

Did you have any luck with this? I tried with a worker and noticed Apollo gateway was throwing errors as it looks like it was reliant on Node

10thfloor commented 3 years ago

Bump? Does anyone know if this is workable at the moment? As far as I can tell, @apollo/gateway can't be bundled into a webworker :(

nickisyourfan commented 2 years ago

Second the Bump! Would love to know if anyone has had success since?

ktheory commented 2 years ago

Related issue on the Apollo side: https://github.com/apollographql/federation/issues/1918

damianesteban commented 1 year ago

Is it possible to run Apollo Gateway on AWS (for example) and use cloudflare workers for the federated services?