Ajout types génériques pour autocomplétion
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { gql, useQuery } from '@apollo/client';
|
||||
import { gql, useQuery, QueryHookOptions } from '@apollo/client';
|
||||
import { DecisionSupportFile } from '../../types/decision';
|
||||
import { useGraphQLData } from './helper';
|
||||
|
||||
@ -25,11 +25,11 @@ export const QUERY_DECISION_SUPPORT_FILES = gql`
|
||||
}
|
||||
`;
|
||||
|
||||
export function useDecisionSupportFilesQuery(options = {}) {
|
||||
export function useDecisionSupportFilesQuery<A = any, R = Record<string, any>>(options: QueryHookOptions<A, R> = {}) {
|
||||
return useQuery(QUERY_DECISION_SUPPORT_FILES, options);
|
||||
}
|
||||
|
||||
export function useDecisionSupportFiles(options = {}) {
|
||||
export function useDecisionSupportFiles<A = any, R = Record<string, any>>(options: QueryHookOptions<A, R> = {}) {
|
||||
const { data, loading, error } = useGraphQLData<DecisionSupportFile[]>(
|
||||
QUERY_DECISION_SUPPORT_FILES, 'decisionSupportFiles', [], options
|
||||
);
|
||||
|
Reference in New Issue
Block a user