apollographql / apollographql/apollo-client-integrations

Difference between "apollo-client-nextjs" and pure "apollo-client"

Open
#306 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
556
Forks
53
PR merge metrics
No merged PRs in 30d

Description

Since there was no "discussion" section in repository, I wanted to open this topic to fill the gaps in my mind.

You see, I'm able to send query to my graphQL server like this

> import { getClient } from "./ApolloClientRSC"
export default async function Home() {
const { data: projectsData } = await getClient().query({query: FETCH_PROJECTS})
}

I'm using "apollo-client-nextjs" above. But, I can even send my queries by using plain "apollo-client" in my RSC like below.

> import client from "./ApolloClient"
export default async function Home() {
const { data: skillsData } = await client.query({query: FETCH_SKILLS})
const { data: projectsData } = await client.query({query: FETCH_PROJECTS})
}

This one, I'm not using "apollo-client-nextjs". Why should I use "apollo-client-nextjs" if I'm able to do it in plain "apollo-client" ?

What is the difference between "apollo-client-nextjs" and plain "apollo-client" at all ?

Thanks

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the ApolloClientRSC and ApolloClient entry points shown in the examples, then compare how each client is used for queries in the Next.js App Router and RSC context. Done means documenting the practical difference between apollo-client-nextjs and plain apollo-client, including when each example is appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
next.js, typescript
Domain
documentation, frontend
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.