Tag: server-side-rendering
-
Set up dynamic routes in Astro with GraphQL fragments query doesn’t work
0 I am trying to setup dynamic routes in Astro SSR mode. From the api I can use the following query (it contains fragments): I am using Apollo Client. const GET_PAGE = gql` query Page($target: String!) { page(target: $target) { type content { … on PageOne { url: anotherKey title: anotherTitleField id } … on…
-
Set up dynamic routes in Astro SSR mode
0 I try to create dynamic routes in astro SSR mode. I am using Apollo client. I have this grapql query from the api: const GET_PAGE = gql` query Page($target: String!) { page(target: $target) { type content { … on MyPage { id url } } } } `; So based on the target variable…
-
Undefined return value from getStaticProps
0 The value being returned from my getStaticProps in nextjs is undefined. I tried fetching data from a graphql endpoint and the return value was undefined when I console.log the value. This is the code block const graphQuery = new GraphQLClient(url); export const getStaticProps = async () => { const { course } = await…
-
Refetch queries server side after a client side mutation apollo client
0 I’m using the experimental version of graphql and apollo client together with next13 and at one point in my code I perform a mutation in a client side component to delete data and I need the query that was performed in a server side component to be re-done for the list of results to…