public function EntityRevisionsTest::testNodeContext in GraphQL 8.3
Regression test for unhandled logic exceptions.
Leaking cache metadata.
File
- modules/
graphql_core/ tests/ src/ Kernel/ Entity/ EntityRevisionsTest.php, line 20
Class
- EntityRevisionsTest
- Fetch node revisions.
Namespace
Drupal\Tests\graphql_core\Kernel\ContextCode
public function testNodeContext() {
$node = Node::create([
'title' => 'Test',
'type' => 'test',
]);
$nodeId = $node
->save();
$draft = $this
->getNewDraft($node);
$draft
->save();
$query = <<<GQL
query (\$path: String!) {
route(path: \$path) {
... on EntityCanonicalUrl {
entity {
... on EntityRevisionable {
entityRevisions {
count
}
}
}
}
}
}
GQL;
$this
->query($query, [
'path' => '/node/' . $nodeId,
]);
}