You are here

DeprecatablePluginTrait.php in GraphQL 8.3

File

src/Plugin/GraphQL/Traits/DeprecatablePluginTrait.php
View source
<?php

namespace Drupal\graphql\Plugin\GraphQL\Traits;

trait DeprecatablePluginTrait {

  /**
   * @param $definition
   *
   * @return null
   */
  protected function buildDeprecationReason($definition) {
    return !empty($definition['deprecated']) ? $definition['deprecated'] : NULL;
  }

}

Traits