Build with Fauna
The Build section of the Fauna documentation explores topics related to developing applications with Fauna. It contains guides to developing with Fauna using Fauna Query Language (FQL) and GraphQL, as well as reference guides to Fauna security and Fauna tools and integrations.
This page provides an introduction to several key aspects of developing with Fauna and lays the groundwork for future learning.
Fauna is a data platform which is accessible to client applications via an HTTP endpoint. Fauna handles all aspects of data replication and redundancy on the server side, so developers can focus on creating efficient queries for data retrieval and manipulation. Each connection to the HTTP endpoint is a standard lightweight HTTP connection that typically lasts for the duration that a query is executing.
Fauna supports drivers in several popular languages to facilitate programmatic database querying. Each driver implements its own HTTP connection management, so client applications do not need to implement connection pools or other connection management strategies.
Fauna Query Language and GraphQL are the two main APIs for interacting with Fauna. FQL provides access to the full range of Fauna’s features and capabilities through a functional language which includes control structures and Literal return values. FQL is the basis for all the language-specific functions used for database operations in the Fauna drivers. Users can use FQL for CRUD operations as well as administration tasks such as database creation, security token management, and user-defined role creation. FQL also includes a wide variety of built-in functions for math operations, string manipulation, type conversion, and object/array manipulation.
Fauna also supports database access via GraphQL, an open-source data query and manipulation language for APIs. GraphQL is familiar to many developers who use it for its clearly defined data structures and efficient request fulfillment. Fauna users can upload a GraphQL schema which automatically creates all the specified data elements, as well as utility functions for CRUD operations. A schema can specify Fauna user-defined functions as GraphQL resolvers, enabling complex queries which use FQL.
Fauna’s security model supports authentication in several ways:
Fauna keys provide database access to anyone with the key’s secret. Each key is associated with a role, and applications which use key access can perform any operation granted to its role.
Users can create Fauna API keys with the Fauna Dashboard. You’ll need an API key to complete the exercises elsewhere in the Build section of the documentation, so now is a good time to create one if you haven’t already.
To create a new key:
Log in to the Fauna Dashboard.
Navigate to your desired database.
Click SECURITY in the left-side navigation.
Click the NEW KEY button.
Select a role from the
Click the SAVE button.
Be sure to copy your key’s secret and save it in a safe place, because it can only be displayed once.
External authentication is handled by an Identity Provider (IdP) which creates, maintains, and manages identity information. When a Fauna user authenticates with an IdP, the IdP generates a JSON Web Token (JWT) which the user can use to authenticate Fauna queries. For more information, see external authentication.
Is this article helpful?
Tell Fauna how the article can be improved:
Thank you for your feedback!