public function buildQueryType(
        string $type,
        QueryTypeHandlerInterface $handler,
        array $config
    ): QueryTypeInterface {
        $parameterBuilder = $this->parameterBuilderFactory->createParameterBuilder();
        $handler->buildParameters($parameterBuilder);
        $parameterDefinitions = $parameterBuilder->buildParameterDefinitions();

        return QueryType::fromArray(
            [
                'type' => $type,
                'isEnabled' => $config['enabled'],
                'name' => $config['name'] ?? '',
                'handler' => $handler,
                'parameterDefinitions' => $parameterDefinitions,
            ]
        );
    }