January 30th, 2025

Hot Reload in Data API builder Now Available

Jerry Nixon
Senior Program Manager

Data API builder (DAB) creates secure REST and GraphQL endpoints over your database (SQL, Postgres, Cosmos, MySQL) in Azure, on-prem, or anywhere you can run a container. It supports every programming language, requires no additional framework, is rich with features, and – because it is open source – is completely free.

There is no code generation with Data API builder (DAB), instead a single JSON file describes your data source and the tables, views or stored procedures you want to expose. This file, the configuration file, is the only requirement to get DAB up and running. The stateless and scalable engine is production-ready and built for developers.

Announcing Hot Reload

Data API builder (DAB) Hot Reload

In a recent release, Data API builder (DAB) announced support for Hot Reload. This allows developers to modify the configuration file, save it and see the impact of those changes without restarting the engine. This tightens the loop, allowing developers to tune their implementation without waiting for needless tear down/set up operations.

How is this useful?

Getting your REST API just right is tricky. As you manipulate REST paths and settings, hit refresh in Swagger to see your changes and keep testing. Hot reload makes REST configuration faster and easier.

Getting your GraphQL schema just right is tricky. As you manipulate GraphQL types and settings, refresh the GQL schema in Banana Cake Pop and keep testing. Hot reload makes iterating GraphQL design faster and easier.

Getting security just right isn’t just about authentication. Mapping the right columns or tweaking CRUD permissions can be as much an art as a science. Update the configuration and hit refresh; Hot Reload lets you refine setup without pulling your hair out.

The truth is, dabbling all the Data API builder (DAB) features can be a lot of fun, but restarting the engine can interrupt developer productivity. Tightening the developer loop is now a standard luxury for DAB developers.

How does it work?

Data API builder (DAB) Hot Reload will remind .NET developers of dotnet watch. This command instructs .NET to monitor a codebase for file changes and take action when detected. Similarly, Hot Reload watches its configuration file and updates the in-memory engine upon changes.

Does Hot Reload work when DAB has multiple configuration files? Yes. DAB supports multiple configuration files, allowing it to expose multiple data stores across different types and locations (cloud or on-prem). A change in any configuration file triggers Hot Reload.

Does Hot Reload work when DAB references Cosmos DB schema files? Yes. DAB uses schema files for Cosmos DB. Though Cosmos is unstructured, the GraphQL endpoint exposed through DAB is fully typed with an automatic GQL schema. A change in any schema file triggers Hot Reload.

Does Hot Reload work when DAB composes a configuration with environment variables? No. DAB configurations can reference environment variables using @env(), allowing developers to inject secrets without storing them in the configuration file. However, process-level environment variables do not expose events for DAB to monitor.

Does it kill the engine if I break the configuration somehow? No. Data API builder (DAB) requires a valid configuration file, but if a change introduces an error, nothing stops running. Instead, you’ll see feedback in the console, and the Hot Reload subsystem will revert to the last known good configuration in memory. This fail-safe approach lets you experiment without disrupting productivity.

Is it secure?

Yes, security in Data API builder (DAB) is a top priority, and Hot Reload is no exception. The DAB runtime operates in two modes: development and production. Development mode is built for developers, enabling Swagger, Banana Cake Pop, and detailed console logging. Production mode, however, disables these tools along with Hot Reload.

The reason is simple—any unauthorized access to a production container and attempted configuration changes will be ignored. Without this safeguard, bad actors could modify permissions, database objects, or API paths without triggering the logging you rely on for security reviews.

What’s next?

In the next release, we plan to introduce a limited form of Hot Reload in production. Specifically, we are adding a global log level setting that allows you to adjust log verbosity in the configuration instead of only through the CLI. Coupling this setting with Hot Reload will let you fine-tune production logging to the console or Application Insights for debugging API issues without restarting the engine, helping you better isolate the root cause.

How do I get it?

A startling number of DAB users are still running outdated versions of the engine—versions that are not support and could have security vulnerabilities. This month we will release version 1.4, bringing important improvements, so start thinking about upgrades. Hot Reload first launched in 1.3, but it’s faster and more comprehensive in 1.4. DAB follows a simple release pattern, odd-numbered versions add new features, even-numbered versions focus on stability. Each update refreshes both the DAB engine container image and our CLI tooling. Make sure you’re using the latest of both for the best experience.

Join the Team

Image dab logoData API builder (DAB) is open source and driven by the community. Visit our GitHub repository (https://aka.ms/dab) to find an open invitation at the top of the README. Join the conversation, help shape the roadmap and be the first to know about new features.

Author

Jerry Nixon
Senior Program Manager

SQL Server Developer Experience Program Manager for Data API builder.

0 comments