Gatsby: Query nodes built by transfomers based on gatsby-source-filesystem sourceInstanceName

Created on 4 Sep 2017  ·  1Comment  ·  Source: gatsbyjs/gatsby

Hi!

We use gatsby-transformer-remark and gatsby-transformer-sharp alongside the gatsby-source-filesystem plugin.

We currently filter the allMarkdownRemark query with a regex on the fileAbsolutePath property (as also explained in #1634). However, this workaround does not apply to the gatsby-transformer-sharp plugin.

Wouldn't it be nice to always have the sourceInstanceName property in the filter ? As far as I understand gatsby, this should always be available for any source plugin ?

Most helpful comment

In retrospect it was a mistake adding that field to gatsby-transformer-remark and will be removed in the future as the transformer shouldn't know or care what the source of the markdown is.

What you want to do instead is just query allFile filtering on the source and then select childImageSharp, etc.

>All comments

In retrospect it was a mistake adding that field to gatsby-transformer-remark and will be removed in the future as the transformer shouldn't know or care what the source of the markdown is.

What you want to do instead is just query allFile filtering on the source and then select childImageSharp, etc.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

magicly picture magicly  ·  3Comments

theduke picture theduke  ·  3Comments

dustinhorton picture dustinhorton  ·  3Comments

KyleAMathews picture KyleAMathews  ·  3Comments

rossPatton picture rossPatton  ·  3Comments