From 80cf50ee678d41dc607b96267e960d32fd9a9629 Mon Sep 17 00:00:00 2001 From: Birge Clark Date: Fri, 19 Oct 2018 09:49:14 -0700 Subject: [PATCH 1/2] update docs for the client prop --- docs/source/api/react-apollo.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/source/api/react-apollo.md b/docs/source/api/react-apollo.md index f8c18dae226..fa196ce0029 100644 --- a/docs/source/api/react-apollo.md +++ b/docs/source/api/react-apollo.md @@ -85,6 +85,8 @@ The Query component accepts the following props. Only `query` and `children` are
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.
`partialRefetch`: boolean
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.
+
`client`: ApolloClient
+
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.

Render prop function

@@ -145,6 +147,8 @@ The Mutation component accepts the following props. Only `mutation` and `childre
A callback executed in the event of an error
`context`: Record
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.
+
`client`: ApolloClient
+
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.

Render prop function

@@ -192,6 +196,8 @@ The Subscription component accepts the following props. Only `subscription` and
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`.
`fetchPolicy`: FetchPolicy
How you want your component to interact with the Apollo cache. Defaults to "cache-first".
+
`client`: ApolloClient
+
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.

Render prop function

From 4fbfb1d3417eb5e20a983e3c307f7e89fca8dc63 Mon Sep 17 00:00:00 2001 From: Hugh Willson Date: Wed, 2 Jan 2019 09:23:52 -0500 Subject: [PATCH 2/2] Slight wording adjustments --- docs/source/api/react-apollo.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/api/react-apollo.md b/docs/source/api/react-apollo.md index fa196ce0029..428f2cd3f6d 100644 --- a/docs/source/api/react-apollo.md +++ b/docs/source/api/react-apollo.md @@ -86,7 +86,7 @@ The Query component accepts the following props. Only `query` and `children` are
`partialRefetch`: boolean
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.
`client`: ApolloClient
-
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.
+
An `ApolloClient` instance. By default `Query` uses the client passed down via context, but a different client can be passed in.

Render prop function

@@ -148,7 +148,7 @@ The Mutation component accepts the following props. Only `mutation` and `childre
`context`: Record
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.
`client`: ApolloClient
-
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.
+
An `ApolloClient` instance. By default `Query` uses the client passed down via context, but a different client can be passed in.

Render prop function

@@ -197,7 +197,7 @@ The Subscription component accepts the following props. Only `subscription` and
`fetchPolicy`: FetchPolicy
How you want your component to interact with the Apollo cache. Defaults to "cache-first".
`client`: ApolloClient
-
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.
+
An `ApolloClient` instance. By default `Query` uses the client passed down via context, but a different client can be passed in.

Render prop function