UNPKG

@sparklink-pro/apant

Version:

Apollo & Antd tools

18 lines 806 B
import { QueryHookOptions } from '@apollo/client'; import { GraphQLObject, GraphQLType } from '../definitions'; type useTypeListOpts = { type: GraphQLType; fragment?: string; }; /** * This hook returns the list of items for a given type. It use `useQuery` to perform a GraphQL query. * It will use the default list operation defined in the registry (OPERATION_LIST) for the type and the default fragment unless a custom fragment is provided. * The query is expected to return a valid payload of the form `{ items: [] }`. */ export declare function useTypeList({ type, fragment, ...useQueryOptions }: useTypeListOpts & QueryHookOptions<object>): { loading: boolean; items: GraphQLObject[]; refetch: () => void; }; export default useTypeList; //# sourceMappingURL=useTypeList.d.ts.map