This is for a Gatsby template. I’m familiar with JS but trying to get familiar with React.
I’m trying to retrieve data for one page (the about page), to create a custom card for it.
The reason is that I want a static block at the top of my post
I think the code should use allGhostPage
like this:
const aboutPage = await graphql(`
{
allGhostPage(filter: { slug: 'about' }) {
edges {
node {
title
excerpt
feature_image
}
}
}
}
`)[0]
And then I’d pass that data on to the component.
Is that OK?
Is there a way of just retrieving all the edges, in case I need them? (or is that lazy?)
And this seems a little intense — is there a more efficient way of doing it?