Connect with Hasura

The Hasura SingleStore Data Connector ("the connector") connects your SingleStore database to Hasura Data Delivery Network (DDN) and enables you to query and update your SingleStore data via a GraphQL API. Once the connector is initialized, it automatically deploys a GraphQL API on top of your SingleStore data.

The Hasura SingleStore Data Connector is built using the Native Data Connector SDK for TypeScript, and it implements Hasura's Native Data Connectors specification.

Prerequisites

Connect to SingleStore

To connect to your SingleStore deployment using the connector:

  1. Set the context for an existing subgraph.

  2. Initialize the connector.

    ddn connector init -i
  3. Specify the connection configuration for your SingleStore deployment using the following environment variables:

    Variable Name

    Description

    SINGLESTORE_HOST

    Hostname or IP address of your SingleStore Helios deployment.

    SINGLESTORE_PORT

    Port of your SingleStore Helios deployment.

    Default is 3306.

    SINGLESTORE_USER

    Name of the SingleStore database user with which to access the database.

    SINGLESTORE_PASSWORD

    Password for the SingleStore database user

    SINGLESTORE_DATABASE

    Name of the SingleStore database to connect with.

    Refer to the Hasura SingleStore Data Connector GitHub repository for information on additional configuration options and connection pool options.

  4. Once the connector is initialized, introspect the source database to update the configuration.

  5. Add your models, commands, and relationships.

  6. Create a new build, and run the scripts using the connector.

The connector is now configured and ready.

Supported Features

Feature

Supported

Native queries and logical models

Simple object query

Filter or search

Simple aggregation

Sort

Paginate

Table relationships

Views

Distinct

Remote relationships

Mutations

Limitations

SingleStore does not support foreign keys. Therefore, relationships between tables must be manually defined by appending the relationship information to the .hml files. Refer to Relationships for more information.

References

Last modified: October 18, 2024

Was this article helpful?