You are here

public static function LanguageTypeResolver::isDefault in GraphQL 8

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

Returns whether this language is the default language.

Parameters

\Drupal\Core\TypedData\Plugin\DataType\Language: The language object.

Return value

bool Whether the language is the default language.

File

src/TypeResolver/LanguageTypeResolver.php, line 139

Class

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

Namespace

Drupal\graphql\TypeResolver

Code

public static function isDefault(Language $language) {
  return $language
    ->getValue()
    ->isDefault();
}