Skip to content

Querying fixed, fluid, or gatsbyImage nodes of the childImageSharp node of a Craft asset results in an error. #6

Closed
@sandren

Description

@sandren

Description

The gatsby-source-craft plugin makes childImageSharp nodes appear in Gatsby's GraphiQL interface, but querying any of the fields within the fixed, fluid, or gatsbyImage nodes results in the following error:

The "path" argument must be of type string or an instance of Buffer or URL. Received undefined

Steps to reproduce

  1. install and configure gatsby-source-craft
  2. run gatsby develop
  3. open GraphiQL on http://localhost:8000/___graphql and query any fields within the fixed, fluid, or gatsbyImage nodes of the childImageSharp of a Craft CMS asset such as:
... on Craft_EXAMPLE_Asset {
  childImageSharp {
    gatsbyImageData(layout: FLUID)
  }
}

Additional info

  • Craft version: Craft Pro 3.5.15.1
  • PHP version: 7.3.19
  • Database driver & version: MySQL 5.5.5
  • Plugins & versions: Gatsby 1.0.0-beta.1

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions