You are here

class GraphQLField in GraphQL 8.3

Annotation for GraphQL field plugins.

Hierarchy

Expanded class hierarchy of GraphQLField

1 file declares its use of GraphQLField
MockGraphQLPluginTrait.php in tests/src/Traits/MockGraphQLPluginTrait.php
1 string reference to 'GraphQLField'
graphql.services.yml in ./graphql.services.yml
graphql.services.yml
96 classes are annotated with GraphQLField
Alias in modules/graphql_core/src/Plugin/GraphQL/Fields/Routing/InternalUrl/Alias.php
Plugin annotation @GraphQLField( id = "internal_url_path_alias", secure = true, name = "pathAlias", description = @Translation("The url's path alias if any."), response_cache_contexts = {"languages:language_url"}, type = "String", …
AvailableLanguages in modules/graphql_core/src/Plugin/GraphQL/Fields/Languages/AvailableLanguages.php
List site-wide configured languages.
BackupCar in tests/modules/graphql_plugin_test/src/Plugin/GraphQL/Fields/BackupCar.php
A car in a car. Not sure what's so funny about that.
BlocksByRegion in modules/graphql_core/src/Plugin/GraphQL/Fields/Blocks/BlocksByRegion.php
List all blocks within a theme region.
Breadcrumbs in modules/graphql_core/src/Plugin/GraphQL/Fields/Breadcrumbs/Breadcrumbs.php
Retrieve the breadcrumbs.

... See full list

File

src/Annotation/GraphQLField.php, line 10

Namespace

Drupal\graphql\Annotation
View source
class GraphQLField extends GraphQLAnnotationBase {

  /**
   * {@inheritdoc}
   */
  public $pluginType = GRAPHQL_FIELD_PLUGIN;

  /**
   * Mark this field as "secure" to be resolved by untrusted consumers.
   *
   * @var bool
   */
  public $secure = FALSE;

  /**
   * The id of the GraphQLType or GraphQLInterface this field is bound to.
   *
   * If omitted, the field is considered a "root" field.
   *
   * @var string[]
   */
  public $parents = [];

  /**
   * The field type.
   *
   * Must be a registered Interface, Type, Scalar or Enum.
   *
   * If an associative array is provided - the Enum type will be created
   * automatically for the given set of values. But $enum_type_name has to be
   * defined in this case.
   *
   * @var string|array
   */
  public $type = NULL;

  /**
   * The field arguments.
   *
   * Array keyed by argument names with Scalar or Input Type names as values.
   *
   * @var array
   */
  public $arguments = [];

  /**
   * Contextual arguments.
   *
   * List of argument identifiers that will be merged with the current query
   * context.
   *
   * @var string[]
   */
  public $contextual_arguments = [];

  /**
   * The deprecation reason or FALSE if the field is not deprecated.
   *
   * @var string|bool
   */
  public $deprecated = FALSE;

}

Members

Namesort descending Modifiers Type Description Overrides
GraphQLAnnotationBase::$description public property The component description.
GraphQLAnnotationBase::$name public property The component name.
GraphQLAnnotationBase::$response_cache_contexts public property The cache contexts for caching the response.
GraphQLAnnotationBase::$response_cache_max_age public property The cache max age for caching the response.
GraphQLAnnotationBase::$response_cache_tags public property The cache tags for caching the response.
GraphQLAnnotationBase::$schema_cache_contexts public property The cache contexts for caching the type system definition in the schema.
GraphQLAnnotationBase::$schema_cache_max_age public property The cache max age for caching the type system definition in the schema.
GraphQLAnnotationBase::$schema_cache_tags public property The cache tags for caching the type system definition in the schema.
GraphQLAnnotationBase::$weight public property Weight for precedence calculations.
GraphQLAnnotationBase::__construct public function GraphQLAnnotationBase constructor. Overrides Plugin::__construct
GraphQLField::$arguments public property The field arguments.
GraphQLField::$contextual_arguments public property Contextual arguments.
GraphQLField::$deprecated public property The deprecation reason or FALSE if the field is not deprecated.
GraphQLField::$parents public property The id of the GraphQLType or GraphQLInterface this field is bound to.
GraphQLField::$pluginType public property The plugin type. Overrides GraphQLAnnotationBase::$pluginType
GraphQLField::$secure public property Mark this field as "secure" to be resolved by untrusted consumers.
GraphQLField::$type public property The field type.
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 5
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider