Skip to content
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

Merged

Conversation

dthyresson
Copy link
Contributor

@dthyresson dthyresson commented Jun 6, 2023

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.

@Josh-Walker-GM
Copy link
Collaborator

@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?

Copy link
Contributor Author

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

@dthyresson dthyresson added the release:feature This PR introduces a new feature label Jun 7, 2023
@dthyresson dthyresson marked this pull request as ready for review June 8, 2023 18:12
@dthyresson dthyresson changed the title DRAFT: WIP Support Auth in Fastify GraphQL Server by mimicking Lambda Events and Context feature: Support Auth in Fastify GraphQL Server by mimicking Lambda Events and Context Jun 8, 2023
Copy link
Collaborator

@Josh-Walker-GM Josh-Walker-GM left a 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.

@dthyresson dthyresson enabled auto-merge (squash) June 8, 2023 18:18
@dthyresson dthyresson merged commit f5c139d into redwoodjs:main Jun 8, 2023
25 checks passed
@redwoodjs-bot redwoodjs-bot bot added this to the next-release milestone Jun 8, 2023
@jtoar jtoar modified the milestones: next-release, v6.0.0 Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:feature This PR introduces a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants