-
Notifications
You must be signed in to change notification settings - Fork 2k
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
refactor: use Promise constructor to wrap builtin gzip #7229
Conversation
❌ Deploy Preview for apollo-server-docs failed.Built without sensitive environment variables
|
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 0154317:
|
I am happy to merge this change because there's nothing particularly negative about it and I trust you that it resolves the CF worker issue. But it is hard for me to know as a maintainer what to avoid doing in the future — eg, the fact that |
This PR was opened by the [Changesets release](https://github.com/changesets/action) 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 main, this PR will be updated. # Releases ## @apollo/server-plugin-response-cache@4.1.0 ### Minor Changes - [#7241](#7241) [`d7e9b9759`](d7e9b97) Thanks [@glasser](https://github.com/glasser)! - If the cache you provide to the `cache` option is created with `PrefixingKeyValueCache.cacheDangerouslyDoesNotNeedPrefixesForIsolation` (new in `@apollo/utils.keyvaluecache@2.1.0`), the `fqc:` prefix will not be added to cache keys. ## @apollo/server@4.3.0 ### Minor Changes - [#7241](#7241) [`d7e9b9759`](d7e9b97) Thanks [@glasser](https://github.com/glasser)! - If the cache you provide to the `persistedQueries.cache` option is created with `PrefixingKeyValueCache.cacheDangerouslyDoesNotNeedPrefixesForIsolation` (new in `@apollo/utils.keyvaluecache@2.1.0`), the `apq:` prefix will not be added to cache keys. Providing such a cache to `new ApolloServer()` throws an error. ### Patch Changes - [#7232](#7232) [`3a4823e0d`](3a4823e) Thanks [@glasser](https://github.com/glasser)! - Refactor the implementation of `ApolloServerPluginDrainHttpServer`'s grace period. This is intended to be a no-op. - [#7229](#7229) [`d057e2ffc`](d057e2f) Thanks [@dnalborczyk](https://github.com/dnalborczyk)! - Improve compatibility with Cloudflare workers by avoiding the use of the Node `util` package. This change is intended to be a no-op. - [#7228](#7228) [`f97e55304`](f97e553) Thanks [@dnalborczyk](https://github.com/dnalborczyk)! - Improve compatibility with Cloudflare workers by avoiding the use of the Node `url` package. This change is intended to be a no-op. - [#7241](#7241) [`d7e9b9759`](d7e9b97) Thanks [@glasser](https://github.com/glasser)! - For ease of upgrade from the recommended configuration of Apollo Server v3.9+, you can now pass `new ApolloServer({ cache: 'bounded' })`, which is equivalent to not providing the `cache` option (as a bounded cache is now the default in AS4). ## @apollo/server-integration-testsuite@4.3.0 ### Patch Changes - [#7228](#7228) [`f97e55304`](f97e553) Thanks [@dnalborczyk](https://github.com/dnalborczyk)! - Improve compatibility with Cloudflare workers by avoiding the use of the Node `url` package. This change is intended to be a no-op. - Updated dependencies \[[`3a4823e0d`](3a4823e), [`d057e2ffc`](d057e2f), [`f97e55304`](f97e553), [`d7e9b9759`](d7e9b97), [`d7e9b9759`](d7e9b97)]: - @apollo/server@4.3.0 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
thank you @glasser for pulling this in!
I agree, that's totally understandable.
Good point. There might be not a straight forward way to easily accomplish that without constraining further development and improvements of Apollo Server. Generally speaking, preferring JS/Web API over platform specific API would definitely help, for CFW or any other platform than node.js, such as deno, bun etc. In addition, avoiding (currently) non-polyfillable modules such as I would think most developers who are using CFW are hopefully aware of the implications the platform comes with, and we could (or even should) add some additional suggestions on the the CFW integration docs, such as pinning the deps, and always use lock files etc., otherwise bring it up in an issue or a PR. |
Thanks. I guess my question is: is there something pretty simple we can do in a smoke test perhaps using Wrangler directly that builds a minimal Apollo Server app and sees that it at least starts up properly (ie the imports don't fail)? |
yes, there is! for local development unfortunately, the problem is that the generated output and the behavior really depends on which tools and which versions are being used 😞 |
OK, so waiting til v3 might make sense for this sort of testing? What's the next step we can take towards getting Cloudflare support on our integrations page? Your package ready for that? |
forgot to mention, https://github.com/dnalborczyk/apollo-server-cloudflare-workers
There's only a couple things left, other than that it should be ready to go, we can move the repo over to I removed the another small thing on my todo list is to look at: https://github.com/dnalborczyk/apollo-server-integrations-cloudflare-workers/blob/97c085d7e481a94d668a0b4378d7e9462a3e36d7/src/startServerAndCreateCloudflareWorkersHandler.ts#L97 last but not least we need to add some tests. |
support for
Cloudflare Workers
ref: #6034