drupal-graphql / graphql

GraphQL integration for Drupal 9/10
288 stars 202 forks source link

Deprecated NULL placeholder value #1401

Closed almunnings closed 3 months ago

almunnings commented 3 months ago

Html::escape(), ::decodeEntities(), and FormattableMarkup::placeholderEscape() no longer accept NULL

Change log: https://www.drupal.org/node/3318826 Introduced: 9.5.0

Error in Drupal 11

TypeError: Drupal\Component\Utility\Html::escape(): Argument #1 ($text) must be of type string, null given, called in /app/web/core/lib/Drupal/Component/Render/FormattableMarkup.php on line 256 in Drupal\Component\Utility\Html::escape() (line 428 of core/lib/Drupal/Component/Utility/Html.php).

https://github.com/drupal-graphql/graphql/blob/8.x-4.x/src/Form/ServerForm.php#L103-L108

Problemo

Originating from \Drupal\graphql\Form\ServerForm::form()

$this->operation is create, not add

Which passes down a NULL to $this->t()'s variable as $server->label()