wundergraph / cosmo

The open-source solution to building, maintaining, and collaborating on GraphQL Federation at Scale. The alternative to Apollo Studio and GraphOS.
https://cosmo-docs.wundergraph.com/
Apache License 2.0
750 stars 107 forks source link

Support generating nodev1.EngineConfiguration from a supergraph #1271

Open darren-west opened 1 month ago

darren-west commented 1 month ago

Hi 👋

I was looking at Cosmo router and was investigating if / how to generate an EngineConfiguration proto message from a Supergraph, so that the gateway could be configured with a supergraph.

I couldnt see any obvious way to achieve this right now, unless I am missing something?

The goal is to be able to pass the router a supergraph and start a cosmo router communicating with subgraphs.

Im guessing this could be possibly be achieved with some of the JavaScript packages although ideally I was looking at using GoLang to achieve it.

Thanks in advance.

github-actions[bot] commented 1 month ago

WunderGraph commits fully to Open Source and we want to make sure that we can help you as fast as possible. The roadmap is driven by our customers and we have to prioritize issues that are important to them. You can influence the priority by becoming a customer. Please contact us here.

thisisnithin commented 1 month ago

Hi @darren-west , could you please elaborate on your current setup. Are you trying to use Apollo studio with Cosmo Router?

darren-west commented 1 month ago

Hi @thisisnithin not with Apollo Studio but this is a good use case, I think accepting a supergraph gives the router a lot more flexibility.

I have a supergraph generated by composition and wanted to use this to evaluate the router, without using wundergraph schema registry.

darren-west commented 4 weeks ago

Any update on this? I'm quite keen to look into this although it looks quite involved.

Aenimus commented 2 weeks ago

Hi @darren-west,

This would be a significant development effort. Please can you help me understand the use-case? Is this simply to avoid needing to supply your subgraphs to the composition library to generate an execution config? But why?

darren-west commented 2 weeks ago

Hi @Aenimus

Thanks for getting back to me, my main use case would be to support other schema registries such as Apollo and hive (guild). I quite like the approach of a supergraph for describing a distributed graph, feels like a good fit for a platform agnostic configuration.

What composition library were you mentioning, is there an example?

Aenimus commented 1 week ago

Hi @darren-west,

I think this documentation would be helpful.

The wgc command you're looking for is wgc router compose. The docs should feel familiar if you've used Rover before.