Moved from GitHub dgraph/4808
Posted by mangalaman93:
cc: @animesh2049 @pawanrawal
Steps to reproduce:
- Insert the below mutation in dgraph.
{
set {
<0x1> <value> "1" .
<0x1> <value> "0" .
}
}
- Query the schema.
schema{}
Result
{
"data": {
"schema": [
{
"predicate": "value",
"type": "default",
"list": true
}
]
},
}
Note: type of value is default.
3. Now do an alter.
<value>: [int] .
- Now do the same mutation as step 1
{
set {
<0x1> <value> "1" .
<0x1> <value> "0" .
}
}
- Run this query
{
q(func: has(value)) {
uid
value
}
}
Response:
{
"data": {
"q": [
{
"uid": "0x1",
"value": [
0,
1,
1,
0
]
}
]
},
}
Expected Response:
{
"data": {
"q": [
{
"uid": "0x1",
"value": [
0,
1,
]
}
]
},
}