public static function transformToPaginatedField(
        PaginationType $paginationType,
        FieldDefinitionNode $fieldDefinition,
        ObjectTypeDefinitionNode $parentType,
        DocumentAST $current,
        ?int $defaultCount = null,
        ?int $maxCount = null
    ): DocumentAST {
        if ($paginationType->isConnection()) {
            return self::registerConnection($fieldDefinition, $parentType, $current, $defaultCount, $maxCount);
        }

        return self::registerPaginator($fieldDefinition, $parentType, $current, $defaultCount, $maxCount);
    }