1 | <?php |
||
11 | trait CacheableEdgeTrait { |
||
12 | |||
13 | /** |
||
14 | * {@inheritdoc} |
||
15 | */ |
||
16 | abstract public function getPlugin(PluggableSchemaBuilderInterface $schemaBuilder); |
||
17 | |||
18 | /** |
||
19 | * {@inheritdoc} |
||
20 | */ |
||
21 | public function getSchemaCacheMetadata(AbstractSchema $schema) { |
||
26 | |||
27 | /** |
||
28 | * {@inheritdoc} |
||
29 | */ |
||
30 | public function getResponseCacheMetadata(AbstractSchema $schema) { |
||
35 | |||
36 | /** |
||
37 | * Helper function to load cache metadata from a schema's edges. |
||
38 | * |
||
39 | * @param \Youshido\GraphQL\Schema\AbstractSchema $schema |
||
40 | * The schema. |
||
41 | * @param callable $callback |
||
42 | * Callback to return the cache metadata from an edge. |
||
43 | * |
||
44 | * @return \Drupal\Core\Cache\RefinableCacheableDependencyInterface |
||
45 | * The cache metadata. |
||
46 | */ |
||
47 | protected function getCacheMetadata(AbstractSchema $schema, callable $callback) { |
||
64 | |||
65 | } |