modules/graphql_core/src/Plugin/GraphQL/Fields/Routing/RouteEntity.php 1 location
|
@@ 139-144 (lines=6) @@
|
| 136 |
|
*/ |
| 137 |
|
protected function resolveEntity(EntityInterface $entity, Url $url, array $args, ResolveInfo $info) { |
| 138 |
|
$access = $entity->access('view', NULL, TRUE); |
| 139 |
|
if ($access->isAllowed()) { |
| 140 |
|
yield $entity->addCacheableDependency($access); |
| 141 |
|
} |
| 142 |
|
else { |
| 143 |
|
yield new CacheableValue(NULL, [$access]); |
| 144 |
|
} |
| 145 |
|
} |
| 146 |
|
|
| 147 |
|
/** |
modules/graphql_core/src/Plugin/GraphQL/Fields/EntityQuery/EntityQueryEntities.php 1 location
|
@@ 205-210 (lines=6) @@
|
| 202 |
|
} |
| 203 |
|
|
| 204 |
|
$access = $entity->access('view', NULL, TRUE); |
| 205 |
|
if ($access->isAllowed()) { |
| 206 |
|
yield $entity->addCacheableDependency($access); |
| 207 |
|
} |
| 208 |
|
else { |
| 209 |
|
yield new CacheableValue(NULL, [$access]); |
| 210 |
|
} |
| 211 |
|
} |
| 212 |
|
} |
| 213 |
|
|