You are here

function graphql_file_validate in GraphQL 8.4

Implements hook_file_validate().

File

tests/modules/graphql_file_validate/graphql_file_validate.module, line 13
Test module for file validation.

Code

function graphql_file_validate(FileInterface $file) : void {
  if (!file_exists($file
    ->getFileUri())) {
    throw new \Exception('File does not exist during validation: ' . $file
      ->getFileUri());
  }
}