add new globalSearch resolver + update useSearchRecords hook (#10457)
# Context To enable search records sorting by ts_rank_cd / ts_rank, we have decided to add a new search resolver serving `GlobalSearchRecordDTO`. ----- - [x] Test to add - work in progress closes https://github.com/twentyhq/core-team-issues/issues/357
This commit is contained in:
@ -704,6 +704,16 @@ export type GetServerlessFunctionSourceCodeInput = {
|
||||
version?: Scalars['String']['input'];
|
||||
};
|
||||
|
||||
export type GlobalSearchRecord = {
|
||||
__typename?: 'GlobalSearchRecord';
|
||||
imageUrl?: Maybe<Scalars['String']['output']>;
|
||||
label: Scalars['String']['output'];
|
||||
objectSingularName: Scalars['String']['output'];
|
||||
recordId: Scalars['String']['output'];
|
||||
tsRank: Scalars['Float']['output'];
|
||||
tsRankCD: Scalars['Float']['output'];
|
||||
};
|
||||
|
||||
export enum HealthIndicatorId {
|
||||
connectedAccount = 'connectedAccount',
|
||||
database = 'database',
|
||||
@ -1437,6 +1447,7 @@ export type Query = {
|
||||
getTimelineCalendarEventsFromPersonId: TimelineCalendarEventsWithTotal;
|
||||
getTimelineThreadsFromCompanyId: TimelineThreadsWithTotal;
|
||||
getTimelineThreadsFromPersonId: TimelineThreadsWithTotal;
|
||||
globalSearch: Array<GlobalSearchRecord>;
|
||||
index: Index;
|
||||
indexMetadatas: IndexConnection;
|
||||
object: Object;
|
||||
@ -1552,6 +1563,13 @@ export type QueryGetTimelineThreadsFromPersonIdArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type QueryGlobalSearchArgs = {
|
||||
excludedObjectNameSingulars?: InputMaybe<Array<Scalars['String']['input']>>;
|
||||
limit: Scalars['Int']['input'];
|
||||
searchInput: Scalars['String']['input'];
|
||||
};
|
||||
|
||||
|
||||
export type QueryIndexArgs = {
|
||||
id: Scalars['UUID']['input'];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user