ChilliCream / graphql-platform

Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.
https://chillicream.com
MIT License
4.96k stars 722 forks source link

Do not produce a subgraph called default when no subgraph-config is available #7044

Open Jonny-Collins opened 1 month ago

Jonny-Collins commented 1 month ago

Product

Hot Chocolate

Is your feature request related to a problem?

When using the HotChocolate fusion commandline tool to pack a subgraph, it looks for the subgraph name in the subgraph-config.json. If it cannot find one, it uses the name default for the subgraph.

We had a bug recently where our subgraph-config was not being provided correctly to our composition step in CI and it was just producing a default subgraph and composing it. We had multiple services inherit this bug, so they were effectively overwriting each other's subgraphs in the composition.

This also tied particular types in the graph to the default subgraph so even after it was fixed, types were not updating as expected in the composed graph because they were still referenced to the default subgraph (which was not super obvious).

The solution you'd like

While these are just symptoms of our own bug, it might be more advantageous if the pack step would require a subgraph, and not revert to a default name value for the subgraph.