ChilliCream / ChilliCream/graphql-platform

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

Open
#7,044 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🌶️ hot chocolate Area: Fusion
Dominant language
C#
Stars
5.8k
Forks
810
Avg merge
15h 39m
Merged PRs (30d)
98

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Hot Chocolate Fusion command-line pack step and its handling of subgraph-config.json. Confirm where the missing configuration becomes the default subgraph name, then define and implement the required failure behavior; done means packing without a subgraph name no longer emits a default-named subgraph.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.