workers-graphql-server icon indicating copy to clipboard operation
workers-graphql-server copied to clipboard

Example Apollo Federation with Apollo Gateway

Open g3rd opened this issue 5 years ago • 8 comments

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.

g3rd avatar Aug 21 '19 12:08 g3rd

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 :)

kristianfreeman avatar Aug 21 '19 19:08 kristianfreeman

Awesome. Working on it now. 🤞

g3rd avatar Aug 21 '19 21:08 g3rd

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

jopo11 avatar Aug 08 '20 11:08 jopo11

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 :(

10thfloor avatar May 25 '21 19:05 10thfloor

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

nickisyourfan avatar Feb 21 '22 21:02 nickisyourfan

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

ktheory avatar Aug 18 '22 16:08 ktheory

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

damianesteban avatar Nov 08 '22 21:11 damianesteban