如何查看RDS数据源的AWS AppSync请求/响应$ CTX对象?

发布于 2025-02-06 16:35:25 字数 52 浏览 3 评论 0 原文

我想在浏览请求和响应VTL映射之前和之后查看生成的$ CTX对象。是否可以?怎么办? 问候

I would like to see the generated $ctx object before and after it goes through the request and response vtl mappings. Is it possible? How to?
Regards

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

乖乖哒 2025-02-13 16:35:25

如果您使用的是AppSync控制台并且不想打开云手表,则可以使用 $ util.error(“调试”,“请求”,null,$ util.tojson($ ctx))>

If you are using the appsync console and do not want to open cloud watch, you can use $util.error("debug", "request", null, $util.toJson($ctx))

秋风の叶未落 2025-02-13 16:35:25

为此,我们可以使用

在请求和响应映射中,我们可以使用以下方式记录上下文
$ utils.log.info($ utils.tojson($ ctx))

To achieve this, we can use the appsync vtl utility helper.

Inside the request and response mappings, we can log the context using :
$utils.log.info($utils.toJson($ctx))

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文