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

    Type Alias WatchQueryOptions<TData, TVariables>

    WatchQueryOptions: {
        "[variablesUnknownSymbol]"?: boolean;
        context?: DefaultContext;
        errorPolicy?: ErrorPolicy;
        fetchPolicy?: WatchQueryFetchPolicy;
        initialFetchPolicy?: WatchQueryFetchPolicy;
        nextFetchPolicy?:
            | WatchQueryFetchPolicy
            | (
                (
                    this: WatchQueryOptions<TData, TVariables>,
                    currentFetchPolicy: WatchQueryFetchPolicy,
                    context: NextFetchPolicyContext<TData, TVariables>,
                ) => WatchQueryFetchPolicy
            );
        notifyOnNetworkStatusChange?: boolean;
        pollInterval?: number;
        query: DocumentNode | TypedDocumentNode<TData, TVariables>;
        refetchWritePolicy?: RefetchWritePolicy;
        returnPartialData?: boolean;
        skipPollAttempt?: () => boolean;
    } & VariablesOption<NoInfer<TVariables>>

    Watched query options.

    Type Parameters

    • TData = unknown
    • TVariables extends OperationVariables = OperationVariables

    Type Declaration

    • Optional Internal[variablesUnknownSymbol]?: boolean

      This API is meant for framework integrations only. Do not use for everyday use.

      Indicates that the variables are unknown at the time of query creation. This option can only be set when fetchPolicy is 'standby'. Setting this to true will prevent client.refetchQueries from refetching this query before it has left the 'standby' state, either by setting a fetchPolicy, or by calling observableQuery.refetch() explicitly.

      Changing this option after the query has been created will have no effect.

      This is an internal API and should not be used directly. This can be removed or changed at any time.

    • Optionalcontext?: DefaultContext

      If you're using Apollo Link, this object is the initial value of the context object that's passed along your link chain.

      1. Networking options
    • OptionalerrorPolicy?: ErrorPolicy

      Specifies how the query handles a response that returns both GraphQL errors and partial results.

      For details, see GraphQL error policies.

      The default value is none, meaning that the query result includes error details but not partial results.

      1. Operation options
    • OptionalfetchPolicy?: WatchQueryFetchPolicy

      Specifies how the query interacts with the Apollo Client cache during execution (for example, whether it checks the cache for results before sending a request to the server).

      For details, see Setting a fetch policy.

      The default value is cache-first.

      1. Caching options
    • OptionalinitialFetchPolicy?: WatchQueryFetchPolicy

      Defaults to the initial value of options.fetchPolicy, but can be explicitly configured to specify the WatchQueryFetchPolicy to revert back to whenever variables change (unless nextFetchPolicy intervenes).

      1. Caching options
    • OptionalnextFetchPolicy?:
          | WatchQueryFetchPolicy
          | (
              (
                  this: WatchQueryOptions<TData, TVariables>,
                  currentFetchPolicy: WatchQueryFetchPolicy,
                  context: NextFetchPolicyContext<TData, TVariables>,
              ) => WatchQueryFetchPolicy
          )

      Specifies the FetchPolicy to be used after this query has completed.

      1. Caching options
    • OptionalnotifyOnNetworkStatusChange?: boolean

      If true, the in-progress query's associated component re-renders whenever the network status changes or a network error occurs.

      The default value is true.

      1. Networking options
    • OptionalpollInterval?: number

      Specifies the interval (in milliseconds) at which the query polls for updated results.

      The default value is 0 (no polling).

      1. Networking options
    • query: DocumentNode | TypedDocumentNode<TData, TVariables>

      A GraphQL query string parsed into an AST with the gql template literal.

      1. Operation options
    • OptionalrefetchWritePolicy?: RefetchWritePolicy

      Specifies whether a NetworkStatus.refetch operation should merge incoming field data with existing data, or overwrite the existing data. Overwriting is probably preferable, but merging is currently the default behavior, for backwards compatibility with Apollo Client 3.x.

      1. Caching options
    • OptionalreturnPartialData?: boolean

      If true, the query can return partial results from the cache if the cache doesn't contain results for all queried fields.

      The default value is false.

      1. Caching options
    • OptionalskipPollAttempt?: () => boolean

      A callback function that's called whenever a refetch attempt occurs while polling. If the function returns true, the refetch is skipped and not reattempted until the next poll interval.

      1. Networking options