Closed FX-HAO closed 5 years ago
I've not personally checked it with graphql-ruby 1.9.x yet, so it may be a version incompatibility.
Thank you for reporting I will check it in one of the following days.
I took a deeper look and found what the problem was. https://github.com/rmosolgo/graphql-ruby/blob/bcf0eb1c7a51dad6957460c80b5d32291ef1b9b7/lib/graphql/subscriptions.rb#L90
def execute(subscription_id, event, object)
# Lookup the saved data for this subscription
query_data = read_subscription(subscription_id)
# Fetch the required keys from the saved data
query_string = query_data.fetch(:query_string)
variables = query_data.fetch(:variables)
context = query_data.fetch(:context)
operation_name = query_data.fetch(:operation_name) # this should be `nil` instead of `""`
It seems like hmset sets a nil and hmget gets an empty string. I'll fix it.
When I tried to trigger an event, my client kept getting
{"errors":[{"message":"No operation named \"\""}]}
.My code:
The backtrace:
but I'm not sure if it's the bug of
graphql-ruby
or this gem.graphql
version is 1.9.6.