AWS AppSync adds support for custom response headers
Categories: AWS(Amazon Web Services)
AWS AppSync adds support for custom response headers
AWS AppSync is a fully managed service that makes it easy to develop and manage GraphQL and Real-time APIs, making it easy to securely access, manipulate, and combine data from one or more data sources via a single API endpoint.
Now AppSync supports configuring custom HTTP headers in responses to GraphQL operations. With the new feature, it is now possible to define directly in AppSync additional headers sent to clients upon a response to an API call. For instance, if there is a security requirement for a specific header to be present in the HTTP response, the GraphQL operation can be configured in AppSync to generate it.
AWS AppSync provides a set of built-in utility helpers that can be leveraged within a GraphQL resolver to simplify interactions with data sources or clients. You can now use the new resolver utility $util. HTTP.add response headers() to configure additional headers in the response for a GraphQL API operation.
This feature is available in all AWS Regions where AppSync is available. For more details on the new VTL utility helper to customize HTTP response headers, refer to the Resolver Mapping Template Utility Reference AppSync documentation.