Skip to content

feature: edge functions references#37

Merged
Rodriguespn merged 3 commits intofeature/supabase-skillfrom
feature/edge-functions-references
Feb 13, 2026
Merged

feature: edge functions references#37
Rodriguespn merged 3 commits intofeature/supabase-skillfrom
feature/edge-functions-references

Conversation

@Rodriguespn
Copy link
Collaborator

Summary

Adds 15 Edge Functions reference files organized into 6 sections:

  • Fundamentals (edge-fun-*): Quickstart, project structure, and fat functions pattern
  • Authentication (edge-auth-*): JWT verification with jose + JWKS endpoint, RLS integration
  • Database (edge-db-*): supabase-js client patterns and direct Postgres with Drizzle ORM
  • Patterns (edge-pat-*): CORS, multi-route with Hono, error handling, background tasks via EdgeRuntime.waitUntil()
  • Advanced (edge-adv-*): SSE streaming, WebSockets, regional invocation
  • Debugging (edge-dbg-*): Deno test patterns and runtime limits

Uses modern SUPABASE_PUBLISHABLE_KEY naming and jsr:@panva/jose@6 for JWT verification. Updates SKILL.md, AGENTS.md, and _sections.md.

@Rodriguespn Rodriguespn self-assigned this Feb 9, 2026
@Rodriguespn Rodriguespn added the new-rule Adding a new rule(s) to a skill label Feb 9, 2026
@Rodriguespn
Copy link
Collaborator Author

@kallebysantos commented on closed PR

Hi @Rodriguespn 💚
From my point, its looks good!!

Happy that you mentioned the new JWK verification

@Rodriguespn Rodriguespn force-pushed the feature/supabase-skill branch from 397502e to d097278 Compare February 10, 2026 19:00
@Rodriguespn Rodriguespn force-pushed the feature/edge-functions-references branch from 68537fb to a5596d8 Compare February 12, 2026 12:35
@Rodriguespn
Copy link
Collaborator Author

Hey Functions team, I've gave this another look by comparing the information from the reference files and our documentation. Below is the changelog report with the changes for each file and the sources I used for each one.

Note: The example still use the legacy ANON_KEYS since, according with our docs, publishable keys are not enabled by default on edge functions.

Currently, the new API keys are not available by default on the Edge Functions environment.
But you can manually expose them as [secret](https://supabase.com/docs/guides/functions/secrets#local-secrets) using the SB_ prefix.

We're working on exposing these secrets and making them default in the future.

If this is not the case and the publishable keys are enabled by default, happy to change this.


edge-adv-websockets.md — Replaced supabase.auth.getUser(token) with supabase.auth.getClaims() for JWT verification, changed query parameter from token to jwt, updated status codes from 401 to 403, and added security caveat about query param logging.

edge-dbg-limits.md — Replaced non-existent --debug CLI flag with --inspect-mode brk (or shorthand --inspect), added 150s request idle timeout to limits description, added "(hosted environment only)" caveat for SB_REGION/SB_EXECUTION_ID, fixed reference URL from /functions/troubleshooting to /functions/limits.

edge-adv-regional.md — Expanded region list from 6 to all 14 available regions (added ap-northeast-2, ap-south-1, ap-southeast-2, ca-central-1, us-west-2, eu-west-2, eu-west-3, sa-east-1).

edge-adv-streaming.md — Clarified that both raw streaming and SSE-formatted streaming are valid patterns, added try/catch/finally error handling in stream start callback matching official AI Models examples, reframed "incorrect" example around missing error handling instead of format.

edge-auth-jwt-verification.md — Qualified "no network request" claim for getClaims() (initial JWKS fetch required, then cached ~10min), added note about Supabase transitioning toward developer-controlled verification, added config.toml verify_jwt = false as alternative to --no-verify-jwt CLI flag.

edge-auth-rls-integration.md — Added supabase.auth.getClaims() mention for user identity verification, updated reference URL from /functions/auth to /functions/connect-to-postgres.

edge-db-direct-postgres.md — Removed client.end() call to match official Drizzle example, clarified pool-size-of-1 guidance applies to deno.land/x/postgres (not postgres-js), removed unverified claim about SUPABASE_DB_URL including pooler endpoint.

edge-dbg-testing.md — Added npx supabase start as prerequisite before npx supabase functions serve.

edge-fun-project-structure.md — Added import_map.json to folder structure example, added deno.importMap setting to VSCode configuration, fixed reference URL from quickstart to development-tips.

edge-fun-quickstart.md — Added SUPABASE_DB_URL to default environment variables list, added npx supabase start prerequisite before npx supabase functions serve, added npx supabase login prerequisite before npx supabase link.

edge-pat-background-tasks.md — Added unhandledrejection event listener recommendation for background task error handling, added note that per_worker mode requires manual restart via npx supabase functions serve.

edge-pat-cors.md — Changed error response status code from 500 to 400 to match official CORS example.

edge-pat-error-handling.md — Updated guidance from "never expose error.message" to "include helpful error messages" matching official docs recommendation, updated code example to return error.message, fixed reference URL from /functions/troubleshooting to /functions/error-handling.

edge-pat-routing.md — Changed Hono import from npm:hono to jsr:@hono/hono matching official docs standard.

@Rodriguespn Rodriguespn changed the title Feature: edge functions references feature: edge functions references Feb 12, 2026
@Rodriguespn Rodriguespn force-pushed the feature/edge-functions-references branch from 3b43299 to 4daddba Compare February 13, 2026 15:18
@coderabbitai
Copy link

coderabbitai bot commented Feb 13, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • !master
  • !main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/edge-functions-references

Comment @coderabbitai help to get the list of available commands and usage tips.

@Rodriguespn Rodriguespn merged commit 5ed4eb9 into feature/supabase-skill Feb 13, 2026
4 checks passed
@Rodriguespn Rodriguespn deleted the feature/edge-functions-references branch February 13, 2026 15:22
Rodriguespn added a commit that referenced this pull request Feb 13, 2026
* rebase and house keeping

* fix edge functions reference files after docs review

* update agents.mdd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-rule Adding a new rule(s) to a skill

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant