Releases: apollographql/apollo-server
@apollo/[email protected]
Patch Changes
-
#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.
-
@apollo/[email protected]
Patch Changes
-
#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 [
cf0fcf49a]:- @apollo/[email protected]
@apollo/[email protected]
Patch Changes
-
#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 [
cf0fcf49a]:- @apollo/[email protected]
@apollo/[email protected]
@apollo/[email protected]
Patch Changes
-
#6806
bccc230f0Thanks @glasser! - Rename response.http.statusCode back to status like it was in AS3. -
Updated dependencies [
bccc230f0]:- @apollo/[email protected]
@apollo/[email protected]
Patch Changes
-
#6806
bccc230f0Thanks @glasser! - Rename response.http.statusCode back to status like it was in AS3. -
Updated dependencies [
bccc230f0]:- @apollo/[email protected]
@apollo/[email protected]
Patch Changes
-
#6788
13f809ca6Thanks @glasser! -parseOptionsis now only used for parsing operations, not for schemas too. Its TS type now only includes options recognized bygraphql-jsitself. -
#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). -
#6792
400f7867bThanks @glasser! - Port GHSA-2fvv-qxrq-7jq6 fix from v3 (remove XSS from default landing page HTML) -
#6794
7445d3377Thanks @glasser! - Usage reporting and inline trace plugins: replacerewriteErrorwithsendErrorsInTraces/includeErrors, and mask all errors by default.
@apollo/[email protected]
Patch Changes
-
#6795
363fd308dThanks @bonnici! - Added unit tests to coverunmodifiedandmaskederror reporting options -
#6794
7445d3377Thanks @glasser! - Usage reporting and inline trace plugins: replacerewriteErrorwithsendErrorsInTraces/includeErrors, and mask all errors by default. -
Updated dependencies [
13f809ca6,96178c570,400f7867b,7445d3377]:- @apollo/[email protected]
@apollo/[email protected]
Patch Changes
-
#6771
bce9150f3Thanks @glasser! - Support Gateway. Remove executor constructor option. -
#6764
c4115e96aThanks @glasser! - Get cache-control types from @apollo/cache-control-types; no moredeclare modulefor info.cacheControl -
#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 #6763 from AS3 (fix fieldLevelInstrumentation type declaration)