Referencing non-existant Gatsby Types supresses develop and build errors #38531
Labels
status: triage needed
Issue or pull request that need to be triaged and assigned to a reviewer
type: bug
An issue or pull request relating to a bug in Gatsby
Preliminary Checks
Description
My setup is apparently pretty unique, so I'm unsure if this issue is present in the latest version of Gatsby;
I have a gatsbyjs front end that pulls in data from a single Drupal 9 instance, which filters the exposed data via the Gatsby Endpoints module.
As it serves to multiple websites with different content, there are GraphQL queries in the front end that refer to content only present on some sites. When building a site that doesn't contain at least one instance of each piece of content, the builds fail. I'm currently handling this with the
gatsby-schema-snapshot
plugin to get around this.I found featuring any queries on non-existent Types causes any Gatsby errors to be hidden in the build output.
gatsby-develop
can proceed past this error, butgatsby-build
fails and builds cannot complete, making it a blocker.Reproduction Link
no repo, sorry
Steps to Reproduce
v3.15
sitegatsby develop --verbose
Expected Result
The build logs should show the errors arising from the non-existent Type during the "waitingPendingQueries" stage:
Actual Result
The build logs omit the errors despite them having been thrown, giving the user no idea indication the issue is related to their code:
Note the actual queued errors expected can be exposed by adding
console.log()s
tomy-project/node_modules/@graphql-tools/utils/index.cjs.js
:Environment
Config Flags
none
The text was updated successfully, but these errors were encountered: