isGraphQLResult(rejection: any): boolean {
return rejection !== undefined && (rejection.data !== undefined || rejection.errors !== undefined);
}
handleError(error: any): void {
if (error !== undefined && this.isGraphQLResult(error.rejection)) {
const graphqlResult: GraphQLResult = error.rejection as GraphQLResult;
// handle the graphqlResult
}