I have the following schema types:
type Developer {
id: String! @id
name: String! @search(by: [exact])
issues: [Issue] @hasInverse(field: developers)
sprints: [Sprint] @hasInverse(field: developers)
projects: [Project] @hasInverse(field: developers)
mergeApproves: [MergeRequest] @hasInverse(field: approvedBy)
mergesAssigned: [MergeRequest] @hasInverse(field: assignees)
mergesAuthorOf: [MergeRequest] @hasInverse(field: author)
mergesOfDeveloper: [MergeRequest] @hasInverse(field: mergeUser)
mergesReviewed: [MergeRequest] @hasInverse(field: reviewers)
}
type MergeRequest {
id: String! @id
title: String!
state: String!
project: Project
approvedBy: [Developer] @hasInverse(field: mergeApproves)
assignees: [Developer] @hasInverse(field: mergesAssigned)
author: Developer
mergeUser: Developer
reviewers: [Developer] @hasInverse(field: mergesReviewed)
}
What I would like to do is a recursion to find the ‘mergesReviewed’ of a Developer and then for that MergeRequest find ‘reviewers’.
My current query is this:
{
parentMergeRequest(func: uid("0xc421")) {
MergeRequest.title name
assignee : MergeRequest.assignees {
Developer.name name
reviewerOf : Developer.mergesReviewed {
MergeRequest.title
mergeUid as uid
}
}
}
childMergeRequest(func: uid(mergeUid)) @recurse {
title : MergeRequest.title
reviewerUid as MergeRequest.reviewers
}
reviewerFunc(func: uid(reviewerUid)) {
Developer.name name
}
}
I thought this would be as simple as having the childMergeRequest func as follows:
childMergeRequest(func: uid(mergeUid)) @recurse {
title : MergeRequest.title
MergeRequest.reviewers
}
However, no detail of any MergeRequest.reviewers nodes is returned.
What my current query returns:
Thank you in advance for any help