Skip to content

docs: improve discoverability of custom schemas documentation - #42634

Merged
ChrisChinchilla merged 3 commits into
supabase:masterfrom
yogeshwaran-c:docs/improve-custom-schemas-discoverability
Jul 8, 2026
Merged

ChrisChinchilla merged 3 commits into
supabase:masterfrom
yogeshwaran-c:docs/improve-custom-schemas-discoverability

Conversation

@yogeshwaran-c

@yogeshwaran-c yogeshwaran-c commented Feb 10, 2026 •

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Documentation improvement

What is the current behavior?

The documentation for using custom schemas is buried under the REST API section (/guides/api/using-custom-schemas), making it hard for users to find when they first encounter schemas in the database documentation. Users who create custom schemas often don't realize they need to configure API access and grant permissions, leading to confusion.

Closes #39856

What is the new behavior?

Three improvements to make custom schemas documentation more discoverable:

  1. Cross-reference in tables page: Added an admonition tip after the "Schemas" section in /guides/database/tables linking to both the "Using Custom Schemas" guide and the "Hardening the Data API" guide
  2. Navigation sidebar: Added "Using Custom Schemas" link under "Database > Access and security" in the sidebar navigation, so users can find it from the database section without having to navigate to the API section
  3. service_role mention: Updated the schema grants example in "Hardening the Data API" to include service_role alongside anon and authenticated, since users with server-side access also need this grant

Additional context

The issue author spent hours debugging custom schema access because the documentation wasn't linked from where schemas are first introduced (the database tables page). These changes create a clear path from learning about schemas → configuring API access → security hardening.

Summary by CodeRabbit

  • Documentation
    • Added "Using Custom Schemas" guide to the navigation menu under Database -> Access and security section
    • Enhanced Data API hardening documentation with clarification on service_role permissions for server-side database access
    • Added instructional tips regarding custom schema exposure via Data API and proper permission configuration

- Add cross-reference links in the database tables page pointing to the
  "Using Custom Schemas" and "Hardening the Data API" guides
- Add "Using Custom Schemas" to the database navigation sidebar under
  "Access and security" so it's discoverable from the database section
- Mention service_role in the hardening guide's schema grants, since
  the existing example only included anon and authenticated

Closes supabase#39856
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for contributing to Supabase! ❤️ Our team will review your PR.

A few tips for a smoother review process:

  • If you have a local version of the repo, run pnpm run format to make sure formatting checks pass.
  • Once we've reviewed your PR, please don't trivially merge master (don't click Update branch if there are no merge conflicts to be fixed). This invalidates any pre-merge checks we've run.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Feb 10, 2026
@vercel

vercel Bot commented Feb 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
design-system Ready Ready Preview, Comment Jul 8, 2026 1:02pm
docs Ready Ready Preview, Comment, Open in v0 Jul 8, 2026 1:02pm
studio-self-hosted Ready Ready Preview, Comment Jul 8, 2026 1:02pm
studio-staging Ready Ready Preview, Comment Jul 8, 2026 1:02pm
ui-library Ready Ready Preview, Comment Jul 8, 2026 1:02pm
zone-www-dot-com Ready Ready Preview, Comment, Open in v0 Jul 8, 2026 1:02pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Jul 8, 2026 1:02pm

Request Review

@vercel

vercel Bot commented Feb 10, 2026

Copy link
Copy Markdown

@yogeshwaran-c is attempting to deploy a commit to the Supabase Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Feb 10, 2026 •

Copy link
Copy Markdown
Contributor

Walkthrough

Documentation updates to improve guidance on custom schemas and Data API access permissions. A new navigation item directs users to the "Using Custom Schemas" guide, and existing database documentation is enhanced with admonitions and clarifications about exposing custom schemas and granting required permissions including service_role.

Changes

Cohort / File(s) Summary
Navigation Updates
apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
Added new navigation item "Using Custom Schemas" under Database > Access and security section, directing users to /guides/api/using-custom-schemas.
Documentation Improvements
apps/docs/content/guides/database/hardening-data-api.mdx, apps/docs/content/guides/database/tables.mdx
Updated hardening guide to clarify that service_role should be granted usage on the api schema for server-side access. Added two admonition tip blocks in tables guide highlighting the need to expose custom schemas via Data API and grant appropriate permissions, with cross-references to related guides.

Possibly related PRs

Suggested labels

documentation

Suggested reviewers

  • gregnr
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and concisely summarizes the main objective: improving discoverability of custom schemas documentation through navigation, cross-references, and permission updates.
Description check ✅ Passed The PR description comprehensively covers what kind of change was made, current behavior, new behavior with three specific improvements, and additional context explaining the motivation behind the changes.
Linked Issues check ✅ Passed The PR addresses the three main coding objectives from issue #39856: improving discoverability via navigation sidebar, cross-referencing on the tables page, and updating documentation to include service_role in schema grants.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue objectives: navigation menu addition, documentation cross-references, and schema grant example updates. No unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉


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

# Conflicts:
#	apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
#	apps/docs/content/guides/database/hardening-data-api.mdx
@ChrisChinchilla
ChrisChinchilla requested a review from a team as a code owner July 8, 2026 12:53

@ChrisChinchilla ChrisChinchilla left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ChrisChinchilla
ChrisChinchilla enabled auto-merge (squash) July 8, 2026 12:55
@ChrisChinchilla
ChrisChinchilla merged commit c84d985 into supabase:master Jul 8, 2026
28 checks passed
@github-actions

github-actions Bot commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1783515925)

Score Average Improvements Regressions
Knowledge Usage 94.9% (+3pp) 1 🟢 -
Tool Usage 73.2% (+1pp) 1 🟢 1 🔴
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 100% (+0pp) - -
Time_to_first_token 3.17tok (+0.04tok) 13 🟢 16 🔴
Llm_calls 2.87 (-0.07) 10 🟢 14 🔴
Tool_calls 3 (-0.09) 9 🟢 13 🔴
Errors 5.26 (+0) 3 🟢 3 🔴
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 21781.6tok (-2259.91tok) 12 🟢 13 🔴
Prompt_cached_tokens 7385.75tok (-1606.62tok) 10 🟢 15 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 589.77tok (-5.8tok) 13 🟢 16 🔴
Completion_reasoning_tokens 97.71tok (-2.79tok) 12 🟢 14 🔴
Total_tokens 22371.37tok (-2265.71tok) 13 🟢 16 🔴
Estimated_cost 0$ (0$) 11 🟢 14 🔴
Duration 19.76s (+2.04s) 10 🟢 19 🔴
Llm_duration 14.75s (+2.53s) 10 🟢 19 🔴

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

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move documentation for creating new schemas from "RestAPI" to "database"

2 participants