graphql
graphql copied to clipboard
chore(deps): update apollo graphql packages to v2 (major)
This PR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
@apollo/gateway | 0.52.1 -> 2.1.2 |
||||
@apollo/subgraph | 0.5.1 -> 2.1.2 |
Release Notes
apollographql/federation (@βapollo/gateway)
v2.1.2
- Allow fields with arguments in
@requires
PR #β2120. - Fix potential inefficient planning due to
__typename
PR #β2137. - Fix potential assertion during query planning PR #β2133.
- Fix some defer query plans having invalid result sets (with empty branches) PR #β2125.
- Fix defer information lost when cloning fetch group (resulting in non-deferred parts) PR #β2129.
- Fix directives on fragment spread being lost PR #β2126.
v2.1.1
- Fix build-time regression caused by #β1970 (removal of @βtypes/node-fetch from runtime dependencies) PR #β2116
v2.1.0
- Fix issue where fragment expansion can erase applied directives (most notably
@defer
) PR #β2093. - Fix abnormally high memory usage when extracting subgraphs for some fed1 supergraphs (and small other memory footprint improvements) PR #β2089.
- Fix issue with fragment reusing code something mistakenly re-expanding fragments PR #β2098.
- Fix issue when type is only reachable through a @βprovides PR #β2083.
- Fix case where some key field necessary to a
@require
fetch were not previously fetched PR #β2075. - Add type definitions to schema extensions PR #β2081
- Update peer dependency
graphql
to^16.5.0
to useGraphQLErrorOptions
PR #β2060 - Upgrade underlying
@apollo/utils.fetcher
to support aborting a request. This is a type-only change, and will not impact the underlying runtime. PR #β2017. - Some TypeScript types, such as the arguments and return value of
GraphQLDataSource.process
, are defined using types from the@apollo/server-gateway-interface
package instead of fromapollo-server-types
andapollo-server-core
. This is intended to be fully backwards-compatible; please file an issue if this leads to TypeScript compilation issues. PR #β2044 - Don't require
@link
when using@composeDirective
PR #β2046 - Don't do debug logging by default PR #β2048
- Add
@composeDirective
directive to specify directives that should be merged to the supergraph during composition PR #β1996. - Fix fragment reuse in subgraph fetches PR #β1911.
- Allow passing a custom
fetcher
PR #β1997.-
UNBREAKING: Previous 2.1.0 alphas removed the custom fetcher for Apollo Uplink. This re-adds that parameter, and requires the fetcher to have the
AbortSignal
interface https://fetch.spec.whatwg.org/#requestinit.
-
UNBREAKING: Previous 2.1.0 alphas removed the custom fetcher for Apollo Uplink. This re-adds that parameter, and requires the fetcher to have the
- The method
RemoteGraphQLDataSource.errorFromResponse
now returns aGraphQLError
(as defined bygraphql
) rather than anApolloError
(as defined byapollo-server-errors
). PR #β2028-
BREAKING: If you call
RemoteGraphQLDataSource.errorFromResponse
manually and expect its return value to be a particular subclass ofGraphQLError
, or if you expect the error received bydidEncounterError
to be a particular subclass ofGraphQLError
, then this change may affect you. We recommend checkingerror.extensions.code
instead.
-
BREAKING: If you call
- The
LocalGraphQLDataSource
class no longer supports the undocumented__resolveObject
Apollo Server feature. PR #β2007-
BREAKING: If you relied on the undocumented
__resolveObject
feature withLocalGraphQLDataSource
, it will no longer work. If this affects you, file an issue and we can help you find a workaround.
-
BREAKING: If you relied on the undocumented
- Expose document representation of sub-query request within GraphQLDataSourceProcessOptions so that it is available to RemoteGraphQLDataSource.process and RemoteGraphQLDataSource.willSendRequest PR#β1878
- Fix issue when using a type condition on an inaccessible type in
@require
#β1873.-
BREAKING: this fix required passing a new argument to the
executeQueryPlan
method, which is technically exported by the gateway. Most users of the gateway should not call this method directly (which is exported mainly for testing purposes in the first place) and will thus be unaffected, but if you do call this method directly, you will have to pass the new argument when upgrading. See the method documentation for details.
-
BREAKING: this fix required passing a new argument to the
- Cleanup error related code, adding missing error code to a few errors PR #β1914.
- Fix issue generating plan for a "diamond-shaped" dependency PR #β1900.
- Fix issue computing query plan costs that can lead to extra unnecessary fetches PR #β1937.
- Reject directive applications within
fields
of@key
,@provides
and@requires
PR #β1975.-
BREAKING: previously, directive applications within a
@key
,@provides
or@requires
were parsed but not honored in any way. As this change reject such applications (at composition time), it could theoretically require to remove some existing (ignored) directive applications within a@key
,@provides
or@requires
.
-
BREAKING: previously, directive applications within a
- Move
DEFAULT_UPLINK_ENDPOINTS
to static member ofUplinkSupergraphManager
PR #β1977. - Add
node-fetch
as a runtime dependency PR #β1970. - Add timeouts when making requests to Apollo Uplink PR #β1950.
-
BREAKING: In 2.1.0-alpha.0,
UplinkSupergraphManager
was introduced and allowed passing afetcher
argument to the constructor. That parameter has been removed, at least until we figure out how to support thesignal
param more generically inapollo-utils
types.
-
BREAKING: In 2.1.0-alpha.0,
- Avoid type-explosion with fed1 supergraphs using a fed2 query planner PR #β1994.
- Add callback when fetching a supergraph from Apollo Uplink fails PR #β1812.
-BREAKING: Previously, if a custom
fetcher
was passed to the gateway instance, that would be passed to theUplinkSupergraphManager
. That meant thatfetcher
customizations intended forRemoteGraphQLDataSource
were also added toUplinkFetcher
/UplinkSupergraphManager
. Now, thefetcher
passed to the gateway instance will not be passed toUplinkSupergraphManager
. If your team relies on fetcher customizations being used for polling Apollo Uplink, please file an issue. - Expand support for Node.js v18 PR #β1884
v2.0.5
- Fix bug with unsatisfiable query branch when handling federation 1 supergraph PR #β1908.
v2.0.4
- Fix issue when all root operations were defined in an
extend schema
PR #β1875.
v2.0.3
- Fix bug with type extension of empty type definition PR #β1821
- Fix output of
printSubgraphSchema
method, ensuring it can be read back by composition andbuildSubgraphSchema
PR #β1831. - Fix issue with
@requires
and conditional queries (@include
/@skip
) 1835. - Fix bug with field covariance when the underlying plan use type-explosion 1859.
v2.0.2
- The
fetch
implementation used by default byUplinkFetcher
andRemoteGraphQLDataSource
is now imported frommake-fetch-happen
v10 instead of v8. The fetcher used byRemoteGraphQLDataSource
no longer limits the number of simultaneous requests per subgraph (or specifically, per host/port pair) to 15 by default; instead, there is no limit. (If you want to restore the previous behavior, installmake-fetch-happen
, importfetcher
from it, and passnew RemoteGraphQLDataSource({ fetcher: fetcher.defaults(maxSockets: 15)}))
in yourbuildService
option.) Note that if you invoke thefetcher
yourself in aRemoteGraphQLDataSource
subclass, you should ensure that you pass "plain" objects rather thanHeaders
orRequest
objects, as the newer version has slightly different logic about how to recognizeHeaders
andRequest
objects. We have adjusted the TypeScript types forfetcher
so that only these "plain" objects (which result in consistent behavior across all fetcher implementations) are permitted. PR #β1805 -
BREAKING: We no longer export a
getDefaultFetcher
function. This function returned the defaultfetch
implementation used to talk to Uplink (which is distinct from the defaultfetch
implementation used byRemoteGraphQLDataSource
to talk to subgraphs). It was the fetcher frommake-fetch-happen
v8 with some preset configuration relating to caching and request headers. However, the caching configuration was not actually being used when talking to Uplink (as we talk to Uplink over POST requests, and the Uplink protocol has an application-level mechanism for avoiding unnecessary large responses), and the request headers were already being provided explicitly by the Uplink client code. Since this release is also upgradingmake-fetch-happen
, it is impossible to promise that there would be no behavior change at all to the fetcher returned frommake-fetch-happen
, and as none of the preset configuration is actually relevant to the internal use ofgetDefaultFetcher
(which now just usesmake-fetch-happens
without extra configuration), we have removed the function. If you were using this function, you can replaceconst fetcher = getDefaultFetcher()
withimport fetcher from 'make-fetch-happen'
. PR #β1805 - Fix
Schema.clone
when directive application happens before definition PR #β1785 - More helpful error message for errors encountered while reading supergraphs generated pre-federation 2 PR #β1796
- Fix handling of @βrequire "chains" (a @βrequire whose fields have @βrequire themselves) PR #β1790
- Fix bug applying an imported federation directive on another directive definition PR #β1797.
- Fix bug where planning a query with
@require
impacts the plans of followup queries PR #β1783. - Improve fed1 schema support during composition PR #β1735
- Add missing @βapollo/federation-internals dependency to gateway PR #β1721
- Improve merging of groups during
@require
handling in query planning PR #β1732 - Move
__resolveReference
resolvers on toextensions
PR #β1746 - Add gateway version to schema extensions PR #β1751
- Honor directive imports when directive name is spec name PR #β1720
- Migrate to
@apollo/utils
packages forcreateSHA
andisNodeLike
PR #β1765
v2.0.1
- Use
for: SECURITY
in the core/link directive application in the supergraph for@inaccessible
PR #β1715
v2.0.0
- Previous preview release promoted to general availability! Please see previous changelog entries for full info.
apollographql/federation (@βapollo/subgraph)
v2.1.2
v2.1.1
v2.1.0
- Update peer dependency
graphql
to^16.5.0
to useGraphQLErrorOptions
PR #β2060 - Remove dependency on apollo-server-types PR #β2037
- Expand support for Node.js v18 PR #β1884
v2.0.5
v2.0.4
v2.0.3
- Fix output of
printSubgraphSchema
method, ensuring it can be read back by composition andbuildSubgraphSchema
PR #β1831. - Fix definition of
@key
to be repeatable PR #β1826.
v2.0.2
- Add __resolveType to _Entity union PR #β1773
v2.0.1
- Released in sync with other federation packages but no changes to this package.
v2.0.0
- Previous preview release promoted to general availability! Please see previous changelog entries for full info.
Configuration
π Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
π¦ Automerge: Enabled.
β» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
π Ignore: Close this PR and you won't be reminded about these updates again.
- [ ] If you want to rebase/retry this PR, click this checkbox.
This PR has been generated by Mend Renovate. View repository job log here.
Note to self: needs GQL v16 installed as dev dependency
Let's track this here https://github.com/nestjs/graphql/pull/2636/