abstract class GraphQLAnnotationBase in GraphQL 8.3
Annotation for GraphQL input type plugins.
Hierarchy
- class \Drupal\Component\Annotation\Plugin implements AnnotationInterface
- class \Drupal\graphql\Annotation\GraphQLAnnotationBase
Expanded class hierarchy of GraphQLAnnotationBase
File
- src/
Annotation/ GraphQLAnnotationBase.php, line 14
Namespace
Drupal\graphql\AnnotationView source
abstract class GraphQLAnnotationBase extends Plugin {
/**
* The plugin type.
*
* The type of component. Field, Interface, Type, Scalar ...
*
* @var string
*
* @see graphql.module
*/
public $pluginType = NULL;
/**
* The component name.
*
* @var string
*/
public $name;
/**
* The component description.
*
* @var string
*/
public $description = '';
/**
* Weight for precedence calculations.
*
* If multiple components with the same name are available, the highest
* weight wins.
*
* @var int
*/
public $weight = 0;
/**
* The cache contexts for caching the type system definition in the schema.
*
* @var array
*/
public $schema_cache_contexts = [];
/**
* The cache tags for caching the type system definition in the schema.
*
* @var array
*/
public $schema_cache_tags = [];
/**
* The cache max age for caching the type system definition in the schema.
*
* @var array
*/
public $schema_cache_max_age = CacheBackendInterface::CACHE_PERMANENT;
/**
* The cache contexts for caching the response.
*
* @var array
*/
public $response_cache_contexts = [
'user.permissions',
];
/**
* The cache tags for caching the response.
*
* @var array
*/
public $response_cache_tags = [];
/**
* The cache max age for caching the response.
*
* @var array
*/
public $response_cache_max_age = CacheBackendInterface::CACHE_PERMANENT;
/**
* GraphQLAnnotationBase constructor.
*
* @param $values
* The plugin annotation values.
*
* @throws \Doctrine\Common\Annotations\AnnotationException
* In case of missing required annotation values.
*/
public function __construct($values) {
if (!array_key_exists('id', $values) || !$values['id']) {
throw new AnnotationException('GraphQL plugin is missing an "id" property.');
}
parent::__construct($values);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
GraphQLAnnotationBase:: |
public | property | The component description. | |
GraphQLAnnotationBase:: |
public | property | The component name. | |
GraphQLAnnotationBase:: |
public | property | The plugin type. | 9 |
GraphQLAnnotationBase:: |
public | property | The cache contexts for caching the response. | |
GraphQLAnnotationBase:: |
public | property | The cache max age for caching the response. | |
GraphQLAnnotationBase:: |
public | property | The cache tags for caching the response. | |
GraphQLAnnotationBase:: |
public | property | The cache contexts for caching the type system definition in the schema. | |
GraphQLAnnotationBase:: |
public | property | The cache max age for caching the type system definition in the schema. | |
GraphQLAnnotationBase:: |
public | property | The cache tags for caching the type system definition in the schema. | |
GraphQLAnnotationBase:: |
public | property | Weight for precedence calculations. | |
GraphQLAnnotationBase:: |
public | function |
GraphQLAnnotationBase constructor. Overrides Plugin:: |
|
Plugin:: |
protected | property | The plugin definition read from the class annotation. | 1 |
Plugin:: |
public | function |
Gets the value of an annotation. Overrides AnnotationInterface:: |
5 |
Plugin:: |
public | function |
Gets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the unique ID for this annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
protected | function | Parses an annotation into its definition. | |
Plugin:: |
public | function |
Sets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Sets the name of the provider of the annotated class. Overrides AnnotationInterface:: |