Open tintin10q opened 9 months ago
You also have to add it here:
export type SubscriptionToGraphQL<Z, T, SCLR extends ScalarDefinition> = {
complete: () => void;
ws: WebSocket;
on: (fn: (args: InputType<T, Z, SCLR>) => void) => void;
off: (
fn: (e: {
data?: InputType<T, Z, SCLR>;
code?: number;
reason?: string;
message?: string;
}) => void,
) => void;
error: (fn: (e: { data?: InputType<T, Z, SCLR>; errors?: string[] }) => void) => void;
open: () => void;
};
Instead of creating a new connection I would like to just resubscribe instead. graphql-ws allows you to complete queries by sending a complete message. This can easily be done by calling the function that is returned when you call client.subscribe.
It would be great if this functionality is exposed. All that would be needed is to go from this:
to: