Skip to content

Conversation

@Alearner12
Copy link

Summary

Fixes #39294

Problem

The extractingQueries state in the query-running state machine was missing an onError handler, causing confusing "Missing onError handler for invocation 'extracting-queries'" errors when schema validation fails.

This commonly occurs when using gatsby-source-wordpress with WooGraphQL where certain connection types (like WpProductToPaCombustivelConnectionType) don't implement required interface fields (nodes, pageInfo).

Solution

Added an onError handler to the extractingQueries state that gracefully transitions to the done state when an error occurs. The actual error is still reported by the extractQueries service via panicOnBuild, but now the state machine won't crash with the confusing "Missing onError handler" message.

Testing

Added a test case to verify error handling works correctly during query extraction.

Fixes gatsbyjs#39294

The extractingQueries state in the query-running state machine was
missing an onError handler, causing confusing 'Missing onError handler
for invocation extracting-queries' errors when schema validation fails.

This commonly occurs when using gatsby-source-wordpress with WooGraphQL
where certain connection types don't implement required interface fields.

Added test to verify error handling works correctly.
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer

1 participant