Skip to content

Commit 90e2413

Browse files
committed
Adding separate method to fetch extensions.
1 parent 7f8c92e commit 90e2413

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/Plugin/GraphQL/Schema/SdlSchemaPluginBase.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function __construct(
113113
* @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
114114
*/
115115
public function getSchema(ResolverRegistryInterface $registry) {
116-
$extensions = $this->extensionManager->getExtensions($this->getPluginId());
116+
$extensions = $this->getExtensions();
117117
$resolver = [$registry, 'resolveType'];
118118
$document = $this->getSchemaDocument($extensions);
119119
$schema = BuildSchema::build($document, function ($config, TypeDefinitionNode $type) use ($resolver) {
@@ -135,6 +135,13 @@ public function getSchema(ResolverRegistryInterface $registry) {
135135
return SchemaExtender::extend($schema, $this->getExtensionDocument($extensions));
136136
}
137137

138+
/**
139+
* @return \Drupal\graphql\Plugin\SchemaExtensionPluginInterface[]
140+
*/
141+
protected function getExtensions() {
142+
return $this->extensionManager->getExtensions($this->getPluginId());
143+
}
144+
138145
/**
139146
* Retrieves the parsed AST of the schema definition.
140147
*

0 commit comments

Comments
 (0)