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.

Home Page:https://chillicream.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Jonny-Collins opened this issue · comments

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.