From eba67b5ea926987016e19476e4d4591ec7b04b47 Mon Sep 17 00:00:00 2001 From: Alec Lomas Date: Sun, 21 Apr 2019 17:49:27 -0700 Subject: [PATCH] :bug: prevent graphql type errors in gatsby-node not sure why but i guess the parenthesis are absolutely needed --- gatsby-node.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gatsby-node.js b/gatsby-node.js index adf63fe..cb4c7c5 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -46,8 +46,8 @@ exports.createPages = async ({ graphql, actions }) => { const Lesson = path.resolve('./src/templates/Lesson.js') const Event = path.resolve('./src/templates/Event.js') - const result = await graphql` - { + const result = await graphql(` + query { allYouTubePlaylist { edges { node { @@ -55,6 +55,7 @@ exports.createPages = async ({ graphql, actions }) => { } } } + allContentfulLesson(filter: { title: { ne: "SCHEMA__Lesson" } }) { edges { node { @@ -62,6 +63,7 @@ exports.createPages = async ({ graphql, actions }) => { } } } + allContentfulEvent(filter: { title: { ne: "SCHEMA__Event" } }) { edges { node { @@ -70,7 +72,7 @@ exports.createPages = async ({ graphql, actions }) => { } } } - ` + `) if (result.errors) { console.error(result.errors) -- 2.51.2