I have a Next.js application running on React 17 and my goal is to upgrade to React 18. However, I’ve been facing issues while trying to upgrade the @apollo/client package to the latest version. I’ve made two failed attempts so far:
-
I tried upgrading from @apollo/client: 3.3.20 to @apollo/client: 3.6.0. This caused one of our pages to fail due to server-side rendering (SSR) issues. We were able to resolve it, but then we noticed that one of our unit tests was consistently failing. So, we decided to try a different version.
-
We then attempted to upgrade from @apollo/client: 3.3.20 to @apollo/client: 3.7.15. This version fixed the failing unit test, and we were able to merge it and deploy it to production. However, after a couple of days, we noticed a significant increase in CPU utilization and memory usage, indicating a memory leak. We had to revert the upgrade, and the ECS health metrics returned to normal.
Our main goal is to upgrade to React 18, but we keep running into issues with @apollo/client versions above 3.6.0. We are wondering if it’s sufficient to stay on version 3.3.20 for React 18 or if it will cause problems in the future?