Skip to content

Commit

Permalink
docs(ApolloClient): added documentation for getObservableQueries meth…
Browse files Browse the repository at this point in the history
…od (#10669)

Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
Co-authored-by: Alessia Bellisario <alessia@apollographql.com>
  • Loading branch information
3 people authored Mar 31, 2023
1 parent 152baac commit c4e2a14
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions docs/source/api/core/ApolloClient.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ different value for the same option in individual function calls.
<TypescriptApiBox name="ApolloClient.stop" />
<TypescriptApiBox name="ApolloClient.reFetchObservableQueries" />
<TypescriptApiBox name="ApolloClient.refetchQueries" />
<TypescriptApiBox name="ApolloClient.getObservableQueries" />

## Types

Expand Down
13 changes: 8 additions & 5 deletions src/core/ApolloClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -575,11 +575,14 @@ export class ApolloClient<TCacheShape> implements DataProxy {

/**
* Get all currently active `ObservableQuery` objects, in a `Map` keyed by
* query ID strings. An "active" query is one that has observers and a
* `fetchPolicy` other than "standby" or "cache-only". You can include all
* `ObservableQuery` objects (including the inactive ones) by passing "all"
* instead of "active", or you can include just a subset of active queries by
* passing an array of query names or DocumentNode objects.
* query ID strings.
*
* An "active" query is one that has observers and a `fetchPolicy` other than
* "standby" or "cache-only".
*
* You can include all `ObservableQuery` objects (including the inactive ones)
* by passing "all" instead of "active", or you can include just a subset of
* active queries by passing an array of query names or DocumentNode objects.
*/
public getObservableQueries(
include: RefetchQueriesInclude = "active",
Expand Down

0 comments on commit c4e2a14

Please sign in to comment.