diff --git a/CHANGELOG.md b/CHANGELOG.md index 49f5a88..fa2d92a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# Typescript (Deno) Connector Changelog +# TypeScript (Deno) Connector Changelog This changelog documents the changes between release versions. @@ -9,6 +9,20 @@ This changelog documents the changes between release versions. Changes to be included in the next upcoming release. +## v0.20 + +Improved support for running the connector in Watch mode, where it will auto-restart when changes +to the functions are made. + +* The Docker container is now compatible with watch mode and can be used for local development +* README documentation about watch mode updated to indicate the need to explicitly watch the functions + folder (ie `--watch=./functions`) +* `functions` configuration property is now required +* Type inference is now only done at connector startup, not every time the `/schema` endpoint is called +* Updated TypeScript SDK to v1.2.5 + +PR: https://github.com/hasura/ndc-typescript-deno/pull/79 + ## v0.19 Updating the TS SDK to 1.2.4 and fixing incorrectly required insert_schema field in mutations. diff --git a/README.md b/README.md index ba9cbb4..2660259 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,7 @@ local development will reward you with much more rapid feedback. In order to develop your functions locally the following is the recommended practice: * Have a `./functions/` directory in your project +* Create your functions in an `index.ts` file inside the `./functions/` directory * Create a development config for your connector in `./config.json`: ```json { @@ -155,6 +156,18 @@ deno run -A --watch=./functions --check https://deno.land/x/hasura_typescript_co * (Optionally) Add a test-suite for your functions. See [Deno Testing Basics](https://docs.deno.com/runtime/manual/basics/testing). +## Local Development of your Functions (Docker) +You can also perform local development with rapid feedback by using the Docker container instead +of `deno run`. You don't need a `config.json` in this case. + +* Have a `./functions/` directory in your project +* Create your functions in an `index.ts` file inside the `./functions/` directory +* Start the connector using Docker: +```bash +docker run -it --rm -v ./functions:/functions/src -p 8080:8080 -e WATCH=1 ghcr.io/hasura/ndc-typescript-deno:latest +``` + + ## Config Format The configuration object has the following properties: