Skip to content

Commit

Permalink
Upgrade to Lighthouse ^5
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-de-wit committed Jan 5, 2021
1 parent 5a9d59f commit 4a47ddc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"require": {
"php": "^7.4",
"czim/laravel-paperclip": "^3",
"nuwave/lighthouse": "^4"
"nuwave/lighthouse": "^5"
},
"require-dev": {
"orchestra/testbench": "^6.0",
Expand Down
6 changes: 3 additions & 3 deletions src/Directives/VariantDirective.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
use GraphQL\Language\AST\FieldDefinitionNode;
use GraphQL\Language\AST\InputValueDefinitionNode;
use GraphQL\Language\AST\ObjectTypeDefinitionNode;
use GraphQL\Language\Parser;
use Illuminate\Support\Str;
use Nuwave\Lighthouse\Schema\AST\DocumentAST;
use Nuwave\Lighthouse\Schema\AST\PartialParser;
use Nuwave\Lighthouse\Schema\Directives\BaseDirective;
use Nuwave\Lighthouse\Support\Contracts\ArgManipulator;

Expand Down Expand Up @@ -62,7 +62,7 @@ public function manipulateArgDefinition(
}

$resizeEnumName = Str::studly($parentField->name->value) . Str::studly($argDefinition->name->value);
$argDefinition->type = PartialParser::namedType($resizeEnumName);
$argDefinition->type = Parser::namedType($resizeEnumName);


$enumValues = collect($variants)->map(function (string $variant) {
Expand All @@ -76,7 +76,7 @@ public function manipulateArgDefinition(
$enumDefinition .= '}';

$documentAST->setTypeDefinition(
PartialParser::enumTypeDefinition($enumDefinition)
Parser::enumTypeDefinition($enumDefinition)
);
}
}

0 comments on commit 4a47ddc

Please sign in to comment.