You are here

public function SchemaExtension::__construct in GraphQL 8.4

SchemaExtension 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/SchemaExtension.php, line 53

Class

SchemaExtension
Annotation for GraphQL schema extension plugins.

Namespace

Drupal\graphql\Annotation

Code

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);
}