fix/token-refresh-mutations
Mutations never triggered the token-refresh path — only query() set the _refreshUnauthorizedUser flag apollo.js's errorLink checks, so a 401 on a mutation silently dropped the change instead of retrying. handleRefreshToken also had a latent bug (.then(value => value.flatMap(...)) on a string access token), which would have thrown even for queries. Changes: - stores/helpers.js: mutate() now sets _refreshUnauthorizedUser like query() does. - boot/apollo.js: fix the flatMap bug; when the token refresh call itself fails, show a persistent, non-dismissible login overlay instead of navigating to /login (which would discard in-progress form state), then retry the exact same query/mutation after successful login. Dedup concurrent failures behind one shared overlay/promise. Add a loop guard so a retried operation that 401s again fails cleanly instead of retrying forever. mutateImpl no longer swallows errors into a fake success. - stores/Auth.js: dedupe concurrent refreshAccessToken() calls via an in-flight promise. - components/auth/LoginOverlayDialog.vue: new persistent login dialog used by the overlay fallback above. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Polétání.cz
Languages
Vue
73.4%
JavaScript
25.7%
HTML
0.4%
SCSS
0.2%
Dockerfile
0.2%
Other
0.1%