So when i get the response from my query, i can see there is a loading property. But i don't really get why they would pass it along. Because when you get the response it means that the loading is finished, hence the loading will always be false.
Is there a way that i can use this loading property so that i can for example make a loading icon appear when the call is still loading?
I have the following code in an Angular 2 environment:
public apolloQuery = gql`
query {
apolloQuery
}`;
const sub = this.apollo.watchQuery<QueryResponse>({
query: this.apolloQuery
}).subscribe(data => {
console.log(data);
sub.unsubscribe();
});
And the log from the data object contains the loading property i was talking about, which is always false.
I know i can make my own boolean property and check this way, but i was just wondering if i could use the built-in loading property that Apollo provides?