Skip to content

Instantly share code, notes, and snippets.

@jonnysamps
Last active February 25, 2021 15:29
Show Gist options
  • Save jonnysamps/991e18969de0e9945c494e87814ceef9 to your computer and use it in GitHub Desktop.
Save jonnysamps/991e18969de0e9945c494e87814ceef9 to your computer and use it in GitHub Desktop.
Apollo Client Best Practices - 5
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