def convert_sorting(sortings):
  """Convert a V3 sort parameter into  the V4 orderBys field.

  Args:
    sortings: A string representing the V3 sort parameter.
  Returns:
    A list of V4 orderBy objects.
  """
  order_bys = []

  for sorting in sortings.split(','):
    order_by = {}
    order_by['orderType'] = 'VALUE'
    if sorting.startswith('-'):
      order_by['fieldName'] = sorting[1:]
      order_by['sortOrder'] = 'DESCENDING'
    else:
      order_by['fieldName'] = sorting
    order_bys.append(order_by)
  return order_bys