diff --git a/src/react/hooks/useLazyQuery.ts b/src/react/hooks/useLazyQuery.ts index 0f3e0ae688e..5e8a6891d3c 100644 --- a/src/react/hooks/useLazyQuery.ts +++ b/src/react/hooks/useLazyQuery.ts @@ -80,8 +80,7 @@ export function useLazyQuery( loading: false, data: void 0 as unknown as TData, error: void 0, - // TODO: fix the type of result - called: false as any, + called: false, }; @@ -94,6 +93,5 @@ export function useLazyQuery( } } - // TODO: fix the type of result - return [execute, result as LazyQueryResult]; + return [execute, result]; } diff --git a/src/react/types/types.ts b/src/react/types/types.ts index 4f3bc908aac..f74817d8117 100644 --- a/src/react/types/types.ts +++ b/src/react/types/types.ts @@ -78,7 +78,7 @@ export interface QueryResult error?: ApolloError; loading: boolean; networkStatus: NetworkStatus; - called: true; + called: boolean; } export interface QueryDataOptions