You are here

class ExecutionResult in GraphQL 8.4

Expand the upstream ExecutionResult to make it Drupal cachable.

Hierarchy

Expanded class hierarchy of ExecutionResult

3 files declare their use of ExecutionResult
Executor.php in src/GraphQL/Execution/Executor.php
QueryResultAssertionTrait.php in tests/src/Traits/QueryResultAssertionTrait.php
Server.php in src/Entity/Server.php

File

src/GraphQL/Execution/ExecutionResult.php, line 12

Namespace

Drupal\graphql\GraphQL\Execution
View source
class ExecutionResult extends LibraryExecutionResult implements CacheableDependencyInterface {
  use RefinableCacheableDependencyTrait;

  /**
   * PHP Serialization: skip some class members when serializing during tests.
   */
  public function __sleep() : array {

    // PHPUnit error: Fatal error: Uncaught Exception: Serialization of
    // 'Closure' is not allowed.
    // Remove some closure-containing members before serializing.
    $vars = get_object_vars($this);
    unset($vars['extensions']);
    return array_keys($vars);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
CacheableDependencyTrait::$cacheContexts protected property Cache contexts.
CacheableDependencyTrait::$cacheMaxAge protected property Cache max-age.
CacheableDependencyTrait::$cacheTags protected property Cache tags.
CacheableDependencyTrait::getCacheContexts public function 3
CacheableDependencyTrait::getCacheMaxAge public function 3
CacheableDependencyTrait::getCacheTags public function 3
CacheableDependencyTrait::setCacheability protected function Sets cacheability; useful for value object constructors.
ExecutionResult::__sleep public function PHP Serialization: skip some class members when serializing during tests.
RefinableCacheableDependencyTrait::addCacheableDependency public function 1
RefinableCacheableDependencyTrait::addCacheContexts public function
RefinableCacheableDependencyTrait::addCacheTags public function
RefinableCacheableDependencyTrait::mergeCacheMaxAge public function