-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGraphQLSettings.php
45 lines (40 loc) · 2.45 KB
/
GraphQLSettings.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
41
42
43
44
45
<?php declare(strict_types = 1);
namespace LastDragon_ru\LaraASP\GraphQLPrinter\Settings;
use LastDragon_ru\LaraASP\GraphQLPrinter\Contracts\DirectiveFilter;
use LastDragon_ru\LaraASP\GraphQLPrinter\Contracts\TypeFilter;
use LastDragon_ru\LaraASP\GraphQLPrinter\Filters\GraphQLDirectiveFilter;
/**
* These settings close as possible to {@see \GraphQL\Utils\SchemaPrinter}.
*/
class GraphQLSettings extends ImmutableSettings {
protected string $space = ' ';
protected string $indent = ' ';
protected string $fileEnd = "\n";
protected string $lineEnd = "\n";
protected int $lineLength = 80;
protected bool $printDirectives = true;
protected bool $printDirectiveDefinitions = false;
protected bool $printUnusedDefinitions = true;
protected bool $normalizeDefinitions = true;
protected bool $normalizeUnions = false;
protected bool $normalizeEnums = false;
protected bool $normalizeInterfaces = false;
protected bool $normalizeFields = false;
protected bool $normalizeArguments = false;
protected bool $normalizeDescription = false;
protected bool $normalizeDirectives = false;
protected bool $normalizeDirectiveLocations = false;
protected bool $alwaysMultilineUnions = false;
protected bool $alwaysMultilineArguments = false;
protected bool $alwaysMultilineInterfaces = false;
protected bool $alwaysMultilineDirectives = false;
protected bool $alwaysMultilineDirectiveLocations = false;
protected ?TypeFilter $typeFilter = null;
protected ?TypeFilter $typeDefinitionFilter = null;
protected ?DirectiveFilter $directiveFilter = null;
protected ?DirectiveFilter $directiveDefinitionFilter = null;
public function __construct() {
parent::__construct();
$this->directiveFilter = new GraphQLDirectiveFilter();
}
}