From cbbe583e4ad71d2b8dd16e6879ed377b1847389c Mon Sep 17 00:00:00 2001 From: Sean Park-Ross Date: Wed, 29 Nov 2023 13:12:49 +0700 Subject: [PATCH] Update documentation and features implemented --- docs/usage/index.md | 18 ++++++++ docs/usage/multi-region-routing.md | 72 ------------------------------ readme.md | 2 + 3 files changed, 20 insertions(+), 72 deletions(-) create mode 100644 docs/usage/index.md delete mode 100644 docs/usage/multi-region-routing.md diff --git a/docs/usage/index.md b/docs/usage/index.md new file mode 100644 index 000000000..a99cc689e --- /dev/null +++ b/docs/usage/index.md @@ -0,0 +1,18 @@ +# PostgreSQL NDC Usage + +This native data connector implements the following Hasura Data Domain Specification features: + +| Feature | | +|-------------------------------------------------------------------------------------------------------------------------------------|----| +| [Simple Queries](https://hasura.io/docs/3.0/graphql-api/queries/simple-queries/) | ✅ | +| [Nested Queries](https://hasura.io/docs/3.0/graphql-api/queries/nested-queries/) | ✅ | +| [Query Result Sorting](https://hasura.io/docs/3.0/graphql-api/queries/sorting/) | ✅ | +| [Query Result Pagination](https://hasura.io/docs/3.0/graphql-api/queries/pagination/) | ✅ | +| [Multiple Query Arguments](https://hasura.io/docs/3.0/graphql-api/queries/multiple-arguments/) | ✅ | +| [Multiple Queries in a Request](https://hasura.io/docs/3.0/graphql-api/queries/multiple-queries/) | ✅ | +| [Variables, Aliases, Fragments, Directives](https://hasura.io/docs/3.0/graphql-api/queries/variables-aliases-fragments-directives/) | ✅ | +| [Query Filter: Value Comparison](https://hasura.io/docs/3.0/graphql-api/queries/filters/comparison-operators/) | ✅ | +| [Query Filter: Boolean Expressions](https://hasura.io/docs/3.0/graphql-api/queries/filters/boolean-operators/) | ✅ | +| [Query Filter: Text](https://hasura.io/docs/3.0/graphql-api/queries/filters/text-search-operators/) | ✅ | +| [Query Filter: Nested Objects](https://hasura.io/docs/3.0/graphql-api/queries/filters/nested-objects/) | ✅ | +| [Multi-Region Routing](https://hasura.io/docs/3.0/graphql-api/queries/filters/nested-objects/) | ✅ | diff --git a/docs/usage/multi-region-routing.md b/docs/usage/multi-region-routing.md deleted file mode 100644 index 18f84e629..000000000 --- a/docs/usage/multi-region-routing.md +++ /dev/null @@ -1,72 +0,0 @@ -# Multi-Region Routing with the Native Data Connector for PostgreSQL - -Multi-Region Routing is easy with Hasura DDN using our -[Native Data Connector for PostgreSQL](/connectors/postgresql/index.mdx). With Multi-Region Routing, you can ensure -that the data is always fetched from the database closest to the user, thus minimizing the latency for the request. - -For Multi-Region Routing, you only need postgres databases deployed in (or near) more than one of the [supported -regions](#supported-regions). - -> :information_source: You must ensure that the schema for the different PostgresSQL databases are exactly same. If -> there is any ambiguity between the schemas, then the metadata build would fail. - -## Configuration - -For Multi-Region Routing, you would have to add configuration for each of the PostgresSQL databases in the metadata -object for -[`HasuraHubDataConnector`](https://hasura.io/docs/3.0/data-domain-modeling/introduction/#hasura-hub-data-connector). - -An example configuration is provided below: - -```yaml {7-8,26-27} -kind: HasuraHubDataConnector -version: v1 -definition: - name: db - connectorId: hasura/postgres - connectorConfiguration: - - region: gcp-europe-west1 - mode: ReadOnly - configuration: - version: 1 - metadata: &db-metadata - tables: - Album: - schemaName: public - tableName: Album - columns: - AlbumId: - name: AlbumId - type: integer - aggregateFunctions: - integer: {} - text: {} - connectionUri: - uri: - stringValueFromSecret: PG_EUROPE_URL - - region: gcp-us-east4 - mode: ReadWrite - configuration: - version: 1 - metadata: *db-metadata - aggregateFunctions: - integer: {} - text: {} - connectionUri: - uri: - stringValueFromSecret: PG_US_URL -``` - -For the above configuration, Hasura DDN will route all the write queries (mutations) to the database in the -`gcp-us-east4` region and the read queries (query and subscriptions) to either `gcp-us-east4` or `gcp-europe-west1` -based on the geolocation of the client. - -## Supported regions -Currently, Hasura DDN supports the following regions: -- `gcp-asia-south1` -- `gcp-asia-southeast1` -- `gcp-australia-southeast1` -- `gcp-europe-west1` -- `gcp-southamerica-east1` -- `gcp-us-east4` -- `gcp-us-west2` \ No newline at end of file diff --git a/readme.md b/readme.md index 0d0535b0d..8a16ebeb0 100644 --- a/readme.md +++ b/readme.md @@ -31,6 +31,8 @@ If you want to report a security issue, please [read this](./docs/security.md). ## Documentation +See which Hasura OpenDD Spec features are supported by the connector [here](./docs/usage/index.md). + View the full documentation for the connector [here](./docs/readme.md). ### Production