- Updated dependencies []:
- @apollo/federation-internals@2.14.4
- @apollo/query-graphs@2.14.4
-
Propagate directives from @interfaceObject fields to @external implementations (#3456)
When an implementation re-declares a field as
@external(e.g. to reference it in@requires), the field's only resolvable definition lives on the abstracting@interfaceObject. Directives like@tagapplied there were not being propagated to the implementation's copy in the supergraph.During
add_interface_object_fields, detect implementation fields where every@join__fieldisexternal: trueand the field is provided by an@interfaceObject, then copy applicable directives onto the implementation field. -
Updated dependencies []:
- @apollo/federation-internals@2.14.3
- @apollo/query-graphs@2.14.3
- Updated dependencies []:
- @apollo/federation-internals@2.14.2
- @apollo/query-graphs@2.14.2
-
Suppress false INCONSISTENT_INTERFACE_VALUE_TYPE_FIELD hints for
@interfaceObject(#3444)Skip the inconsistent value type field hint when a source is an
@interfaceObject(which only contributes specific fields) or when the field is provided by an@interfaceObjectin another subgraph (since non-@interfaceObjectsubgraphs are not expected to define those fields). -
Updated dependencies [
278eb0fc2bc0ef13ba371407df04cfe50fa2887d,8bb88f9c7b90addd5ef29f9e4a3f9c027e6cf690]:- @apollo/federation-internals@2.14.1
- @apollo/query-graphs@2.14.1
-
Relax
@composeDirectivevalidation when definitions are absent in some subgraphs. (#3422)Previously, if some set of spec directives were being composed into the supergraph schema via
@composeDirective, then subgraphs with the latest version of that spec would each have to declare all of those spec directive definitions. Not following this rule would often result in composition emitting aDIRECTIVE_COMPOSITION_ERRORerror. This restriction has now been relaxed, and a definition needs to only be in at least one of those subgraphs with the latest version of that spec.As an example, the following
@composeDirectiveusage could previously fail, but is now valid.# subgraph A — composes and defines @foo and @bar extend schema # ... @link(url: "https://myorg.dev/myspec/v1.0", import: ["@foo", "@bar"]) @composeDirective(name: "@foo") @composeDirective(name: "@bar") # ... directive @foo on FIELD directive @bar on FIELD # subgraph B — composes and defines only @foo extend schema # ... @link(url: "https://myorg.dev/myspec/v1.0", import: ["@foo"]) @composeDirective(name: "@foo") # ... directive @foo on FIELD
- Fixed print logic when calculating the max number of elements to include in the message. Previously we were not passing (#3424) the current calculated length correctly leading to inclusion of additional elements in the error/hints message.
- Updated dependencies [
21cf465d4c687daeed71635422718c3c7b7d2d0e,5b36fc6b5a494aa6983e0339713dc45a0bd031e3,a20279a0184d9dfbc01a806d849dc8ae22497298]:- @apollo/federation-internals@2.14.0
- @apollo/query-graphs@2.14.0
-
Mark connect/v0.4 as a preview version so composition does not inject it into the supergraph
@linkunless a subgraph explicitly uses it. Previously, upgrading to Federation v2.13 would unconditionally stampconnect/v0.4into the supergraph, causing Router to require theconnectors.preview_connect_v0_4flag even when no subgraph used v0.4 features. (RH-1321) (#3413) -
Updated dependencies [
b5c17ffa73e2de49bd63182a84a7d5837c0ab2d5]:- @apollo/federation-internals@2.13.3
- @apollo/query-graphs@2.13.3
- Updated dependencies [
84e9226b606b176ede097410f5ba35ba03d140ed]:- @apollo/federation-internals@2.13.2
- @apollo/query-graphs@2.13.2
- Updated dependencies []:
- @apollo/federation-internals@2.13.1
- @apollo/query-graphs@2.13.1
-
Drop Node.js 14/16 support, require Node.js 18+ (#3364)
-
Support
ConnectSpec::V0_4and@link(url: "https://specs.apollo.dev/connect/v0.4")for upcoming connectors release (#3349)
- Updated dependencies [
f4d2f4a1f50a92be37ea7179eddb3681f36d9d15,523b13b715e75033f0bdbc176416e59ac01de8f0,ecbe182423313b3a94c185dee6b659573435b141,4c64006b1604471940e20aa1aa46a0f75a6396df,873577a2b7ae8ce507e0ca4377aed049e1a15075]:- @apollo/query-graphs@2.13.0
- @apollo/federation-internals@2.13.0
- Updated dependencies [
238d9d71e831e4f3e8d8e334ad6952cc19c073b1]:- @apollo/federation-internals@2.12.2
- @apollo/query-graphs@2.12.2
-
Fixed access control verification of transitive requirements (through
@requiresand/or@fromContext) to ensure it works with chains of transitive dependencies. (#3343) -
Allow interface object fields to specify access control (#3343)
Update composition logic to allow specifying access control directives (
@authenticated,@requiresScopesand@policy) on@interfaceObjectfields. While we disallow access control on interface types and fields, we decided to support it on@interfaceObjectas it is a useful pattern to define a single resolver (that may need access controls) for common interface fields. Alternative would require our users to explicitly define resolvers for all implementations which defeats the purpose of@interfaceObject.This PR refactors in how we propagate access control by providing additional merge sources when merging directives on interfaces, interface fields and object fields.
-
Updated dependencies [
09e596e6a0c753071ca822e84f525d73ada395cf,ac1ed2946c48e0fef4b413b192d8c5fbdb2370ae]:- @apollo/federation-internals@2.12.1
- @apollo/query-graphs@2.12.1
-
Federation 2.12 and Connect 0.3 (#3276)
-
Added isSuccess argument to @connect and @source (#3294)
-
Fixes a bug where composition may not generate a satisfiability error for an unsatisfiable
@shareablemutation field. (#3305) (#3305) -
Automatically propagate authorization requirements from implementing type to interface in the supergraph. (#3321)
Authorization requirements now automatically propagate from implementing types to interfaces during composition. Direct auth specifications on interfaces are no longer allowed. Interface access requires satisfying ALL implementing types' requirements (
ANDrule), with these requirements included in the supergraph for backward compatibility with older routers. -
Fix transitive auth requirements on
@requiresand@fromcontext(#3321)Adds new
postMergeValidationcheck to ensure that all fields that depends on data from other parts of the supergraph through@requiresand/or@fromContextdirectives explicitly specify matching@authenticated,@requiresScopesand/or@policyauth requirements, e.g.type T @key(fields: "id") { id: ID! extra: String @external # we need explicit `@authenticated` as it is needed to access extra requiresExtra: String @requires(fields: "extra") @authenticated } type T @key(fields: "id") { id: ID! extra: String @authenticated }
-
Adding new CompositionOption
maxValidationSubgraphPaths. This value represents the maximum number of SubgraphPathInfo objects that may exist in a ValidationTraversal when checking for satisfiability. Setting this value can help composition error before running out of memory. Default is 1,000,000. (#3275) -
Restrict usage of auth directives on interfaces (#3321)
Restricts usage of
@authenticated,@policyand@requiresScopesfrom being applied on interfaces, interface objects and their fields.GraphQL spec currently does not define any interface inheritance rules and developers have to explicitly redefine all interface fields on their implementations. At runtime, GraphQL servers cannot return abstract types and always return concrete output types. Due to the above, applying auth directives on the interfaces may lead to unexpected runtime behavior as they won't have any effect at runtime.
-
Stricter merge rules for @requiresScopes and @policy (#3321)
Current merge policies for
@authenticated,@requiresScopesand@policywere inconsistent.If a shared field uses the same authorization directives across subgraphs, composition merges them using
ORlogic. However, if a shared field uses different authorization directives across subgraphs composition merges them usingANDlogic. This simplified schema evolution, but weakened security requirements. Therefore, the behavior has been changed to always applyANDlogic to authorization directives applied to the same field across subgraphs.Since
@policyand@requiresScopesvalues represent boolean conditions in Disjunctive Normal Form, we can merge them conjunctively to get the final auth requirements. For example:# subgraph A type T @authenticated { # requires scopes (A1 AND A2) OR A3 secret: String @requiresScopes(scopes: [["A1", "A2"], ["A3"]]) } # subgraph B type T { # requires scopes B1 OR B2 secret: String @requiresScopes(scopes: [["B1"], ["B2"]] } # composed supergraph type T @authenticated { secret: String @requiresScopes( scopes: [ ["A1", "A2", "B1"], ["A1", "A2", "B2"], ["A3", "B1"], ["A3", "B2"] ]) }
This algorithm also deduplicates redundant requirements, e.g.
# subgraph A type T { # requires A1 AND A2 scopes to access secret: String @requiresScopes(scopes: [["A1", "A2"]]) } # subgraph B type T { # requires only A1 scope to access secret: String @requiresScopes(scopes: [["A1"]]) } # composed supergraph type T { # requires only A1 scope to access as A2 is redundant secret: String @requiresScopes(scopes: [["A1"]]) }
-
Fixed handling
@requiresdependency on fields returned by@interfaceObject(#3318)Depending on the merge order of the types, we could fail composition if a type that
@requiresdata from an@interfaceObjectis merged before the interface. Updated merge logic to use explicit merge order of scalars, input objects, interfaces, and finally objects. -
Added preview
@cacheTagdirective support (#3274)
- Updated dependencies [
3e2b0a8569a9fe46726182887ed0b4bfc0b52468,bb4614d338ae03bac51a5fc2439590f172c4e54d,99f2da21de88f9ad9a32ee7ed64b2d4a92887b40,468f27842608f4e390cfc88bc7e6b4b0945f95ff,3fd5157b309f1d3439b2d87c67b0601fb246d04c,b734ea04d118db09cf6077fdd968c8f04a96327a,4bda3a498eba36e187dfd9ae673eca12d3f3502c,e7e67579908d5cd2fa6fe558228dffe4808cd98d,f3ab499eaf62b1a1c0f08b838d2cbde5accb303a,faea2d1174d80593264f2227cfde9a2ba1a59b96,97b9d2edfcfeed99124f9e115f992cbef3804682,f6af504f1ba8283fd00af0d6e3c9c1a665d62736,a595235d3cf8f67611efd8395332b64d067b5f1f]:- @apollo/query-graphs@2.12.0
- @apollo/federation-internals@2.12.0
- Updated dependencies [
8c7a2cd655ad3060e9f5c3b106cfbdb59251701c]:- @apollo/federation-internals@2.11.3
- @apollo/query-graphs@2.11.3
-
Improve error messages when @composeDirective arguments are NULL or empty strings. (#3283)
Previous message on undefined/null argument value
Cannot read properties of undefined (reading '0')New message
Argument to @composeDirective in subgraph "${sg.name}" cannot be NULL or an empty String -
Updated dependencies [
28c08bef6e691aefc6ed07c0e7057f9cd803b317]:- @apollo/federation-internals@2.11.2
- @apollo/query-graphs@2.11.2
-
Adding new CompositionOption
maxValidationSubgraphPaths. This value represents the maximum number of SubgraphPathInfo objects that may exist in a ValidationTraversal when checking for satisfiability. Setting this value can help composition error before running out of memory. Default is 1,000,000. (#3254) -
Fix bug in composition where, when a field's type in a subgraph is a subtype of the field's type in the supergraph, the satisfiability validation spuriously succeeds/errors. (#3277)
-
Updated dependencies [
7799ad1717becf15fb0e82f89619f2ec8a24b4d4,b26794c5724ef23d1f0fd45a40aee3d301557489,51bed5be49d8e87adae59f568315c9e3488a91e0]:- @apollo/federation-internals@2.11.1
- @apollo/query-graphs@2.11.1
- Adds connect spec v0.2, available for use with Apollo Router 2.3.0 or greater. (#3262)
-
Allow merging external types when using arrays as default arguments. (#3262)
-
Updated dependencies [
1462c91879d41884c0a7e60551d8dd0d67c832d3,9614b26e5a17cbf1f6aaf08f6fcb1c95eb12592d]:- @apollo/query-graphs@2.11.0
- @apollo/federation-internals@2.11.0
-
Preparing preview.2 release (#3255)
-
Updated dependencies [
3e2b0a8569a9fe46726182887ed0b4bfc0b52468]:- @apollo/query-graphs@2.11.0-preview.2
- @apollo/federation-internals@2.11.0-preview.2
- Updated dependencies [
1462c91879d41884c0a7e60551d8dd0d67c832d3]:- @apollo/query-graphs@2.11.0-preview.1
- @apollo/federation-internals@2.11.0-preview.1
- Add connect spec v0.2 (#3228)
- Updated dependencies [
e7e67579908d5cd2fa6fe558228dffe4808cd98d]:- @apollo/federation-internals@2.11.0-preview.0
- @apollo/query-graphs@2.11.0-preview.0
- Adds the ability to compose and serialize directives for Apollo Connectors. To use Apollo Connectors, compose your supergraphs using GraphOS or rover, and run your supergraph in Apollo Router 2.0.0 or higher. (#3215)
- Updated dependencies [
8927e315ab0e865ef3ff12320f265ee95588b899,8927e315ab0e865ef3ff12320f265ee95588b899]:- @apollo/query-graphs@2.10.0
- @apollo/federation-internals@2.10.0
- Updated dependencies [
345661c558773e4eb5d5f0b28464a8d1acdc2a2d,e00e1c9892b48ac89823597113989830877966ef,cc4573471696ef78d04fa00c4cf8e5c50314ba9f,062572b3253e8640b60a0bf58b83945094b76b6f,df5eb3cb0e2b4802fcd425ab9c23714de2707db3,1c99cb0dcc6c639ac351210932623ab0bd6907e4]:- @apollo/query-graphs@2.9.3
- @apollo/federation-internals@2.9.3
- Updated dependencies [
2192f355f50db33fe0807d16153f357696b9f190,e1e2605b30efc488b57f62ba43436606a38a3607,5ac01b534318105e904c1e6598070f753add3bb1]:- @apollo/federation-internals@2.9.2
- @apollo/query-graphs@2.9.2
-
Fix bugs in composition when merging nulls in directive applications and when handling renames. (#3134)
-
Updated dependencies [
b8e4ab5352a4dfd262af49493fdd42e86e5e3d99,e6c05b6c96023aa3dec79889431f8217fcb3806d]:- @apollo/federation-internals@2.9.1
- @apollo/query-graphs@2.9.1
- Implements two new directives for defining custom costs for demand control. The
@costdirective allows setting a custom weight to a particular field in the graph, overriding the default cost calculation. The@listSizedirective gives the cost calculator information about how to estimate the size of lists returned by subgraphs. This can either be a static size or a value derived from input arguments, such as paging parameters. (#3074)
-
Reduce memory overhead during satisfiability checking when there are many options. (#3109)
-
Updated dependencies [
acfe3193429c7f99b4fc564b20828aaa8659a75c,02c2a34a62c3717a4885449172e404f19ebf66c9,0ccfd937d4b4a576f890665ceebbd7986fac5d0c,e0a5075c0d12a0e2f7ef303b246e3216a139d3e0]:- @apollo/query-graphs@2.9.0
- @apollo/federation-internals@2.9.0
- Updated dependencies []:
- @apollo/federation-internals@2.8.5
- @apollo/query-graphs@2.8.5
-
When doing interface type intersection detection, allow @interfaceObject to stand in for any type (#3087)
-
Updated dependencies [
5f4bb160d024678d6facd471c43c8ec61c86e701,672aca7cbeb0a6a38586357a4e154f2dd91caa0c]:- @apollo/federation-internals@2.8.4
- @apollo/query-graphs@2.8.4
-
Error messages are now lazily evaluated for satisfiability validations. (#3068)
-
Query graph caches now use maps instead of sparsely-populated arrays for per-subgraph data. (#3066)
-
Add a fast path to skip override validation for fields without any subgraph
@overrides. (#3070) -
Type merging now uses maps instead of sparsely-populated arrays for per-subgraph data. (#3069)
-
Stop duplicating hints for inconsistent value type fields per subgraph. (#3071)
-
Fix logic to compute missing subgraphs when generating composition hints/errors (#3076)
-
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
- Updated dependencies [
50d648ccffb05591878de75dc5522914ed48698f]:- @apollo/federation-internals@2.8.3-beta.2
- @apollo/query-graphs@2.8.3-beta.2
-
Fix logic to compute missing subgraphs when generating composition hints/errors (#3076)
-
Updated dependencies []:
- @apollo/federation-internals@2.8.3-beta.1
- @apollo/query-graphs@2.8.3-beta.1
-
Error messages are now lazily evaluated for satisfiability validations. (#3068)
-
Query graph caches now use maps instead of sparsely-populated arrays for per-subgraph data. (#3066)
-
Add a fast path to skip override validation for fields without any subgraph
@overrides. (#3070) -
Type merging now uses maps instead of sparsely-populated arrays for per-subgraph data. (#3069)
-
Stop duplicating hints for inconsistent value type fields per subgraph. (#3071)
-
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
- Updated dependencies [
b2e5ab66f84688ec304cfcf2c6f749c86aded549]:- @apollo/federation-internals@2.8.2
- @apollo/query-graphs@2.8.2
-
Fix performance regression in needsJoinField() for large graphs (#3038)
-
Updated dependencies []:
- @apollo/federation-internals@2.8.1
- @apollo/query-graphs@2.8.1
-
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
propfield 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! }
-
Various set context bugfixes (#3017)
-
Updated dependencies [
c4744da360235d8bb8270ea048f0e0fa5d03be1e,8a936d741a0c05835ff2533714cf330d18209179,f5fe3e74d36722f78004c1e2e03c77d8b95cd6bf]:- @apollo/query-graphs@2.8.0
- @apollo/federation-internals@2.8.0
- Updated dependencies [
f5fe3e74d36722f78004c1e2e03c77d8b95cd6bf]:- @apollo/query-graphs@2.8.0-alpha.1
- @apollo/federation-internals@2.8.0-alpha.1
-
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
propfield 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! }
- Updated dependencies [
c4744da360235d8bb8270ea048f0e0fa5d03be1e]:- @apollo/query-graphs@2.8.0-alpha.0
- @apollo/federation-internals@2.8.0-alpha.0
-
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
-
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
-
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
- Updated dependencies []:
- @apollo/federation-internals@2.7.5
- @apollo/query-graphs@2.7.5
- Updated dependencies [
d80b7f0ca1456567a0866a32d2b2abf940598f77]:- @apollo/federation-internals@2.7.4
- @apollo/query-graphs@2.7.4
-
Fix a query planning bug where invalid subgraph queries are generated with
reuseQueryFragmentsset true. (#2952) (#2963) -
Updated dependencies [
ec04c50b4fb832bfd281ecf9c0c2dd7656431b96,a494631918156f0431ceace74281c076cf1d5d51]:- @apollo/federation-internals@2.7.3
- @apollo/query-graphs@2.7.3
-
When a linked directive requires a federation version higher than the linked federation spec, upgrade to the implied version and issue a hint (#2929)
-
Stop emitting "inconsistent value type" hints against definitions where the type is marked
@externalor all fields are marked@external. (#2951) -
Introduce a new composition hint pertaining specifically to progressive
@overrideusage (when alabelargument is present). (#2922) -
Updated dependencies [
33b937b18d3c7ca6af14b904696b536399e597d1,09cd3e55e810ee513127b7440f5b11af7540c9b0,d7189a86c27891af408d3d0184db6133d3342967]:- @apollo/federation-internals@2.7.2
- @apollo/query-graphs@2.7.2
- Updated dependencies [
493f5acd16ad92adf99c963659cd40dc5eac1219]:- @apollo/federation-internals@2.7.1
- @apollo/query-graphs@2.7.1
-
Implement progressive
@overridefunctionality (#2911)The progressive
@overridefeature brings a new argument to the@overridedirective:label: String. When a label is added to an@overrideapplication, 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
hellofield 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).
-
Support
@join__directive(graphs, name, args)directives (#2894)
-
Allow known
FeatureDefinitionsubclasses to define custom subgraph schema validation rules (#2910) -
Updated dependencies [
6ae42942b13dccd246ccc994faa2cb36cd62cb3c,66833fb8d04c9376f6ed476fed6b1ca237f477b7,931f87c6766c7439936df706727cbdc0cd6bcfd8]:- @apollo/query-graphs@2.7.0
- @apollo/federation-internals@2.7.0
- Updated dependencies []:
- @apollo/federation-internals@2.6.3
- @apollo/query-graphs@2.6.3
- Updated dependencies [
7b5b836d15247c997712a47847f603aa5887312e,74ca7dd617927a20d79b824851f7651ef3c40a4e,3f7392b84f8b626b248b59ce81f193d0f0272045]:- @apollo/federation-internals@2.6.2
- @apollo/query-graphs@2.6.2
- Updated dependencies [
0d5ab01a]:- @apollo/federation-internals@2.6.1
- @apollo/query-graphs@2.6.1
-
Update
licensefield inpackage.jsonto useElastic-2.0SPDX identifier (#2741) -
Introduce the new
@policyscope for composition (#2818)Note that this directive will only be fully supported by the Apollo Router as a GraphOS Enterprise feature at runtime. Also note that composition of valid
@policydirective applications will succeed, but the resulting supergraph will not be executable by the Gateway or an Apollo Router which doesn't have the GraphOS Enterprise entitlement.Users may now compose
@policyapplications from their subgraphs into a supergraph.The directive is defined as follows:
scalar federation__Policy directive @policy( policies: [[federation__Policy!]!]! ) on FIELD_DEFINITION | OBJECT | INTERFACE | SCALAR | ENUM
The
Policyscalar is effectively aString, similar to theFieldSettype.In order to compose your
@policyusages, you must update your subgraph's federation spec version to v2.6 and add the@policyimport to your existing imports like so:@link(url: "https://specs.apollo.dev/federation/v2.6", import: [..., "@policy"])
- Updated dependencies [
b18841be,e325b499]:- @apollo/query-graphs@2.6.0
- @apollo/federation-internals@2.6.0
- Updated dependencies []:
- @apollo/federation-internals@2.5.7
- @apollo/query-graphs@2.5.7
-
Fixing issue where redeclaration of custom scalars in a fed1 schema may cause upgrade errors (#2809)
-
Updated dependencies [
c719214a]:- @apollo/federation-internals@2.5.6
- @apollo/query-graphs@2.5.6
- Updated dependencies []:
- @apollo/federation-internals@2.5.5
- @apollo/query-graphs@2.5.5
- Updated dependencies []:
- @apollo/federation-internals@2.5.4
- @apollo/query-graphs@2.5.4
-
Modifies the type for the argument of the
@requiresScopesfrom[federation__Scope!]!to[[federation__Scope!]!]!. (#2738)The
@requiresScopesdirectives has been pre-emptively introduced in 2.5.0 to support an upcoming Apollo Router feature around scoped accesses. The argument for@requiresScopesin that upcoming feature is changed to accommodate a new semantic. Note that this technically a breaking change to the@requiresScopesdirective definition, but as the full feature using that directive has been released yet, this directive cannot effectively be used and this should have no concrete impact. -
Updated dependencies [
4b9a512b,c6e0e76d,1add932c,6f1fddb2]:- @apollo/federation-internals@2.5.3
- @apollo/query-graphs@2.5.3
- Updated dependencies [
35179f08]:- @apollo/federation-internals@2.5.2
- @apollo/query-graphs@2.5.2
- Updated dependencies [
b9052fdd]:- @apollo/federation-internals@2.5.1
- @apollo/query-graphs@2.5.1
-
Do not run the full suite of graphQL validations on supergraphs and their extracted subgraphs by default in production environment. (#2657)
Running those validations on every updates of the schema takes a non-negligible amount of time (especially on large schema) and mainly only serves in catching bugs early in the supergraph handling code, and in some limited cases, provide slightly better messages when a corrupted supergraph is received, neither of which is worth the cost in production environment.
A new
validateSupergraphoption is also introduced in the gateway configuration to force this behaviour. -
Includes an optional Schema Coordinate field in the Composition Hints returned by composition (#2658)
-
For CoreSpecDefintions that opt in, we've added the ability to tie the core spec version to a particular federation version. That means that if there's a new version of, say, the join spec, you won't necessarily get the new version in the supergraph schema if no subgraph requires it. (#2528)
-
Introduce the new
@authenticateddirective for composition (#2644)Note that this directive will only be fully supported by the Apollo Router as a GraphOS Enterprise feature at runtime. Also note that composition of valid
@authenticateddirective applications will succeed, but the resulting supergraph will not be executable by the Gateway or an Apollo Router which doesn't have the GraphOS Enterprise entitlement.Users may now compose
@authenticatedapplications from their subgraphs into a supergraph. This addition will support a future version of Apollo Router that enables authenticated access to specific types and fields via directive applications.The directive is defined as follows:
directive @authenticated on FIELD_DEFINITION | OBJECT | INTERFACE | SCALAR | ENUM
In order to compose your
@authenticatedusages, you must update your subgraph's federation spec version to v2.5 and add the@authenticatedimport to your existing imports like so:@link(url: "https://specs.apollo.dev/federation/v2.5", import: [..., "@authenticated"])
-
Introduce the new
@requiresScopesdirective for composition (#2649)Note that this directive will only be fully supported by the Apollo Router as a GraphOS Enterprise feature at runtime. Also note that composition of valid
@requiresScopesdirective applications will succeed, but the resulting supergraph will not be executable by the Gateway or an Apollo Router which doesn't have the GraphOS Enterprise entitlement.Users may now compose
@requiresScopesapplications from their subgraphs into a supergraph. This addition will support a future version of Apollo Router that enables scoped access to specific types and fields via directive applications.The directive is defined as follows:
scalar federation__Scope directive @requiresScopes( scopes: [federation__Scope!]! ) on FIELD_DEFINITION | OBJECT | INTERFACE | SCALAR | ENUM
The
Scopescalar is effectively aString, similar to theFieldSettype.In order to compose your
@requiresScopesusages, you must update your subgraph's federation spec version to v2.5 and add the@requiresScopesimport to your existing imports like so:@link(url: "https://specs.apollo.dev/federation/v2.5", import: [..., "@requiresScopes"])
- Updated dependencies [
fe1e3d7b,6b18af50,9396c0d6,2b5796a9,4f3c3b9e]:- @apollo/query-graphs@2.5.0
- @apollo/federation-internals@2.5.0
- Updated dependencies [
b6be9f96]:- @apollo/federation-internals@2.4.10
- @apollo/query-graphs@2.4.10
- Updated dependencies [
7ac83456,d60349b3,1bb7c512,02eab3ac,fd4545c2]:- @apollo/query-graphs@2.4.9
- @apollo/federation-internals@2.4.9
- Updated dependencies [
62e0d254,7f1ef73e,2a97f372]:- @apollo/federation-internals@2.4.8
- @apollo/query-graphs@2.4.8
- Re-work the code use to try to reuse query named fragments to improve performance (thus sometimes improving query (#2604)
planning performance), to fix a possibly raised assertion error (with a message of form like
Cannot add selection of field X to selection set of parent type Y), and to fix a rare issue where an interface or union field was not being queried for all the types it should be. - Updated dependencies [
2d44f346]:- @apollo/federation-internals@2.4.7
- @apollo/query-graphs@2.4.7
- Updated dependencies [
5cd17e69,e136ad87]:- @apollo/federation-internals@2.4.6
- @apollo/query-graphs@2.4.6
-
Supersedes v2.4.4 due to a publishing error with no dist/ folder (#2583)
-
Updated dependencies [
c96e24c4]:- @apollo/federation-internals@2.4.5
- @apollo/query-graphs@2.4.5
- Updated dependencies []:
- @apollo/federation-internals@2.4.4
- @apollo/query-graphs@2.4.4
- Updated dependencies [
f6a8c1ce]:- @apollo/federation-internals@2.4.3
- @apollo/query-graphs@2.4.3
- Allow passing print options to the
composemethod to impact how the supergraph is printed, and adds new printing (#2042) options to order all elements of the schema. - Updated dependencies [
2c370508,179b4602]:- @apollo/federation-internals@2.4.2
- @apollo/query-graphs@2.4.2
-
Start building packages with TS 5.x, which should have no effect on consumers (#2480)
-
Updated dependencies [
450b9578,afde3158,eafebc3c,01fe3f83]:- @apollo/query-graphs@2.4.1
- @apollo/federation-internals@2.4.1
- Addition of new query planner node types to enable federated subscriptions support (#2389)
-
Refactor the internal implementation of selection sets used by the query planner to decrease the code complexity and (#2387) improve query plan generation performance in many cases.
-
Optimises query plan generation for parts of queries that can statically be known to not cross across subgraphs (#2449)
-
Updated dependencies [
260c357c,7bc0f8e8,1a555d98,cab383b2]:- @apollo/federation-internals@2.4.0
- @apollo/query-graphs@2.4.0
- Updated dependencies [
7bc0f8e8]:- @apollo/federation-internals@2.4.0-alpha.1
- @apollo/query-graphs@2.4.0-alpha.1
- Addition of new query planner node types to enable federated subscriptions support (#2389)
- Updated dependencies [
6e2d24b5,1a555d98]:- @apollo/federation-internals@2.4.0-alpha.0
- @apollo/query-graphs@2.4.0-alpha.0
- Updated dependencies []:
- @apollo/federation-internals@2.3.5
- @apollo/query-graphs@2.3.5
- Updated dependencies [
6e2d24b5]:- @apollo/federation-internals@2.3.4
- @apollo/query-graphs@2.3.4
-
Stop generating misleading "hint" regarding value type fields for interface types that are entity interfaces (they have a
@keydefined). (#2412) -
Updated dependencies [
de89e504]:- @apollo/query-graphs@2.3.3
- @apollo/federation-internals@2.3.3
- Updated dependencies []:
- @apollo/federation-internals@2.3.2
- @apollo/query-graphs@2.3.2
- Updated dependencies [
7e2ca46f]:- @apollo/query-graphs@2.3.1
- @apollo/federation-internals@2.3.1
This CHANGELOG pertains only to Apollo Federation packages in the 2.x range. The Federation v0.x equivalent for this package can be found here on the version-0.x branch of this repo.
- Error on composition when a
@shareablefield runtime types don't intersect between subgraphs: a@shareablefield must resolve the same way in all the subgraphs, but this is impossible if the concrete runtime types have no intersection at all PR #1556. - Uses the 0.3 version of the tag spec in the supergraph, which adds
@tagdirective support for theSCHEMAlocation PR #2314. - Fixes composition issues with
@interfaceObjectPR #2318.
- Preserves source of union members and enum values in supergraph PR #2288.
- BREAKING: composition now rejects
@overrideon interface fields. The@overridedirective was not meant to be supported on interfaces and was not having any impact whatsoever. If an existing subgraph does have a@overrideon an interface field, this will now be rejected, but the@overridecan simply and safely be removed since it previously was ignored.
- BREAKING: composition now rejects
@shareableon interface fields. The@shareabledirective is about controlling if multiple subgraphs can resolve a particular field, and as interface field are never directly resolved (it's their implementation that are), having@shareableon interface fields is not completely meaningful and was never meant to be supported. If an existing subgraph does have a@shareableon an interface field, this will now be rejected, but the@shareablecan simply and safely be removed since it previously was ignored. - Provide support for marking @external on object type PR #2214
- Drop support for node12 PR #2202
- Fix error when a skipped enum value had directives applied PR #2232.
- Improves error message to help with misspelled source of an
@overridePR #2181.
- Fix composition of repeatable custom directives PR #2136
- Allow fields with arguments in
@requiresPR #2120.
- Don't apply @shareable when upgrading fed1 supergraphs if it's already @shareable PR #2043
- Update peer dependency
graphqlto^16.5.0to useGraphQLErrorOptionsPR #2060 - Don't require
@linkwhen using@composeDirectivePR #2046 - Add
@composeDirectivedirective to specify directives that should be merged to the supergraph during composition PR #1996. - Warn on merging inconsistent non-repeatable directive applications instead of failing composition PR #1840.
- Expand support for Node.js v18 PR #1884
- Use
for: SECURITYin the core/link directive application in the supergraph for@inaccessiblePR #1715
- Previous preview release promoted to general availability! Please see previous changelog entries for full info.
- Add a level to hints, uppercase their code and related fixes PR #1683.
- Add support for
@inaccessiblev0.2 PR #1678
- Fix merging of Input objects and enum types PR #1672.
- Fix regression in composition validation introduced by #1653 PR #1673.
- Add nodes when displaying hints for
@overridePR #1684
- Fix handling of core/link when definitions are provided or partially so PR #1662.
- Optimize composition validation when many entities spans many subgraphs PR #1653.
- Support for Node 17 PR #1541.
- Adds Support for
@tag/v0.2, which allows the@tagdirective to be additionally placed on arguments, scalars, enums, enum values, input objects, and input object fields. PR #1652. - Adds support for the
@overridedirective on fields to indicate that a field should be moved from one subgraph to another. PR #1484
NOTE: Be sure to upgrade the gateway before re-composing/deploying with this version. See below and the changelog for @apollo/gateway.
- Adds support for
@inaccessiblein subgraphs PR #1638. - Fix merging of
@tagdirective when it is renamed in subgraphs PR #1637. - Generates supergraphs with
@linkinstead of@core. As a result, prior federation 2 pre-release gateway will not read supergraphs generated by this version correctly, so you should upgrade the gateway to this version before re-composing/deploying with this version. PR #1628.
- Fix propagation of
@tagto the supergraph and allows @tag to be repeated. Additionally, merged directives (only@tagand@deprecatedcurrently) are not allowed on external fields anymore PR #1592.
- Released in sync with other federation packages but no changes to this package.
- Released in sync with other federation packages but no changes to this package.
- Re-publishing release which published to npm with stale build artifacts from
version-0.xrelease.
- No-op publish to account for publishing difficulties.
- Initial "preview" release.
- No direct changes, only transitive updates to
@apollo/query-graphsand@apollo/federation-internals.
- Remove
graphql@15from peer dependencies PR #1472.
- Assign and document error codes for all errors PR #1274.
- BREAKING: Bump graphql peer dependency to
^15.7.0PR #1200 - Add missing dependency to
@apollo/query-graphs
- 🎉 Initial alpha release of Federation 2.0. For more information, see our documentation. We look forward to your feedback!