resolveSearch() — supabase Function Reference
Architecture documentation for the resolveSearch() function in globalSearchResolver.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD b3c9d93a_b9b6_3cfd_c58c_63d2b6a0e312["resolveSearch()"] 0483845d_079f_75e1_7fe8_82b5925bc5ff["tryCatchFlat()"] b3c9d93a_b9b6_3cfd_c58c_63d2b6a0e312 -->|calls| 0483845d_079f_75e1_7fe8_82b5925bc5ff 9eb51941_1b09_8b41_0cad_11f562d6a0ba["create()"] b3c9d93a_b9b6_3cfd_c58c_63d2b6a0e312 -->|calls| 9eb51941_1b09_8b41_0cad_11f562d6a0ba 0d1f4e6d_023f_d670_ea66_14ed55d7f2fe["unwrap()"] b3c9d93a_b9b6_3cfd_c58c_63d2b6a0e312 -->|calls| 0d1f4e6d_023f_d670_ea66_14ed55d7f2fe 1ee162b1_d232_4846_ef61_0018a3d5f851["error()"] b3c9d93a_b9b6_3cfd_c58c_63d2b6a0e312 -->|calls| 1ee162b1_d232_4846_ef61_0018a3d5f851 98dae242_6132_86d3_9fa0_eb45046dbbb0["isUserError()"] b3c9d93a_b9b6_3cfd_c58c_63d2b6a0e312 -->|calls| 98dae242_6132_86d3_9fa0_eb45046dbbb0 69cdaf4e_592b_f232_a6d3_d02e50f30f76["isPrivate()"] b3c9d93a_b9b6_3cfd_c58c_63d2b6a0e312 -->|calls| 69cdaf4e_592b_f232_a6d3_d02e50f30f76 style b3c9d93a_b9b6_3cfd_c58c_63d2b6a0e312 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/docs/resources/globalSearch/globalSearchResolver.ts lines 20–46
async function resolveSearch(
parent: unknown,
args: RootQueryTypeSearchDocsArgs,
context: unknown,
info: GraphQLResolveInfo
): Promise<SearchResultCollection | GraphQLError> {
return (
await Result.tryCatchFlat(
resolveSearchImpl,
convertUnknownToApiError,
parent,
args,
context,
info
)
).match(
// Building a collection from an array is infallible
async (data) => (await GraphQLCollectionBuilder.create({ items: data })).unwrap(),
(error) => {
console.error(`Error resolving ${GRAPHQL_FIELD_SEARCH_GLOBAL}:`, error)
if (!error.isUserError()) {
Sentry.captureException(error)
}
return new GraphQLError(error.isPrivate() ? 'Internal Server Error' : error.message)
}
)
}
Domain
Subdomains
Source
Frequently Asked Questions
What does resolveSearch() do?
resolveSearch() is a function in the supabase codebase.
What does resolveSearch() call?
resolveSearch() calls 6 function(s): create, error, isPrivate, isUserError, tryCatchFlat, unwrap.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free