Tag: next.js
-
Response not successful: Received status code 400 at new ApolloError
0 I am working on an application with has the backend NestJS with graphql and postgres. Front End is in Next JS. Facing this error while calling a mutation from the front end. Relevant details of the code are below: — Graphql Query definition — Front End Code: const SAVE_PASSWORD_MUTATION = gql` mutation SavePassword($passwordInput: Password!,…
-
Error: Cannot read properties of undefined (reading ‘Symbol(__APOLLO_CONTEXT__)’) when using apollo provider
0 i want to use query in my next app but when i’m using it i’m getting error Error: Cannot read properties of undefined (reading ‘Symbol(APOLLO_CONTEXT)’) so this is my apollo client: import { ApolloClient, InMemoryCache } from "@apollo/client"; const apolloClient = new ApolloClient({ uri: "https://localhost:8000/", cache: new InMemoryCache(), }); export default apolloClient; layout.tsx: import…
-
Attempted to call the default export of C:UsersTeyllayDesktopss.lvfrontendsrcappapollo.ts from the server but it’s on the client
0 so problem is i want to query user info when entering user page like website/user/1 but when i want enter page i’m getting error, i think it’s from apollo, so is there a way to fix this? what i did wrong? apollo.ts: "use client"; import { ApolloClient, InMemoryCache } from "@apollo/client"; const createApolloClient =…
-
GraphQL Error (Code: 429) – Next Js project
0 For anyone working on a nextjs project, who’s struggling with GraphQL Error (Code: 429), here’s a quick fix. The back story…: I built a headless CMS using Hygraph and NextJS 13 for a blog project. I also used the npm graphql-request package. I originally wanted to have it run on a server, but ended…
-
React Apollo Error: Invariant Violation: Could not find “client” in the context or passed in as an option
38 I’m building a project using React, Apollo and Next.js. I’m trying to update react-apollo to 3.1.3 and I’m now getting the following error when viewing the site. Invariant Violation: Could not find “client” in the context or passed in as an option. Wrap the root component in an , or pass an ApolloClient instance…
-
Fetch is not working in nextjs 13 version using graphql client library after fetching data for some time
0 Applo client code in apploclient.js import { ApolloClient, HttpLink, InMemoryCache } from "@apollo/client"; import { registerApolloClient } from "@apollo/experimental-nextjs-app-support/rsc"; import { NextSSRInMemoryCache, NextSSRApolloClient, } from "@apollo/experimental-nextjs-app-support/ssr"; export const { getClient } = registerApolloClient(() => { console.log(process.env.UMBRACO_DOMAIN_GRAPHQL) return new NextSSRApolloClient({ link: new HttpLink({ uri: ‘https://localhost:44328/graphql/’, }), cache: new NextSSRInMemoryCache(), }); }); Code in root file…
-
vendure-auth-token in next js
0 As I am using vendure graphql in my next js project and I am using apolloClient for query and mutation , I am facing an problem while loging in My client code import { HttpLink } from "@apollo/client"; import { NextSSRInMemoryCache, NextSSRApolloClient, } from "@apollo/experimental-nextjs-app-support/ssr"; import { registerApolloClient } from "@apollo/experimental-nextjs-app-support/rsc"; const { BACKEND_URL…
-
Cannot find the URL to my Strapi Media Library
0 So, I hosted my strapi app on Cloudinary and Render. So there is a rich text input in my strapi backend. When i fetch the data using graphql, the images are sent out as URLs ofc. So when i host strapi in my localhost, the url is this, https://localhost:1337/uploads/Expressjs_706596c597.png. But when my app is…
-
NextJs update GraphQL pagination limit with Apollo Client
0 I would like to update my exisiting Graphql Query to create a infinite Scroll in NextJs. But I don’t know how to setup the update Function for the pagination limit. What I have know: Apollo Client: import { ApolloClient, InMemoryCache } from "@apollo/client"; const client = new ApolloClient({ uri: process.env.API_ENDPOINT, cache: new InMemoryCache(), });…
-
Unhandled runtime error or uncaught (in promise) error
3 I’m trying to make sure that Next.js doesn’t display the error, but rather I handle it on my code. I’m using Apollo-client to handle errors and I’m closely following the docs to make sure that I’m handling them properly. I’m currently getting a "Unhandled runtime error. Error: category already exists" displayed by Next.js, and…