Skip to content

Latest commit

History

History
167 lines (86 loc) 路 13.9 KB

CHANGELOG.md

File metadata and controls

167 lines (86 loc) 路 13.9 KB

@apollo/server

4.0.0-rc.17

Patch Changes

4.0.0-rc.16

Patch Changes

  • #6986 db5d715a3 Thanks @glasser! - The cache control plugin sets cache-control: no-store for uncacheable responses. Pass calculateHttpHeaders: 'if-cacheable' to the cache control plugin to restore AS3 behavior.

4.0.0-rc.15

Patch Changes

  • #6897 e1455d583 Thanks @bonnici! - Usage reporting: always send traces over 10MB as stats.

  • Updated dependencies [d20842824]:

    • @apollo/usage-reporting-protobuf@4.0.0-rc.2

4.0.0-rc.14

Patch Changes

  • #6961 a782c791f Thanks @glasser! - Require graphql@16.6 as a peer dependency.

  • #6960 d3ea2d4ef Thanks @glasser! - Add generics for response data and variables to server.executeOperation; allow inference from TypedQueryDocumentNode.

4.0.0-alpha.13

Patch Changes

  • #6936 a404bf17e Thanks @trevor-scheer! - Update executeOperation second parameter to be an optional options object which includes an optional contextValue.

  • #6936 a404bf17e Thanks @trevor-scheer! - HTTPGraphQLRequest now uses a specific HeaderMap class which we export instead of allowing a standard Map. The HeaderMap downcases all incoming keys, as header names are not case-sensitive.

  • #6936 a404bf17e Thanks @trevor-scheer! - Update validationRules typing for correctness. This is sort of a breaking change for TS users in that the types were more permissive than they should have been. All validationRules list items should conform to the graphql-js ValidationRule type.

4.0.0-alpha.12

Patch Changes

  • #6827 0c2909aa1 Thanks @glasser! - Experimental support for incremental delivery (@defer/@stream) when combined with a prerelease of graphql-js.

  • #6827 0c2909aa1 Thanks @glasser! - Support application/graphql-response+json content-type if requested via Accept header, as per graphql-over-http spec. Include charset=utf-8 in content-type headers.

4.0.0-alpha.11

Patch Changes

4.0.0-alpha.10

Patch Changes

  • #6857 15b1cb2e9 Thanks @glasser! - Errors thrown in resolvers and context functions can use extensions.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 comparing extensions.code to INTERNAL_SERVER_ERROR.

4.0.0-alpha.9

Patch Changes

  • #6855 3e4ab3fca Thanks @glasser! - New usage reporting option sendTraces: false to only send usage reports as aggregated statistics, not per-request traces.
  • #6855 3e4ab3fca Thanks @glasser! - Remove Apollo-internal internal_includeTracesContributingToStats. This should not have been used other than inside Apollo's own servers.
  • #6855 3e4ab3fca Thanks @glasser! - The usage reporting option debugPrintReports now displays reports via logger.info rather than logger.warn.
  • #6855 3e4ab3fca Thanks @glasser! - Rename usage reporting option sendErrorsInTraces (added in 4.0.0-alpha.4) to sendErrors, as it also affects error statistics outside of traces.

4.0.0-alpha.8

Patch Changes

  • #6841 3320fee92 Thanks @glasser! - Upgrade @apollo/server-gateway-interface to have laxer definition of overallCachePolicy.

4.0.0-alpha.7

Patch Changes

4.0.0-alpha.6

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.

4.0.0-alpha.5

Patch Changes

4.0.0-alpha.4

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.

4.0.0-alpha.3

Patch Changes

  • #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.

4.0.0-alpha.2

Patch Changes

4.0.0-alpha.1

Patch Changes

  • #6357 7c3c825d8 Thanks @trevor-scheer! - Export ApolloServerErrorCode enum instead of error classes. HTTPGraphQLRequest takes search params as raw string.

  • Updated dependencies [7c3c825d8]:

    • @apollo/usage-reporting-protobuf@4.0.0-alpha.1

4.0.0-alpha.0

Major Changes

Patch Changes

  • Updated dependencies [f39d9eec7]:
    • @apollo/usage-reporting-protobuf@4.0.0-alpha.0