Last active
February 25, 2021 00:08
-
-
Save jonnysamps/b002d5b84d16d5b58420cd6956124246 to your computer and use it in GitHub Desktop.
Apollo Client Best Practices
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
const query = gql`...`; | |
timer(0, REFRESH_INTERVAL) | |
.pipe( | |
mergeMap(() => apollo.watchQuery({ query }).valueChanges), | |
map(result => result.data) | |
) | |
.subscribe(() => { | |
// ... | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment