for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Digia\GraphQL\Schema;
use Psr\SimpleCache\CacheInterface;
class DefinitionBuilderCreator implements DefinitionBuilderCreatorInterface
{
/**
* @var CacheInterface
*/
protected $cache;
* DefinitionBuilderCreator constructor.
public function __construct(CacheInterface $cache)
$this->cache = $cache;
}
* @inheritdoc
* @throws \Psr\SimpleCache\InvalidArgumentException
public function create(
array $typeDefinitionsMap,
?callable $resolveTypeFunction = null,
?ResolverRegistryInterface $resolverRegistry = null
): DefinitionBuilderInterface {
return new DefinitionBuilder(
$typeDefinitionsMap,
$resolverRegistry ?? new ResolverMapRegistry(),
$resolveTypeFunction,
$this->cache
);