I'm using Gatsby with Strapi for quite some time now.
We been using gatsby-source-graphql until few days ago when there was a decision made in the company to switch to gatsby-source-strapi due to the fact that gatsby-source-graphql doesn't work with Gatsby Live Preview, anyway...
We started to refactor the queries and everything seemed to be working just fine until this thing popped out:
of course - all of those fields are gone from the data, so I can't access it.
What I tried to do is define the types just as it states in the description of the warning.
So what I did inside of gatsby-node.js was this:
exports.createSchemaCustomization = ({ actions }) => {
const { createTypes } = actions
const typeDefs = `
type StrapiLandingPages implements Node {
programmes: [StrapiLandingPagesProgrammes]
}
type StrapiLandingPagesProgrammes {
certification: StrapiLandingPagesProgrammesCertification
}
type StrapiLandingPagesProgrammesCertification implements Node @dontInfer {
id: Int!
Title: String
slugUid: String
sectionTitle: String
content: String
published_at: Date @dateformat
created_at: Date @dateformat
updated_at: Date @dateformat
}
`
createTypes(typeDefs)
}
But it didn't seem to work as expected. I've managed to see the field Certification but all of the data inside of it was null.
Any idea how to fix this?
Thanks!
