public function ThunderSchema::getResolverRegistry in Thunder 6.2.x
File
- modules/
thunder_gqls/ src/ Plugin/ GraphQL/ Schema/ ThunderSchema.php, line 62
Class
- ThunderSchema
- Tha base schema for Thunder composable schema.
Namespace
Drupal\thunder_gqls\Plugin\GraphQL\SchemaCode
public function getResolverRegistry() {
$this->registry = new ResolverRegistry();
$this
->createResolverBuilder();
$this
->resolveBaseTypes();
$this
->addFieldResolverIfNotExists('Query', 'redirect', $this->builder
->produce('thunder_redirect')
->map('path', $this->builder
->fromArgument('path')));
if ($this->dataProducerManager
->hasDefinition('access_unpublished_token_set')) {
$this
->addFieldResolverIfNotExists('Query', 'accessUnpublishedToken', $this->builder
->produce('access_unpublished_token_set')
->map('token', $this->builder
->fromArgument('auHash')));
}
return $this->registry;
}