Next.js Discord

Discord Forum

Using @apollo/experimental-nextjs-app-support/ together with @as-integrations/next

Unanswered
Himalayan posted this in #help-forum
Open in Discord
Avatar
HimalayanOP
I am building a Nextjs app in the App directory. I'm experimenting using @apollo/experimental-nextjs-app-support/ for SSR with ApolloClient as well as running an ApolloServer on the Next13 api routes using @as-integrations/next.

Right now I am finding that the client will fail to request from the server when running build. I am guessing at this point that it is because at the time the request is made in build, the server isn't running.

Build actually works if I am running the app locally at the time I run build.
But this ofcourse means that deploying the app to vercel for example means that it fails, because as the app builds, the server isn't running when the client makes it's requests.

Has anyone else played with these two together?

https://github.com/apollo-server-integrations/apollo-server-integration-next
https://github.com/apollographql/apollo-client-nextjs

0 Replies