-
-
Notifications
You must be signed in to change notification settings - Fork 266
/
Copy pathGraphQL.php
40 lines (36 loc) · 1.42 KB
/
GraphQL.php
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
<?php
declare(strict_types=1);
namespace Rebing\GraphQL\Support\Facades;
use GraphQL\Error\Error;
use GraphQL\Executor\ExecutionResult;
use GraphQL\Type\Definition\ObjectType;
use GraphQL\Type\Definition\Type;
use GraphQL\Type\Schema;
use Illuminate\Support\Facades\Facade;
/**
* @method static array query(string $query, ?array $params = [], array $opts = [])
* @method static ExecutionResult queryAndReturnResult(string $query, ?array $params = [], array $opts = [])
* @method static Type type(string $name, bool $fresh = false)
* @method static Type paginate(string $typeName, string $customName = null)
* @method static Type simplePaginate(string $typeName, string $customName = null)
* @method static array<string,object|string> getTypes()
* @method static Schema schema(Schema|array|string $schema = null)
* @method static array getSchemas()
* @method static void addSchema(string $name, Schema|array $schema)
* @method static void addType(object|string $class, string $name = null)
* @method static Type objectType(ObjectType|array|string $type, array $opts = [])
* @method static array formatError(Error $e)
* @method static Type wrapType(string $typeName, string $customTypeName, string $wrapperTypeClass)
*/
class GraphQL extends Facade
{
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
{
return 'graphql';
}
}