for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Install GitHub App
<?php
declare(strict_types=1);
namespace Overblog\GraphQLBundle\GraphQL\Relay\Node;
use GraphQL\Type\Definition\ResolveInfo;
use Overblog\GraphQLBundle\Definition\Resolver\AliasedInterface;
use Overblog\GraphQLBundle\Definition\Resolver\QueryInterface;
use Overblog\GraphQLBundle\Relay\Node\GlobalId;
use Overblog\GraphQLBundle\Resolver\FieldResolver;
final class GlobalIdFieldQuery implements QueryInterface, AliasedInterface
{
/**
* @param object|array $obj
* @param int|string|null $idValue
*/
public function __invoke($obj, ResolveInfo $info, $idValue, ?string $typeName): string
return GlobalId::toGlobalId(
!empty($typeName) ? $typeName : $info->parentType->name,
$idValue ? $idValue : FieldResolver::valueFromObjectOrArray($obj, 'id')
);
}
* {@inheritdoc}
public static function getAliases(): array
return ['__invoke' => 'relay_globalid_field'];