It is part of this query maybe something is wrong in the larger scope:
var(func: uid($repoId)){
Repository.branches @filter(eq(Branch.name, "master")){
Branch.versions{
NUM as Version.number
}
LATEST as max(val(NUM))
}
}
var(func: uid($repoId)){
Repository.branches @filter(NOT eq(Branch.name, "master")) {
Branch.versions {
N as Version.number
}
LV as max(val(N))
}
}
get_repo(func: uid($repoId)) {
name: Repository.name
uname: Repository.unique_name
description: Repository.description
is_public: Repository.is_public
last_update: Repository.last_updated
created_at: Repository.created_at
owner: Repository.owner {
uid
username: User.username
}
Repository.branches @filter(eq(Branch.name, "master")) {
Branch.name
Branch.versions @filter(eq(Version.number, val(LATEST))) {
number: Version.number
Version.artifacts (orderasc: Artifact.name) {
types: dgraph.type
name: Artifact.name
last_updated: Artifact.last_updated
}
}
}
}
repo_branches(func: uid($repoId), first: 7) @normalize {
Repository.branches(orderdesc: Branch.last_updated, orderasc: Branch.name){
branch_name: Branch.name
Branch.versions @filter(eq(Version.number, val(LV))) {
latest_version: Version.number
}
}
}
}
Update
I tried it by it self and it didn’t work either.
I am checking if it happens in a grater version of dgraph.
I used 20.03.0 and upgrading know to the latest