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

Add GraphQLWs subscription transport option for GraphiQL #1162

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Shane32
Copy link
Member

@Shane32 Shane32 commented Oct 31, 2024

This feature is necessary in case the user has disabled the subscription-transport-ws package/protocol, which is desirable if you need 'secure' keep-alive packet functionality.

@Shane32 Shane32 self-assigned this Oct 31, 2024
@Shane32
Copy link
Member Author

Shane32 commented Oct 31, 2024

@gao-artur What do you think? It currently loads both protocol implementations but only initializes the one its configured to use. I could make it only load the one it needs, but at that point maybe two different cshtml files would be better -- but that's more maintenance, and I'd prefer to just have a single cshtml file to manage. I found the js code somewhere, changed it quite a bit, modified it so that non-subscription requests will use the regular fetcher (which supports headers) and stuff. Everything seems to work like it should -- (actually it works better than before, since now the stop button works to unsubscribe).

@gao-artur
Copy link
Contributor

I'm sorry, but I'm a 100% C# backend rat, and I have zero knowledge of frontend and JS (I've been trying to avoid touching them my whole career).

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.

GraphiQL: Update subscriptions to support the newer graphql-transport-ws sub-protocol
2 participants