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.

key.exists()

Learn: Keys

Test if a key exists.

Signature

exists() => Boolean

Description

Tests if an key, represented as an Key document, exists.

A key is a type of authentication secret used for anonymous access to a Fauna database. Unlike tokens, keys are not associated with an identity.

Parameters

None

Return value

Type Description

Boolean

If true, the Key document exists. If false, the Key document doesn’t exist.

Examples

Key.byId("412655134325080576")!.exists()
true

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!