1
0
mirror of https://github.com/kremalicious/gatsby-redirect-from.git synced 2024-12-22 17:23:24 +01:00

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

View File

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