@@ -34,7 +34,6 @@ |
||
34 | 34 | use Youshido\GraphQL\Validator\Exception\ResolveException; |
35 | 35 | use Youshido\GraphQL\Validator\ResolveValidator\ResolveValidator; |
36 | 36 | use Youshido\GraphQL\Validator\ResolveValidator\ResolveValidatorInterface; |
37 | -use Youshido\GraphQL\Validator\SchemaValidator\SchemaValidator; |
|
38 | 37 | |
39 | 38 | class Processor |
40 | 39 | { |
@@ -13,7 +13,7 @@ |
||
13 | 13 | /** @var ObjectType $rootQueryType */ |
14 | 14 | |
15 | 15 | $schema = new Schema([ |
16 | - 'query' => $rootQueryType |
|
16 | + 'query' => $rootQueryType |
|
17 | 17 | ]); |
18 | 18 | |
19 | 19 | (new SchemaValidator())->validate($schema); |
@@ -10,17 +10,17 @@ |
||
10 | 10 | require_once __DIR__ . '/../../vendor/autoload.php'; |
11 | 11 | |
12 | 12 | $schema = new Schema([ |
13 | - 'query' => new ObjectType([ |
|
13 | + 'query' => new ObjectType([ |
|
14 | 14 | 'name' => 'RootQueryType', |
15 | 15 | 'fields' => [ |
16 | - 'currentTime' => [ |
|
16 | + 'currentTime' => [ |
|
17 | 17 | 'type' => new StringType(), |
18 | 18 | 'resolve' => function () { |
19 | - return date('Y-m-d H:ia'); |
|
19 | + return date('Y-m-d H:ia'); |
|
20 | 20 | } |
21 | - ] |
|
21 | + ] |
|
22 | 22 | ] |
23 | - ]) |
|
23 | + ]) |
|
24 | 24 | ]); |
25 | 25 | |
26 | 26 | (new SchemaValidator())->validate($schema); |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | use Youshido\GraphQL\Type\Scalar\StringType; |
8 | 8 | use Youshido\GraphQL\Validator\SchemaValidator\SchemaValidator; |
9 | 9 | |
10 | -require_once __DIR__ . '/../../vendor/autoload.php'; |
|
10 | +require_once __DIR__.'/../../vendor/autoload.php'; |
|
11 | 11 | |
12 | 12 | $schema = new Schema([ |
13 | 13 | 'query' => new ObjectType([ |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | 'fields' => [ |
16 | 16 | 'currentTime' => [ |
17 | 17 | 'type' => new StringType(), |
18 | - 'resolve' => function () { |
|
18 | + 'resolve' => function() { |
|
19 | 19 | return date('Y-m-d H:ia'); |
20 | 20 | } |
21 | 21 | ] |
@@ -28,4 +28,4 @@ discard block |
||
28 | 28 | $processor = new Processor($schema); |
29 | 29 | |
30 | 30 | $processor->processPayload('{ currentTime }'); |
31 | -echo json_encode($processor->getResponseData()) . "\n"; |
|
31 | +echo json_encode($processor->getResponseData())."\n"; |