#post detail page not working
4 messages · Page 1 of 1 (latest)
export async function getServerSideProps() {
const GET_POSTS = gql`
query GetAllPost{
posts{
nodes{
title
excerpt
uri
slug
date
featuredImage {
node {
sourceUrl
}
}
}
}
}
`
const response = await client.query({
query: GET_POSTS
});
const posts = response?.data?.posts?.nodes
return {
props: {
posts
}
}
}
this is my blog listing page query
this blog detail page