Tag: next.js13
-
Nextjs 14 and @apollo/experimental-nextjs-app-support/ssr overlapping query issue
0 I am using next.js 14 and apollo experimental lib, i am using suspense with useSuspenseQuery, when i reload page it always fire query in browser side even if query run on server also. https://prnt.sc/53bLQGLYgNhH — query running on server https://prnt.sc/Ban7QSSzg-IQ — query running on browser due to each time query running on browser also…
-
Handling auth token expiration in apollo client NextJS13
0 I’m trying to handle the expiration of auth token in GraphQL, Apollo client in NextJS 13 application. This is the code I’ve written for the client provider, "use client"; import React from "react"; import { ApolloClient, InMemoryCache, ApolloProvider, HttpLink, ApolloLink, concat, } from "@apollo/client"; const httpLink = new HttpLink({ uri: process.env.NEXT_PUBLIC_SANDBOX_URL }); const authMiddleware…
-
ApolloError: Connector: HTTP Error: Bad Request – 405
0 I have a nextjs 14 weather project and i’m using Graphql, Apollo and stepzen for the first time. I had a error like that; ⨯ node_modules/@apollo/client/errors/index.js (28:27) @ call ApolloError: Connector: HTTP Error: Bad Request at new Promise (<anonymous>) at Array.forEach (<anonymous>) null ⨯ node_modules/@apollo/client/errors/index.js (28:27) @ call ⨯ ApolloError: Response not successful: Received…
-
getClient function React-Apollo giving a error which is Unhandled Runtime Error: HTTP Error: Bad Request
0 I’m new with graphql and this question can be so simple, I dont know. I have a nextjs 14 weather project and i’m using Graphql, Apollo and stepzen for the first time. I had a error like that; ⨯ node_modules/@apollo/client/errors/index.js (28:27) @ call ApolloError: Connector: HTTP Error: Bad Request at new Promise (<anonymous>) at…
-
getClient function React-Apollo giving a error which is Response not successful: Received status code 405
0 I’m new with graphql and this question can be so simple, I dont know. I have a nextjs 14 weather project and i’m using Graphql, Apollo and stepzen for the first time. I had a error like that; ⨯ node_modules/@apollo/client/errors/index.js (28:27) @ call ⨯ ApolloError: Response not successful: Received status code 405 at new…
-
React NextJS 13 page navigation – react-relay query on page – prerendering error during build
0 I have a react component called pagesproductDetail.tsx which loads a product detail data. The productId comes from query parameter, the data comes from a graphQL query called productStateByKeyQuery and is defined in an external file. Starting the npm run dev the page works, when I navigate to this page an url like this: “…
-
Weird behaviour of Apollo client in Nextjs13
0 I’m currently working on a side project (a simple habit tracker) that involves using cookie-based authentication and websockets. I’ve been referring to Apollo’s documentation and have tried using useSuspenseQuery, but I’m encountering an issue that I can’t quite figure out. I’ve followed the documentation’s guidelines, but my queries always return unauthorized responses. This seems…
-
Invariant Violation: When using graphql Mutation on nextjs 13
0 all my query is working well, except for my graphql mutation. hope you can help. I’m using the same code on my other project, the only difference is this form is inside a modal. error on showing And I know this mutation on my playground is working graphql playground working mutation here’s my full…
-
nextauth getServerSession() always returns null when trying to call within GraphQL Yoga context
0 I’m using Nextjs ^13.4 with GraphQL Yoga & Apollo/client and Prisma. I’m trying to get the current user’s session in GraphQL Pothos, by forwarding the response of getServerSession() but its always null. If I call getServerSession() within a RSC, then I can see the session details. 1. apps/web/app/api/auth/[…nextauth]/options.ts export const authOptions: AuthOptions = {…
-
Invariant Violation APOLLO: Using next.js and ts
0 I get an Invariant Violation when using the apollo client on react, specifically when I use the ApolloProvider. If I delete those ApolloProvider lines the problem goes, also I already tried removing the provider from Next-Auth. I’m using typescript and I don’t know if the declaration of the apollo configuration is correct. This is…