Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Inconsistency between implementation / README #62

Closed
timsuchanek opened this issue Jan 27, 2017 · 1 comment
Closed

Inconsistency between implementation / README #62

timsuchanek opened this issue Jan 27, 2017 · 1 comment

Comments

@timsuchanek
Copy link
Contributor

timsuchanek commented Jan 27, 2017

For the SUBSCRIPTION_FAIL event, the README says the following:

  • errors: Array<Object> : array of errors attributed to the subscription failing on the server
  • id: string : subscription ID of the subscription that failed on the server

So I assume, that the message should look like this:

{
  errors: [...],
  id: '...'
}

But the client implementation apparently wants this:

{
  payload: {
    errors: [...],
  },
  id: '...'
}

https://github.com/apollostack/subscriptions-transport-ws/blob/master/src/client.ts#L224

So which way do we want to do it? With or without payload?
Because our backend implementation now implements the first version like specified in the README and I'm wondering why subscriptions-transport-ws is throwing errors.

@NeoPhi
Copy link
Contributor

NeoPhi commented Jan 28, 2017

This is an error in the documentation. All messages from the server should be in the form {type, id, payload}. If you want to put together a PR, I'd be happy to review it.

timsuchanek added a commit to timsuchanek/subscriptions-transport-ws that referenced this issue Jan 28, 2017
@DxCx DxCx closed this as completed Jan 29, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants