Trying to use the new subscription feature, but it seems that the enclosing subscription field is missing from the responses. Example query: ` subscription NewMessages { newMessage(roomId: 123) { sender text } } ` Expected is a stream of: ` { "newMessage": { "sender": ".....", "text": "...." } } ` But 'newMessage' is missing from the stream of updates, only receives a flat map with sender and text. This is a least what I was expecting, could be wrong. Played with an apollo base demo at [WorldChat]( https://demo.graph.cool/worldchat) where a request looks like: ` { subscription { Location(filter: {mutation_in: [CREATED, UPDATED]}) { mutation ... more } } } ` and responses look like: ` { "Location": { "mutation":"UPDATED", ... more } } ` Please note that the websocket messages is enclosed in the apollo framing protocol: https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md Is this a bug, or is there some way to get hold of the 'newMessage' field (could be aliased as well).
Activity
bbakerman commentedon Nov 28, 2017
Re-reading the spec more closely I can confirm this is a bug
Add root field to subscription results
Add root field to subscription results
bbakerman commentedon Dec 5, 2017
Now fixed
LarsKrogJensen commentedon Dec 6, 2017
Nice, but the solution ignores a potential alias field. Should I open a new issue?