@twilio/flex-sdk
    Preparing search index...

    Interface RefetchQueriesResult<TResult>

    The result of client.refetchQueries is thenable/awaitable, if you just want an array of fully resolved results, but you can also access the raw results immediately by examining the additional queries and results properties of the RefetchQueriesResult<TResult> object.

    interface RefetchQueriesResult<TResult> {
        "[toStringTag]": string;
        queries: ObservableQuery<any, OperationVariables>[];
        results: InternalRefetchQueriesResult<TResult>[];
        catch<TResult = never>(
            onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null,
        ): Promise<RefetchQueriesPromiseResults<TResult> | TResult>;
        finally(
            onfinally?: (() => void) | null,
        ): Promise<RefetchQueriesPromiseResults<TResult>>;
        then<TResult1 = RefetchQueriesPromiseResults<TResult>, TResult2 = never>(
            onfulfilled?:
                | (
                    (
                        value: RefetchQueriesPromiseResults,
                    ) => TResult1 | PromiseLike<TResult1>
                )
                | null,
            onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null,
        ): Promise<TResult1 | TResult2>;
    }

    Type Parameters

    • TResult

    Hierarchy (View Summary)

    Index

    Properties

    "[toStringTag]": string
    queries: ObservableQuery<any, OperationVariables>[]

    An array of ObservableQuery objects corresponding 1:1 to TResult values in the results arrays (both the result property and the resolved value).

    results: InternalRefetchQueriesResult<TResult>[]

    An array of results that were either returned by onQueryUpdated, or provided by default in the absence of onQueryUpdated, including pending promises.

    If onQueryUpdated returns false for a given query, no result is provided for that query.

    If onQueryUpdated returns true, the resulting Promise<ApolloQueryResult<any>> is included in the results array instead of true.

    Methods

    • Attaches a callback for only the rejection of the Promise.

      Type Parameters

      • TResult = never

      Parameters

      • Optionalonrejected: ((reason: any) => TResult | PromiseLike<TResult>) | null

        The callback to execute when the Promise is rejected.

      Returns Promise<RefetchQueriesPromiseResults<TResult> | TResult>

      A Promise for the completion of the callback.

    • Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.

      Parameters

      • Optionalonfinally: (() => void) | null

        The callback to execute when the Promise is settled (fulfilled or rejected).

      Returns Promise<RefetchQueriesPromiseResults<TResult>>

      A Promise for the completion of the callback.

    • Attaches callbacks for the resolution and/or rejection of the Promise.

      Type Parameters

      • TResult1 = RefetchQueriesPromiseResults<TResult>
      • TResult2 = never

      Parameters

      • Optionalonfulfilled:
            | (
                (
                    value: RefetchQueriesPromiseResults,
                ) => TResult1 | PromiseLike<TResult1>
            )
            | null

        The callback to execute when the Promise is resolved.

      • Optionalonrejected: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null

        The callback to execute when the Promise is rejected.

      Returns Promise<TResult1 | TResult2>

      A Promise for the completion of which ever callback is executed.