modules/graphql_core/src/Plugin/GraphQL/Fields/Routing/RouteEntity.php 1 location
|
@@ 146-151 (lines=6) @@
|
| 143 |
|
*/ |
| 144 |
|
protected function resolveEntity(EntityInterface $entity, Url $url, array $args, ResolveInfo $info) { |
| 145 |
|
$access = $entity->access('view', NULL, TRUE); |
| 146 |
|
if ($access->isAllowed()) { |
| 147 |
|
yield $entity->addCacheableDependency($access); |
| 148 |
|
} |
| 149 |
|
else { |
| 150 |
|
yield new CacheableValue(NULL, [$access]); |
| 151 |
|
} |
| 152 |
|
} |
| 153 |
|
|
| 154 |
|
/** |
modules/graphql_core/src/Plugin/GraphQL/Fields/EntityQuery/EntityQueryEntities.php 1 location
|
@@ 186-191 (lines=6) @@
|
| 183 |
|
} |
| 184 |
|
|
| 185 |
|
$access = $entity->access('view', NULL, TRUE); |
| 186 |
|
if ($access->isAllowed()) { |
| 187 |
|
yield $entity->addCacheableDependency($access); |
| 188 |
|
} |
| 189 |
|
else { |
| 190 |
|
yield new CacheableValue(NULL, [$access]); |
| 191 |
|
} |
| 192 |
|
} |
| 193 |
|
} |
| 194 |
|
|