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