question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

apollo-server-cloudflare is building at >1MB

See original GitHub issue

Using the latest version of apollo-server-cloudflare (2.0.2), a minimal app builds to greater than 1MB, which is the limit of Cloudflare Workers (so cannot be deployed).

A project build with 1.0.0-beta.0 builds to less than 350KB.

See 1.0.0-beta.0 example at https://github.com/jbaxleyiii/apollo-server-cloudflare. Then, install the latest version, and see the new size of dist/app.js.


Update: Still an issue as of 2.2.2 (2018-11-13)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:18

github_iconTop GitHub Comments

1reaction
codewithkristiancommented, May 29, 2019

hi all, dev advocate for the cloudflare workers team here 👋 we recently pushed some updates to how we bundle scripts at deploy time in workers – after some testing, it looks to me like deploying an apollo server on workers… works! (again)

would love someone to double-check my work who has been running into this issue in this thread – here’s an example project you can configure: https://github.com/signalnerve/workers-graphql

1reaction
gcodacommented, Apr 22, 2019

I do not need uploads, so i just aliased busboy to null in webpack.config.js, barely fits(968KiB) but works. Also cloudflare needs a addEventListener. here is a gist

Read more comments on GitHub >

github_iconTop Results From Across the Web

Integrate GraphQL Worker with KV storage?
Lightning-fast, globally distributed Apollo GraphQL server, ... Building a GraphQL server on the edge with Cloudflare Workers.
Read more >
Choosing an Apollo Server package
Apollo Server is distributed as a collection of different packages for different environments and web frameworks. ... apollo-server-cloudflare (Cloudflare).
Read more >
Cloudflare Workers - vite-plugin-ssr
Cloudflare uses the term "worker code" to denote server code that is run on ... use vite-plugin-cloudflare which enables us to simply use...
Read more >
Cloudflare Workers | Noise | Page 6
I have to be honest: creating a server-side rendered React framework with little prior knowledge was very difficult. There's still a ton to...
Read more >
Why do Webdevs keep trying to kill REST? - Swyx
Watching recent trends in client-server paradigms, from Apollo GraphQL ... JS bundles upfront: Firebase adds as much as 1mb to your bundle, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found