class Schema in GraphQL 8.4
Annotation for GraphQL schema plugins.
@codeCoverageIgnore
Hierarchy
- class \Drupal\Component\Annotation\Plugin implements AnnotationInterface
- class \Drupal\graphql\Annotation\Schema
Expanded class hierarchy of Schema
3 string references to 'Schema'
- graphql.schema.yml in config/
schema/ graphql.schema.yml - config/schema/graphql.schema.yml
- graphql.services.yml in ./
graphql.services.yml - graphql.services.yml
- ServerForm::form in src/
Form/ ServerForm.php - Gets the actual form array to be built.
3 classes are annotated with Schema
- ComposableSchema in src/
Plugin/ GraphQL/ Schema/ ComposableSchema.php - Plugin annotation @Schema( id = "composable", name = "Composable schema" )
- ComposableSchemaExample in examples/
graphql_composable/ src/ Plugin/ GraphQL/ Schema/ ComposableSchemaExample.php - Plugin annotation @Schema( id = "composable", name = "Composable Example schema", extensions = "composable", )
- ExampleSchema in examples/
graphql_example/ src/ Plugin/ GraphQL/ Schema/ ExampleSchema.php - Plugin annotation @Schema( id = "example", name = "Example schema" )
File
- src/
Annotation/ Schema.php, line 14
Namespace
Drupal\graphql\AnnotationView source
class Schema extends Plugin {
/**
* The plugin ID.
*
* @var string
*/
public $id;
/**
* The schema name.
*
* @var string
*/
public $name;
/**
* The component description.
*
* @var string
*/
public $description = '';
/**
* Schema constructor.
*
* @param mixed $values
* The plugin annotation values.
*
* @throws \Doctrine\Common\Annotations\AnnotationException
* In case of missing required values.
*/
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);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
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:: |
|
Schema:: |
public | property | The component description. | |
Schema:: |
public | property | The plugin ID. | |
Schema:: |
public | property | The schema name. | |
Schema:: |
public | function |
Schema constructor. Overrides Plugin:: |