Skip to content

Commit cd8c776

Browse files
authored
Update examples in hook doc blocks
1 parent 89f6d68 commit cd8c776

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/react/hooks/useLazyQuery.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,8 @@ const EAGER_METHODS = [
255255
*
256256
* @example
257257
* ```jsx
258-
* import { gql, useLazyQuery } from "@apollo/client";
258+
* import { gql } from "@apollo/client";
259+
* import { useLazyQuery } from "@apollo/client/react";
259260
*
260261
* const GET_GREETING = gql`
261262
* query GetGreeting($language: String!) {

src/react/hooks/useQuery.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,13 +237,14 @@ interface InternalState<TData, TVariables extends OperationVariables> {
237237
*
238238
* To run a query within a React component, call `useQuery` and pass it a GraphQL query document.
239239
*
240-
* When your component renders, `useQuery` returns an object from Apollo Client that contains `loading`, `error`, and `data` properties you can use to render your UI.
240+
* When your component renders, `useQuery` returns an object from Apollo Client that contains `loading`, `error`, `dataState`, and `data` properties you can use to render your UI.
241241
*
242242
* > Refer to the [Queries](https://www.apollographql.com/docs/react/data/queries) section for a more in-depth overview of `useQuery`.
243243
*
244244
* @example
245245
* ```jsx
246-
* import { gql, useQuery } from '@apollo/client';
246+
* import { gql } from '@apollo/client';
247+
* import { useQuery } from '@apollo/client/react';
247248
*
248249
* const GET_GREETING = gql`
249250
* query GetGreeting($language: String!) {

0 commit comments

Comments
 (0)