export type Data = { tag: 'Loading'; value: null | undefined | T; } | { tag: 'Loaded'; value: T; } | { tag: 'Failure'; value: string; }; export interface Connection { data: Data; executeQuery: () => void; isLoading: boolean; loadMore: () => void; hasNextPage: boolean; }