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.
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 | ✅ |
[Prerequisites or recommended steps before using the connector.]
- The DDN CLI and Docker installed
- A supergraph
- A subgraph
- 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.
ddn auth login
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
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.
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"
Introspecting the connector will generate a config.json
file and a qdrant.hml
file.
ddn connector introspect qdrant
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
View the full documentation for the Qdrant connector here.
Check out our contributing guide for more details.
The Qdrant connector is available under the Apache License 2.0.