【问题标题】:How to enable compression for GraphQL API responses in AWS Appsync如何在 AWS Appsync 中为 GraphQL API 响应启用压缩
【发布时间】:2022-12-08 07:14:54
【问题描述】:

我已经在 AWS Appsync 中部署了一个 GraphQL API。

我观察到我得到的 API 响应 (JSON) 没有被压缩,压缩响应会降低延迟时间。

根据AWS Docs

要启用压缩,客户端必须发送值为 gzip 或 br 的 Accept-Encoding 标头,但即使我发送了指定的标头,我也得到了未压缩的数据,这导致延迟延迟。

解决这个问题的任何解决方法?

【问题讨论】:

    标签: amazon-web-services api aws-lambda graphql aws-appsync


    【解决方案1】:

    这似乎是一个已知问题: https://github.com/aws/aws-appsync-community/issues/15

    唯一已知的解决方法似乎是为 Appsync 设置 CloudFormation,您可以在其中启用压缩

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-12
      • 2020-08-20
      • 1970-01-01
      • 2020-09-10
      • 2022-06-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多