add user_id to the sql query to reduce query latency

This commit is contained in:
Hongbo Wu
2023-10-11 16:05:35 +08:00
parent a4aeb40276
commit 30ba22cbbc
3 changed files with 18 additions and 11 deletions

View File

@ -707,9 +707,9 @@ export const typeaheadSearchResolver = authorized<
TypeaheadSearchSuccess,
TypeaheadSearchError,
QueryTypeaheadSearchArgs
>(async (_obj, { query, first }, { log }) => {
>(async (_obj, { query, first }, { log, uid }) => {
try {
const items = await findLibraryItemsByPrefix(query, first || undefined)
const items = await findLibraryItemsByPrefix(query, uid, first || undefined)
return {
items: items.map((item) => ({