You are here

public function SchemaPluginBase::hasFields in GraphQL 8.3

Checks if a given type has any fields attached to it.

Parameters

string $type: The name of the type.

Return value

bool TRUE if the type has any fields, FALSE otherwise.

Overrides SchemaBuilderInterface::hasFields

File

src/Plugin/GraphQL/Schemas/SchemaPluginBase.php, line 311

Class

SchemaPluginBase

Namespace

Drupal\graphql\Plugin\GraphQL\Schemas

Code

public function hasFields($type) {
  return isset($this->pluginDefinition['field_association_map'][$type]);
}