trait CacheablePluginTrait in GraphQL 8.3
Trait CacheablePluginTrait
@package Drupal\graphql\Plugin\GraphQL\Traits
Hierarchy
- trait \Drupal\graphql\Plugin\GraphQL\Traits\CacheablePluginTrait
6 files declare their use of CacheablePluginTrait
- EnumPluginBase.php in src/
Plugin/ GraphQL/ Enums/ EnumPluginBase.php - FieldPluginBase.php in src/
Plugin/ GraphQL/ Fields/ FieldPluginBase.php - InputTypePluginBase.php in src/
Plugin/ GraphQL/ InputTypes/ InputTypePluginBase.php - InterfacePluginBase.php in src/
Plugin/ GraphQL/ Interfaces/ InterfacePluginBase.php - ScalarPluginBase.php in src/
Plugin/ GraphQL/ Scalars/ ScalarPluginBase.php
File
- src/
Plugin/ GraphQL/ Traits/ CacheablePluginTrait.php, line 10
Namespace
Drupal\graphql\Plugin\GraphQL\TraitsView source
trait CacheablePluginTrait {
/**
* @param $definition
*
* @return array
*/
protected function buildCacheContexts($definition) {
if (!empty($definition['response_cache_contexts'])) {
return $definition['response_cache_contexts'];
}
return [];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CacheablePluginTrait:: |
protected | function |