From 161771615ca8310f01e825b1e579a5274fe89f61 Mon Sep 17 00:00:00 2001 From: Lyndon Maydwell Date: Sat, 16 Sep 2023 15:42:16 +1000 Subject: [PATCH 1/3] Updating Typescript-Deno Readme for Hub Listing --- registry/typescript-deno/README.md | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/registry/typescript-deno/README.md b/registry/typescript-deno/README.md index bc77fd39..6d7697c2 100644 --- a/registry/typescript-deno/README.md +++ b/registry/typescript-deno/README.md @@ -2,7 +2,7 @@ The Typescript (Deno) Connector allows a running connector to be inferred from a Typescript file (optionally with dependencies) and interpreted by [Deno](https://deno.com). -https://github.com/hasura/ndc-typescript-deno/tree/main#ndc-typescript-deno +[github.com/hasura/ndc-typescript-deno](https://github.com/hasura/ndc-typescript-deno/tree/main#ndc-typescript-deno) The connector runs in the following manner: @@ -35,6 +35,11 @@ export function make_password_hash(pw: string): string { } ``` +* JSDoc comments and tags are exposed in the schema +* Async, and normal functions are both supported +* Functions tagged with `@pure` annotations are exposed as functions +* Those without `@pure` annotations are exposed as procedures + ## Deployment You will need: @@ -54,21 +59,24 @@ typescript file as mounted with the `--volume` flag. Create the connector: -> hasura3 connector create my-cool-connector:v1 \\ -> --github-repo-url https://github.com/hasura/ndc-typescript-deno/tree/main \\ -> --config-file config.json \\ -> --volume ./functions:/functions \\ -> --env SERVICE_TOKEN_SECRET=MY-SERVICE-TOKEN +``` +hasura3 connector create my-cool-connector:v1 \ + --github-repo-url https://github.com/hasura/ndc-typescript-deno/tree/main \ + --config-file config.json \ + --volume ./functions:/functions \ + --env SERVICE_TOKEN_SECRET=MY-SERVICE-TOKEN +``` Monitor the deployment status by name: -> hasura connector status my-cool-connector:v1 +``` +hasura connector status my-cool-connector:v1 +``` List your connector with its deployed URL: -> hasura connector list - ``` +hasura connector list my-cool-connector:v1 https://connector-9XXX7-hyc5v23h6a-ue.a.run.app active ``` @@ -90,5 +98,5 @@ Include the connector URL in your Hasura V3 project metadata: ## Troubleshooting -Please [https://github.com/hasura/ndc-typescript-deno/issues/new](submit a Github issue) +Please [submit a Github issue](https://github.com/hasura/ndc-typescript-deno/issues/new) if you encounter any problems! From a50c48e2318973815f5149abd1798214dc3deb23 Mon Sep 17 00:00:00 2001 From: Lyndon Maydwell Date: Sat, 16 Sep 2023 15:43:37 +1000 Subject: [PATCH 2/3] no json format block --- registry/typescript-deno/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/typescript-deno/README.md b/registry/typescript-deno/README.md index 6d7697c2..49a5a98a 100644 --- a/registry/typescript-deno/README.md +++ b/registry/typescript-deno/README.md @@ -84,7 +84,7 @@ my-cool-connector:v1 https://connector-9XXX7-hyc5v23h6a-ue.a.run.app active Include the connector URL in your Hasura V3 project metadata: -```json +``` [ { "kind": "dataSource", From 5fc847b422caf6714afe5edda1acfc9d4b95cfc5 Mon Sep 17 00:00:00 2001 From: Lyndon Maydwell Date: Sat, 16 Sep 2023 15:49:57 +1000 Subject: [PATCH 3/3] https://github.com/hasura/ndc-sendgrid-deno example link --- registry/typescript-deno/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/registry/typescript-deno/README.md b/registry/typescript-deno/README.md index 49a5a98a..e192ca47 100644 --- a/registry/typescript-deno/README.md +++ b/registry/typescript-deno/README.md @@ -80,6 +80,9 @@ hasura connector list my-cool-connector:v1 https://connector-9XXX7-hyc5v23h6a-ue.a.run.app active ``` +See [the Typescript Deno SendGrid repository](https://github.com/hasura/ndc-sendgrid-deno) +for an example of what a project structure that uses a connector could look like. + ## Usage Include the connector URL in your Hasura V3 project metadata: