Skip to content

Subscription field is missing #844

@LarsKrogJensen

Description

@LarsKrogJensen

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
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).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions