Query.identity()

Get the current identity.

Signature

Query.identity(): Any | Null

Description

The identity() method gets the identity of a caller making a query in the current session.

Parameters

None

Return value

One of:

Type Description

Any

Identity document.

Null

null: No identity is associated with the current session.

Examples

Query.identity()
{
  id: "371264255805095970",
  coll: People,
  ts: Time("2023-07-25T22:27:15.410Z"),
  name: "Alice Jones",
  email: "ajones@gmail.com"
}

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!