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?

Verification instructions

Note: You must install cosign to verify the authenticity of the SingleStore file.

Use the following steps to verify the authenticity of singlestoredb-server, singlestoredb-toolbox, singlestoredb-studio, and singlestore-client SingleStore files that have been downloaded.

You may perform the following steps on any computer that can run cosign, such as the main deployment host of the cluster.

  1. (Optional) Run the following command to view the associated signature files.

    curl undefined
  2. Download the signature file from the SingleStore release server.

    • Option 1: Click the Download Signature button next to the SingleStore file.

    • Option 2: Copy and paste the following URL into the address bar of your browser and save the signature file.

    • Option 3: Run the following command to download the signature file.

      curl -O undefined
  3. After the signature file has been downloaded, run the following command to verify the authenticity of the SingleStore file.

    echo -n undefined |
    cosign verify-blob --certificate-oidc-issuer https://oidc.eks.us-east-1.amazonaws.com/id/CCDCDBA1379A5596AB5B2E46DCA385BC \
    --certificate-identity https://kubernetes.io/namespaces/freya-production/serviceaccounts/job-worker \
    --bundle undefined \
    --new-bundle-format -
    Verified OK