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