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

preview_player
Показать описание

***
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.

Рекомендации по теме
Комментарии
Автор

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.

Автор

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!

piotrszczesniak
Автор

This information about using the client directly is very rare to find. Thanks Patrick!

NaveenKumarasinghe
Автор

Thanks a lot. I just started using NextJS and your video answers all of my questions in 25 mins. Awesome -)

harissarwar
Автор

Great video, I've been struggling with this and your content really helped me fixed my cache issues !!

mxvvunr
Автор

Love from Bangladesh Patrick Arminio. You are great, Patrick!😊

siamahnaf
Автор

Great video, it helped me setup Apollo with next.js 13 ssr

mauriciabad
Автор

Great talk, Patrick! I'd love to hear your thoughts on how NextJS 14 and server actions change the usage of server components.

coreybyrum
Автор

is the experimental library is good to use, does it change the way of using it once it get stable

xuzypnq
Автор

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.

freddiemotion
Автор

21:27 if u want to see how revalidate on graphql client

djET
Автор

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?

alexshi
welcome to shbcf.ru