cylc-uiserver icon indicating copy to clipboard operation
cylc-uiserver copied to clipboard

GraphQL queries fail after disconnection from network

Open MetRonnie opened this issue 7 months ago • 1 comments

Description

After a network disconnect and reconnect, any GraphQL mutations or queries fail with

403 : Forbidden

XSRF cookie does not match POST argument

However, subscriptions continue to work.

Reproducible Example

Open a workflow in the GUI, turn off WiFi and turn it back on, then wait for the red offline banner to disappear and try e.g. opening the log view for a task. The LogFiles query will fail.

MetRonnie avatar Jul 24 '25 13:07 MetRonnie

We are currently issuing GraphQL queries via HTTPs but mutations via websockets.

There is some advice in the Apollo docs to do it this way, but I think that advise is bunk if you have a long-lived websocket that is always open.

I think it would make sense to send GraphQL queries down websockets. This would at least reduce the variability, either nothing works or everything works. Websockets have better tested retry and disconnect logic.

oliver-sanders avatar Jul 24 '25 15:07 oliver-sanders