Check out v4 of the Fauna CLI

v4 of the Fauna CLI is now in beta.

The new version introduces enhancements to the developer experience, including an improved authentication workflow. To get started, check out the CLI v4 quick start.

ID()

Create a valid document ID.

Signature

ID(id: String | Int) => ID

Description

The ID() method returns a valid ID given a String or Int representation of the ID.

Parameters

Parameter Type Required Description

id

String or Int

Yes

Document identifier.

Return value

Type Description

ID

Resource identifier.

Examples

ID(123)
"123"
ID("123")
"123"

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!