Home / Function/ extractMethod() — supabase Function Reference

extractMethod() — supabase Function Reference

Architecture documentation for the extractMethod() function in hooks.utils.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  44a1d22a_5d71_8dd5_1cd2_b6af6a48cf0f["extractMethod()"]
  88ef1a80_8aa7_dc47_4a1b_b4c5227b90a4["AddHookDropdown()"]
  88ef1a80_8aa7_dc47_4a1b_b4c5227b90a4 -->|calls| 44a1d22a_5d71_8dd5_1cd2_b6af6a48cf0f
  ed51c473_5272_57db_6316_2f767f81b646["CreateHookSheet()"]
  ed51c473_5272_57db_6316_2f767f81b646 -->|calls| 44a1d22a_5d71_8dd5_1cd2_b6af6a48cf0f
  dd52c5dc_b7d0_44e1_518c_ed23612e4645["HooksListing()"]
  dd52c5dc_b7d0_44e1_518c_ed23612e4645 -->|calls| 44a1d22a_5d71_8dd5_1cd2_b6af6a48cf0f
  style 44a1d22a_5d71_8dd5_1cd2_b6af6a48cf0f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/studio/components/interfaces/Auth/Hooks/hooks.utils.ts lines 3–20

export const extractMethod = (
  uri: string,
  secret?: string
):
  | { type: 'postgres'; schema: string; functionName: string }
  | { type: 'https'; url: string; secret: string } => {
  if (uri.startsWith('https')) {
    return { type: 'https', url: uri, secret: secret || '' }
  } else {
    const [_proto, _x, _db, schema, functionName] = (uri || '').split('/')

    return {
      type: 'postgres',
      schema: schema || '',
      functionName: functionName || '',
    }
  }
}

Subdomains

Frequently Asked Questions

What does extractMethod() do?
extractMethod() is a function in the supabase codebase.
What calls extractMethod()?
extractMethod() is called by 3 function(s): AddHookDropdown, CreateHookSheet, HooksListing.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free