GraphQL with Next.js 13 Server Components

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

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

This is really cool, GraphQL codegen looks much nicer to work with now! I'm gonna have to check out Next 13 soon as well, server components look awesome.

rapid-ruby
Автор

This is really what I was looking for, thank you ♥

tntube
Автор

Do you have any sort of way, even if in a limited way, to use apollo with nextjs? The old approach of passing pageProps to hydrate the cache is now not possible and i am a bit stumped on what to do.

adamwheatley
Автор

Hey, nice explanation. I implemented it in my project, however I encountered a problem. Next13 promotes an approach to have fetches in multiple places (in one render) and relies on react cache to perform only one request. This doesnt seem to work because u pass an object to the function (which is different each time). Other solutions rely on internal cache which also isnt a solution, bc I would need to invalidate all the caches after each render. Any ideas how to fix this problem?

Kable
Автор

Quick off topic question what font are you using it looks gorgeous

dogcodes
Автор

Is there an Apollo client version of this

ReuelTeodoro
Автор

Nice! Let's get this Next13 going...I found you in Hygraph :) Awesome stuff!

jonathanvandenberg
Автор

I always get the following error while using Next.js 14, apparently graphqlClient.request is not something that I can use. Please help
"Cannot access document.definitions on the server. You cannot dot into a client module from a server component."

AhmadSheraz-cq
Автор

From what I read about the description for grahic-ql requests it states it's used for simple apps. What I'm building ain't simple. What do I need in replacement from that?

Ok. No need. Apollo client will do the trick.

miraclehesed
Автор

Thanks for the great video! I am just wondering how you would go about ISR with GraphQL?

ryanyu
Автор

I always get the following error when using it with Next.js 14. Apparently graphqlClient.request is not something we can use now.

"Cannot access document.definitions on the server. You cannot dot into a client module from a server component."

AhmadSheraz-cq
Автор

Hello Jamie please i need some help, please. i have had a hard time using Urql with nextjs server components in order to make requests from the server. converting my component to a client component works pretty well but i want some queries obtained from the server. Can i use your expertise? Please

aristide_F
Автор

how to query properties from returned results? for example i only need "id" and don't need "title". If I remove 'title' then typescript throws an error.

LQT
Автор

There will be too many request if we go with graphql-request and that can be sorted out with cache impl, Could you make a video with apollo-client that helps production grade apps

AnanthM-yf
Автор

I want to mutation in of graphql inside a client component of next.js

rahulpradhan
Автор

Nextjs 13.4 is very cool. I tried with Nextjs.13 ( app folder ) with appolo-client, graphql, appolo-server with prisma, but struggling to find properly working examples for basic jwt- based (credentials) authentication flow with Auth0 or 3rd party systems. Any example you know?

Coder
Автор

I'm trying to use codegen with Next.js 13 without TypeScript... Initially I was just trying to consume some GraphQL APIs with Apollo, but I think I'm going with the new Next fecth api. =/
I failed using codegen with vanilla js.

ricardomartins
Автор

Do you think it could be done using Apollo too both for RSC and client components?

daavidaviid
Автор

Can you please provide link for this repo

itsyashsahu