Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SupergraphConfig::merge_subgraphs method #541

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

dotdat
Copy link
Contributor

@dotdat dotdat commented Jul 15, 2024

Adds a method to merge another SupergraphConfig's subgraphs into another.

@dotdat dotdat requested review from a team as code owners July 15, 2024 16:09
@dotdat dotdat merged commit 20ab21a into main Jul 15, 2024
13 checks passed
@dotdat dotdat deleted the dotdat/supergraph-config-merge branch July 15, 2024 16:20
glasser added a commit that referenced this pull request Sep 5, 2024
…e_subgraphs`

This function was added a few months ago in #541 and as far as I know is
only used in Rover for the `supergraph compose` and `dev` commands to
combine configuration from `--graph-ref` and
`--supergraph-config`/`--config` (and the feature does not actually work
for `supergraph compose` due to the issue fixed in
apollographql/rover#2101).

The use case here is to let you run composition or dev against a GraphOS
graph with some local changes, and so "I just want to change the SDL and
nothing else" is a reasonable use case. This change means that if an
override specifies SDL but no routing URL for a subgraph, Rover will
continue to use the routing URL fetched from GraphOS for that subgraph,
which seems reasonable.

While this is a "backwards incompatible" change, this crate is only
intended for use by the Rover CLI and in the one case where this was
called (`rover dev --graph-ref REF --supergraph-config CONFIG`) this
seems like a clear improvement.
tninesling pushed a commit that referenced this pull request Sep 6, 2024
…e_subgraphs` (#574)

This function was added a few months ago in #541 and as far as I know is
only used in Rover for the `supergraph compose` and `dev` commands to
combine configuration from `--graph-ref` and
`--supergraph-config`/`--config` (and the feature does not actually work
for `supergraph compose` due to the issue fixed in
apollographql/rover#2101).

The use case here is to let you run composition or dev against a GraphOS
graph with some local changes, and so "I just want to change the SDL and
nothing else" is a reasonable use case. This change means that if an
override specifies SDL but no routing URL for a subgraph, Rover will
continue to use the routing URL fetched from GraphOS for that subgraph,
which seems reasonable.

While this is a "backwards incompatible" change, this crate is only
intended for use by the Rover CLI and in the one case where this was
called (`rover dev --graph-ref REF --supergraph-config CONFIG`) this
seems like a clear improvement.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants