st getActualValue = filter.field !== '@'
          ? `item => _.get(item, '${filter.field}')`
          : `item => item`
        query = `_.filter(${query}, ${getActualValue} ${filter.relation} '${filter.value}')`
      }

      if (sort) {
        // The '@' field name is a special case,
        // which means that the field itself is selected.
        // For example when we have an array containing numbers.
        query = sort.field !== '@'
          ? `_.orderBy(${query}, '${sort.field}', '${sort.direct