You are here

public function FileUploadResponse::getFileEntity in GraphQL 8.4

Get the first file entity if there is one.

Return value

\Drupal\file\FileInterface|null First file entity or NULL.

File

src/GraphQL/Response/FileUploadResponse.php, line 47

Class

FileUploadResponse
A response that either has a file entity or some violations.

Namespace

Drupal\graphql\GraphQL\Response

Code

public function getFileEntity() : ?FileInterface {
  return $this->fileEntities[0] ?? NULL;
}