Skip to content

Commit

Permalink
Merge pull request #4029 from birge/master
Browse files Browse the repository at this point in the history
Update docs for the client prop
  • Loading branch information
hwillson authored Jan 2, 2019
2 parents 2875cba + a13c744 commit 0bfc682
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/source/api/react-apollo.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ The Query component accepts the following props. Only `query` and `children` are
<dd>Shared context between your Query component and your network interface (Apollo Link). Useful for setting headers from props or sending information to the `request` function of Apollo Boost.</dd>
<dt>`partialRefetch`: boolean</dt>
<dd>If `true`, perform a query `refetch` if the query result is marked as being partial, and the returned data is reset to an empty Object by the Apollo Client `QueryManager` (due to a cache miss). The default value is `false` for backwards-compatibility's sake, but should be changed to true for most use-cases.</dd>
<dt>`client`: ApolloClient</dt>
<dd>An `ApolloClient` instance. By default `Query` uses the client passed down via context, but a different client can be passed in.</dd>
</dl>

<h3 id="query-render-prop">Render prop function</h3>
Expand Down Expand Up @@ -145,6 +147,8 @@ The Mutation component accepts the following props. Only `mutation` and `childre
<dd>A callback executed in the event of an error</dd>
<dt>`context`: Record<string, any></dt>
<dd>Shared context between your Mutation component and your network interface (Apollo Link). Useful for setting headers from props or sending information to the `request` function of Apollo Boost.</dd>
<dt>`client`: ApolloClient</dt>
<dd>An `ApolloClient` instance. By default `Query` uses the client passed down via context, but a different client can be passed in.</dd>
</dl>

<h3 id="mutation-render-prop">Render prop function</h3>
Expand Down Expand Up @@ -192,6 +196,8 @@ The Subscription component accepts the following props. Only `subscription` and
<dd>Allows the registration of a callback function, that will be triggered each time the `Subscription` component receives data. The callback `options` object param consists of the current Apollo Client instance in `client`, and the received subscription data in `subscriptionData`.</dd>
<dt>`fetchPolicy`: FetchPolicy</dt>
<dd>How you want your component to interact with the Apollo cache. Defaults to "cache-first".</dd>
<dt>`client`: ApolloClient</dt>
<dd>An `ApolloClient` instance. By default `Query` uses the client passed down via context, but a different client can be passed in.</dd>
</dl>

<h3 id="subscription-render-prop">Render prop function</h3>
Expand Down

0 comments on commit 0bfc682

Please sign in to comment.