Skip to content

Commit 3a10356

Browse files
fix: improve jsdoc of apolloclient (#13114)
Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
1 parent d2ed35e commit 3a10356

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

src/core/ApolloClient.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -735,24 +735,22 @@ export class ApolloClient {
735735
* @example
736736
*
737737
* ```js
738-
* import { ApolloClient, InMemoryCache } from "@apollo/client";
738+
* import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client";
739739
*
740740
* const cache = new InMemoryCache();
741+
* const link = new HttpLink({ uri: "http://localhost:4000/" });
741742
*
742743
* const client = new ApolloClient({
743744
* // Provide required constructor fields
744745
* cache: cache,
745-
* uri: "http://localhost:4000/",
746+
* link: link,
746747
*
747748
* // Provide some optional constructor fields
748-
* name: "react-web-client",
749-
* version: "1.3",
750-
* queryDeduplication: false,
751-
* defaultOptions: {
752-
* watchQuery: {
753-
* fetchPolicy: "cache-and-network",
754-
* },
749+
* clientAwareness: {
750+
* name: "react-web-client",
751+
* version: "1.3",
755752
* },
753+
* queryDeduplication: false,
756754
* });
757755
* ```
758756
*/

0 commit comments

Comments
 (0)