Skip to main content
Version: v3.x

Introduction to Lambda Connectors

Introduction

Lambda connectors enable you to easily implement and host custom business logic within your Hasura project.

With lambda connectors, you simply write your functions, track them, and they're automatically available in your API.

Traditional Approaches

Imagine you've been tasked with handling custom business logic in a traditional middleware setup.

Each day, you dive into custom code and write scripts to parse and route incoming requests to the appropriate handlers. You haven't even gotten to writing custom business logic yet.

Next, you need to enrich the data. This likely involves wrangling multiple disparate APIs to enhance the raw information. Afterward, you meticulously format and transform the data to meet the desired structure. Error handling requires its own set of custom logic to manage various failure cases effectively. Finally, you format the response and send it back to the client, hoping nothing breaks along the way.

These manual steps are time-consuming, error-prone, and increasingly difficult to maintain as your application and team grows. The constant need for custom code at every stage of the process can be overwhelming and frustrating.

Architecture

A traditional setup like this requires separate services running on various infrastructural components. You may self-host these or depend on numerous cloud providers. This distributed system causes bottlenecks, increases latency, and demands more resources for maintenance and scaling. Coordination between different services can be challenging, leading to potential synchronization issues and deployment complexities.

With Hasura DDN

Now, imagine a different scenario with Hasura DDN.

Instead of manually parsing and routing requests, Hasura automatically handles these tasks, freeing you from writing custom code for every incoming request.

Data retrieval becomes a breeze as you no longer have to juggle multiple external APIs. Hasura has already federated all of your sources and generated your GraphQL queries for you, simplifying the process significantly.

You simply write custom functions in TypeScript or Python, Hasura introspects them, and then seamlessly integrates these functions into your GraphQL API.

With Hasura DDN, the tedious manual steps of traditional middleware are replaced by a streamlined, efficient process that allows you to focus on writing meaningful business logic rather than boilerplate code.

Architecture

We can host this custom business logic for you. Or, if you wish, you can host it on your own infrastructure. Either way, your deployment process has been simplified to a great extent. Hasura DDN provides a unified platform that minimizes latency, reduces the complexity of service coordination, and offers seamless scaling capabilities. The integrated observability and management tools ensure that your business logic runs efficiently and reliably, all while exposing your custom business logic directly to API consumers.

Next Steps

To get started with Hasura's lambda connectors and enjoy the benefits of:

  • Reduced boilerplate
  • Less infrastructure
  • Federated data access
  • Faster development

Explore the following resources: