lacinia-pedestal
lacinia-pedestal copied to clipboard
Incompatibility with GraphQL clients for subscriptions
Most GraphQL client libraries have moved on from using the subscriptions-transport-ws
(which is no longer maintained) implementation in favour of graphql-ws
for subscriptions.
This causes compatibility issues, as in our case, we are trying to use the ApolloGraphQL client and lacinia-pedestal server and are unable to do so.
To enhance compatibility with client libraries, it would be great to move to the newer graphql-ws
implementation.
Was this fixed by #124 ?
@hlship
Probably not.
To fix this issue, the lacinia-pedestal
server must support the graphql-transport-ws
protocol.
specified by: https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md
Currently, lacinia-pedestal
supports the older graphql-ws
protocol.
specified by: https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md
(The naming of the library and protocol does not match, which is confusing)
I suspect It is needed to change the implementation of subscriptions / connection-loop
to handle requests for new protocols as well. Also, for backward compatibility, I think it is better to keep the support of the old protocol.
https://github.com/walmartlabs/lacinia-pedestal/blob/master/src/com/walmartlabs/lacinia/pedestal/subscriptions.clj#L105
So I think this was fixed by #126, right?
Oh, right, #126 isn't merged yet.