@@ -25,20 +25,20 @@ |
||
| 25 | 25 | { |
| 26 | 26 | $schema = new Schema(); |
| 27 | 27 | $schema->addQuery('latest', |
| 28 | - new ObjectType( |
|
| 29 | - [ |
|
| 30 | - 'name' => 'latest', |
|
| 31 | - 'fields' => [ |
|
| 32 | - 'id' => ['type' => 'int'], |
|
| 33 | - 'name' => ['type' => 'string'] |
|
| 34 | - ], |
|
| 35 | - 'resolve' => function () { |
|
| 36 | - return [ |
|
| 37 | - 'id' => 1, |
|
| 38 | - 'name' => 'Alex' |
|
| 39 | - ]; |
|
| 40 | - } |
|
| 41 | - ])); |
|
| 28 | + new ObjectType( |
|
| 29 | + [ |
|
| 30 | + 'name' => 'latest', |
|
| 31 | + 'fields' => [ |
|
| 32 | + 'id' => ['type' => 'int'], |
|
| 33 | + 'name' => ['type' => 'string'] |
|
| 34 | + ], |
|
| 35 | + 'resolve' => function () { |
|
| 36 | + return [ |
|
| 37 | + 'id' => 1, |
|
| 38 | + 'name' => 'Alex' |
|
| 39 | + ]; |
|
| 40 | + } |
|
| 41 | + ])); |
|
| 42 | 42 | |
| 43 | 43 | $schema->addQuery('user', new UserType()); |
| 44 | 44 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | 'id' => ['type' => 'int'], |
| 33 | 33 | 'name' => ['type' => 'string'] |
| 34 | 34 | ], |
| 35 | - 'resolve' => function () { |
|
| 35 | + 'resolve' => function() { |
|
| 36 | 36 | return [ |
| 37 | 37 | 'id' => 1, |
| 38 | 38 | 'name' => 'Alex' |