You are here

protected function QueryResultAssertionTrait::defaultMutationCacheMetaData in GraphQL 8.3

Same name and namespace in other branches
  1. 8.4 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.

6 calls to QueryResultAssertionTrait::defaultMutationCacheMetaData()
EntityMutationTest::testCreateEntityMutation in modules/graphql_core/tests/src/Kernel/EntityMutation/EntityMutationTest.php
Test entity creation.
EntityMutationTest::testCreateEntityMutationViolation in modules/graphql_core/tests/src/Kernel/EntityMutation/EntityMutationTest.php
Test entity creation violations.
EntityMutationTest::testDeleteEntityMutation in modules/graphql_core/tests/src/Kernel/EntityMutation/EntityMutationTest.php
Test entity deletion.
EntityMutationTest::testUpdateEntityMutation in modules/graphql_core/tests/src/Kernel/EntityMutation/EntityMutationTest.php
Test entity updates.
MutationTest::testMutationQuery in tests/src/Kernel/Extension/MutationTest.php
Test if the schema is created properly.

... See full list

File

tests/src/Traits/QueryResultAssertionTrait.php, line 78

Class

QueryResultAssertionTrait
Trait for easier assertion on GraphQL query results.

Namespace

Drupal\Tests\graphql\Traits

Code

protected function defaultMutationCacheMetaData() {
  $metadata = new CacheableMetadata();
  $metadata
    ->setCacheContexts($this
    ->defaultCacheContexts());
  $metadata
    ->setCacheMaxAge(0);
  $metadata
    ->setCacheTags($this
    ->defaultCacheTags());
  return $metadata;
}