Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AmplifyGraphqlApi: latest release for creating a resolver not working (detailed below) #27514

Closed
weisisheng opened this issue Oct 12, 2023 · 6 comments
Labels
@aws-cdk/aws-amplify Related to AWS Amplify @aws-cdk/aws-appsync Related to AWS AppSync bug This issue is a bug. p2

Comments

@weisisheng
Copy link

Describe the bug

Example found here missing something--https://aws.amazon.com/blogs/mobile/announcing-aws-amplifys-graphql-api-cdk-construct-deploy-real-time-graphql-api-and-data-stack-on-aws/

version: 2.100.0

In the backend stack, amplifyApi.addResolver is not identifying the following:

"Code.fromAsset"

and

"FunctionRuntime"

Reviewing the docs, this seems to be a new feature.

Expected Behavior

Resolver is deployed correctly.

Current Behavior

IDE shows errors, "can not find foo" for the two items

Reproduction Steps

Work thru the example given on the blog.

Possible Solution

Need another module imported?

Additional Information/Context

Appreciate any tips, tricks...

CDK CLI Version

2.100.0

Framework Version

0.00.00

Node.js Version

v18.17.1

OS

Ubuntu 23.04

Language

TypeScript

Language Version

Node.js

Other information

N/A

@weisisheng weisisheng added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 12, 2023
@github-actions github-actions bot added the @aws-cdk/aws-appsync Related to AWS AppSync label Oct 12, 2023
@weisisheng weisisheng changed the title AmplifyGraphqlApi: latest release for creating a resolver (detailed below) AmplifyGraphqlApi: latest release for creating a resolver not working (detailed below) Oct 12, 2023
@AnilMaktala
Copy link

AnilMaktala commented Oct 12, 2023

Hey @weisisheng , 👋 thanks for raising this! I'm going to transfer this over to our API repository for better assistance 🙂.

Please follow aws-amplify/amplify-category-api#1947 issue for future updates.

@renebrandel
Copy link

@weisisheng - I'm updating the blog post to be more explicit. We depend on the aws-appsync package. So please include these import statements from AppSync:

import { Code, FunctionRuntime } from 'aws-cdk-lib/aws-appsync';

@renebrandel
Copy link

image

@renebrandel
Copy link

Updated the blog post with the comment above!

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@weisisheng
Copy link
Author

Well done. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-amplify Related to AWS Amplify @aws-cdk/aws-appsync Related to AWS AppSync bug This issue is a bug. p2
Projects
None yet
Development

No branches or pull requests

4 participants