Skip to content

Releases: apollographql/apollo-server

@apollo/[email protected]

15 Aug 21:30
b40f836
Compare
Choose a tag to compare
Pre-release

Patch Changes

  • #6814 cf0fcf49a Thanks @glasser! - Several changes relating to plugins:

    • Remove the server field on GraphQLRequestContext and GraphQLServerContext (ie, the arguments to most plugin hook methods). This was added during AS4 development and did not exist in AS3.

    • Add logger and cache fields to GraphQLRequestContext and GraphQLServerContext. The logger fields and GraphQLRequestContext.cache existed in AS3 and had been previously removed for redundancy with the server 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 about contextValue to simply implement ApolloServerPlugin and it will work with any ApolloServer<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 the ApolloServer 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 the ApolloServer itself when creating the plugin) can be handled with the new-in-AS4 ApolloServer.addPlugin method.

  • Updated dependencies [cf0fcf49a]:

@apollo/[email protected]

15 Aug 21:30
b40f836
Compare
Choose a tag to compare
Pre-release

Patch Changes

  • #6814 cf0fcf49a Thanks @glasser! - Several changes relating to plugins:

    • Remove the server field on GraphQLRequestContext and GraphQLServerContext (ie, the arguments to most plugin hook methods). This was added during AS4 development and did not exist in AS3.

    • Add logger and cache fields to GraphQLRequestContext and GraphQLServerContext. The logger fields and GraphQLRequestContext.cache existed in AS3 and had been previously removed for redundancy with the server 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 about contextValue to simply implement ApolloServerPlugin and it will work with any ApolloServer<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 the ApolloServer 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 the ApolloServer itself when creating the plugin) can be handled with the new-in-AS4 ApolloServer.addPlugin method.

  • Updated dependencies [cf0fcf49a]:

@apollo/[email protected]

12 Aug 20:50
fbac9eb
Compare
Choose a tag to compare
Pre-release

Patch Changes

@apollo/[email protected]

12 Aug 20:50
fbac9eb
Compare
Choose a tag to compare
Pre-release

Patch Changes

@apollo/[email protected]

12 Aug 20:50
fbac9eb
Compare
Choose a tag to compare
Pre-release

Patch Changes

@apollo/[email protected]

11 Aug 23:52
a39273a
Compare
Choose a tag to compare
Pre-release

Patch Changes

  • #6788 13f809ca6 Thanks @glasser! - parseOptions is now only used for parsing operations, not for schemas too. Its TS type now only includes options recognized by graphql-js itself.

  • #6785 96178c570 Thanks @renovate! - Update internal use of @graphql-tools/schema from 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 (passing parseOptions to makeExecutableSchema).

  • #6792 400f7867b Thanks @glasser! - Port GHSA-2fvv-qxrq-7jq6 fix from v3 (remove XSS from default landing page HTML)

  • #6794 7445d3377 Thanks @glasser! - Usage reporting and inline trace plugins: replace rewriteError with sendErrorsInTraces/includeErrors, and mask all errors by default.

@apollo/[email protected]

11 Aug 23:52
a39273a
Compare
Choose a tag to compare
Pre-release

Patch Changes

@apollo/[email protected]

09 Aug 21:23
9214d26
Compare
Choose a tag to compare
Pre-release

Patch Changes

  • #6771 bce9150f3 Thanks @glasser! - Support Gateway. Remove executor constructor option.

  • #6764 c4115e96a Thanks @glasser! - Get cache-control types from @apollo/cache-control-types; no more declare module for info.cacheControl

  • #6759 6ef6a090c Thanks @glasser! - Refactor error formatting.

    Remove error.extensions.exception; you can add it back yourself with formatError. error.extensions.exception.stacktrace is now available on error.extensions.stacktrace.

    Provide unwrapResolverError function in @apollo/server/errors; useful for your formatError hook.

    No more TS declare module describing the exception extension (partially incorrectly).

    Rename the (new in v4) constructor option includeStackTracesInErrorResponses to includeStacktraceInErrorResponses.

  • #6765 536e038a7 Thanks @glasser! - Port #6763 from AS3 (fix fieldLevelInstrumentation type declaration)

@apollo/[email protected]

09 Aug 21:23
9214d26
Compare
Choose a tag to compare
Pre-release

Patch Changes

@apollo/[email protected]

09 Aug 21:23
9214d26
Compare
Choose a tag to compare
Pre-release

Patch Changes

  • #6771 bce9150f3 Thanks @glasser! - Support Gateway. Remove executor constructor option.

  • #6764 c4115e96a Thanks @glasser! - Get cache-control types from @apollo/cache-control-types; no more declare module for info.cacheControl

  • #6759 6ef6a090c Thanks @glasser! - Refactor error formatting.

    Remove error.extensions.exception; you can add it back yourself with formatError. error.extensions.exception.stacktrace is now available on error.extensions.stacktrace.

    Provide unwrapResolverError function in @apollo/server/errors; useful for your formatError hook.

    No more TS declare module describing the exception extension (partially incorrectly).

    Rename the (new in v4) constructor option includeStackTracesInErrorResponses to includeStacktraceInErrorResponses.

  • Updated dependencies [bce9150f3, c4115e96a, 6ef6a090c, 536e038a7]: