All Connectors
Azure Cosmos DB for NoSQL Connector
Azure Cosmos DB for NoSQL Connector
Azure Cosmos DB for NoSQL Connector
Connect to a Azure Cosmos DB for NoSQL and expose it to Hasura v3 Project
About
Version
Released
June 21, 2024
Last Updated
September 28, 2024
GitHub Repo

Azure Cosmos DB for NoSQL Connector

Docs ndc-hub License Status

With this connector, Hasura allows you to instantly create a real-time GraphQL API on top of your data models in Azure Cosmos DB for NoSQL Database containers. This connector supports Azure Cosmos DB for NoSQL's functionalities listed in the table below, allowing for efficient and scalable data operations.

This connector is built using the TypeScript Data Connector SDK and implements the Data Connector Spec.

Features

Below, you'll find a matrix of all supported features for the Azure Cosmos DB for NoSQL connector:

FeatureSupportedNotes
Native Queries + Logical Models
Simple Object Query
Filter / Search
Simple Aggregation
Sort
Paginate
Nested Objects
Nested Arrays
Nested Filtering
Nested Sorting
Nested Relationships

Prerequisites

  1. Create a Hasura Cloud account
  2. Please ensure you have the DDN CLI and Docker installed
  3. Create a supergraph
  4. Create a subgraph

The steps below explain how to initialize and configure a connector on your local machine (typically for development purposes).You can learn how to deploy a connector to Hasura DDN — after it's been configured — here.

Using the Azure Cosmos DB for NoSQL connector

With the context set for an existing subgraph, initialize the connector by choosing hasura/azure-cosmos. When the wizard runs, you'll also be prompted to enter the following env vars necessary for your connector to function:

NameDescriptionRequired
AZURE_COSMOS_KEYThe Azure Cosmos DB for NoSQL DB keyYes
AZURE_COSMOS_DB_NAMEName of the Azure Cosmos DB for NoSQL DBYes
AZURE_COSMOS_ENDPOINTEndpoint of the Azure Cosmos DB for NoSQL DBYes
AZURE_COSMOS_MANAGED_CLIENT_IDManaged client ID of the Azure Cosmos DB for NoSQLYes
AZURE_COSMOS_NO_OF_ROWS_TO_FETCHMaximum number of rows to fetch per container to infer the schema of the container.No

Note: AZURE_COSMOS_CONNECTOR_NO_OF_ROWS_TO_FETCH is an optional field, with 100 rows to be fetched by default.

After the CLI initializes the connector, you'll need to:

Contributing

We're happy to receive any contributions from the community. Please refer to our development guide.

License

The Hasura Azure Cosmos DB for NoSQL connector is available under the Apache License 2.0.

2024 Edition

The GraphQL Handbook

A GraphQL Handbook for developers and architects to help plan your GraphQL adoption journey.
The GraphQL Handbook

Ship a rock-solid API on your data – in minutes!