You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the browser fails to connect to the websocket semi-randomly. This happens almost always on firefox and sometimes on chrome. The WS connection shows up in the Network tab devtools but no messages are exchanged. This might not be a Graphql-ruby bug but I thought I'd mention it. I am still trying to figure this one out
ActionCable internally logs a cryptic error
Issue 2 I think is most likely a bug in graphql-ruby
The error message is: [GraphqlChannel] Unable to process GraphqlChannel#send({"variables"=>{"userId"=>nil}, "operationName"=>"useWorkspaceLoader_Subscription", - I cut off the rest which isn't important
I think the issue is that the graphql client will try to perform a "send" operation but the channel on the ruby code only has a handler for the "execute" operation, see here:
I've worked up a patch to remove that call here: #4793
If you add a dummy def send(_data); end in your ActionCable channel, does that make the error go away? (I think that would make the perform("send", ...) call "work"....)
Describe the bug
There's two issues:
Issue 2 I think is most likely a bug in graphql-ruby
The error message is:
[GraphqlChannel] Unable to process GraphqlChannel#send({"variables"=>{"userId"=>nil}, "operationName"=>"useWorkspaceLoader_Subscription",
- I cut off the rest which isn't importantI traced it here in the rails source code: https://github.com/rails/rails/blob/21eceb7db26b724d1f7a824d4cc04ddeba44244b/actioncable/lib/action_cable/channel/base.rb#L176
I think the issue is that the graphql client will try to perform a "send" operation but the channel on the ruby code only has a handler for the "execute" operation, see here:
graphql-ruby/javascript_client/src/subscriptions/createActionCableHandler.ts
Lines 47 to 48 in 85e7117
Versions
graphql
version: 2.2.4rails
(or other framework): 7.1GraphQL schema
I don't think it's relevant
GraphQL query
I don't think it's relevant
Steps to reproduce
Setting up a project with Relay on the frontend and ActionCable on the backend and trying to run subscriptions
Expected behavior
Subscriptions work fine
Actual behavior
I can't get them to actually work even though there is no exception with stack trace anywhere
Additional context
The project is a Next.js app using the "pages" folder for setting up routes
The text was updated successfully, but these errors were encountered: