-
Notifications
You must be signed in to change notification settings - Fork 201
Expand file tree
/
Copy pathSchemaPluginInterface.php
More file actions
46 lines (39 loc) · 1.17 KB
/
SchemaPluginInterface.php
File metadata and controls
46 lines (39 loc) · 1.17 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
<?php
namespace Drupal\graphql\Plugin;
use Drupal\Component\Plugin\PluginInspectionInterface;
use Drupal\Component\Plugin\DerivativeInspectionInterface;
use Drupal\graphql\GraphQL\ResolverRegistryInterface;
/**
* Defines a schema plugin that returns a GraphQL schema part.
*
* A schema plugin also defines how that schema is resolved to values with data
* producers.
*/
interface SchemaPluginInterface extends PluginInspectionInterface, DerivativeInspectionInterface {
/**
* Set the serverID, required for cache id generation.
*
* @param string
* The machine name of the server using this plugin.
*/
public function setServerId(string $serverId): void;
/**
* Retrieves the schema.
*
* @param \Drupal\graphql\GraphQL\ResolverRegistryInterface $registry
* The resolver registry.
*
* @return \GraphQL\Type\Schema
* The schema.
*/
public function getSchema(ResolverRegistryInterface $registry);
/**
* Retrieves the resolver registry.
*
* @todo Instead, this should be configuration.
*
* @return \Drupal\graphql\GraphQL\ResolverRegistryInterface
* The resolver registry.
*/
public function getResolverRegistry();
}