Skip to content

Navigation Menu

Sign in
Sign up

Response Headers #1002

hjanuschka started this conversation in General
Apr 19, 2022 · 1 comments · 1 reply
Discussion options

Q A
Bug report? no
Feature request? no
BC Break report? no
RFC? no
Version/Branch master

we'd like to add custom response headers to the graphql requests.
like - from the resolver, depending on the query/model

is there any way, or already a sample, on how to add headers to the $response, from within a QueryInterface?

You must be logged in to vote

Replies: 1 comment 1 reply

Comment options

Using the kernel.response event does not answer to your needs?

You must be logged in to vote
1 reply
Comment options

i could add headers there. BUT i need different ones depending on queries/resolvers involved.

my resolver implements QueryInterface, AliasedInterface - and on resolve i kind of like to modify the response object.
not sure, where to stick the information, to later on use it in kernel.response - you have any idea?

it would also work if i could do that on Query level instead of resolver level - but same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Converted from issue

This discussion was converted from issue #1000 on April 26, 2022 15:05.

AltStyle によって変換されたページ (->オリジナル) /