Skip to content

Latest commit

 

History

History
119 lines (81 loc) · 4.96 KB

README.md

File metadata and controls

119 lines (81 loc) · 4.96 KB

Hasura Qdrant Connector

Docs ndc-hub License Status

The Hasura Qdrant Connector allows for connecting to a Qdrant database to give you an instant GraphQL API on top of your Qdrant data.

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 Qdrant connector:

Feature Supported Notes
Native Queries + Logical Models
Simple Object Query
Filter / Search
Simple Aggregation
Sort
Paginate Pagination offset field only works for documents with Integer ID's
Nested Objects
Nested Arrays
Nested Filtering
Nested Sorting
Nested Relationships
Vector Search

Before you get Started

[Prerequisites or recommended steps before using the connector.]

  1. The DDN CLI and Docker installed
  2. A supergraph
  3. A subgraph
  4. Have a Qdrant hosted database, or a locally running Qdrant database — for supplying data to your API.

The steps below explain how to Initialize and configure a connector for local development. You can learn how to deploy a connector — after it's been configured — here.

Using the Qdrant connector

Step 1: Authenticate your CLI session

ddn auth login

Step 2: Configure the connector

Once you have an initialized supergraph and subgraph, run the initialization command in interactive mode while providing a name for the connector in the prompt:

ddn connector init qdrant -i

Step 2.1: Choose the hasura/qdrant option from the list

Step 2.2: Choose a port for the connector

The CLI will ask for a specific port to run the connector on. Choose a port that is not already in use or use the default suggested port.

Step 2.3: Provide the env var(s) for the connector

Name Description
QDRANT_URL The connection string for the Qdrant database
QDRANT_API_KEY The Qdrant API Key

You'll find the environment variables in the .env file and they will be in the format:

<SUBGRAPH_NAME>_<CONNECTOR_NAME>_<VARIABLE_NAME>

Here is an example of what your .env file might look like:

APP_QDRANT_AUTHORIZATION_HEADER="Bearer B9-PceSL1QrUE_Z1gJNdGQ=="
APP_QDRANT_HASURA_SERVICE_TOKEN_SECRET="B9-PceSL1QrUE_Z1gJNdGQ=="
APP_QDRANT_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="http://local.hasura.dev:4317"
APP_QDRANT_OTEL_SERVICE_NAME="app_qdrant"
APP_QDRANT_QDRANT_API_KEY="5PX..."
APP_QDRANT_QDRANT_URL="https://2a4ae326-fdef-473e-a13c-7dc07f2f2759.us-east4-0.gcp.cloud.qdrant.io"
APP_QDRANT_READ_URL="http://local.hasura.dev:5963"
APP_QDRANT_WRITE_URL="http://local.hasura.dev:5963"

Step 3: Introspect the connector

Introspecting the connector will generate a config.json file and a qdrant.hml file.

ddn connector introspect qdrant

Step 4: Add your resources

You can add the models, commands, and relationships to your API by tracking them which generates the HML files.

ddn connector-link add-resources qdrant

Documentation

View the full documentation for the Qdrant connector here.

Contributing

Check out our contributing guide for more details.

License

The Qdrant connector is available under the Apache License 2.0.