Skip to content

Added an ability to add headers before writing GraphQL response. #371

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

Merged
merged 1 commit into from
Sep 18, 2021

Conversation

donbeave
Copy link
Contributor

Hello!

This PR adds a small but quite useful feature, it modifies the original GraphQLServletListener by adding an additional method void beforeFlush(HttpServletRequest request, HttpServletResponse response), which will be called right before the response will be written and flushed.

In our use-case it can be used to add headers like API rate limit or some temporal tokens generated after some GraphQL mutations were called together.

@oliemansm oliemansm merged commit 5c5f295 into graphql-java-kickstart:master Sep 18, 2021
@oliemansm oliemansm added this to the 12.0.0 milestone Sep 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants