Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix mutation calling onCompleted for loading state
After the introduction of the initial loading state to false on PR zino-hofmann#112, the first emission of the observableQuery observable is a query result with the `loading: true`. The unexpected side effect of this change is that the `onCompleted`callback, which listens only to the first emission, would be called only for the loading state change and not for the query response itself. This PR changes the `onCompleted` subscription to only call the method and cancel the subscription after the loading changes back to false.
- Loading branch information