How do I query a relationship that returns the properties AND the associated nodes?

I want to query a relationship and get the to: from: nodes along with the relationship properties.

My graph consists of one node and one relationship. Together, they define a Bill of Materials

type Node {
	ID: ID!
	name: String
}

type Branch @relation (name:"CHILD_OF_NODE"){
	to:Node
	from:Node
	ID: ID
	index: Int
}

How do I write a server schema that will return something like the following:

{
  branch(root: "Root") {
    ID
    index
    parent{ID}
    child{ID}
  }
}