Gatsby custom schema when using images from api (strapi)

Viewed 148

good day.

Im having an issue using Gatsby and Strapi as API.

When i try to deploy to DigitalOcean i get this error:

Expected undefined to be a GraphQL nullable type.

I found that the best way to handle this is using "createSchemaCustomization"

Tried this in gatsby-node.js but is not working

exports.createSchemaCustomization = ({ actions }) => {
  const { createTypes } = actions
  const typeDefs = `
    type StrapiAbout implements Node {
      content: String
    }

    type StrapiPost implements Node  {
    slug: String
    content: String
    featured_image: childImageSharp
  } 
  type childImageSharp {
    childImageSharp: ImageSharp
  }

  type ImageSharp {
    gatsbyImageData: JSON
  }
  `
  createTypes(typeDefs)
}

Is there something i can do about this? somewhere to read about it? Thanks

0 Answers
Related