You are here

function graphql_help in GraphQL 8.4

Same name and namespace in other branches
  1. 8.3 graphql.module \graphql_help()

Implements hook_help().

File

./graphql.module, line 11
Primary module hooks for GraphQL module.

Code

function graphql_help(string $routeName) : ?string {
  if ($routeName !== 'help.page.graphql') {
    return NULL;
  }
  $title = t('About');
  $description = t('
<p>This module generates and exposes a
  <a href="http://graphql.org/" target="_blank">GraphQL</a> schema for
  <a href="https://www.drupal.org/8" target="_blank">Drupal 8</a> entities,
  and allows you to expose your own custom schema in a consistent way and with
  minimal effort.</p>');
  $help = <<<EOT
<h3>{<span class="php-variable">$title</span>}</h3>
{<span class="php-variable">$description</span>}
EOT;
  return $help;
}