uniiverse / apollo-tracing-ruby

[Maintainers Wanted] Ruby implementation of GraphQL trace data in the Apollo Tracing format
MIT License
85 stars 10 forks source link

Subscriptions: undefined method `[]' for nil:NilClass #10

Closed dpaola2 closed 6 years ago

dpaola2 commented 6 years ago

Hello!

Using the graphql-ruby gem and subscriptions. When a subscription response is empty, the Apollo library seems to assume a response, when there is no such response. So an exception is thrown.

Specifically, this line seems to be the culprit.

See https://github.com/rmosolgo/graphql-ruby/issues/1362 for original discussion.

exAspArk commented 6 years ago

I'm closing the issue since it was fixed in v1.7.14 https://github.com/rmosolgo/graphql-ruby/pull/1382. In case of exceptions, graphql-ruby will set the result value to {} instead of nil.