Releases: apollographql/apollo-server
@apollo/server-integration-testsuite@4.0.0-alpha.10
Patch Changes
-
#6857
15b1cb2e9
Thanks @glasser! - Errors thrown in resolvers and context functions can useextensions.http
to 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.code
toINTERNAL_SERVER_ERROR
. -
Updated dependencies [
15b1cb2e9
]:- @apollo/server@4.0.0-alpha.10
@apollo/server@4.0.0-alpha.9
Patch Changes
-
#6855
3e4ab3fca
Thanks @glasser! - New usage reporting optionsendTraces: false
to only send usage reports as aggregated statistics, not per-request traces. -
#6855
3e4ab3fca
Thanks @glasser! - Remove Apollo-internalinternal_includeTracesContributingToStats
. This should not have been used other than inside Apollo's own servers. -
#6855
3e4ab3fca
Thanks @glasser! - The usage reporting optiondebugPrintReports
now displays reports vialogger.info
rather thanlogger.warn
. -
#6855
3e4ab3fca
Thanks @glasser! - Rename usage reporting optionsendErrorsInTraces
(added in 4.0.0-alpha.4) tosendErrors
, as it also affects error statistics outside of traces.
@apollo/server-integration-testsuite@4.0.0-alpha.9
@apollo/server@4.0.0-alpha.8
Patch Changes
-
#6841
3320fee92
Thanks @glasser! - Upgrade @apollo/server-gateway-interface to have laxer definition of overallCachePolicy. -
#6731
9fc23f799
Thanks @trevor-scheer! - Use extensions for all imports to accommodate TS users using moduleResolution: "nodenext" -
#6846
2cab8f785
Thanks @trevor-scheer! - Ensure executionDidEnd hooks are only called once (when they throw)
@apollo/server-integration-testsuite@4.0.0-alpha.8
@apollo/server@4.0.0-alpha.7
@apollo/server-plugin-landing-page-graphql-playground@4.0.0-alpha.0
@apollo/server-integration-testsuite@4.0.0-alpha.7
@apollo/server@4.0.0-alpha.6
Patch Changes
-
#6814
cf0fcf49a
Thanks @glasser! - Several changes relating to plugins:-
Remove the
server
field onGraphQLRequestContext
andGraphQLServerContext
(ie, the arguments to most plugin hook methods). This was added during AS4 development and did not exist in AS3. -
Add
logger
andcache
fields toGraphQLRequestContext
andGraphQLServerContext
. Thelogger
fields andGraphQLRequestContext.cache
existed in AS3 and had been previously removed for redundancy with theserver
field. (Unlike in AS3,logger
is readonly.) -
ApolloServerPlugin
is 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 aboutcontextValue
to simply implementApolloServerPlugin
and 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
plugins
list in theApolloServer
constructor. (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 theApolloServer
itself when creating the plugin) can be handled with the new-in-AS4ApolloServer.addPlugin
method.
-
@apollo/server-plugin-response-cache@4.0.0-alpha.4
Patch Changes
-
#6814
cf0fcf49a
Thanks @glasser! - Several changes relating to plugins:-
Remove the
server
field onGraphQLRequestContext
andGraphQLServerContext
(ie, the arguments to most plugin hook methods). This was added during AS4 development and did not exist in AS3. -
Add
logger
andcache
fields toGraphQLRequestContext
andGraphQLServerContext
. Thelogger
fields andGraphQLRequestContext.cache
existed in AS3 and had been previously removed for redundancy with theserver
field. (Unlike in AS3,logger
is readonly.) -
ApolloServerPlugin
is 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 aboutcontextValue
to simply implementApolloServerPlugin
and 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
plugins
list in theApolloServer
constructor. (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 theApolloServer
itself when creating the plugin) can be handled with the new-in-AS4ApolloServer.addPlugin
method.
-
-
Updated dependencies [
cf0fcf49a
]:- @apollo/server@4.0.0-alpha.6