> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# resolveUseCancelablePromisesStatus()

- Package: [@gooddata/sdk-ui](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/index.md)
- Kind: function
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui/src/base/react/useCancelablePromiseUtils.ts

Resolve status of multiple [useCancelablePromise()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.usecancelablepromise/index.md) hooks.

**Signature:**

```typescript
export declare function resolveUseCancelablePromisesStatus(cancelablePromisesStates: UseCancelablePromiseState<unknown, unknown>[], options?: {
    strategy?: "serial" | "parallel";
}): UseCancelablePromiseStatus;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| cancelablePromisesStates | [UseCancelablePromiseState](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.usecancelablepromisestate/index.md)&lt;unknown, unknown&gt;[] |  |
| options | { strategy?: "serial" \| "parallel"; } | _(Optional)_ specify options for resolving the status |

**Returns:**

[UseCancelablePromiseStatus](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.usecancelablepromisestatus/index.md)

resolved status

## Remarks

This is useful for useCancelablePromise composition - when you want to wrap multiple useCancelablePromise hooks in another hook, and keep the return value shape of the hook same as for useCancelablePromise.

You can choose between 2 strategies to resolve the status (default strategy is "serial"): - serial: Short-circuits to the first pending/loading/error status, and returns the last status  only when all previous statuses are "success". - parallel: Is resolved to the status which has the highest priority.  Priority of the statuses has the following order (from highest to lowest): pending, loading, error, success.  Examples:  - ["pending", "loading"] will be resolved to "pending"  - ["loading", "error"] will be resolved to "loading"  - ["error", "success"] will be resolved to "error"  - ["success", "success"] will be resolved to "success"
