You are here

public function QueryResult::__sleep in GraphQL 8.3

Don't serialize errors, since they might contain closures.

Return value

string[] The property names to serialize.

File

src/GraphQL/Execution/QueryResult.php, line 40

Class

QueryResult

Namespace

Drupal\graphql\GraphQL\Execution

Code

public function __sleep() {

  // TODO: Find a better way to solve this.
  return array_filter(array_keys(get_object_vars($this)), function ($prop) {
    return $prop != 'errors';
  });
}