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

Use the real Request object in subscriptions #896

Merged
merged 2 commits into from
Oct 24, 2022

Conversation

mcollina
Copy link
Collaborator

Signed-off-by: Matteo Collina hello@matteocollina.com

This PR does a few things:

  1. uses the real Request object in the subscription Context. Reply is still "faked" as there is no Reply for websockets.
  2. copies over all the data incoming as part of connection_init packet to req.headers. If there is a headers object that's used instead (as it was before). This change was needed because GraphiQL treats all the payload as headers.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
Copy link
Contributor

@jonnydgreen jonnydgreen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - reckon we should add the details/behaviour in the PR description to the docs for future reference?

Signed-off-by: Matteo Collina <hello@matteocollina.com>
@mcollina
Copy link
Collaborator Author

Docs added.

@mcollina mcollina merged commit 2cfa5e5 into master Oct 24, 2022
@mcollina mcollina deleted the use-full-request-object-for-subs branch November 4, 2022 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants