{"id":23577615,"url":"https://github.com/couchbaselabs/hasura-connector","last_synced_at":"2025-05-05T23:16:49.655Z","repository":{"id":62415001,"uuid":"558513492","full_name":"couchbaselabs/Hasura-Connector","owner":"couchbaselabs","description":"Couchbase Connector for Hasura","archived":false,"fork":false,"pushed_at":"2023-05-04T15:11:09.000Z","size":214,"stargazers_count":6,"open_issues_count":7,"forks_count":2,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-05-05T23:16:45.052Z","etag":null,"topics":["capella","couchbase","hasura"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/couchbaselabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-27T17:43:58.000Z","updated_at":"2025-04-28T08:21:41.000Z","dependencies_parsed_at":"2023-02-18T18:15:55.922Z","dependency_job_id":null,"html_url":"https://github.com/couchbaselabs/Hasura-Connector","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/couchbaselabs%2FHasura-Connector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/couchbaselabs%2FHasura-Connector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/couchbaselabs%2FHasura-Connector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/couchbaselabs%2FHasura-Connector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/couchbaselabs","download_url":"https://codeload.github.com/couchbaselabs/Hasura-Connector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252590636,"owners_count":21772941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["capella","couchbase","hasura"],"created_at":"2024-12-26T22:29:41.254Z","updated_at":"2025-05-05T23:16:49.625Z","avatar_url":"https://github.com/couchbaselabs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Data Connector Agent for Couchbase\n\nThis directory contains a Couchbase implementation of a data connector agent.\nIt can use a Couchbase cluster and consume documents of a bucket as referenced by the \"DB\" config field.\n\n## Capabilities\n\nThe Couchbase agent currently supports the following capabilities:\n\n* [x] GraphQL Schema\n* [x] GraphQL Queries\n* [x] Prometheus Metrics\n* [ ] Exposing Foreign-Key Information\n* [ ] Mutations\n* [ ] Subscriptions\n* [ ] Streaming Subscriptions\n\nNote: You can get detailed metadata about the agent's capabilities by\n`GET`ting the `/capabilities` endpoint of the running agent.\n\n## Requirements\n\n* NodeJS 16\n* \"Couchbase\": \"^3.2.4\" \n* Note: NPM is used for the [TS Types for the DC-API protocol](https://www.npmjs.com/package/@hasura/dc-api-types)\n* Copy `.env.example` to `.env` and define your values to environment vars\n\n## Options / Environment Variables\n\nNote: Boolean flags `{FLAG}` can be provided as `1`, `true`, `yes`, or omitted and default to `false`.\n\n| ENV Variable Name | Format | Default | Info |\n| --- | --- | --- | --- |\n| `PORT` | `INT` | `8100` | Port for agent to listen on. |\n| `PERMISSIVE_CORS` | `{FLAG}` | `false` | Allows all requests - Useful for testing with SwaggerUI. Turn off on production. |\n| `DEBUGGING_TAGS` | `{FLAG}` | `false` | Outputs xml style tags in query comments for deugging purposes. |\n| `LOG_LEVEL` | `fatal` \\| `error` \\| `info` \\| `debug` \\| `trace` \\| `silent` | `info` | The minimum log level to output |\n| `METRICS` | `{FLAG}` | `false` | Enables a `/metrics` prometheus metrics endpoint.\n\n## Agent usage\n\nThe agent is configured as per the configuration schema. The valid configuration properties are:\n\n| Property | Type | Default | Info |\n| -------- | ---- | ------- | ---------- |\n| `db`| `string` | | Connection string to couchbase cluster |\n| `username`| `string`| | User that will be used to connect with cluster|\n| `password`| `string`| |Password that will be used to connect with cluster|\n| `bucket` | `string` | | Bucket that will be used from DC Agent |\n| `scope` | `string` | `default` | Scope that will be used from DC Agent|\n| `collection` | `string` | `default` | Collection that will be used from DC Agent |\n| `healtCheckStrategy` | `string` | `null` | Strategic to check health of cluster `ping` or `diagnostic` |\n\nThe schema is exposed via introspection, but you can limit which documents are referenced by\n\n## Dataset\n\nThe dataset used for testing the couchbase agent is sample buckets\n- Travel-sample\n\n## [Get started with Couchbase agent](GETTING_STARTED.md)\n\n## Testing Changes to the Agent\n\nRun:\n\n```sh\ncabal run dc-api:test:tests-dc-api -- test --agent-base-url http://localhost:8100 --agent-config '{\"bucket\": \"travel-sample\", \"healtCheckStrategy\": \"ping\"}'\n```\n\nFrom the HGE repo.\n\n## TODO\n\n* [x] Prometheus metrics hosted at `/metrics`\n* [x] Pull reference types from a package rather than checked-in files\n* [x] Health Check\n* [x] DB Specific Health Checks\n* [x] Schema\n* [x] Capabilities\n* [x] Query\n\n\n# Known Bugs\n\n## Tricky Aggregates may have logic bug\n\nReplicate by running the agent test-suite.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcouchbaselabs%2Fhasura-connector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcouchbaselabs%2Fhasura-connector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcouchbaselabs%2Fhasura-connector/lists"}