FQL API reference

The API reference documentation gives you detailed syntactic information for working with FQL database entities.

Querying, data manipulation, and other capabilities are exposed as APIs on top of the core syntax. This gives you an easy-to-learn language with a rich feature set that remains discoverable over time.

Collections expose an ORM-like API for creating declarative queries, with composable methods for filtering, ordering, and transforming sets of documents as part of core FQL. The core API is enhanced with dedicated syntax to optimize the readability of predicates and projection/transformation.

Working with documents is as simple as reading fields off objects. FQL support for first-class foreign keys simplifies them by dereferencing documents through associated fields. For example, if a book document has an author stored in an author field, the author document is retrieved transparently through field access.

FQL includes a powerful indexing system that enables an iterative approach to developer-driven query optimization.

These capabilities mean that it is easy to build sophisticated join-like queries that remain easy to work with as they scale in complexity, and queries can be tailored to return the exact data the application requires.

By convention, the method and field signatures described in this reference have the following notation conventions.

Method signature:

<methodName>([<parameterName>: <parameterType>[, …​]]): <returnType>

Field signature:

<fieldName>: <fieldType>

For more information on typing, see:

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!