You are here

DenyQuery.php in GraphQL 8.3

File

src/Cache/RequestPolicy/DenyQuery.php
View source
<?php

namespace Drupal\graphql\Cache\RequestPolicy;

use Drupal\Core\PageCache\RequestPolicyInterface;
use Symfony\Component\HttpFoundation\Request;
class DenyQuery implements RequestPolicyInterface {

  /**
   * {@inheritdoc}
   */
  public function check(Request $request) {
    if ($request->attributes
      ->has('_graphql')) {
      return static::DENY;
    }
  }

}

Classes

Namesort descending Description
DenyQuery