amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

Injecting custom variables into appsync resolver templates

Open Jkap7788 opened this issue 7 years ago • 2 comments

Is your feature request related to a problem? Please describe. Hi,

I would like to create custom http resolvers which invoke aws services directly (e.g step functions). However as part of the http request, I need to supply resource ARNs. This becomes difficult when the resource names include the name of the environment as we then need to hard-code the name of the resource and alter it depending on the environment.

Describe the solution you'd like I would like to be able to inject env variables into resolver templates to better support differences in environments as well as avoid hard coding resource names.

Describe alternatives you've considered Instead of writing code in separate request/response template files, include the code directly with the cloudformation appsync::resolver resource. Then use the cloudformation !sub function to inject the resource name.

Jkap7788 avatar Dec 01 '19 10:12 Jkap7788

@Jkap7788 There is a PR out for this - #2553 and this feature request is a duplicate of #2092 Closing this as a duplicate.

kaustavghosh06 avatar Dec 10 '19 22:12 kaustavghosh06

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

github-actions[bot] avatar May 26 '21 20:05 github-actions[bot]