import type { ApiError } from './api/error'; export class QueryResult { /** Reactive data - `null` until the request succeeds */ data: Ref = ref(null); /** Reactive error - `null` until an error occurs */ error: Ref = ref(null); /** Whether the request is currently in flight */ loading: Ref = ref(false); /** Runs the query - Will be filled by the request helper */ run!: (requestBody?: PayloadT) => Promise; }