Using Apollo Client with Next.js 13 and Server Components | Patrick Arminio | GraphQL Wroclaw #13

  Рет қаралды 11,400

Mirumee Labs

Mirumee Labs

Күн бұрын

Next.js 13 introduced significant new features, including the app directory (beta), which includes support for layouts and React Server Components. React Server Components enable data fetching on the server, reducing the need for client-side fetches. This talk discusses how to use Apollo Client in Server Components, what are the tradeoffs of using Server Components with Apollo Client.
***
This talk was given during one of the editions of GraphQL Wroclaw Meetup. Join our community, take part in following events and gain access to the GraphQL knowledge library.
👥 Meetup Group - www.meetup.com...
🌐 Website - graphqlwroclaw...
🚀 Twitter - / graphqlwroclaw

Пікірлер: 17
@anthonybillon1360
@anthonybillon1360 9 күн бұрын
Love it, thank you! I'll still keep most of my implementation as client components to avoid problems (it's almost impossible to do otherwise with Auth0 anyway)
@NaveenKumarasinghe
@NaveenKumarasinghe 8 ай бұрын
This information about using the client directly is very rare to find. Thanks Patrick!
@harissarwar
@harissarwar Жыл бұрын
Thanks a lot. I just started using NextJS and your video answers all of my questions in 25 mins. Awesome -)
@RodrigoMedina-k9v
@RodrigoMedina-k9v Жыл бұрын
Great video, I've been struggling with this and your content really helped me fixed my cache issues !!
@piotrszczesniak
@piotrszczesniak 3 ай бұрын
Great and content heavy talk! Patrick, you gave me solutions to problems I've been facing now building my Headless WordPress with Next.js - for this purpose Apollo Client with GraphQL make it super easy to fetch data from WordPress. Thank you!
@freddiemotion
@freddiemotion 6 ай бұрын
Great video! Very insightful. I think one of the greatest advantages that Apollo has is client side caching. Trying to use the apollo client directly instead of hooks on the server component as you mentioned does not look like the best option, cause why not just use the fetch API directly instead (unless you guys found a good way to pass that to the client side for caching). Also, in 23:40 you mentioned there's no way to send a request to a server component and that it responds, but I think server actions kinda solve that, am I wrong? Anyway, thanks for all the good info.
3 ай бұрын
Thanks for sharing. I see the benefit of server components, but it gives me chills implementing them. The availability of information and support is still something that needs to mature and grow.
@coreybyrum
@coreybyrum 6 ай бұрын
Great talk, Patrick! I'd love to hear your thoughts on how NextJS 14 and server actions change the usage of server components.
@siamahnaf6760
@siamahnaf6760 Жыл бұрын
Love from Bangladesh Patrick Arminio. You are great, Patrick!😊
@mauriciabad
@mauriciabad Жыл бұрын
Great video, it helped me setup Apollo with next.js 13 ssr
@djET0
@djET0 8 ай бұрын
21:27 if u want to see how revalidate on graphql client
@mahatohariom
@mahatohariom 11 ай бұрын
is the experimental library is good to use ,does it change the way of using it once it get stable
@shrishah4706
@shrishah4706 8 ай бұрын
amazing talk
@alexshi9320
@alexshi9320 7 ай бұрын
This still doesn't work for me. The whole situation feels like a catch 22. Let me explain why: 1. You can't call a mutation with the client workaround within a server component if let's say you want a on click event handler to make the mutation call. You also can't use the useMutation hook inside a client component for the following reason: 2. You can't even use the ApolloProvider even if you use a use client directive since you need to fetch the client, but to get the client you need a server component, but when you switch over to server component the ApolloProvider API won't work due to it's use of useContext. Has anyone found a solution to circumvent this?
@itspez2147
@itspez2147 7 ай бұрын
at this point just fetch it, for now it's best to just use graphql-request till they add it
@djET0
@djET0 7 ай бұрын
@@itspez2147but with graphql-request u cannot use revalidation , or im wrong?
@khan.hassan
@khan.hassan Жыл бұрын
Great Thanks ♥
Как мы играем в игры 😂
00:20
МЯТНАЯ ФАНТА
Рет қаралды 3,2 МЛН
Officer Rabbit is so bad. He made Luffy deaf. #funny #supersiblings #comedy
00:18
Funny superhero siblings
Рет қаралды 12 МЛН
Клиент Apollo GraphQL для React-приложений
44:11
Михаил Непомнящий
Рет қаралды 29 М.
React With GraphQL (Apollo Client) Crash Course
1:06:28
Laith Academy
Рет қаралды 89 М.
Client-Side VS Server-Side Rendering - Data Fetching with Next.js
13:20
freeCodeCamp Talks
Рет қаралды 183 М.
tRPC + NextJS App Router = Simple Typesafe APIs
19:18
Jack Herrington
Рет қаралды 80 М.
Next 14 + React Query COMBO with Server Actions and RSC
9:49
developedbyed
Рет қаралды 107 М.
The Hidden Cost Of GraphQL And NodeJS
28:35
ThePrimeTime
Рет қаралды 193 М.
GraphQL Requests on Your Front-end w/Next.js
15:13
Discover Sitecore
Рет қаралды 11 М.
10 common mistakes with the Next.js App Router
20:37
Vercel
Рет қаралды 216 М.