You are here

protected function ThunderSchemaExtensionPluginBase::resolvePageInterfaceQueryFields in Thunder 6.2.x

Add content query field resolvers.

Parameters

string $page_type: The page type name.

string $entity_type_id: The entity type ID.

1 call to ThunderSchemaExtensionPluginBase::resolvePageInterfaceQueryFields()
ThunderPagesSchemaExtension::resolveFields in modules/thunder_gqls/src/Plugin/GraphQL/SchemaExtension/ThunderPagesSchemaExtension.php
Add article field resolvers.

File

modules/thunder_gqls/src/Plugin/GraphQL/SchemaExtension/ThunderSchemaExtensionPluginBase.php, line 235

Class

ThunderSchemaExtensionPluginBase
The base class for Thunder schema extension plugins.

Namespace

Drupal\thunder_gqls\Plugin\GraphQL\SchemaExtension

Code

protected function resolvePageInterfaceQueryFields(string $page_type, string $entity_type_id) {
  $this
    ->addFieldResolverIfNotExists('Query', $page_type, $this->builder
    ->produce('entity_load_by_uuid')
    ->map('type', $this->builder
    ->fromValue($entity_type_id))
    ->map('uuid', $this->builder
    ->fromArgument('uuid')));
}