1 | <?php |
||
16 | class QueryProcessor { |
||
17 | |||
18 | /** |
||
19 | * The current user account. |
||
20 | * |
||
21 | * @var \Drupal\Core\Session\AccountProxyInterface |
||
22 | */ |
||
23 | protected $currentUser; |
||
24 | |||
25 | /** |
||
26 | * The graphql container parameters. |
||
27 | * |
||
28 | * @var array |
||
29 | */ |
||
30 | protected $parameters; |
||
31 | |||
32 | /** |
||
33 | * The schema plugin manager. |
||
34 | * |
||
35 | * @var \Drupal\graphql\Plugin\SchemaPluginManager |
||
36 | */ |
||
37 | protected $pluginManager; |
||
38 | |||
39 | /** |
||
40 | * The server helper. |
||
41 | * |
||
42 | * @var \GraphQL\Server\Helper |
||
43 | */ |
||
44 | protected $helper; |
||
45 | |||
46 | /** |
||
47 | * The query provider service. |
||
48 | * |
||
49 | * @var \Drupal\graphql\GraphQL\QueryProvider\QueryProviderInterface |
||
50 | */ |
||
51 | protected $queryProvider; |
||
52 | |||
53 | /** |
||
54 | * The renderer service. |
||
55 | * |
||
56 | * @var \Drupal\Core\Render\RendererInterface |
||
57 | */ |
||
58 | protected $renderer; |
||
59 | |||
60 | /** |
||
61 | * Processor constructor. |
||
62 | * |
||
63 | * @param \Drupal\Core\Render\RendererInterface $renderer |
||
64 | * The renderer service. |
||
65 | * @param \Drupal\Core\Session\AccountProxyInterface $currentUser |
||
66 | * The current user. |
||
67 | * @param \Drupal\graphql\Plugin\SchemaPluginManager $pluginManager |
||
68 | * The schema plugin manager. |
||
69 | * @param \Drupal\graphql\GraphQL\QueryProvider\QueryProviderInterface $queryProvider |
||
70 | * The query provider service. |
||
71 | * @param array $parameters |
||
72 | * The graphql container parameters. |
||
73 | */ |
||
74 | public function __construct( |
||
88 | |||
89 | /** |
||
90 | * Processes one or multiple graphql operations. |
||
91 | * |
||
92 | * @param string $schema |
||
93 | * The name of the schema to execute. |
||
94 | * @param \GraphQL\Server\OperationParams|\GraphQL\Server\OperationParams[] $operations |
||
95 | * The graphql operation(s) to execute. |
||
96 | * @param mixed $context |
||
97 | * The context for the query. |
||
98 | * |
||
99 | * @return \Drupal\graphql\GraphQL\Execution\QueryResult |
||
100 | * The query result. |
||
101 | */ |
||
102 | public function processQuery($schema, $operations, $context = NULL) { |
||
125 | |||
126 | /** |
||
127 | * Executes one or multiple graphql operations. |
||
128 | * |
||
129 | * @param \GraphQL\Server\ServerConfig $server |
||
130 | * The graphql server config. |
||
131 | * @param \GraphQL\Server\OperationParams|\GraphQL\Server\OperationParams[] $operations |
||
132 | * The graphql operation(s) to execute. |
||
133 | * |
||
134 | * @return \Drupal\graphql\GraphQL\Execution\QueryResult |
||
135 | * The result of executing the operations. |
||
136 | */ |
||
137 | protected function executeQuery(ServerConfig $server, $operations) { |
||
159 | |||
160 | } |
||
161 |