Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs for the client prop #4029

Merged
merged 6 commits into from
Jan 2, 2019
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 instance of the `ApolloClient`. By default the `Query` uses the client that is 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 instance of the `ApolloClient`. By default the `Mutation` uses the client that is 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 instance of the `ApolloClient`. By default the `Subscription` uses the client that is 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