public function GraphQLSchema::__construct in GraphQL 8.3
GraphQLSchema 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/ GraphQLSchema.php, line 47
Class
- GraphQLSchema
- Annotation for GraphQL schema plugins.
Namespace
Drupal\graphql\AnnotationCode
public function __construct($values) {
if (!array_key_exists('id', $values) || !$values['id']) {
throw new AnnotationException('GraphQL schema is missing an "id" property.');
}
if (!array_key_exists('path', $values) || !$values['path']) {
throw new AnnotationException('GraphQL schema is missing an "path" property.');
}
parent::__construct($values);
}