When using artisan lighthouse:union <name> the created file imports Nuwave\Lighthouse\Execution\ResolveInfo for $resolveInfo
This results in the following error:
App\GraphQL\Unions\ServiceSettings::__invoke(): Argument #3 ($resolveInfo) must be of type Nuwave\Lighthouse\Execution\ResolveInfo, GraphQL\Type\Definition\ResolveInfo given, called in C:\www\workrest\vendor\webonyx\graphql-php\src\Type\Definition\UnionType.php on line 112
Changing the import from Nuwave\Lighthouse\Execution\ResolveInfo to GraphQL\Type\Definition\ResolveInfo appears to resolve the issue.
Describe the bug
When using
artisan lighthouse:union <name>
the created file importsNuwave\Lighthouse\Execution\ResolveInfo
for$resolveInfo
This results in the following error:
App\GraphQL\Unions\ServiceSettings::__invoke(): Argument #3 ($resolveInfo) must be of type Nuwave\Lighthouse\Execution\ResolveInfo, GraphQL\Type\Definition\ResolveInfo given, called in C:\www\workrest\vendor\webonyx\graphql-php\src\Type\Definition\UnionType.php on line 112
Changing the import from
Nuwave\Lighthouse\Execution\ResolveInfo
toGraphQL\Type\Definition\ResolveInfo
appears to resolve the issue.