-
Notifications
You must be signed in to change notification settings - Fork 63
Closed
Labels
scope/schema-contextscope/serverRelated to the server componentRelated to the server componenttype/featAdd a new capability or enhance an existing oneAdd a new capability or enhance an existing one
Description
What
- Currently, we cannot set up the
express
server so that we can access theresponse
from inside of resolvers.
Why
- It's important to support this so that users can do things like -- in my current use case -- access the
cookie
on the response inside of resolvers, which could be important for a lot of basic authentication setups, for example with Jason Web Tokens as I am doing.
How
- We should add support so that we can pass the response as a second parameter in
schema.addToContext
along with therequest
, with an implementation that would look something like:
schema.addToContext((request, response) => ({
request,
response,
}))
robertcoopercode, nvsd, mikkah, beeplin, ChiefORZ and 2 more
Metadata
Metadata
Assignees
Labels
scope/schema-contextscope/serverRelated to the server componentRelated to the server componenttype/featAdd a new capability or enhance an existing oneAdd a new capability or enhance an existing one