We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a global config so devs can write options like retry overrides once rather than on every query.
Some prototyping
export interface GlobalQueryOptions { readonly debounce?: number; readonly retry?: number | ((attempt: number, error: any) => boolean); readonly retryDelay?: (attempt: number) => number; } export interface GlobalOptions { readonly query: GlobalQueryOptions; } export const config = (c: GlobalOptions) => { /* ... */ }; import {config} from "leo-query"; config({ query: { debounce: 1000, retry: (attempt: number, error: any) => { if (error instanceof Response && error.status === 401) { return false; } if (error && error.status === 401) { return false; } return attempt < 5; } } });
The text was updated successfully, but these errors were encountered:
TODO - going to add documentation about the global config in a future task
Sorry, something went wrong.
No branches or pull requests
Summary
Add a global config so devs can write options like retry overrides once rather than on every query.
Acceptance Criteria
Notes
Some prototyping
The text was updated successfully, but these errors were encountered: