Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Microsoft Announces General Availability of Data API Builder for Azure Cosmos DB

Microsoft Announces General Availability of Data API Builder for Azure Cosmos DB

Microsoft recently announced the general availability of the Data API builder for Azure Cosmos DB. The open-source project provides REST and GraphQL endpoints to Azure databases and on-premises stores.

The new Data API builder (DAB) is intended to simplify the process of exposing GraphQL endpoints on Azure Cosmos DB collections, enabling relational queries, filtering, and mutations, including patch operations. DAB offers a cross-platform CLI, native OpenAPI support, Swagger for REST endpoints, and Banana Cake Pop for GraphQL endpoints.

Sajeetharan Sinnathurai, product manager at Azure Cosmos DB, discusses a few use cases:

Whether you’re building a data clearinghouse, crafting a mobile app, or tinkering with an Azure database, Data API Builder has your back. It seamlessly integrates with various backend stores, from NoSQL to relational databases, and effortlessly manages multiple databases at once.

Source: Microsoft blog

Cross-platform and language-independent, DAB is designed as a replacement for any custom API performing CRUD operations against a database with a single configuration file. It provides retry policies, comprehensive logging, in-memory caching, and the ability to map columns and filter results. DAB is an ASP.NET project written in C# using ChilliCream’s Hot Chocolate for GraphQL and FusionCache for in-memory caching.

Announcing the general availability of the project, Jerry Nixon, senior product manager at Microsoft, writes:

Nearly three years ago, Data API builder began as just a dream. How can we reduce the friction for developers wanting to access databases in their client applications? We created Data API builder to solve this, providing secure and feature-rich REST and GraphQL endpoints over databases with zero code.

According to Azure, the container-based DAB allows developers to create GraphQL endpoints while maintaining granular and flexible security features. Sinnathurai adds:

DAB is a standard Docker-friendly container. It is completely stateless and scalable. You can run it in your own environment or in the cloud—it doesn’t matter. Run one or several containers against a single database or multiple databases.

While supporting custom on-premises deployments, DAB natively integrates with Azure Static Web Apps and works with Azure Container Apps, Azure Container Instances, Azure Kubernetes Service, and Azure Web Apps for Containers.

While some developers ask to add support for Cosmos DB for MongoDB, Arun Vijayraghavan, principal product manager at Microsoft, comments:

What really stands out for the DAB projects is that it brings the database closer to the edge provider. For example, edge providers like Cloudflare, Vercel, Netlify etc are all based off Javascript V8 or Deno which doesn't have a full set of API’s to interact with a database so the best solution is to use REST APIs to access database.

The Data API builder project is free, with no premium tier, and available on GitHub under the MIT license.


About the Author

Rate this Article