src/indexer.ts:162-173 — on socket.onopen the client sends connection_init and then immediately, in the same tick, sends the subscribe message.
The graphql-transport-ws protocol requires the client to wait for the server's connection_ack before sending any subscribe. A spec-compliant server (graphql-ws, Hasura, Apollo Router, …) closes the socket with 4401/4408 when it receives subscribe first.
Impact
Subscriptions fail against compliant GraphQL servers; onclose then fires and the subscription is torn down (silently — see the companion issue). Only lenient servers work.
Suggested fix
Track handshake state: send subscribe only after receiving { type: 'connection_ack' }; queue the subscribe payload until then.
src/indexer.ts:162-173— onsocket.onopenthe client sendsconnection_initand then immediately, in the same tick, sends thesubscribemessage.The
graphql-transport-wsprotocol requires the client to wait for the server'sconnection_ackbefore sending anysubscribe. A spec-compliant server (graphql-ws, Hasura, Apollo Router, …) closes the socket with4401/4408when it receivessubscribefirst.Impact
Subscriptions fail against compliant GraphQL servers;
onclosethen fires and the subscription is torn down (silently — see the companion issue). Only lenient servers work.Suggested fix
Track handshake state: send
subscribeonly after receiving{ type: 'connection_ack' }; queue the subscribe payload until then.