diff --git a/.github/execute-localstack-test.sh b/.github/execute-localstack-test.sh old mode 100644 new mode 100755 index ad9b29e..51647c0 --- a/.github/execute-localstack-test.sh +++ b/.github/execute-localstack-test.sh @@ -23,7 +23,7 @@ export TEST_URL=$(jq -r .CdkStack.GraphQLURL outputs.json) export TEST_API_KEY=$(jq -r .CdkStack.ApiKey outputs.json) log "Accessing URL ${TEST_URL} with api key ${TEST_API_KEY}" -curl \ +RESULT=$(curl \ --connect-timeout 30 \ --retry 10 \ --retry-delay 6 \ @@ -33,5 +33,10 @@ curl \ -H "Content-Type:application/json" \ $TEST_URL \ -d '{"query": "query { foo }"}' - +) +foo=$(jq .data.foo <<< "$RESULT") +errors=$(jq .errors <<< "$RESULT") +if [[ "$errors" != "null" || "$foo" != '"my-string"' ]]; then + exit 1 +fi ) diff --git a/README.md b/README.md index 661d580..75157ae 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ This package provides an implementation for the `@aws-appsync/utils` package that is available on AWS. +## Changelog: + +- v0.1.0: first pinned version of the library + > [!TIP] > To ensure you are using the latest version of this package with LocalStack, start LocalStack with the environment variable > diff --git a/package.json b/package.json index 53ee968..0145103 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,11 @@ "description": "Implementation of the AppSync utils helpers", "type": "module", "main": "index.js", + "exports": { + ".": "./index.js", + "./rds": "./rds/index.js", + "./dynamodb": "./dynamodb/index.js" + }, "scripts": { "test:aws": "NODE_OPTIONS=\"--experimental-vm-modules\" TEST_TARGET=AWS_CLOUD jest -u", "test": "NODE_OPTIONS=\"--experimental-vm-modules\" jest --ci",