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

feat(graphql-ruby-client): support graphql-ws and GraphiQL for Subscription over ActionCable #3708

Conversation

choznerol
Copy link
Contributor

@choznerol choznerol commented Nov 11, 2021

(Probably cloud help) close rmosolgo/graphiql-rails#90, #2658

graphql-ruby already has client side support for Apollo Subscription and Relay Subscription, but GraphiQL (thus graphiql-rails) seems to use graphql-ws under the hood therefore Subscription is not supported in /graphiql.

This draft PR aims to support graphql-ws client like Apollo Subscription and Relay Subscription did, hoping to make Subscription works for GraphiQL client.

Progress

  • javascript client interface
  • basic implementation
  • unit test
  • testing with with GraphiQL or graphql-ws

@choznerol choznerol force-pushed the feat/javascript-clients/support-graphql-ws-and-GraphiQL branch from 5b137b0 to cf22b40 Compare November 23, 2021 15:35
@choznerol choznerol force-pushed the feat/javascript-clients/support-graphql-ws-and-GraphiQL branch from cf22b40 to 85dd8a6 Compare November 24, 2021 02:09
@choznerol
Copy link
Contributor Author

Have been using browser extension Altair GraphQL Client, which supports many GraphQL Subscription transport protocols, including graphql-ws and Rails ActionCable.

While supporitng graphql-ws might still be valuable, since the primary goal for this PR was to be able to use GraphiQL (or any similar tool) for Subscription over ActionCable and there is an existing tool for this, I'll close this PR for now.

@choznerol choznerol closed this Dec 10, 2021
@bmulholland
Copy link

So graphql-ws support was never added? I'd like to use it

@rmosolgo
Copy link
Owner

rmosolgo commented Dec 8, 2023

It's been a while, but in case anyone still finds it helpful, graphql-ruby-client now includes a GraphiQL "fetcher" for using ActionCableSubscriptions: https://graphql-ruby.org/javascript_client/graphiql_subscriptions.html

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.

Support for subscriptions
3 participants