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:
@ -0,0 +1,22 @@
|
||||
import gql from 'graphql-tag';
|
||||
|
||||
export const globalSearch = gql`
|
||||
query GlobalSearch(
|
||||
$searchInput: String!
|
||||
$limit: Int!
|
||||
$excludedObjectNameSingulars: [String!]!
|
||||
) {
|
||||
globalSearch(
|
||||
searchInput: $searchInput
|
||||
limit: $limit
|
||||
excludedObjectNameSingulars: $excludedObjectNameSingulars
|
||||
) {
|
||||
recordId
|
||||
objectSingularName
|
||||
label
|
||||
imageUrl
|
||||
tsRankCD
|
||||
tsRank
|
||||
}
|
||||
}
|
||||
`;
|
||||
Reference in New Issue
Block a user