You are here

protected function ThunderSchemaExtensionPluginBase::resolveParagraphInterfaceFields in Thunder 6.2.x

Add fields common to all media types.

Parameters

string $type: The type name.

1 call to ThunderSchemaExtensionPluginBase::resolveParagraphInterfaceFields()
ThunderParagraphsSchemaExtension::resolveFields in modules/thunder_gqls/src/Plugin/GraphQL/SchemaExtension/ThunderParagraphsSchemaExtension.php
Add paragraph field resolvers.

File

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

Class

ThunderSchemaExtensionPluginBase
The base class for Thunder schema extension plugins.

Namespace

Drupal\thunder_gqls\Plugin\GraphQL\SchemaExtension

Code

protected function resolveParagraphInterfaceFields(string $type) {
  $this
    ->addFieldResolverIfNotExists($type, 'summary', $this->builder
    ->produce('paragraph_summary')
    ->map('paragraph', $this->builder
    ->fromParent()));
}