Created
December 10, 2020 19:04
-
-
Save roytouw7/874bfc1a849c965cd4e8b240c7398ef1 to your computer and use it in GitHub Desktop.
This file contains 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
getProducts(): Observable<(Products_allProducts_data)[]> { | |
return this.apollo.watchQuery<Products>({query: this.query, pollInterval: 120000}).valueChanges.pipe( | |
map(result => result.data.allProducts.data), | |
filter((x): x is Products_allProducts_data[] => x !== null) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment