Gatsby: Bug parsing an array of dates from a yaml file on a cold build

Created on 9 Feb 2018  路  4Comments  路  Source: gatsbyjs/gatsby

Description

When parsing an array of dates from a yaml file, gatsby fails to add it to the GraphQL schema when doing a build without a cache. This triggers warnings about invalid queries, because the property being requested doesn't exist. After killing the process and starting gatsby again, leaving the cache in place, the problem is resolved.

I've only observed this for data coming from yaml files, not JSON files.

This may be related to the work done in #3688 that resolved #3556.

Environment

Gatsby version: 1.9.190
Node.js version: 8.9
Operating System: macOS 10.12.6 and whatever version of Debian Netlify is using on their Docker container

Steps to reproduce

See this repo https://github.com/lourd/gatsby-yaml-dates-array-bug

bug

All 4 comments

I will investigate this.

Just quick question - is this regression? Was it working earlier on cold build?

I just tried my test repo with Gatsby 1.9.185 and it also failed. (it's under a new branch called regression if you want to try it out). So it does not look like this is a regression. I guess your new work on date parsing is unrelated.

Yeah, I didn't change anything related to date specifically (just moved code around).

I see where the issue is and will make pull request with fix soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andykais picture andykais  路  3Comments

ghost picture ghost  路  3Comments

magicly picture magicly  路  3Comments

dustinhorton picture dustinhorton  路  3Comments

mikestopcontinues picture mikestopcontinues  路  3Comments