With GraphQL Ruby it possible to have a GraphQL subscription also return resolves when subscribing? For example:
module Types
class SampleType < GraphQL::Schema::Object
field :greeting, String, null: false
def greeting
'Howdy!'
end
end
end
class SampleSchema < GraphQL::Schema
subscription Types::SampleType
query Types::SampleType
end
SampleSchema.execute('subscription greeting { greeting }')['data'] # nil - but want the same as query
SampleSchema.execute('query greeting { greeting }')['data'] # { greeting: 'Howdy!' }
Note: have found this Subscription Type documents that specify the return value of the resolver is not used for data (only authorization).