Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work with gatsby-transformer-sharp #2

Closed
chriserickson opened this issue Nov 8, 2019 · 1 comment
Closed

Does not work with gatsby-transformer-sharp #2

chriserickson opened this issue Nov 8, 2019 · 1 comment

Comments

@chriserickson
Copy link

Hey, thanks for making this plugin!

I'm trying to use it with gatsby-images and gatsby-transformer-sharp, but it can't generate the types when using their fragment. I'm not sure whether it is possible to get the schema generated after the transformers are applied or not.

Example:
CMS / MD

templateKey: index-page
title: Some page

links:
  - label: Some other page
    url: /whatever
    image: /img/my-image.png

Query:

export const pageQuery = graphql`
  query IndexPageTemplate {
    markdownRemark(frontmatter: { templateKey: { eq: "index-page" } }) {
      frontmatter {
        title
        links {
          label
          url
          image {
            childImageSharp {
              fluid(maxWidth: 240, quality: 64) {
                ...GatsbyImageSharpFluid
              }
            }
          }
        }
      }
    }
  }
`;

Error:

Field "image" must not have a selection since type "String" has no subfields
@chriserickson
Copy link
Author

I actually think the issue may be on their side in not updating the graphql schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant