Skip to content

feat(apollo): SJIP-1576 memoize apollo client to avoid recreating it on each render - #1020

Merged
AltefrohneGaelle merged 2 commits into
devfrom
feat/sjip-1576
Jul 6, 2026
Merged

feat(apollo): SJIP-1576 memoize apollo client to avoid recreating it on each render#1020
AltefrohneGaelle merged 2 commits into
devfrom
feat/sjip-1576

Conversation

@AltefrohneGaelle

@AltefrohneGaelle AltefrohneGaelle commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

feat(apollo): memoize apollo client to avoid recreating it on each render

SJIP-1576

Description

The ApolloClient was being recreated on every render of the Provider, which also
reset the InMemoryCache each time. This PR memoizes the client creation with useMemo,
so it is only recreated when the backend changes.

Changes

  • Wrapped the ApolloClient instantiation in a useMemo
  • The client (and its cache) is now preserved across renders

Acceptance Criterias

  • Verify data loads correctly (FHIR / Arranger)
  • Verify no regression on pages using Apollo

Screenshot or Video

Before

After

lflangis
lflangis previously approved these changes Jun 10, 2026
@netlify

netlify Bot commented Jun 10, 2026

Copy link
Copy Markdown

Deploy Preview for include-qa ready!

Name Link
🔨 Latest commit a98e9ae
🔍 Latest deploy log https://app.netlify.com/projects/include-qa/deploys/6a2b2f41cc20be0008fcfaf7
😎 Deploy Preview https://deploy-preview-1020--include-qa.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 project configuration.

@AltefrohneGaelle
AltefrohneGaelle merged commit 0cc8774 into dev Jul 6, 2026
6 checks passed
@AltefrohneGaelle
AltefrohneGaelle deleted the feat/sjip-1576 branch July 6, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants