You are here

public function LanguageTypeResolver::applies in GraphQL 8

Same name and namespace in other branches
  1. 8.2 src/TypeResolver/LanguageTypeResolver.php \Drupal\graphql\TypeResolver\LanguageTypeResolver::applies()

Parameters

mixed $type:

Return value

bool

Overrides TypeResolverInterface::applies

File

src/TypeResolver/LanguageTypeResolver.php, line 26

Class

LanguageTypeResolver
Resolves the schema for the 'language' data type.

Namespace

Drupal\graphql\TypeResolver

Code

public function applies($type) {
  if ($type instanceof DataDefinitionInterface) {
    return $type
      ->getDataType() === 'language';
  }
  return FALSE;
}