question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add request to context for graphql subscriptions

See original GitHub issue

GraphQL queries and mutations are provided { request, response } to create a context based on the request. Unfortunately subscriptions are only provided { connection } despite webSocket being available in scope.

So either provide webSocket too or provide the request from webSocket.upgradeReq

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:11

github_iconTop GitHub Comments

2reactions
joealdencommented, Nov 23, 2018

This issue should be kept open, I don’t understand why stale bot closes issues ‘if no further activity occurs’. This is is still a feature that I think would be a worthy addition to graphql-yoga, but no maintainer has responded to this issue yet. Why should it be closed if it is still an issue?

1reaction
tpetrycommented, Feb 17, 2019

Will probably not happen unless you know one of the core contributors. There have been multiple releases (even major) since my pull request. And the requested change is a single line, it’s a adding a parameter and fully backwards compatible…

So it’s simply no one with rights to merge is interested in it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Subscriptions in Apollo Server - Apollo GraphQL Docs
For subscriptions, you can extract information from a client's request by adding options to the first argument passed to the useServer function. For...
Read more >
How to set context for subscriptions? · Issue #76 - GitHub
Currently, I have something like this setup for standard graphql requests. router.post('/graphql', graphqlKoa({ schema, formatParams(params) ...
Read more >
Apollo GraphQL server; setting context to handle requests ...
I guess you are using the package subscription-transport-ws . In that case it is possible to add a context value in different execution ......
Read more >
How GraphQL Subscriptions Work - Dgraph
Learn how GraphQL Subscriptions work with an example using Dgraph, NextJS, and Apollo Client.
Read more >
GraphQL subscriptions with Node.js and Express
Or how Google Maps updates your location in real time? The answer to these and many other mysteries is GraphQL subscriptions. GraphQL ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found