Skip to content
This repository was archived by the owner on Dec 22, 2018. It is now read-only.

allShopify Article gatsby-image-sharp not working #22

Description

@jserrao

Sample query for ShopifyArticle yields null in GraphiQL for the childImageSharp field despite there definitely being imagery in there.

  {
      allShopifyArticle {
        edges {
          node {
            id
            title
            contentHtml
            excerpt
            blog {
              title
            }
            author {
              name
            }
            publishedAt(formatString: "YYYY-MM-DD")
            image {
              localFile {
                name
                childImageSharp {
                  fluid(maxWidth: 800) {
                    aspectRatio
                    base64
                    sizes
                    src
                    srcSet
                    srcSetWebp
                    srcWebp
                  }
                }
              }
            }
          }
        }
      }
    }

A more normal query on image works just fine:

{
     allShopifyArticle {
        edges {
          node {
            id
            title
            contentHtml
            excerpt
            blog {
              title
            }
            author {
              name
            }
            publishedAt(formatString: "YYYY-MM-DD")
            image {
              src
              id
              altText
            }
          }
        }
      }
    }

I hunted through how this is implemented and it's not clear to me exactly how you're tapping into file system within Gatsby to pull this off otherwise I'd PR you. Let me know and I can provide more info if this isn't enough to recreate on your end.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions