-
Notifications
You must be signed in to change notification settings - Fork 201
Expand file tree
/
Copy pathServerInterface.php
More file actions
128 lines (110 loc) · 3.03 KB
/
ServerInterface.php
File metadata and controls
128 lines (110 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?php
namespace Drupal\graphql\Entity;
use Drupal\Core\Config\Entity\ConfigEntityInterface;
use Drupal\graphql\Plugin\PersistedQueryPluginInterface;
use GraphQL\Server\OperationParams;
/**
* Defines a GraphQL server that has configuration and executes queries.
*/
interface ServerInterface extends ConfigEntityInterface {
/**
* Execute an operation on this server.
*
* @param \GraphQL\Server\OperationParams $operation
*
* @return \Drupal\graphql\GraphQL\Execution\ExecutionResult
*/
public function executeOperation(OperationParams $operation);
/**
* Execute multiple operations as batch on this server.
*
* @param \GraphQL\Server\OperationParams[] $operations
*
* @return \Drupal\graphql\GraphQL\Execution\ExecutionResult[]
*/
public function executeBatch(array $operations);
/**
* Retrieves the server configuration.
*
* @return \GraphQL\Server\ServerConfig
* The server configuration.
*/
public function configuration();
/**
* Adds a Persisted Query plugin instance to the persisted queries set.
*
* @param \Drupal\graphql\Plugin\PersistedQueryPluginInterface $queryPlugin
*/
public function addPersistedQueryInstance(PersistedQueryPluginInterface $queryPlugin);
/**
* Removes a Persisted Query plugin instance from the persisted queries set.
*
* @param string $queryPluginId
* The plugin id to be removed.
*/
public function removePersistedQueryInstance($queryPluginId);
/**
* Removes all the persisted query instances.
*/
public function removeAllPersistedQueryInstances();
/**
* Returns the current persisted queries set.
*
* @return \Drupal\graphql\Plugin\PersistedQueryPluginInterface[]
*/
public function getPersistedQueryInstances();
/**
* Returns the current persisted queries set, sorted by the plugins weight.
*
* @return \Drupal\graphql\Plugin\PersistedQueryPluginInterface[]
*/
public function getSortedPersistedQueryInstances();
/**
* Gets disable introspection config.
*
* @return bool
* The disable introspection config, FALSE otherwise.
*/
public function getDisableIntrospection();
/**
* Sets disable introspection config.
*
* @param bool $introspection
* The value for the disable introspection config.
*
* @return $this
*/
public function setDisableIntrospection($introspection);
/**
* Gets query depth config.
*
* @return int|null
* The query depth, NULL otherwise.
*/
public function getQueryDepth();
/**
* Sets query depth config.
*
* @param int $depth
* The value for the query depth config.
*
* @return $this
*/
public function setQueryDepth($depth);
/**
* Gets query complexity config.
*
* @return int|null
* The query complexity, NULL otherwise.
*/
public function getQueryComplexity();
/**
* Sets query complexity config.
*
* @param int $complexity
* The value for the query complexity config.
*
* @return $this
*/
public function setQueryComplexity($complexity);
}