Api Final

Announcing Native Polyglot APIs in FaunaDB: GraphQL Now, SQL Forthcoming

Today’s applications require data to be modeled in various ways. Your favorite payment application not only supports real-time transactions, but also provides the ability to communicate with a network of friends. FaunaDB’s multi-model approach enables developers to model almost all types of data including relational, document, graph, and temporal paradigms. This has become very attractive to developers as they do not need to use multiple databases to address these different requirements within the same application.

At Fauna, we also understand that our developers want to use the language/s of their choice to work with their different data models. FaunaDB’s proprietary query language (FQL) is intuitive, flexible, and typesafe. FQL interaction with the database is mediated by drivers that publish embedded DSLs for most popular application languages. But as Fauna expands its user base, more and more developers are requesting different dialects that are popular for specific application use cases. We have listened to our users and are announcing support for a set of new APIs that will empower our developers and boost their productivity.

The New APIs

Developers using FaunaDB will now be able to manipulate data directly using multiple languages such as GraphQL for JAMStack applications, as well as others such as SQL, which have historically been popular in the enterprise. These languages will be supported as native endpoints within FaunaDB, and will not require any additional software to be installed by the database client. With support for GraphQL and FQL, and later SQL, FaunaDB’s managed serverless cloud will become truly versatile. Serverless, multi-tenant, and multi-cloud, FaunaDB’s managed cloud will allow developers to use any of these languages to manipulate all their data, thereby unlocking new levels of productivity for serverless application development.

The Fauna Advantage

Unlike other systems that create API layers with different properties for each dialect, platform APIs in FaunaDB leverage common database capabilities to offer developers uniform access to transactional consistency, user authorization, data access, quality of service (QoS), and temporal storage.

Consistency: FaunaDB offers the highest consistency levels for its transactions. These strong consistency guarantees are automatically applied to all platform APIs.

Authorization: Unlike most databases that control access at a table level, FaunaDB provides access control at a row (document) level. This fine-grained access control is applicable to all APIs, be it GraphQL or SQL.

Shared Data Access: Data written by one API (e.g., GraphQL) can be read and modified by another API (e.g., SQL). This is a huge improvement on other database platforms that limit APIs to their specific datasets.

QoS: FaunaDB's built-in prioritization policies for concurrent workloads are enforced at the database level or with access keys. All API access automatically adheres to these QoS definitions.

Temporality: FaunaDB is the only database on the market that provides built-in temporality support with no limits on data history. With per query snapshots, any platform API (e.g., SQL) in FaunaDB can return data at any given point in time

GraphQL API

GraphQL allows developers to specify the shape of the data they need, without requiring changes to the backend components that provide that data. This enables teams to collaborate more smoothly so that backend teams can focus on security and business logic, and front-end teams can focus on presentation and usability. In this way, GraphQL has emerged as a critical layer for universal database access.

With FaunaDB’s GraphQL API, developers no longer need to create a database schema or write time-consuming resolver functions; rather, a GraphQL schema definition file is all you need to get started. Once you import the schema definition in FaunaDB, all required database objects and functions are automatically generated. This automation tremendously boosts developer productivity as it significantly reduces the time spent in schema design and development.

A preview of FaunaDB’s GraphQL API is immediately available in FaunaDB Cloud. If you want to start using it today, please follow the getting started instructions here

The Road Ahead

While GraphQL is gaining popularity, SQL has long been the lingua franca for traditional enterprise applications. With digital transformation driving cloud adoption within the enterprise, application development continues to rely on SQL for a vast majority of enterprise workloads. However, despite this huge market need, very few cloud-centric SQL databases offer strong consistency and resilience guarantees in mainframe-like environments.

FaunaDB’s support for SQL will enable enterprises and digital businesses alike to gain from the productivity of prevalent skills in SQL while leveraging cloud platforms, without sacrificing the transactional safety that enterprises need. The SQL API will be available in the second half of CY 2019.

If you have feedback, or you would like to know more about our product, please reach me at product@fauna.com. I’d love to talk to you.