-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[gatsby-transformer-remark] File nodes in arrays/lists issue #2286
Comments
Could you create a small site reproducing this issue that I could play with? I think I can fix it fairly easily as I dealt with it the other day. Probably though all that needs done is making this fix I did the other night recursive https://github.com/gatsbyjs/gatsby/pull/2255/files#diff-37476cc0992c8d09852786ba4d4037ffR56 |
Here's a zip file with the isolated files that should reproduce the issue. Here is the query I've been using to test grabbing the data in GraphiQL:
|
Could you push this to a working site in a GitHub repo that I can clone and install and start working on right away? |
Yea, sorry, that would be easiest. Here's my site repo with the source files in the source branch. |
Having the exact same issue- single files are fine, but when you add subobjects in markdown, something goes sideways. |
I recently discovered Gatsby and have been attempting to transition my personal website over to it. My current site architecture uses markdown files with frontmatter use, and Gatsby seems like the easiest way to utilize Markdown data with React as the view layer. In some of my markdown files however, I have lists/arrays with image file references to them. Image file references work fine when not in a list. @amirhouieh posted (#950) a few days ago with the same issue it seems.
Here is my query:
Here is the output (I modified GraphQL to show the stack trace):
I've poked around in the Gatsby code a bit to try and find the issue, but have been having a little trouble with the inner workings. The issue arises around line 480 in infer-graphql-type.js. The nodes inside of the array do not have a parent file node so the parent directory path resolves to undefined which is throwing the error. I'm not too sure where to look from there though.
The text was updated successfully, but these errors were encountered: