Skip to content
New issue

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

[Feature Request] Add a delay to hook #1970

Open
Tsimopak opened this issue Jan 22, 2025 · 1 comment
Open

[Feature Request] Add a delay to hook #1970

Tsimopak opened this issue Jan 22, 2025 · 1 comment

Comments

@Tsimopak
Copy link

Motivation: sometimes need to debug what happens in case of a race between different requests.

@ymc9
Copy link
Member

ymc9 commented Jan 23, 2025

Hi @Tsimopak , I think this can be achieved by implementing a custom fetch function and adding a delay in it:

https://zenstack.dev/docs/reference/plugins/tanstack-query#context-provider

The fetch function has access to the entire request so you can determine when to inject the delay too. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants