I am creating an application on React.js, Gatsby.js, and Contentful. My Application is working fine on my local but when I deploy my app to Natilify Cannot query field "allContentfulGallery" on type "Query". And My GraphQl Queries are also working fine. Please help me I am very sticking by this error."allContentfulGallery" is my collection Name
Very thanks in advance
My gatsby-node.js configuration
const galleryResult = await graphql(`
query gallery {
allContentfulGallery {
edges {
node {
title
slug
images {
title
file {
url
}
}
sys {
contentType {
sys {
id
linkType
type
}
}
revision
type
}
}
}
}
}
`)
var galleryArr =
galleryResult &&
galleryResult.data &&
galleryResult.data.allContentfulGallery &&
galleryResult.data.allContentfulGallery.edges
galleryArr.forEach(edge => {
createPage({
path: `/gallery/${edge.node.slug}`,
component: galleryTemplate,
context: {
title: edge.node.title,
slug: edge.node.slug,
sys: {
...edge.node.sys,
},
},
})
})
gatsby buildworks? Have you uploaded your Contentful API keys in Netlify?GATSBY_gatsbyjs.com/docs/how-to/local-development/… ?