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

Fixes issue where there can be naming collisions in contextual parameter names #3155

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

clenfest
Copy link
Contributor

Subgraph number set for a contextual paramter was colliding if used in multiple subgraphs

@clenfest clenfest requested a review from a team as a code owner September 25, 2024 15:10
Copy link

netlify bot commented Sep 25, 2024

Deploy Preview for apollo-federation-docs canceled.

Name Link
🔨 Latest commit 09150a6
🔍 Latest deploy log https://app.netlify.com/sites/apollo-federation-docs/deploys/66f427f6a78c5c000836c7dc

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@clenfest clenfest merged commit e1e2605 into main Sep 25, 2024
19 checks passed
@clenfest clenfest deleted the clenfest/context_param_naming branch September 25, 2024 15:41
sachindshinde pushed a commit that referenced this pull request Sep 27, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @apollo/composition@2.9.2

### Patch Changes

- Updated dependencies
\[[`2192f355f50db33fe0807d16153f357696b9f190`](2192f35),
[`e1e2605b30efc488b57f62ba43436606a38a3607`](e1e2605),
[`5ac01b534318105e904c1e6598070f753add3bb1`](5ac01b5)]:
    -   @apollo/federation-internals@2.9.2
    -   @apollo/query-graphs@2.9.2

## @apollo/gateway@2.9.2

### Patch Changes

- Updated dependencies
\[[`2192f355f50db33fe0807d16153f357696b9f190`](2192f35),
[`e1e2605b30efc488b57f62ba43436606a38a3607`](e1e2605),
[`5ac01b534318105e904c1e6598070f753add3bb1`](5ac01b5)]:
    -   @apollo/query-planner@2.9.2
    -   @apollo/federation-internals@2.9.2
    -   @apollo/composition@2.9.2

## @apollo/federation-internals@2.9.2

### Patch Changes

- Fixes handling of a `__typename` selection during query planning
process.
([#3156](#3156))

When expanding fragments we were keeping references to the same `Field`s
regardless where those fragments appeared in our original selection set.
This was generally fine as in most cases we would have same inline
fragment selection sets across whole operation but was causing problems
when we were applying another optimization by collapsing those expanded
inline fragments creating a new selection set. As a result, if any
single field selection (within that fragment) would perform optimization
around the usage of `__typename`, ALL occurrences of that field
selection would get that optimization as well.

- Add validations for demand control directive applications
([#3148](#3148))

## @apollo/query-graphs@2.9.2

### Patch Changes

- Fixes issue where contextual parameters can have naming collisions if
used in multiple subgraphs
([#3155](#3155))

- Updated dependencies
\[[`2192f355f50db33fe0807d16153f357696b9f190`](2192f35),
[`5ac01b534318105e904c1e6598070f753add3bb1`](5ac01b5)]:
    -   @apollo/federation-internals@2.9.2

## @apollo/query-planner@2.9.2

### Patch Changes

- Fixes handling of a `__typename` selection during query planning
process.
([#3156](#3156))

When expanding fragments we were keeping references to the same `Field`s
regardless where those fragments appeared in our original selection set.
This was generally fine as in most cases we would have same inline
fragment selection sets across whole operation but was causing problems
when we were applying another optimization by collapsing those expanded
inline fragments creating a new selection set. As a result, if any
single field selection (within that fragment) would perform optimization
around the usage of `__typename`, ALL occurrences of that field
selection would get that optimization as well.

- Fixes issue where contextual parameters can have naming collisions if
used in multiple subgraphs
([#3155](#3155))

- Updated dependencies
\[[`2192f355f50db33fe0807d16153f357696b9f190`](2192f35),
[`e1e2605b30efc488b57f62ba43436606a38a3607`](e1e2605),
[`5ac01b534318105e904c1e6598070f753add3bb1`](5ac01b5)]:
    -   @apollo/federation-internals@2.9.2
    -   @apollo/query-graphs@2.9.2

## @apollo/subgraph@2.9.2

### Patch Changes

- Updated dependencies
\[[`2192f355f50db33fe0807d16153f357696b9f190`](2192f35),
[`5ac01b534318105e904c1e6598070f753add3bb1`](5ac01b5)]:
    -   @apollo/federation-internals@2.9.2

## apollo-federation-integration-testsuite@2.9.2

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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