'data' vs. 'next' - The spec and this library conflicts with apollographql/subscriptions-transport-ws and most clients #288
-
I'm doing some work routing the GraphQL subscriptions for my app through AWS API Gateway and I needed to refer to the graphql-ws spec. Unfortunately it seems this isn't well standardized and the spec in this repo was the closest thing I could find to an official spec. To make matters worse, one of the core operations differs between this library and the Apollo Client + Server libraries. Apollo iOS Client: Both the Apollo server and their clients use the operation type 'data' instead of 'next' when the server pushes GraphQL results to the client, and they don't recognize the 'next' event at all. I'm not actually using this library, but I wanted to flag this discrepancy for you. If someone was to use this library with any of Apollo's client libraries, it likely wouldn't work. It might be worth adding a note about this discrepancy to the spec, too. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The GraphQL over WebSocket protocol this library uses is different from the protocol See also #154 (comment). Additionally, if you are interested in using this protocol in AWS environment, I'd recommend checking: |
Beta Was this translation helpful? Give feedback.
The GraphQL over WebSocket protocol this library uses is different from the protocol
subscriptions-transport-ws
uses. Is also stated in the readme disclaimer.See also #154 (comment).
Additionally, if you are interested in using this protocol in AWS environment, I'd recommend checking:
subscriptionless
graphql-lambda-subscriptions