Retrieving the first document from a Match result

Hi shun,

if you are certain that there is only one document (I am actually not 100% sure if it works when there are multiple docs) then you can write:

await client.query(
  q.Get(q.Match(q.Index('sessions_by_code'), 'ABCD'))
);

If there are multiple documents and you just want to get the first:

await client.query(
  q.Select([0], q.Paginate(q.Match(q.Index('sessions_by_code'), 'ABCD')))
);