You are here

public function QueryConnection::total in GraphQL 8.4

Return value

int

File

examples/graphql_example/src/Wrappers/QueryConnection.php, line 30

Class

QueryConnection
Helper class that wraps entity queries.

Namespace

Drupal\graphql_examples\Wrappers

Code

public function total() {
  $query = clone $this->query;
  $query
    ->range(NULL, NULL)
    ->count();
  return $query
    ->execute();
}