Schema can get cached without GraphQL compose contributions

Created on 14 August 2025, 2 days ago

Problem/Motivation

We have a production site where the schema can sometimes be cached in an incomplete state,

This results in 404s on the Front-end application, and a Drupal cache rebuild is required to fix, same issue as https://www.drupal.org/project/graphql/issues/3477239 πŸ› GraphQL query stops working - seems cache issue Needs work I believe.

Since it seems to be the graphql compose portion only, we should look into this as to how we get the cache and how it can fail. I believe it's around this stack:

GraphQLComposeSchemaTypeManager.php:234, Drupal\graphql_compose\Plugin\GraphQLComposeSchemaTypeManager->printTypes()
AlterSchemaSubscriber.php:60, Drupal\graphql_compose\EventSubscriber\AlterSchemaSubscriber->alterSchema()
ContainerAwareEventDispatcher.php:111, call_user_func:{/var/www/html/docroot/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php:111}()
ContainerAwareEventDispatcher.php:111, Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
AlterableComposableSchema.php:129, Drupal\graphql\Plugin\GraphQL\Schema\AlterableComposableSchema->getSchemaDocument()

Steps to reproduce

Not reproduceable, happens intermittently on cache clear

Proposed resolution

Prevent code execution if schema generation fails.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.4

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States oknate Greater New York City Area

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024