Skip to content

Commit

Permalink
Merge pull request #25 from bwaidelich/bugfix/enum-arguments
Browse files Browse the repository at this point in the history
BUGFIX: Fix support for enum arguments
  • Loading branch information
bwaidelich authored Sep 4, 2023
2 parents 6b81ffa + 48b6663 commit e34cecb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Classes/Resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use GraphQL\Type\Definition\NonNull;
use GraphQL\Type\Definition\ResolveInfo;
use InvalidArgumentException;
use UnitEnum;
use Wwwision\Types\Parser;
use Wwwision\Types\Schema\EnumCaseSchema;
use Wwwision\Types\Schema\EnumSchema;
Expand Down Expand Up @@ -81,10 +82,10 @@ private function convertArguments(array $arguments, FieldDefinition $fieldDefini
}

/**
* @param string|bool|int|array<string, mixed>|null $argument
* @param string|bool|int|UnitEnum|array<string, mixed>|null $argument
* @return string|bool|int|array<string, mixed>|object|null
*/
private function convertArgument(string|bool|int|array|null $argument, ?Argument $argumentDefinition): string|bool|int|array|object|null
private function convertArgument(string|bool|int|UnitEnum|array|null $argument, ?Argument $argumentDefinition): string|bool|int|array|object|null
{
if ($argument === null) {
return null;
Expand Down

0 comments on commit e34cecb

Please sign in to comment.