Dgraph can't add slice of strings with @lang parameter

Dgraph can’t add slice of strings with @lang parameter.
I need to add slice of strings to different languages. And I have a problem with it.

Schema:

op.Schema = `
		name: string @index(term) .
		color: [string] @index(term) @lang .
	`

Golang code:

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"github.com/dgraph-io/dgo"
	"github.com/dgraph-io/dgo/protos/api"
	"google.golang.org/grpc"
	"log"
)

type Car struct {
	Name  string   `json:"name,omitempty"`
	ColorEn []string `json:"color@en,omitempty"`
	ColorRu []string `json:"color@ru,omitempty"`
}

func main() {
	bmv := Car{
		Name:"BMV",
		ColorEn:[]string{"blue","black"},
		ColorRu:[]string{"голубой","черный"},
	}


	conn, err := grpc.Dial("127.0.0.1:9080", grpc.WithInsecure())
	if err != nil {
		log.Fatal("While trying to dial gRPC")
	}
	defer conn.Close()

	dc := api.NewDgraphClient(conn)
	dg := dgo.NewDgraphClient(dc)

	op := &api.Operation{}
	op.Schema = `
		name: string @index(term) .
		color: [string] @index(term) @lang .
	`
	ctx := context.Background()
	err = dg.Alter(ctx, op)
	if err != nil {
		log.Fatal(err)
	}


	mu := &api.Mutation{
		CommitNow: true,
	}


	pb, err := json.Marshal(bmv)
	if err != nil {
		log.Fatal(err)
	}


	mu.SetJson = pb
	assigned, err := dg.NewTxn().Mutate(ctx, mu)
	if err != nil {
		log.Fatal(err)
	}

	fmt.Println(assigned.Uids)
}

After that, I can get only last string or last value.

{
 car(func: eq(name, "BMV")) {   
  name
  color@ru
  color@en
  }  
}

That’s odd, should work. Can you please fill up an issue?

Dgraph Should return a list for each language.

Tested on Ratel:

image

Mutation

{
  "set": [
   {
      "Name": "BMW",
      "Color@en": [ "blue","black"],
      "Color@ru": [ "голубой","черный"]
	}
  ]
}

Query

{
 car(func: eq(Name, "BMW")) {   
  expand(_all_)
  }  
}

Result

{
  "data": {
    "car": [
      {
        "Color@en": "black",
        "Color@ru": "черный",
        "Name": "BMW",
        "uid": "0xa"
      }
    ]
  }

I need two strings or values

"Color@en": "blue","black",
"Color@ru": "голубой","черный",

It’s return only last values “black” and “черный”
Where are the first values: “blue” and “голубой”?

Hey, talking to the team I got the information that this approach is unfeasible. Cuz language tags already use a list. So technically [List] does not support @lang

Cheers.