diff --git a/services/data/src/react/hooks/useDataQuery.ts b/services/data/src/react/hooks/useDataQuery.ts index cc1dadfd9..9b81a145d 100644 --- a/services/data/src/react/hooks/useDataQuery.ts +++ b/services/data/src/react/hooks/useDataQuery.ts @@ -33,7 +33,7 @@ type QueryState = { refetchCallback?: (data: any) => void } -export const useDataQuery = ( +export const useDataQuery = ( query: Query, { onComplete: userOnSuccess, @@ -41,7 +41,7 @@ export const useDataQuery = ( variables: initialVariables = {}, lazy: initialLazy = false, }: QueryOptions = {} -): QueryRenderInput => { +): QueryRenderInput => { const [staticQuery] = useStaticInput(query, { warn: true, name: 'query', diff --git a/services/data/src/types.ts b/services/data/src/types.ts index df2038aaf..fa90af0dd 100644 --- a/services/data/src/types.ts +++ b/services/data/src/types.ts @@ -40,15 +40,15 @@ export interface ExecuteHookResult { data?: ReturnType } -export interface QueryState { +export interface QueryState { called: boolean loading: boolean fetching: boolean error?: FetchError - data?: T + data?: TQueryResult } -export interface QueryRenderInput extends QueryState { +export interface QueryRenderInput extends QueryState { engine: DataEngine refetch: QueryRefetchFunction }