Releases: apollographql/federation
@apollo/federation-internals@2.9.3
Patch Changes
-
fix: normalize field set selection sets (#3162)
FieldSet
scalar represents a selection set without outer braces. This means that users could potentially specify some selections that could be normalized (i.e. eliminate duplicate field selections, hoist/collapse unnecessary inline fragments, etc). Previously we were using@requires
field set selection AS-IS for edge conditions. With this change we will now normalize theFieldSet
selections before using them as fetch node conditions. -
Fixed missing referenced variables in the
variableUsages
field of fetch operations (#3166)Query variables used in fetch operation should be listed in the
variableUsages
field. However, there was a bug where variables referenced by query-level directives could be missing in the field. -
Fix fragment generation recursion logic to apply minification on all subselections. (#3158)
-
Fixed a bug that
__typename
with applied directives gets lost in fetch operations. (#3164)The sibling typename optimization used by query planner simplifies operations by folding
__typename
selections into their sibling selections. However, that optimization does not account for directives or aliases. The bug was applying the optimization even if the__typename
has directives on it, which caused the selection to lose its directives. Now,__typename
with directives (or aliases) are excluded from the optimization.
@apollo/composition@2.9.3
Patch Changes
- Updated dependencies [
345661c558773e4eb5d5f0b28464a8d1acdc2a2d
,e00e1c9892b48ac89823597113989830877966ef
,cc4573471696ef78d04fa00c4cf8e5c50314ba9f
,062572b3253e8640b60a0bf58b83945094b76b6f
,df5eb3cb0e2b4802fcd425ab9c23714de2707db3
,1c99cb0dcc6c639ac351210932623ab0bd6907e4
]:- @apollo/query-graphs@2.9.3
- @apollo/federation-internals@2.9.3
@apollo/subgraph@2.9.2
Patch Changes
- Updated dependencies [
2192f355f50db33fe0807d16153f357696b9f190
,5ac01b534318105e904c1e6598070f753add3bb1
]:- @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)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)
-
Updated dependencies [
2192f355f50db33fe0807d16153f357696b9f190
,e1e2605b30efc488b57f62ba43436606a38a3607
,5ac01b534318105e904c1e6598070f753add3bb1
]:- @apollo/federation-internals@2.9.2
- @apollo/query-graphs@2.9.2
@apollo/query-graphs@2.9.2
Patch Changes
-
Fixes issue where contextual parameters can have naming collisions if used in multiple subgraphs (#3155)
-
Updated dependencies [
2192f355f50db33fe0807d16153f357696b9f190
,5ac01b534318105e904c1e6598070f753add3bb1
]:- @apollo/federation-internals@2.9.2
@apollo/gateway@2.9.2
Patch Changes
- Updated dependencies [
2192f355f50db33fe0807d16153f357696b9f190
,e1e2605b30efc488b57f62ba43436606a38a3607
,5ac01b534318105e904c1e6598070f753add3bb1
]:- @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)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)
@apollo/composition@2.9.2
Patch Changes
- Updated dependencies [
2192f355f50db33fe0807d16153f357696b9f190
,e1e2605b30efc488b57f62ba43436606a38a3607
,5ac01b534318105e904c1e6598070f753add3bb1
]:- @apollo/federation-internals@2.9.2
- @apollo/query-graphs@2.9.2
@apollo/subgraph@2.10.0-alpha.2
CHANGELOG for @apollo/subgraph
2.9.1
Patch Changes
- Updated dependencies [
b8e4ab5352a4dfd262af49493fdd42e86e5e3d99
,e6c05b6c96023aa3dec79889431f8217fcb3806d
]:- @apollo/federation-internals@2.9.1
2.9.0
Patch Changes
- Updated dependencies [
02c2a34a62c3717a4885449172e404f19ebf66c9
,0ccfd937d4b4a576f890665ceebbd7986fac5d0c
,e0a5075c0d12a0e2f7ef303b246e3216a139d3e0
]:- @apollo/federation-internals@2.9.0
2.8.5
Patch Changes
- Updated dependencies []:
- @apollo/federation-internals@2.8.5
2.8.4
Patch Changes
-
Add descriptions for federation directives (#3095)
-
Updated dependencies [
5f4bb160d024678d6facd471c43c8ec61c86e701
,672aca7cbeb0a6a38586357a4e154f2dd91caa0c
]:- @apollo/federation-internals@2.8.4
2.8.3
Patch Changes
- Updated dependencies [
50d648ccffb05591878de75dc5522914ed48698f
,f753d55e9a49d11389ee4f8d7976533447e95ede
,3af790517d662f3bec9064c0bf243014c579e9cd
]:- @apollo/federation-internals@2.8.3
2.8.3-beta.2
Patch Changes
- Updated dependencies [
50d648ccffb05591878de75dc5522914ed48698f
]:- @apollo/federation-internals@2.8.3-beta.2
2.8.3-beta.1
Patch Changes
- Updated dependencies []:
- @apollo/federation-internals@2.8.3-beta.1
2.8.3-beta.0
Patch Changes
- Updated dependencies [
f753d55e9a49d11389ee4f8d7976533447e95ede
,3af790517d662f3bec9064c0bf243014c579e9cd
]:- @apollo/federation-internals@2.8.3-beta.0
2.8.2
Patch Changes
- Updated dependencies [
b2e5ab66f84688ec304cfcf2c6f749c86aded549
]:- @apollo/federation-internals@2.8.2
2.8.1
Patch Changes
- Updated dependencies []:
- @apollo/federation-internals@2.8.1
2.8.0
Patch Changes
-
Various set context bugfixes (#3017)
-
Updated dependencies [
c4744da360235d8bb8270ea048f0e0fa5d03be1e
,8a936d741a0c05835ff2533714cf330d18209179
]:- @apollo/federation-internals@2.8.0
2.8.0-alpha.1
Patch Changes
- Updated dependencies []:
- @apollo/federation-internals@2.8.0-alpha.1
2.8.0-alpha.0
Patch Changes
- Updated dependencies [
c4744da360235d8bb8270ea048f0e0fa5d03be1e
]:- @apollo/federation-internals@2.8.0-alpha.0
2.7.8
Patch Changes
-
Triggering a clean 2.7.8 release now that harmonizer build has been fixed. (#3010)
-
Updated dependencies [
2ad72802044310a528e8944f4538efe519424504
]:- @apollo/federation-internals@2.7.8
2.7.7
Patch Changes
-
No logical changes since 2.7.5 or 2.7.6, but we fixed a bug in the release process, so we need to publish a new patch version (2.7.7). (#2999)
-
Updated dependencies [
bee0b0828b4fb6a1d3172ac330560e2ab6c046bb
]:- @apollo/federation-internals@2.7.7
2.7.6
Patch Changes
- Updated dependencies []:
- @apollo/federation-internals@2.7.6
2.7.5
Patch Changes
- Updated dependencies []:
- @apollo/federation-internals@2.7.5
2.7.4
Patch Changes
- Updated dependencies [
d80b7f0ca1456567a0866a32d2b2abf940598f77
]:- @apollo/federation-internals@2.7.4
2.7.3
Patch Changes
- Updated dependencies [
ec04c50b4fb832bfd281ecf9c0c2dd7656431b96
,a494631918156f0431ceace74281c076cf1d5d51
]:- @apollo/federation-internals@2.7.3
2.7.2
Patch Changes
- Updated dependencies [
33b937b18d3c7ca6af14b904696b536399e597d1
,09cd3e55e810ee513127b7440f5b11af7540c9b0
,d7189a86c27891af408d3d0184db6133d3342967
]:- @apollo/federation-internals@2.7.2
2.7.1
Patch Changes
- Updated dependencies [
493f5acd16ad92adf99c963659cd40dc5eac1219
]:- @apollo/federation-internals@2.7.1
2.7.0
Minor Changes
-
Implement progressive
@override
functionality (#2911)The progressive
@override
feature brings a new argument to the@override
directive:label: String
. When a label is added to an@override
application, the override becomes conditional, depending on parameters provided to the query planner (a set of which labels should be overridden). Note that this feature will be supported in router for enterprise users only.Out-of-the-box, the router will support a percentage-based use case for progressive
@override
. For example:type Query { hello: String @override(from: "original", label: "percent(5)") }
The above example will override the root
hello
field from the "original" subgraph 5% of the time.More complex use cases will be supported by the router via the use of coprocessors/rhai to resolve arbitrary labels to true/false values (i.e. via a feature flag service).
Patch Changes
- Updated dependencies [
6ae42942b13dccd246ccc994faa2cb36cd62cb3c
,66833fb8d04c9376f6ed476fed6b1ca237f477b7
,931f87c6766c7439936df706727cbdc0cd6bcfd8
]:- @apollo/federation-internals@2.7.0
2.6.3
Patch Changes
- Updated dependencies []:
- @apollo/federation-internals@2.6.3
2.6.2
Patch Changes
- Updated dependencies [
7b5b836d15247c997712a47847f603aa5887312e
,74ca7dd617927a20d79b824851f7651ef3c40a4e
]:- @apollo/federation-internals@2.6.2
2.6.1
Patch Changes
- Updated dependencies [
0d5ab01a
]:- @apollo/federation-internals@2.6.1
2.6.0
Patch Changes
2.5.7
Patch Changes
- Updated dependencies []:
- @apollo/federation-internals@2.5.7
2.5.6
Patch Changes
- Updated dependencies [
c719214a
]:- @apollo/federation-internals@2.5.6
2.5.5
Patch Changes
-
Fix specific case for requesting __typename on interface entity type (#2775)
In certain cases, when resolving a __typename on an interface entity (due to it actual being requested in the operation), that fetch group could previously be trimmed / treated as useless. At a glance, it appears to be a redundant step, i.e.:
{ ... on Product { __typename id }} => { ... on Product { __typename} }
It's actually necessary to preserve this in the case that we're coming from an interface object to an (entity) interface so that we can resolve the concrete __typename correctly.
-
Updated dependencies []:
...
@apollo/query-planner@2.10.0-alpha.2
CHANGELOG for @apollo/query-planner
2.9.1
Patch Changes
- Updated dependencies [
b8e4ab5352a4dfd262af49493fdd42e86e5e3d99
,e6c05b6c96023aa3dec79889431f8217fcb3806d
]:- @apollo/federation-internals@2.9.1
- @apollo/query-graphs@2.9.1
2.9.0
Patch Changes
-
Fix issue where variable was not passed into subgraph when embedded in a fragment (#3119)
-
Updated dependencies [
acfe3193429c7f99b4fc564b20828aaa8659a75c
,02c2a34a62c3717a4885449172e404f19ebf66c9
,0ccfd937d4b4a576f890665ceebbd7986fac5d0c
,e0a5075c0d12a0e2f7ef303b246e3216a139d3e0
]:- @apollo/query-graphs@2.9.0
- @apollo/federation-internals@2.9.0
2.8.5
🔒 Security
CVE-2024-43414: Prevent uncontrolled recursion for complex queries
Correct a bug where complex queries can cause uncontrolled recursion due to failure to reduce the number of possible query plans (classified as CWE-674). (#3128)
This weakness impacts all v2 versions of @apollo/query-planner
prior to this release. See the associated Github Advisory, GHSA-fmj9-77q8-g6c4, for more information.
- Updated dependencies []:
- @apollo/federation-internals@2.8.5
- @apollo/query-graphs@2.8.5
2.8.4
Patch Changes
- Updated dependencies [
5f4bb160d024678d6facd471c43c8ec61c86e701
,672aca7cbeb0a6a38586357a4e154f2dd91caa0c
]:- @apollo/federation-internals@2.8.4
- @apollo/query-graphs@2.8.4
2.8.3
Patch Changes
-
Query graph caches now use maps instead of sparsely-populated arrays for per-subgraph data. (#3066)
-
Use sets instead of arrays for tracking schema type/directive referencers. (#3067)
-
Updated dependencies [
38debcf2f9af1a719bd1c8acbd9335efa8427ddb
,50d648ccffb05591878de75dc5522914ed48698f
,860aace9904e787f9bf05aad94be5b5920f10543
,f753d55e9a49d11389ee4f8d7976533447e95ede
,3af790517d662f3bec9064c0bf243014c579e9cd
]:- @apollo/query-graphs@2.8.3
- @apollo/federation-internals@2.8.3
2.8.3-beta.2
Patch Changes
- Updated dependencies [
50d648ccffb05591878de75dc5522914ed48698f
]:- @apollo/federation-internals@2.8.3-beta.2
- @apollo/query-graphs@2.8.3-beta.2
2.8.3-beta.1
Patch Changes
- Updated dependencies []:
- @apollo/federation-internals@2.8.3-beta.1
- @apollo/query-graphs@2.8.3-beta.1
2.8.3-beta.0
Patch Changes
-
Query graph caches now use maps instead of sparsely-populated arrays for per-subgraph data. (#3066)
-
Use sets instead of arrays for tracking schema type/directive referencers. (#3067)
-
Updated dependencies [
38debcf2f9af1a719bd1c8acbd9335efa8427ddb
,860aace9904e787f9bf05aad94be5b5920f10543
,f753d55e9a49d11389ee4f8d7976533447e95ede
,3af790517d662f3bec9064c0bf243014c579e9cd
]:- @apollo/query-graphs@2.8.3-beta.0
- @apollo/federation-internals@2.8.3-beta.0
2.8.2
Patch Changes
- Updated dependencies [
b2e5ab66f84688ec304cfcf2c6f749c86aded549
]:- @apollo/federation-internals@2.8.2
- @apollo/query-graphs@2.8.2
2.8.1
Patch Changes
- Updated dependencies []:
- @apollo/federation-internals@2.8.1
- @apollo/query-graphs@2.8.1
2.8.0
Minor Changes
-
Implement new directives to allow getting and setting context. This allows resolvers to reference and access data referenced by entities that exist in the GraphPath that was used to access the field. The following example demonstrates the ability to access the
prop
field within the Child resolver. (#2988)type Query { p: Parent! } type Parent @key(fields: "id") @context(name: "context") { id: ID! child: Child! prop: String! } type Child @key(fields: "id") { id: ID! b: String! field(a: String @fromContext(field: "$context { prop }")): Int! }
Patch Changes
-
Various set context bugfixes (#3017)
-
Fix relative path logic when eliding subgraph jumps for
@fromContext
(#3005) -
Updated dependencies [
c4744da360235d8bb8270ea048f0e0fa5d03be1e
,8a936d741a0c05835ff2533714cf330d18209179
,f5fe3e74d36722f78004c1e2e03c77d8b95cd6bf
]:- @apollo/query-graphs@2.8.0
- @apollo/federation-internals@2.8.0
2.8.0-alpha.1
Patch Changes
- Updated dependencies [
f5fe3e74d36722f78004c1e2e03c77d8b95cd6bf
]:- @apollo/query-graphs@2.8.0-alpha.1
- @apollo/federation-internals@2.8.0-alpha.1
2.8.0-alpha.0
Minor Changes
-
Implement new directives to allow getting and setting context. This allows resolvers to reference and access data referenced by entities that exist in the GraphPath that was used to access the field. The following example demonstrates the ability to access the
prop
field within the Child resolver. (#2988)type Query { p: Parent! } type Parent @key(fields: "id") @context(name: "context") { id: ID! child: Child! prop: String! } type Child @key(fields: "id") { id: ID! b: String! field(a: String @fromContext(field: "$context { prop }")): Int! }
Patch Changes
-
Fix relative path logic when eliding subgraph jumps for
@fromContext
(#3005) -
Updated dependencies [
c4744da360235d8bb8270ea048f0e0fa5d03be1e
]:- @apollo/query-graphs@2.8.0-alpha.0
- @apollo/federation-internals@2.8.0-alpha.0
2.7.8
Patch Changes
-
Triggering a clean 2.7.8 release now that harmonizer build has been fixed. (#3010)
-
Updated dependencies [
2ad72802044310a528e8944f4538efe519424504
]:- @apollo/federation-internals@2.7.8
- @apollo/query-graphs@2.7.8
2.7.7
Patch Changes
-
No logical changes since 2.7.5 or 2.7.6, but we fixed a bug in the release process, so we need to publish a new patch version (2.7.7). (#2999)
-
Updated dependencies [
bee0b0828b4fb6a1d3172ac330560e2ab6c046bb
]:- @apollo/federation-internals@2.7.7
- @apollo/query-graphs@2.7.7
2.7.6
Patch Changes
-
There is no functionality change between 2.7.5 and 2.7.6. Triggering new release as previous one released partially leading to a broken experience. (#2997)
-
Updated dependencies []:
- @apollo/federation-internals@2.7.6
- @apollo/query-graphs@2.7.6
2.7.5
Patch Changes
-
Fix issue with missing fragment definitions due to
generateQueryFragments
. (#2993)An incorrect implementation detail in
generateQueryFragments
caused certain queries to be missing fragment defi...