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

Query nodes built by transfomers based on gatsby-source-filesystem sourceInstanceName #2020

Closed
djhi opened this issue Sep 4, 2017 · 1 comment

Comments

@djhi
Copy link
Contributor

djhi commented Sep 4, 2017

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 ?

@KyleAMathews
Copy link
Contributor

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.

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

2 participants