Is it possible to access the lambda event (headers, etc.) inside resolvers? Can't see an obvious way.
I agree, this should certainly be possible. Probably by exposing it on the context object?
I've read through the source code and it looks like a function passed in as the context has access to the event. The following sets the APIGatewayEvent as context.
const context = ({ event }) => event
const lambda = new GraphQLServerLambda({ context, typeDefs, resolvers })
Maybe this is more of a documentation or defaults issue.
Due to inactivity of this issue we have marked it stale. It will be closed if no further activity occurs.
Hey :wave:, It seems like this issue has been inactive for some time. In need for maintaining clear overview of the issues concerning the latest version of graphql-yoga we'll close it.
Feel free to reopen it at any time if you believe we should futher discuss its content. :slightly_smiling_face:
Most helpful comment
I've read through the source code and it looks like a function passed in as the context has access to the event. The following sets the
APIGatewayEventas context.Maybe this is more of a documentation or defaults issue.