-
-
Save jonnysamps/3edf112078eafb0663fd29f5f1b6a376 to your computer and use it in GitHub Desktop.
Apollo Client Best Practices - 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fires immediately and then on an interval | |
timer(0, REFRESH_INTERVAL) | |
.pipe( | |
mergeMap(() => apollo.query({ query: gql`...` })), | |
map(result => result.data) | |
) | |
.subscribe(() => { | |
// fires once per http request | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment