public function fetchByType($type)
    {
        if (! $this->hasType($type)) {
            throw new Exception\ResolverTypeNotFoundException();
        }

        $resolvers = new self();

        foreach ($this as $resolver) {
            if ($resolver instanceof $type) {
                $resolvers->attach($resolver);
            }
        }

        if (1 === count($resolvers)) {
            return $resolvers->queue->extract();
        }

        return $resolvers;
    }