Add a Lambda Connector
Introduction
You can add a lambda connector just like any other data source.
Add a connector
ddn connector init <your_name_for_the_connector> -i
- TypeScript
- Python
- Go
When you add the hasura/nodejs
connector, the CLI will generate a Node.js package with a functions.ts
file. This
file is the entrypoint for your connector.
As this is a Node.js project, you can easily add any dependencies you desire by running npm i <package-name>
from this
connector's directory.
When you add the hasura/python
connector, the CLI will generate a Python application with a functions.py
file. This
file is the entrypoint for your connector.
As this is a Python project, you can easily add any dependencies you desire by adding them to the requirements.txt
in
this connector's directory.
When you add the hasura/go
connector, the CLI will generate a Go application with a /functions
directory. The
connector will use this directory — and any *.go
file in it — as the entrypoint for your connector.
As this is a Go project, you can easily add any dependencies you desire by adding them to the go.mod
file and running
go mod tidy
from this connector's directory.
You can customize which subgraph this connector is added to by
changing your project's context or using flags. More information can be found
in the CLI docs for the ddn connector init
command.
Next steps
After adding a connector, learn how to add custom business logic written in your language of choice and expose it via your API.