You are here

graphql.module in GraphQL 8

Same filename and directory in other branches
  1. 8.4 graphql.module
  2. 8.2 graphql.module
  3. 8.3 graphql.module

File

graphql.module
View source
<?php

/**
 * Implements hook_theme().
 */
function graphql_theme() {
  return [
    'page__graphql_explorer' => [
      'render element' => 'elements',
      'base hook' => 'block',
    ],
  ];
}

/**
 * Implements hook_ENTITY_TYPE_insert().
 */
function view_insert() {
  \Drupal::service('cache.graphql')
    ->deleteAll();
}

/**
 * Implements hook_ENTITY_TYPE_update().
 */
function view_update() {
  \Drupal::service('cache.graphql')
    ->deleteAll();
}

/**
 * Implements hook_ENTITY_TYPE_delete().
 */
function view_delete() {
  \Drupal::service('cache.graphql')
    ->deleteAll();
}

Functions