public function PersistedQuery::__construct in GraphQL 8.4
PersistedQuery constructor.
Parameters
array $values: The plugin annotation values.
Throws
\Doctrine\Common\Annotations\AnnotationException In case of missing required annotation values.
Overrides Plugin::__construct
File
- src/
Annotation/ PersistedQuery.php, line 46
Class
- PersistedQuery
- Annotation for persisted query plugins.
Namespace
Drupal\graphql\AnnotationCode
public function __construct(array $values) {
if (!array_key_exists('id', $values) || !$values['id']) {
throw new AnnotationException('The plugin is missing an "id" property.');
}
parent::__construct($values);
}