import { createServerFn } from '@tanstack/start'; // Define a server function export const getServerTime = createServerFn() .handler(async () => { await new Promise((resolve) => setTimeout(resolve, 1000)); // Simulate delay return new Date().toISOString(); // Return c...
eclipse-apoapsis-bot force-pushed the renovate-action/tanstack-query-monorepo branch from 6ab400d to 6c1e832 Compare February 3, 2025 08:36 deps: update tanstack-query monorepo to v5.66.0 2e053e3 eclipse-apoapsis-bot force-pushed the renovate-action/tanstack-query-monorepo branch from 6c1e...
14 - export declare function init(options: Options | clientSdk.BrowserOptions | serverSdk.NodeOptions): Client | undefined; 15 - 16 - export declare const linkedErrorsIntegration: typeof clientSdk.linkedErrorsIntegration; 17 - export declare const contextLinesIntegration: typeof clientSdk.contex...
First, install the json-server package globally: npm install -g json-server # --- or --- yarn global add json-server Next, add the following content to a new file named db.json: { "products": [ { "id": 1, "name": "ProX Watch", "price": 20 }, { "id": 2, "name": ...
import { createServerFn } from '@tanstack/start'; // Define a server function export const getServerTime = createServerFn() .handler(async () => { await new Promise((resolve) => setTimeout(resolve, 1000)); // Simulate delay return new Date().toISOString(); // Return...
import { createServerFn } from '@tanstack/start'; // Define a server function export const getServerTime = createServerFn() .handler(async () => { await new Promise((resolve) => setTimeout(resolve, 1000)); // Simulate delay return new Date().toISOString(); // Return current...
In most cases, I need to retry the request, while for certain server errors I need to stop and perform an action (plus report to the user). A workaround would be to handle the errors in the retry(failureCount, error) callback, but that would be misuse. IMHO, side effects should ...