Name query and change reference to query result

This commit is contained in:
Alistair Russell 2019-01-09 11:25:19 +00:00
parent 1303d79e36
commit 8bc3e67c69
1 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ export function createPages({ graphql, actions }, pluginOptions) {
graphql(
`
{
${markdownQuery}(
q: ${markdownQuery}(
filter: { frontmatter: { redirect_from: { ne: null } } }
) {
edges {
@ -32,7 +32,7 @@ export function createPages({ graphql, actions }, pluginOptions) {
reject(result.errors)
}
const allPosts = result.data.allMarkdownRemark.edges
const allPosts = result.data.q.edges
const redirects = []