getTypeExtensionDefinition(): Argument #1 ($types) must be of type array, null given

Created on 3 January 2024, 12 months ago
Updated 24 January 2024, 11 months ago

Problem/Motivation

I had this error:

TypeError: Drupal\graphql_core_schema\Plugin\GraphQL\SchemaExtension\FormattedDateExtension::getTypeExtensionDefinition(): Argument #1 ($types) must be of type array, null given, called in .../docroot/modules/contrib/graphql_core_schema/src/Plugin/GraphQL/Schema/CoreComposableSchema.php on line 391 in Drupal\graphql_core_schema\Plugin\GraphQL\SchemaExtension\FormattedDateExtension->getTypeExtensionDefinition() (line 26 of .../docroot/modules/contrib/graphql_core_schema/src/Plugin/GraphQL/SchemaExtension/FormattedDateExtension.php).

Clearing the cache fixed this but the odd thing is that we deployed 2 weeks ago and I cleared the cache then and it was running smooth. I am trying to investigate why this would have happened and obviously it is possible to get to this point in the code and receive a null value for the type definition extension. Might be likely that it should check and just skip over that instead of completely killing the request.

Steps to reproduce

Can't reproduce as far as I can tell.

Proposed resolution

At least check if the generated types is null and handle in a way that doesn't kill the response.

๐Ÿ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States brayn7 Lexington, Ky

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024