Predicate Update from Scalar to Array

Try these operations:

upsert {
  query {
    v as var(func: has(Rating_rates)) {
      a as Rating_rates
    }
  }

  mutation {
    # we copy the values from the old predicate
    # Facets will be lost
    set {
      uid(v) <tmp> uid(a) .
    }
  }
}

Now run

curl -X POST localhost:8080/alter -d '{"drop_attr": "Rating_rates"}'

And

$ curl -X POST localhost:8080/alter -d '<Rating_rates>: [uid] @reverse .'

And finally

upsert {
  query {
    v as var(func: has(tmp)) {
      a as tmp
    }
  }

  mutation {
    # we copy the values from the old predicate
    set {
      uid(v) <Rating_rates> uid(a) .
    }

  }
}
curl -X POST localhost:8080/alter -d '{"drop_attr": "tmp"}'