async-graphql / examples

217 stars 54 forks source link

Include a gateway implementation in the federation example #71

Open jamescoleuk opened 1 year ago

jamescoleuk commented 1 year ago

The federation example uses rover to pull the subgraphs together into a supergraph. I have a Apollo Federation gateway written in TypeScript but I'd like to re-write it in Rust. I'm not sure how, and an example here would really help.

urkle commented 9 months ago

@jamescoleuk FYI. the "rover" package does the following.

1) grabs the SDL (subgraphs) from each of the nodes and then builds the supergraph 2) runs the apollo router to run that supergraph.

And that apollow router is written in rust!

https://www.apollographql.com/docs/router/quickstart/ https://github.com/apollographql/router

So, really I don't think there is a need to write another router in rust and instead we can just utilize the one that apollo provides.

The only thing that would be nice is a tool (outside of rover) to compose the supergraph for us :)

Hmm. or make some scripts to use rover supergraph compose to help do that .