Skip to content

Example for using AWS Amplify Graphql transformer without Amplify CLI

Notifications You must be signed in to change notification settings

alex-vladut/amplify-graphql-transformer

Repository files navigation

Welcome to your CDK TypeScript project!

This is a blank project for TypeScript development with CDK.

The cdk.json file tells the CDK Toolkit how to execute your app.

Useful commands

  • npm run build compile typescript to js
  • npm run watch watch for changes and compile
  • npm run test perform the jest unit tests
  • cdk deploy deploy this stack to your default AWS account/region
  • cdk diff compare deployed stack with current state
  • cdk synth emits the synthesized CloudFormation template

Error reproduction steps

Run:

cdk bootstrap
# or
cdk deploy

and the following error will be thrown

Error: Resource used in GetAtt expression with logical ID: 'UserTable' not found

The Cloudformation stacks generated by running npm run transform could be found under /lib/build. And inside the stack User, there is a User DynamoDB table which is defined like this:

    "UserTableBD4BF69E": {
      "Type": "AWS::DynamoDB::Table",
      ...

but then, the Outputs are referencing the resource like this by UserTable (but there is no such resource inside the Cloudformation template):

    "GetAttUserTableStreamArn": {
      "Description": "Your DynamoDB table StreamArn.",
      "Value": {
        "Fn::GetAtt": [
          "UserTable",
          "StreamArn"
        ]
      },
      "Export": {
        "Name": {
          "Fn::Join": [
            ":",
            [
              {
                "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId"
              },
              "GetAtt:UserTable:StreamArn"
            ]
          ]
        }
      }
    },

About

Example for using AWS Amplify Graphql transformer without Amplify CLI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published