apollographql / apollographql/apollo-client-integrations

[Discussion] How caching works with RSC components

Open
#494 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
556
Forks
53
PR merge metrics
No merged PRs in 30d

Description

Even though I've read the documentation and the breakdown, I'm still not fully sure how caching works with RSC components.

For example, in my current project, I'm building a paginated list that is rendered 100% server-side using RSC. When the page changes (e.g., /posts?page=2), a query is made using getClient().

My question is: when a user revisits the same paginated page, is the response cached?

- Is it leveraging the built-in Next.js server-side cache?
- If not, does Apollo implement its own caching layer for RSC?
- Or do fetches inside RSC components bypass caching entirely?

And if there is no caching, would it be more performant to only fetch the first page on the server (with ``) and handle the rest of the pagination on the client side?

Contributor guide

No contributing guide indexed for this repository

Research direction

No files or tests are named. Start by tracing getClient() and in the Next.js App Router integration, then compare caching behavior for revisiting /posts?page=2; done means documenting which cache layer applies and how server-side pagination should be handled.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, next.js, react, typescript
Domain
frontend, performance, web-dev
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.