How to make a delay before the request is sent to apollo react?

The user enters a search string query, React apollo client sends it immediately.
Is it possible the apollo funds to make the delay before sending the request to the API? Or send a query when the user has stopped typing with the keyboard?
March 23rd 20 at 18:49
2 answers
March 23rd 20 at 18:51
Solution
debounce
Example.
March 23rd 20 at 18:53
Solution
In the RxJs library is the ability to put a delay before sending work, if within a certain period of time came the new data, it will execute the query when the timer will reset and begin the wait again. It is possible and to come up with debounce logic
The switchMap operator - stacy16 commented on March 23rd 20 at 18:56

Find more questions by tags React