Skip to content
This repository has been archived by the owner on Aug 27, 2020. It is now read-only.

graphyne-ws: Deviation from 'GraphQL over WebSocket Protocol' #148

Open
hoangvvo opened this issue Jul 16, 2020 · 0 comments
Open

graphyne-ws: Deviation from 'GraphQL over WebSocket Protocol' #148

hoangvvo opened this issue Jul 16, 2020 · 0 comments

Comments

@hoangvvo
Copy link
Owner

Even though, it is said that graphyne-ws follows GraphQL over WebSocket Protocol, we have several differences:

GQL_ERROR

Server sends this message upon a failing operation, before the GraphQL execution, usually due to GraphQL validation errors (resolver errors are part of GQL_DATA message, and will be added as errors array)

graphyne-ws sends this as GQL_DATA instead of GQL_ERROR. However, weird enough, even subscriptions-transports-ws implementation does the same: https://github.com/apollographql/subscriptions-transport-ws/blob/master/src/server.ts#L350-L354 -- and does not follow the section of the protocol either.

I will need to look into some GraphQL client implementation to see how it handles GQL_ERROR.

The only times graphyne-ws sends GQL_ERROR are:

  • No query string provided
  • Malformed message
  • Internal, non GraphQL error

This issue will be updated if there is any additional deviations.

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

1 participant