Skip to content

fix(#101): add hono adapter Database type override#100

Open
elGatoMantocko wants to merge 1 commit into
supabase:mainfrom
elGatoMantocko:elliott/fix-hono-adapter-types
Open

fix(#101): add hono adapter Database type override#100
elGatoMantocko wants to merge 1 commit into
supabase:mainfrom
elGatoMantocko:elliott/fix-hono-adapter-types

Conversation

@elGatoMantocko

Copy link
Copy Markdown

What kind of change does this PR introduce?

Fix hono adapter type definitions.

What is the current behavior?

There is no way to override the DB context returned by the withSupabase middleware without doing so in the Hono app itself.

What is the new behavior?

Make the hono withSupabase adapter more type-aware. Allow Database type overrides in the hono middleware.

Additional context

For growing projects, managing routes with hono's route helpers via sub-applications generally becomes best practice when scalaing a hono api. In those scenarios, it's common to see many hono "apps" or routes defined across a stack. This change allows users to just use the hono middleware without needing to pre-declare any context types.

adds generic Database type override to hono adapter
added test to ensure chained declarations preserve context type
updated docs to include alternative hono declaration
@elGatoMantocko elGatoMantocko requested review from a team as code owners July 8, 2026 18:35
@elGatoMantocko elGatoMantocko changed the title fix: add hono adapter Database type override fix(#101): add hono adapter Database type override Jul 8, 2026
@elGatoMantocko

Copy link
Copy Markdown
Author

fixes #101

@pkg-pr-new

pkg-pr-new Bot commented Jul 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@supabase/server@100

commit: 5fb279c

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant