protected function QueryResultAssertionTrait::defaultMutationCacheMetaData in GraphQL 8.4
Same name and namespace in other branches
- 8.3 tests/src/Traits/QueryResultAssertionTrait.php \Drupal\Tests\graphql\Traits\QueryResultAssertionTrait::defaultMutationCacheMetaData()
The default mutation cache metadata object.
Return value
\Drupal\Core\Cache\CacheableMetadata The cache metadata object.
1 call to QueryResultAssertionTrait::defaultMutationCacheMetaData()
- TestFrameworkTest::testMutationMock in tests/
src/ Kernel/ Framework/ TestFrameworkTest.php - Test mutation mocking.
File
- tests/
src/ Traits/ QueryResultAssertionTrait.php, line 70
Class
- QueryResultAssertionTrait
- Trait for easier assertion on GraphQL query results.
Namespace
Drupal\Tests\graphql\TraitsCode
protected function defaultMutationCacheMetaData() {
$metadata = new CacheableMetadata();
$metadata
->setCacheMaxAge(0);
$metadata
->setCacheTags($this
->defaultCacheTags());
$metadata
->setCacheContexts($this
->defaultCacheContexts());
return $metadata;
}