Open-Source Wikis

/

Supabase

/

Features

/

Edge Functions

supabase/supabase

Edge Functions

Studio's interface for editing, deploying, configuring, and inspecting Supabase Edge Functions. Edge Functions run on supabase/edge-runtime (a Deno-based runtime).

Studio surfaces involved

Folder Purpose
apps/studio/components/interfaces/EdgeFunctions/ Function editor, deploy UI, secrets, logs viewer.

Data layer

Under apps/studio/data/edge-functions/. Operations include:

  • Listing functions for a project.
  • Reading function metadata and source.
  • Deploying a function (uploading source bundles).
  • Managing custom and default secrets (a recent change split secrets into "custom" and "default" sections — see commit 45ffa97240).
  • Reading invocation logs (federated through Logflare).

How it works

The editor surface uses the same Monaco config as the SQL editor. Deno-specific autocomplete and library types come from apps/studio/build:deno-types (a script that generates Deno-shaped types committed under apps/studio/types/).

graph LR
    Editor[EdgeFunctions/Editor]
    Mut[data/edge-functions/*-mutation]
    API[Mgmt API /v1/projects/{ref}/functions]
    Runtime[supabase/edge-runtime]
    Logs[Logflare]

    Editor --> Mut
    Mut --> API
    API --> Runtime
    Runtime --> Logs
    Logs --> Editor

Local development of edge functions happens via the Supabase CLI (supabase functions ...), not in Studio. Studio is the operational surface.

Integration points

  • supabase/edge-runtime — the runtime, run in self-host as the edge-runtime Docker service.
  • Logflare — for invocation logs (consumed by data/logs/).
  • The Supabase CLI — provides the local dev experience.

Entry points for modification

  • Function editor UX → components/interfaces/EdgeFunctions/ (Monaco + helper panels).
  • Deploy / list / secrets behavior → mutations and queries under data/edge-functions/.
  • Deno type generation → apps/studio/scripts/deno-types.ts, run via pnpm --filter studio build:deno-types.

Local dev

There is no fully local Edge Functions experience in this repo's apps. Use the Supabase CLI (supabase functions serve) alongside pnpm dev:studio for an end-to-end local loop.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Edge Functions – Supabase wiki | Factory