You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand yaml files need proper contents according to graphql queries in codes, but in my case, yaml contents are dynamic. They are sometimes no data (I update yaml files before a build).
If an array in yaml is empty, graphql queries using the yaml will fire an error. This error is critical, and it stops the process when to build.
** I need to show the page with the empty data. (I can't skip the page)
Is there a way to avoid this graphql error when you have such an empty array?
Can we implement yaml data type definition in gatsby? so that we can simply have an empty array data without being worried about filtering out the dummy type definition data (see https://github.com/github0013/empty_yaml_load) ?
Summary
I understand yaml files need proper contents according to graphql queries in codes, but in my case, yaml contents are dynamic. They are sometimes no data (I update yaml files before a build).
If an array in yaml is empty, graphql queries using the yaml will fire an error. This error is critical, and it stops the process when to build.
** I need to show the page with the empty data. (I can't skip the page)
This is how I avoid the build error.
https://github.com/github0013/empty_yaml_load
Here are my questions
Relevant information
Environment (if relevant)
─➤ gatsby info --clipboard
System:
OS: macOS Sierra 10.12.6
CPU: x64 Intel(R) Core(TM) i5-4258U CPU @ 2.40GHz
Shell: 5.2 - /bin/zsh
Binaries:
Node: 10.9.0 - /usr/local/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 6.2.0 - /usr/local/bin/npm
Browsers:
Chrome: 70.0.3538.77
Firefox: 63.0.1
Safari: 12.0.1
npmPackages:
gatsby: ^2.0.35 => 2.0.35
gatsby-plugin-manifest: ^2.0.7 => 2.0.7
gatsby-plugin-no-sourcemaps: ^2.0.1 => 2.0.1
gatsby-plugin-offline: ^2.0.12 => 2.0.12
gatsby-plugin-react-helmet: ^3.0.1 => 3.0.1
gatsby-plugin-sass: ^2.0.3 => 2.0.3
gatsby-plugin-typescript: ^2.0.1 => 2.0.1
gatsby-plugin-typography: ^2.2.1 => 2.2.1
gatsby-source-filesystem: ^2.0.7 => 2.0.7
gatsby-transformer-yaml: ^2.1.4 => 2.1.4
npmGlobalPackages:
gatsby-cli: 2.4.2
File contents (if changed)
gatsby-config.js
: N/Apackage.json
: N/Agatsby-node.js
: N/Agatsby-browser.js
: N/Agatsby-ssr.js
: N/AThe text was updated successfully, but these errors were encountered: