You are here

public function EntityBundle::resolve in GraphQL 8.4

Resolver.

Parameters

\Drupal\Core\Entity\EntityInterface $entity:

Return value

string

File

src/Plugin/GraphQL/DataProducer/Entity/EntityBundle.php, line 34

Class

EntityBundle
Returns the bundle name of the entity.

Namespace

Drupal\graphql\Plugin\GraphQL\DataProducer\Entity

Code

public function resolve(EntityInterface $entity) {
  return $entity
    ->bundle();
}