-
Notifications
You must be signed in to change notification settings - Fork 4k
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
(aws_appsync): Unable to reference external SourceApis in Defintions.fromSourceApis() #27098
Comments
Yes, as far as I can tell this should be able to seamlessly accept an aws-cdk/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts Lines 704 to 730 in ae455d8
|
The PR #27121 I have in progress should partly address this as it would allow you to create the SourceApiAssociation as a standalone construct for the cases when the source api or merged api is not in the same stack as long as you have the identifier (api id for same account / ARN for cross account use case ) |
This was fixed by #27121. If this does not address your issue, ping me on this thread. |
|
Describe the bug
I believe this is simply a typo in the creation of the reference type
SourceApi
. The issue is thatSourceApi.sourceApi
is of aGraphqlApi
type. This requires that the source API be created in the stack. This should instead be aIGraphqlApi
type so that the results of a lookup usingGraphqlApi.fromGraphqlApiAttributes
Expected Behavior
The following Typescript code compiles:
Current Behavior
The code fails to compile reporting the following error
Reproduction Steps
After
cdk init app --language typescript
replace the contents of./lib/<name>-stack.ts
with the above code. The compiler should report the errorPossible Solution
Change the type of
SourceApi.sourceApi
to IGraphqlApiAdditional Information/Context
No response
CDK CLI Version
2.94.0 (build 987c329)
Framework Version
2.95.1
Node.js Version
v18.7.0
OS
MacOs
Language
Typescript
Language Version
3.9.7
Other information
No response
The text was updated successfully, but these errors were encountered: