Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version Packages #7017

Merged
merged 2 commits into from Oct 10, 2022
Merged

Version Packages #7017

merged 2 commits into from Oct 10, 2022

Conversation

github-actions[bot]
Copy link
Contributor

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/server-integration-testsuite@4.0.0

Major Changes

Patch Changes

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

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

  • #6806 bccc230f0 Thanks @glasser! - Rename response.http.statusCode back to status like it was in AS3.

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

  • #6760 052f1b548 Thanks @glasser! - Relax error-handling expectations to work better with Fastify

  • #6817 eca003fdc Thanks @glasser! - Move ApolloServerPluginGraphQLPlayground into its own package.

  • #6795 363fd308d Thanks @bonnici! - Added unit tests to cover unmodified and masked error reporting options

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

  • #6906 115ab2fa8 Thanks @trevor-scheer! - Relax message requirement for malformed JSON POST to allow default 'Bad Request'
    response.

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

  • #7001 63d568d13 Thanks @glasser! - Test the behavior of didResolveOperation hooks throwing.

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

  • #6850 256f2424b Thanks @renovate! - Expand jest peer deps to include v29

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

  • #6910 6541f92c9 Thanks @trevor-scheer! - Update snapshot format to future jest v29 default

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

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

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

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

  • #6936 a404bf17e Thanks @trevor-scheer! - Add test for batch requests with no elements

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

  • 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/server@4.0.0
    • @apollo/server-plugin-landing-page-graphql-playground@4.0.0
    • @apollo/usage-reporting-protobuf@4.0.0

@apollo/server-plugin-landing-page-graphql-playground@4.0.0

Major Changes

Patch Changes

@apollo/server-plugin-response-cache@4.0.0

Major Changes

Patch Changes

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

  • #6806 bccc230f0 Thanks @glasser! - Rename response.http.statusCode back to status like it was in AS3.

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

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

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

  • #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 [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/server@4.0.0

@apollo/server@4.0.0

Major Changes

Patch Changes

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

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

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

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

  • #6806 bccc230f0 Thanks @glasser! - Rename response.http.statusCode back to status like it was in AS3.

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

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

  • #6855 3e4ab3fca Thanks @glasser! - New usage reporting option sendTraces: false to only send usage reports as aggregated statistics, not per-request traces.

  • #6357 f736b4980 Thanks @trevor-scheer! - Port Update error message when graph ref and variant are specified #6709 from AS3 (improve an error message)

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

  • #6855 3e4ab3fca Thanks @glasser! - Remove Apollo-internal internal_includeTracesContributingToStats. This should not have been used other than inside Apollo's own servers.

  • #6817 eca003fdc Thanks @glasser! - Move ApolloServerPluginGraphQLPlayground into its own package.

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

  • #6731 9fc23f799 Thanks @trevor-scheer! - Use extensions for all imports to accommodate TS users using moduleResolution: "nodenext"

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

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

  • #6879 6b37d169b Thanks @bonnici! - Fixed usage reporting plugin log message

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

  • #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 Usage reporting: fix TS declaration of fieldLevelInstrumentation #6763 from AS3 (fix fieldLevelInstrumentation type declaration)

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

  • #6846 2cab8f785 Thanks @trevor-scheer! - Ensure executionDidEnd hooks are only called once (when they throw)

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

  • #6998 233b44eea Thanks @glasser! - Fix a slow memory leak in the usage reporting plugin (Possible memory leak in ApolloServerPluginUsageReporting #6983).

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

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

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

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

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

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

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

  • Updated dependencies [6ac508225, d20842824, 7c3c825d8]:

    • @apollo/usage-reporting-protobuf@4.0.0

@apollo/usage-reporting-protobuf@4.0.0

Major Changes

Patch Changes

@netlify
Copy link

netlify bot commented Oct 10, 2022

Deploy Preview for apollo-server-docs ready!

Name Link
🔨 Latest commit 95a200e
🔍 Latest deploy log https://app.netlify.com/sites/apollo-server-docs/deploys/63447de62ccf7f000927174d
😎 Deploy Preview https://deploy-preview-7017--apollo-server-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 10, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 95a200e:

Sandbox Source
Apollo Server Typescript Configuration
Apollo Server Configuration

We do not need to describe changes between prereleases now that the
prerelease phase is over.

Move the main release note draft out of the draft file.

Remove the ROADMAP: we've done everything in it! New ROADMAP to come
once it's ready.

Note that the changeset-publishing code (in
https://github.com/changesets/action/blob/398d7edfb130ad2d4e076a573724f435ea87cea6/src/run.ts#L34)
finds a Markdown section with a heading matching the version (precisely:
no `v`). We can edit the section inside the PR before we merge it, and
that will affect the GitHub Release text.
@glasser glasser merged commit 578dc68 into version-4 Oct 10, 2022
@glasser glasser deleted the changeset-release/version-4 branch October 10, 2022 20:21
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant