1 | <?php |
||
17 | abstract class SchemaPluginBase extends PluginBase implements SchemaPluginInterface, ContainerFactoryPluginInterface { |
||
18 | |||
19 | use DependencySerializationTrait; |
||
20 | |||
21 | /** |
||
22 | * The schema builder object. |
||
23 | * |
||
24 | * @var \Drupal\graphql\Plugin\GraphQL\PluggableSchemaBuilderInterface |
||
25 | */ |
||
26 | protected $schemaBuilder; |
||
27 | |||
28 | /** |
||
29 | * {@inheritdoc} |
||
30 | */ |
||
31 | public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { |
||
39 | |||
40 | /** |
||
41 | * SchemaPluginBase constructor. |
||
42 | * |
||
43 | * @param array $configuration |
||
44 | * The plugin configuration array. |
||
45 | * @param string $pluginId |
||
46 | * The plugin id. |
||
47 | * @param array $pluginDefinition |
||
48 | * The plugin definition array. |
||
49 | * @param \Drupal\graphql\Plugin\GraphQL\TypeSystemPluginManagerAggregator $pluginManagers |
||
50 | * Type system plugin manager aggregator service. |
||
51 | */ |
||
52 | public function __construct($configuration, $pluginId, $pluginDefinition, TypeSystemPluginManagerAggregator $pluginManagers) { |
||
56 | |||
57 | /** |
||
58 | * {@inheritdoc} |
||
59 | */ |
||
60 | public function getSchema() { |
||
75 | |||
76 | /** |
||
77 | * Extract type or field definitions from plugins. |
||
78 | * |
||
79 | * @param array $plugins |
||
80 | * The list of plugins to extract the type or field definitions from. |
||
81 | * |
||
82 | * @return array |
||
83 | * The list of extracted type or field definitions. |
||
84 | */ |
||
85 | protected function extractDefinitions(array $plugins) { |
||
90 | |||
91 | /** |
||
92 | * Retrieve all mutations. |
||
93 | * |
||
94 | * @return \Drupal\graphql\Plugin\GraphQL\TypeSystemPluginInterface[] |
||
95 | * The list of mutation plugins. |
||
96 | */ |
||
97 | protected function getMutations() { |
||
102 | |||
103 | /** |
||
104 | * Retrieve all fields that are not associated with a specific type. |
||
105 | * |
||
106 | * @return \Drupal\graphql\Plugin\GraphQL\TypeSystemPluginInterface[] |
||
107 | * The list root field plugins. |
||
108 | */ |
||
109 | protected function getRootFields() { |
||
116 | |||
117 | /** |
||
118 | * Retrieve all types to be registered explicitly. |
||
119 | * |
||
120 | * @return \Drupal\graphql\Plugin\GraphQL\TypeSystemPluginInterface[] |
||
121 | * The list of types to be registered explicitly. |
||
122 | */ |
||
123 | protected function getTypes() { |
||
132 | |||
133 | } |
||
134 |