-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feature: Support Auth in Fastify GraphQL Server by mimicking Lambda Events and Context #8533
feature: Support Auth in Fastify GraphQL Server by mimicking Lambda Events and Context #8533
Conversation
@dthyresson We've seen that this approach works and is a good solution until we do a bigger non-lambda focused rewrite - if we ever do. Is the plan to merge this in as it stands and then have a separate PR to look into updating how we handle the global context? |
Josh Walker am currently doing some refactoring … realized I can reuse much of what is in the fastify/lambda functions already to reshape the request into the event |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally works to prevent auth issues. We'll discuss as team as to how we'll move forward more generally with this context issue.
See if GraphQL authentication works with a simulated Lambda event and context in Fastify GraphQL Server
Important:
Need to set
DISABLE_CONTEXT_ISOLATION = 1
in envars to get Auth to work so that global context is populated correctly.