CacheablePluginTrait.php in GraphQL 8.3
Namespace
Drupal\graphql\Plugin\GraphQL\TraitsFile
src/Plugin/GraphQL/Traits/CacheablePluginTrait.phpView source
<?php
namespace Drupal\graphql\Plugin\GraphQL\Traits;
/**
* Trait CacheablePluginTrait
*
* @package Drupal\graphql\Plugin\GraphQL\Traits
*/
trait CacheablePluginTrait {
/**
* @param $definition
*
* @return array
*/
protected function buildCacheContexts($definition) {
if (!empty($definition['response_cache_contexts'])) {
return $definition['response_cache_contexts'];
}
return [];
}
}
Traits
Name | Description |
---|---|
CacheablePluginTrait | Trait CacheablePluginTrait |