@@ 21-23 (lines=3) @@ | ||
18 | NodeKind::FIELD => [ |
|
19 | 'leave' => function (FieldNode $field) use ($info, &$contexts) { |
|
20 | $definition = $info->getFieldDef(); |
|
21 | if (!empty($definition->config['contexts'])) { |
|
22 | $contexts = Cache::mergeContexts($contexts, $this->collectCacheContexts($definition->config['contexts'])); |
|
23 | } |
|
24 | ||
25 | $parent = $info->getParentType(); |
|
26 | if (!empty($parent->config['contexts'])) { |
|
@@ 26-28 (lines=3) @@ | ||
23 | } |
|
24 | ||
25 | $parent = $info->getParentType(); |
|
26 | if (!empty($parent->config['contexts'])) { |
|
27 | $contexts = Cache::mergeContexts($contexts, $this->collectCacheContexts($parent->config['contexts'])); |
|
28 | } |
|
29 | ||
30 | $type = $info->getType(); |
|
31 | // Collect cache metadata from leaf types. |
|
@@ 32-34 (lines=3) @@ | ||
29 | ||
30 | $type = $info->getType(); |
|
31 | // Collect cache metadata from leaf types. |
|
32 | if ($type instanceof LeafType && !empty($type->config['contexts'])) { |
|
33 | $contexts = Cache::mergeContexts($contexts, $this->collectCacheContexts($type->config['contexts'])); |
|
34 | } |
|
35 | }, |
|
36 | ], |
|
37 | ]; |