Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release 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 version-4, this PR will be updated.
Releases
@apollo/[email protected]
Major Changes
6ac508225Thanks @glasser! - Initial Apollo Server 4 releasePatch Changes
#6827
0c2909aa1Thanks @glasser! - Experimental support for incremental delivery (@defer/@stream) when combined with a prerelease ofgraphql-js.#6771
bce9150f3Thanks @glasser! - Support Gateway. Remove executor constructor option.#6806
bccc230f0Thanks @glasser! - Rename response.http.statusCode back to status like it was in AS3.#6986
db5d715a3Thanks @glasser! - The cache control plugin setscache-control: no-storefor uncacheable responses. PasscalculateHttpHeaders: 'if-cacheable'to the cache control plugin to restore AS3 behavior.#6760
052f1b548Thanks @glasser! - Relax error-handling expectations to work better with Fastify#6817
eca003fdcThanks @glasser! - Move ApolloServerPluginGraphQLPlayground into its own package.#6795
363fd308dThanks @bonnici! - Added unit tests to coverunmodifiedandmaskederror reporting options#6764
c4115e96aThanks @glasser! - Get cache-control types from @apollo/cache-control-types; no moredeclare modulefor info.cacheControl#6906
115ab2fa8Thanks @trevor-scheer! - Relax message requirement for malformed JSON POST to allow default 'Bad Request'response.
#6961
a782c791fThanks @glasser! - Require [email protected] as a peer dependency.#7001
63d568d13Thanks @glasser! - Test the behavior of didResolveOperation hooks throwing.#6855
3e4ab3fcaThanks @glasser! - Rename usage reporting optionsendErrorsInTraces(added in 4.0.0-alpha.4) tosendErrors, as it also affects error statistics outside of traces.#6850
256f2424bThanks @renovate! - Expand jest peer deps to include v29#6759
6ef6a090cThanks @glasser! - Refactor error formatting.Remove
error.extensions.exception; you can add it back yourself withformatError.error.extensions.exception.stacktraceis now available onerror.extensions.stacktrace.Provide
unwrapResolverErrorfunction in@apollo/server/errors; useful for yourformatErrorhook.No more TS
declare moduledescribing theexceptionextension (partially incorrectly).Rename the (new in v4) constructor option
includeStackTracesInErrorResponsestoincludeStacktraceInErrorResponses.#6910
6541f92c9Thanks @trevor-scheer! - Update snapshot format to future jest v29 default#6827
0c2909aa1Thanks @glasser! - Support application/graphql-response+json content-type if requested via Accept header, as per graphql-over-http spec.Include
charset=utf-8in content-type headers.#6794
7445d3377Thanks @glasser! - Usage reporting and inline trace plugins: replacerewriteErrorwithsendErrorsInTraces/includeErrors, and mask all errors by default.#6357
7c3c825d8Thanks @trevor-scheer! - Export ApolloServerErrorCode enum instead of error classes. HTTPGraphQLRequest takes search params as raw string.#6814
cf0fcf49aThanks @glasser! - Several changes relating to plugins:Remove the
serverfield onGraphQLRequestContextandGraphQLServerContext(ie, the arguments to most plugin hook methods). This was added during AS4 development and did not exist in AS3.Add
loggerandcachefields toGraphQLRequestContextandGraphQLServerContext. Theloggerfields andGraphQLRequestContext.cacheexisted in AS3 and had been previously removed for redundancy with theserverfield. (Unlike in AS3,loggeris readonly.)ApolloServerPluginis now declared as<in TContext extends BaseContext = BaseContext>rather than<in out TContext>. This means that you can declare a plugin that doesn't care aboutcontextValueto simply implementApolloServerPluginand it will work with anyApolloServer<NoMatterWhatContext>. This should make it easy to write plugins that don't care about context.Remove the ability to specify a factory function as an element of the
pluginslist in theApolloServerconstructor. (Reducing the number of ways to specify constructor options helps keep type errors simpler.) As far as we know the main use case for this (referring to theApolloServeritself when creating the plugin) can be handled with the new-in-AS4ApolloServer.addPluginmethod.#6936
a404bf17eThanks @trevor-scheer! - Add test for batch requests with no elements#6857
15b1cb2e9Thanks @glasser! - Errors thrown in resolvers and context functions can useextensions.httpto affect the response status code and headers. The default behavior when a context function throws is now to always use status code 500 rather than comparingextensions.codetoINTERNAL_SERVER_ERROR.Updated dependencies [
a404bf17e,3320fee92,0c2909aa1,bce9150f3,bccc230f0,db5d715a3,a404bf17e,3e4ab3fca,f736b4980,a404bf17e,3e4ab3fca,eca003fdc,13f809ca6,9fc23f799,c4115e96a,a782c791f,6b37d169b,3e4ab3fca,3e4ab3fca,6ac508225,6ef6a090c,536e038a7,96178c570,2cab8f785,400f7867b,233b44eea,d20842824,0c2909aa1,7445d3377,7c3c825d8,cf0fcf49a,15b1cb2e9,d3ea2d4ef,e1455d583]:@apollo/[email protected]
Major Changes
eca003fdcThanks @glasser! - Move ApolloServerPluginGraphQLPlayground into its own package.Patch Changes
a404bf17e,3320fee92,0c2909aa1,bce9150f3,bccc230f0,db5d715a3,a404bf17e,3e4ab3fca,f736b4980,a404bf17e,3e4ab3fca,eca003fdc,13f809ca6,9fc23f799,c4115e96a,a782c791f,6b37d169b,3e4ab3fca,3e4ab3fca,6ac508225,6ef6a090c,536e038a7,96178c570,2cab8f785,400f7867b,233b44eea,0c2909aa1,7445d3377,7c3c825d8,cf0fcf49a,15b1cb2e9,d3ea2d4ef,e1455d583]:@apollo/[email protected]
Major Changes
6ac508225Thanks @glasser! - Initial Apollo Server 4 releasePatch Changes
#6827
0c2909aa1Thanks @glasser! - Experimental support for incremental delivery (@defer/@stream) when combined with a prerelease ofgraphql-js.#6806
bccc230f0Thanks @glasser! - Rename response.http.statusCode back to status like it was in AS3.#6764
c4115e96aThanks @glasser! - Get cache-control types from @apollo/cache-control-types; no moredeclare modulefor info.cacheControl#6961
a782c791fThanks @glasser! - Require [email protected] as a peer dependency.#6357
7c3c825d8Thanks @trevor-scheer! - Export ApolloServerErrorCode enum instead of error classes. HTTPGraphQLRequest takes search params as raw string.#6814
cf0fcf49aThanks @glasser! - Several changes relating to plugins:Remove the
serverfield onGraphQLRequestContextandGraphQLServerContext(ie, the arguments to most plugin hook methods). This was added during AS4 development and did not exist in AS3.Add
loggerandcachefields toGraphQLRequestContextandGraphQLServerContext. Theloggerfields andGraphQLRequestContext.cacheexisted in AS3 and had been previously removed for redundancy with theserverfield. (Unlike in AS3,loggeris readonly.)ApolloServerPluginis now declared as<in TContext extends BaseContext = BaseContext>rather than<in out TContext>. This means that you can declare a plugin that doesn't care aboutcontextValueto simply implementApolloServerPluginand it will work with anyApolloServer<NoMatterWhatContext>. This should make it easy to write plugins that don't care about context.Remove the ability to specify a factory function as an element of the
pluginslist in theApolloServerconstructor. (Reducing the number of ways to specify constructor options helps keep type errors simpler.) As far as we know the main use case for this (referring to theApolloServeritself when creating the plugin) can be handled with the new-in-AS4ApolloServer.addPluginmethod.Updated dependencies [
a404bf17e,3320fee92,0c2909aa1,bce9150f3,bccc230f0,db5d715a3,a404bf17e,3e4ab3fca,f736b4980,a404bf17e,3e4ab3fca,eca003fdc,13f809ca6,9fc23f799,c4115e96a,a782c791f,6b37d169b,3e4ab3fca,3e4ab3fca,6ac508225,6ef6a090c,536e038a7,96178c570,2cab8f785,400f7867b,233b44eea,0c2909aa1,7445d3377,7c3c825d8,cf0fcf49a,15b1cb2e9,d3ea2d4ef,e1455d583]:@apollo/[email protected]
Major Changes
6ac508225Thanks @glasser! - Initial Apollo Server 4 releasePatch Changes
#6936
a404bf17eThanks @trevor-scheer! - Update executeOperation second parameter to be an optional options object which includes an optionalcontextValue.#6841
3320fee92Thanks @glasser! - Upgrade @apollo/server-gateway-interface to have laxer definition of overallCachePolicy.#6827
0c2909aa1Thanks @glasser! - Experimental support for incremental delivery (@defer/@stream) when combined with a prerelease ofgraphql-js.#6771
bce9150f3Thanks @glasser! - Support Gateway. Remove executor constructor option.#6806
bccc230f0Thanks @glasser! - Rename response.http.statusCode back to status like it was in AS3.#6986
db5d715a3Thanks @glasser! - The cache control plugin setscache-control: no-storefor uncacheable responses. PasscalculateHttpHeaders: 'if-cacheable'to the cache control plugin to restore AS3 behavior.#6936
a404bf17eThanks @trevor-scheer! -HTTPGraphQLRequestnow uses a specificHeaderMapclass which we export instead of allowing a standardMap. TheHeaderMapdowncases all incoming keys, as header names are not case-sensitive.#6855
3e4ab3fcaThanks @glasser! - New usage reporting optionsendTraces: falseto only send usage reports as aggregated statistics, not per-request traces.#6357
f736b4980Thanks @trevor-scheer! - Port Update error message when graph ref and variant are specified #6709 from AS3 (improve an error message)#6936
a404bf17eThanks @trevor-scheer! - UpdatevalidationRulestyping for correctness. This is sort of a breaking change for TS users in that the types were more permissive than they should have been. AllvalidationRuleslist items should conform to thegraphql-jsValidationRuletype.#6855
3e4ab3fcaThanks @glasser! - Remove Apollo-internalinternal_includeTracesContributingToStats. This should not have been used other than inside Apollo's own servers.#6817
eca003fdcThanks @glasser! - Move ApolloServerPluginGraphQLPlayground into its own package.#6788
13f809ca6Thanks @glasser! -parseOptionsis now only used for parsing operations, not for schemas too. Its TS type now only includes options recognized bygraphql-jsitself.#6731
9fc23f799Thanks @trevor-scheer! - Use extensions for all imports to accommodate TS users using moduleResolution: "nodenext"#6764
c4115e96aThanks @glasser! - Get cache-control types from @apollo/cache-control-types; no moredeclare modulefor info.cacheControl#6961
a782c791fThanks @glasser! - Require [email protected] as a peer dependency.#6879
6b37d169bThanks @bonnici! - Fixed usage reporting plugin log message#6855
3e4ab3fcaThanks @glasser! - The usage reporting optiondebugPrintReportsnow displays reports vialogger.inforather thanlogger.warn.#6855
3e4ab3fcaThanks @glasser! - Rename usage reporting optionsendErrorsInTraces(added in 4.0.0-alpha.4) tosendErrors, as it also affects error statistics outside of traces.#6759
6ef6a090cThanks @glasser! - Refactor error formatting.Remove
error.extensions.exception; you can add it back yourself withformatError.error.extensions.exception.stacktraceis now available onerror.extensions.stacktrace.Provide
unwrapResolverErrorfunction in@apollo/server/errors; useful for yourformatErrorhook.No more TS
declare moduledescribing theexceptionextension (partially incorrectly).Rename the (new in v4) constructor option
includeStackTracesInErrorResponsestoincludeStacktraceInErrorResponses.#6765
536e038a7Thanks @glasser! - Port Usage reporting: fix TS declaration of fieldLevelInstrumentation #6763 from AS3 (fix fieldLevelInstrumentation type declaration)#6785
96178c570Thanks @renovate! - Update internal use of@graphql-tools/schemafrom v8 to v9. This should be a no-op; we have already removed the feature that would have been affected by the API change in this upgrade (passingparseOptionstomakeExecutableSchema).#6846
2cab8f785Thanks @trevor-scheer! - Ensure executionDidEnd hooks are only called once (when they throw)#6792
400f7867bThanks @glasser! - Port GHSA-2fvv-qxrq-7jq6 fix from v3 (remove XSS from default landing page HTML)#6998
233b44eeaThanks @glasser! - Fix a slow memory leak in the usage reporting plugin (Possible memory leak in ApolloServerPluginUsageReporting #6983).#6827
0c2909aa1Thanks @glasser! - Support application/graphql-response+json content-type if requested via Accept header, as per graphql-over-http spec.Include
charset=utf-8in content-type headers.#6794
7445d3377Thanks @glasser! - Usage reporting and inline trace plugins: replacerewriteErrorwithsendErrorsInTraces/includeErrors, and mask all errors by default.#6357
7c3c825d8Thanks @trevor-scheer! - Export ApolloServerErrorCode enum instead of error classes. HTTPGraphQLRequest takes search params as raw string.#6814
cf0fcf49aThanks @glasser! - Several changes relating to plugins:Remove the
serverfield onGraphQLRequestContextandGraphQLServerContext(ie, the arguments to most plugin hook methods). This was added during AS4 development and did not exist in AS3.Add
loggerandcachefields toGraphQLRequestContextandGraphQLServerContext. Theloggerfields andGraphQLRequestContext.cacheexisted in AS3 and had been previously removed for redundancy with theserverfield. (Unlike in AS3,loggeris readonly.)ApolloServerPluginis now declared as<in TContext extends BaseContext = BaseContext>rather than<in out TContext>. This means that you can declare a plugin that doesn't care aboutcontextValueto simply implementApolloServerPluginand it will work with anyApolloServer<NoMatterWhatContext>. This should make it easy to write plugins that don't care about context.Remove the ability to specify a factory function as an element of the
pluginslist in theApolloServerconstructor. (Reducing the number of ways to specify constructor options helps keep type errors simpler.) As far as we know the main use case for this (referring to theApolloServeritself when creating the plugin) can be handled with the new-in-AS4ApolloServer.addPluginmethod.#6857
15b1cb2e9Thanks @glasser! - Errors thrown in resolvers and context functions can useextensions.httpto affect the response status code and headers. The default behavior when a context function throws is now to always use status code 500 rather than comparingextensions.codetoINTERNAL_SERVER_ERROR.#6960
d3ea2d4efThanks @glasser! - Add generics for response data and variables to server.executeOperation; allow inference from TypedQueryDocumentNode.#6897
e1455d583Thanks @bonnici! - Usage reporting: always send traces over 10MB as stats.Updated dependencies [
6ac508225,d20842824,7c3c825d8]:@apollo/[email protected]
Major Changes
6ac508225Thanks @glasser! - Initial Apollo Server 4 releasePatch Changes
#6967
d20842824Thanks @renovate! - Update@apollo/protobufjsdependency to avoid false positives in vulnerability scans (Vulnerabilies in @apollo/protobufjs (dependency of apollo-reporting-protobuf) #6835)#6357
7c3c825d8Thanks @trevor-scheer! - Export ApolloServerErrorCode enum instead of error classes. HTTPGraphQLRequest takes search params as raw string.