Schema to have single edge return json non array type

Hi,

I am trying to Marshal the json output back into a go struct.

I have 2 dgraph types one has a reference to another and has a single edge.

When I try and marshal the response json back into an object it says it cant because the json contains an array.

Here are the relevant sections of my schema. Any ideas?

<person.entityID>: string @index(exact).
<person.name>: string .
<person.orgid>: string .
<person.orgname>: string .
<person.type>: string .
<person.title>: string .

<speech.order>: int .
<speech.type>: int .
<speech.context>: [uid] .
<speech.person>: [uid] .

type <Person> {
	person.entityID
	person.name
	person.orgid
	person.orgname
	person.type
	person.title
}

type <Speech> {
	speech.order
	speech.person
	speech.type
	speech.context
}

Fixed it myself by googling. I couldn’t find it in the docs though

You do the schema with no square brackets around the uid like this.

<speech.person>: uid .