Tag: next.js
-
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…
-
I can’t read session when I pass from next-auth to nodejs
0 I have Next.js project where I use next-auth and I use node.js for the server. when user log in system, their session should pass to nodejs like this: this code is part of […nextAuth].ts events: { async signIn({ user }: any) { const { PASS_SESSION_SERVER } = Operation.Mutations; const { data } = await…
-
AWS CDK newly added data delay issue to display
0 I am facing data delay issue in my application. When I add new data it take to much time to display on live site but working fine when I attach live database with my local code. CDK usually take 5 to 20 mints to respond but in my case it taking hours and some…
-
NextJS: GraphQL causing build errors but working locally
0 I recently refactored some parts of my project that was outdated. As a part of that refactoring I updated our queries and types. Now I’m suddenly getting 404 errors indicating there is something wrong with my query. It runs fine and builds without errors locally, but crashes every time I push. It’s fetching from…
-
3 levels nested dynamic routes with Next.js
0 I’m trying to achieve a 3 levels dynamic routes in my next js application. So far I just obtain a 2 levels dynamic routes. All the data are coming from a headless CMS. I’m using graphlQL So far I managed to obtain a 2 levels: blog/[category]/[post]. However I can’t make this working: blog/[category]/[subcategory]/[post] This…
-
NextJS with Apollo and Graphql use of Fragment
0 I would like to use same basic fragments in my query. But as soon as I use my fragment variable: ${NEXT_SEO_FRAGMENT} I got following Error: ApolloError: Response not successful: Received status code 500 my query: import { getApolloClient } from "../apollo-client"; import gql from ‘graphql-tag’ import { Locale } from "../types"; const NEXT_SEO_FRAGMENT =…
-
SEO Meta Tags in Next.js App not showing in Page Source
2 I’m having an issue with generating meta tags for my Next.js blogging application. I am currently using Typescript and apollo-codegen to generate query hooks to fetch information from my Strapi backend. Because i’ve read on many other posts that dynamic meta tag information won’t show in the view page source if the information is…
-
Next.js Vercel deployment doesn’t run codegen command
0 I created a React Next.js project with Typescript on pnpm and using graphql-codegen/typescript to create types. On vercel build, I get module not found error for import of generated types with codegen. On development server I generate types with ‘pnpm gen’ command manually from terminal. Probably while next build on vercel, it doesn’t run…
-
Using multiple endpoints in Apollo Client
18 this is my first discussion post here. I have learned Apollo + GraphQL through Odyssey. Currently, I am building my own project using Next.js which required fetching data from 2 GraphQL endpoints. My problem: How can I fetch data from multiple GraphQL endpoints with ApolloClient? Below is my code for my first endpoint: import…
-
how can I use partial data with relay?
2 I recently start to learn relay and have a question about how I can use partial data with relay. // Screen A const ProductsPageQuery = graphql` query products_PageQuery { products(first: 5, channel: "default-channel") { edges { node { id name description } } } } `; const Page = ({ preloadedQuery }: RelayProps<{}, products_PageQuery>)…