Is the Order of Arrays Preserved?

I know arrays are handled like sets in Dgraph and duplicates are not preserved, but is the order of the set preserved or is it possible that they could be reordered by the dgraph engine?

What I want to ensure is that I can do this:

type Task {
  orderedList: [String]
}

Example, If I add a value as ["b","c","a"] is it ever possible that it could be returned in a different order such as ["a","b","c"]

I have a field that needs to have an ordered list and graphql cannot handle that very well natively unless making the complicated schema to track the order as well as the values such as:

type Task {
  orderedList: [OrderedList]
}
type OrderedList {
  order: Int
  value: String
}

Yes, that is possible. Lists in Dgraph behave as an unordered set. See https://dgraph.io/docs//query-language/schema/#list-type for more details.