# 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](https://github.com/hasura/ndc-sdk-typescript), and it implements Hasura's [Native Data Connectors](https://github.com/hasura/ndc-spec) specification.

## Prerequisites

* A [Hasura Cloud](https://console.hasura.io/) account.
* Install the [DDN CLI](https://hasura.io/docs/3.0/cli/installation) and [Docker](https://docs.docker.com/engine/install/).
* Create a [supergraph](https://hasura.io/docs/3.0/getting-started/init-supergraph).
* Create a [subgraph](https://hasura.io/docs/3.0/getting-started/init-subgraph).
* An active SingleStore deployment.

## Connect to SingleStore

To connect to your SingleStore deployment using the connector:

1. Set the context for an existing subgraph.

2. Initialize the connector.
   ```shell
   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 yourSingleStoredeployment.                   |
   | `SINGLESTORE_PORT`     | Port of yourSingleStoredeployment.Default is`3306`.                    |
   | `SINGLESTORE_USER`     | Name of theSingleStoredatabase user with which to access the database. |
   | `SINGLESTORE_PASSWORD` | Password for theSingleStoredatabase user                               |
   | `SINGLESTORE_DATABASE` | Name of theSingleStoredatabase to connect with.                        |
   Refer to the [Hasura SingleStore Data Connector](https://github.com/singlestore-labs/singlestore-hasura-connector?tab=readme-ov-file#using-the-singlestore-connector) GitHub repository for information on additional configuration options and connection pool options.

4. Once the connector is initialized, [introspect the source database](https://hasura.io/docs/3.0/cli/commands/ddn_connector_introspect/) to update the configuration.

5. Add your [models](https://hasura.io/docs/3.0/cli/commands/ddn_model_add/), [commands](https://hasura.io/docs/3.0/cli/commands/ddn_command_add/), and [relationships](https://hasura.io/docs/3.0/cli/commands/ddn_relationship_add/).

6. Create a new [build](https://hasura.io/docs/3.0/cli/commands/ddn_supergraph_build_local/), and [run](https://hasura.io/docs/3.0/cli/commands/ddn_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](https://hasura.io/docs/3.0/supergraph-modeling/relationships/) for more information.

## References

* [SingleStore Data Connector](https://hasura.io/connectors/singlestore)
* [Hasura DDN Documentation](https://hasura.io/docs/)

***

Modified at: September 26, 2025

Source: [/db/v9.1/connect-to-singlestore/connect-with-hasura/](https://docs.singlestore.com/db/v9.1/connect-to-singlestore/connect-with-hasura/)

(An index of the documentation is available at /llms.txt)
