/
Launch Apollo Studio

ObservableQuery

ObservableQuery API reference


ObservableQuery functions

ApolloClient Observables extend the Observables implementation provided by zen-observable. Refer to the zen-observable documentation for additional context and API options.

result(): Promise<ApolloQueryResult>

(src/core/ObservableQuery.ts, line 97)
Arguments
Name /
Type
Description
saveAsLastResult

any

Update the variables of this observable query, and fetch the new results. This method should be preferred over setVariables in most use cases.

Arguments
Name /
Type
Description
variables

Partial<>

Arguments
Name /
Type
Description
newOptions

Partial<WatchQueryOptions>

This is for internal use only. Most users should instead use refetch in order to be properly notified of results even when they come from cache.

Arguments
Name /
Type
Description
variables

any

Arguments
Name /
Type
Description
fetchMoreOptions

any

Arguments
Name /
Type
Description
mapFn

(any, Pick<WatchQueryOptions, "variables">) => any

Arguments
Name /
Type
Description
pollInterval

any

Types

The current status of a query’s execution in our system.

Properties
Name /
Type
Description
data

any

error

ApolloError

errors

ReadonlyArray<GraphQLError>

loading

any

networkStatus

NetworkStatus

partial

any

Edit on GitHub