You are here

public function ThunderPagesSchemaExtension::registerResolvers in Thunder 6.2.x

Overrides ThunderSchemaExtensionPluginBase::registerResolvers

File

modules/thunder_gqls/src/Plugin/GraphQL/SchemaExtension/ThunderPagesSchemaExtension.php, line 29

Class

ThunderPagesSchemaExtension
Schema extension for page types.

Namespace

Drupal\thunder_gqls\Plugin\GraphQL\SchemaExtension

Code

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