Skip to content

Commit 7f98776

Browse files
xyngmoufmouf
authored andcommitted
chore: update to webonyx/graphql-php:^14.5.0
1 parent 98cc384 commit 7f98776

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"thecodingmachine/cache-utils": "^1",
2828
"thecodingmachine/class-explorer": "^1.1.0",
2929
"webmozart/assert": "^1.10",
30-
"webonyx/graphql-php": "^0.13.4"
30+
"webonyx/graphql-php": "^v14.5.0"
3131
},
3232
"require-dev": {
3333
"beberlei/porpaginas": "^1.2",

src/Http/Psr15GraphQLMiddlewareBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace TheCodingMachine\GraphQLite\Http;
66

7-
use GraphQL\Error\Debug;
7+
use GraphQL\Error\DebugFlag;
88
use GraphQL\Server\ServerConfig;
99
use GraphQL\Type\Schema;
1010
use Laminas\Diactoros\ResponseFactory;
@@ -41,7 +41,7 @@ public function __construct(Schema $schema)
4141
{
4242
$this->config = new ServerConfig();
4343
$this->config->setSchema($schema);
44-
$this->config->setDebug(Debug::RETHROW_UNSAFE_EXCEPTIONS);
44+
$this->config->setDebugFlag(DebugFlag::RETHROW_UNSAFE_EXCEPTIONS);
4545
$this->config->setErrorFormatter([WebonyxErrorHandler::class, 'errorFormatter']);
4646
$this->config->setErrorsHandler([WebonyxErrorHandler::class, 'errorHandler']);
4747
$this->config->setContext(new Context());

src/Http/WebonyxGraphqlMiddleware.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
107107
private function processResult($result): array
108108
{
109109
if ($result instanceof ExecutionResult) {
110-
return $result->toArray($this->config->getDebug());
110+
return $result->toArray($this->config->getDebugFlag());
111111
}
112112

113113
if (is_array($result)) {
114114
return array_map(function (ExecutionResult $executionResult) {
115-
return $executionResult->toArray($this->config->getDebug());
115+
return $executionResult->toArray($this->config->getDebugFlag());
116116
}, $result);
117117
}
118118

src/Mappers/Proxys/MutableObjectTypeAdapter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct(ObjectType $type, ?string $className = null)
4545
/**
4646
* @return InterfaceType[]
4747
*/
48-
public function getInterfaces()
48+
public function getInterfaces(): array
4949
{
5050
$type = $this->type;
5151
assert($type instanceof ObjectType);
@@ -56,7 +56,7 @@ public function getInterfaces()
5656
* @param mixed[] $value
5757
* @param mixed[]|null $context
5858
*
59-
* @return bool|null
59+
* @return bool|\GraphQL\Deferred|null
6060
*/
6161
public function isTypeOf($value, $context, ResolveInfo $info)
6262
{
@@ -70,7 +70,7 @@ public function isTypeOf($value, $context, ResolveInfo $info)
7070
*
7171
* @return bool
7272
*/
73-
public function implementsInterface($iface)
73+
public function implementsInterface($iface): bool
7474
{
7575
$type = $this->type;
7676
assert($type instanceof ObjectType);

src/Mappers/Root/BaseTypeMapper.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use GraphQL\Type\Definition\IntType;
1212
use GraphQL\Type\Definition\NamedType;
1313
use GraphQL\Type\Definition\OutputType;
14+
use GraphQL\Type\Definition\ScalarType;
1415
use GraphQL\Type\Definition\StringType;
1516
use GraphQL\Type\Definition\Type as GraphQLType;
1617
use GraphQL\Upload\UploadType;
@@ -119,7 +120,7 @@ public function toGraphQLInputType(Type $type, ?InputType $subType, string $argu
119120
* Casts a Type to a GraphQL type.
120121
* Does not deal with nullable.
121122
*
122-
* @return BooleanType|FloatType|IDType|IntType|StringType|UploadType|DateTimeType|null
123+
* @return BooleanType|FloatType|IDType|IntType|StringType|UploadType|DateTimeType|ScalarType|null
123124
*/
124125
private function mapBaseType(Type $type)
125126
{

0 commit comments

Comments
 (0)