hasura / ndc-sendgrid

Native Data Connector that connects to the SendGrid REST API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SendGrid Connector

Warning

This connector has been updated to support the Hasura DDN Beta, and will not work with the Alpha.

The SendGrid Native Data Connector allows for connecting to the SendGrid v3 API and exposing its functionality from your Hasura API. While this is a functional implementation of the SendGrid API, it also serves as a minimal example of an "Action" style connector using the Rust Data Connector SDK.

In order to use this connector you will need to:

  • Create a SendGrid API account
  • Create an API key
  • Log in to A Hasura CLI Session
  • Create a Pre-Shared Token for service authentication between the Hasura V3 Engine and your connector

Features

This connector is a minimal implementation of the SendGrid v3 API functions:

  • Sending mail (the send_mail procedure)
  • Getting a list of email templates (the list_templates function)

It also serves as an example of how an Action style connector can be implemented in Hasura V3.

For Hasura Users

TBD

For Developers

The following instructions are for developers who wish to contribute to the SendGrid Connector.

Build

Prerequisites:

  1. Install rustup.

Commands:

cargo build
SENDGRID_API_KEY="YOUR-API-KEY-HERE" cargo run -- serve --configuration .

Docker

The Dockerfile is used by the connector create command and can be tested as follows:

docker build . --tag ndc-sendgrid
docker run -it -e SENDGRID_API_KEY="YOUR-API-KEY-HERE" ndc-sendgrid

About

Native Data Connector that connects to the SendGrid REST API

License:Apache License 2.0


Languages

Language:Rust 97.1%Language:Dockerfile 1.5%Language:Makefile 1.4%