You are here

public function ThunderMediaSchemaExtension::registerResolvers in Thunder 6.2.x

Overrides ThunderSchemaExtensionPluginBase::registerResolvers

File

modules/thunder_gqls/src/Plugin/GraphQL/SchemaExtension/ThunderMediaSchemaExtension.php, line 25

Class

ThunderMediaSchemaExtension
The media schema extension.

Namespace

Drupal\thunder_gqls\Plugin\GraphQL\SchemaExtension

Code

public function registerResolvers(ResolverRegistryInterface $registry) {
  parent::registerResolvers($registry);
  $this->registry
    ->addTypeResolver('Media', \Closure::fromCallable([
    __CLASS__,
    'resolveMediaTypes',
  ]));
  $this
    ->resolveFields();
}