<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Haviland at Cheqvo</title>
    <description>The latest articles on DEV Community by Haviland at Cheqvo (@cheqvo).</description>
    <link>https://dev.to/cheqvo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4258346%2Fc3a37132-5a1f-44f5-b5ae-0869e3bbcbc6.png</url>
      <title>DEV Community: Haviland at Cheqvo</title>
      <link>https://dev.to/cheqvo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cheqvo"/>
    <language>en</language>
    <item>
      <title>New Supabase tables can return 42501. Old ones can still be readable.</title>
      <dc:creator>Haviland at Cheqvo</dc:creator>
      <pubDate>Wed, 25 Nov 2026 14:22:54 +0000</pubDate>
      <link>https://dev.to/cheqvo/new-supabase-tables-can-return-42501-old-ones-can-still-be-readable-1imj</link>
      <guid>https://dev.to/cheqvo/new-supabase-tables-can-return-42501-old-ones-can-still-be-readable-1imj</guid>
      <description>&lt;p&gt;If you shipped a Supabase app with Lovable, Cursor, or another AI coding tool, two things may show up at once: a new table fails with Postgres error &lt;code&gt;42501&lt;/code&gt; (&lt;code&gt;permission denied for table&lt;/code&gt;), or someone asks whether the October 30 Data API change closed off tables you created earlier.&lt;/p&gt;

&lt;p&gt;Those are not the same problem. They sit on two layers of Postgres access control, and mixing them up is how a &lt;code&gt;42501&lt;/code&gt; fix turns into a table that signed-out visitors can read. This review is for &lt;em&gt;your&lt;/em&gt; project, not anyone else's, and it is not legal advice.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually changed
&lt;/h2&gt;

&lt;p&gt;On April 28, 2026, Supabase published a breaking-change notice: new tables in the &lt;code&gt;public&lt;/code&gt; schema would no longer be reachable through the Data API automatically. The planned dates were April 28 (opt in at project creation), May 30 (new default for new projects, rolled out gradually), and October 30, 2026 (applied to existing projects).&lt;/p&gt;

&lt;p&gt;The Data API is the auto-generated REST and GraphQL layer that &lt;code&gt;supabase-js&lt;/code&gt; and the other client libraries call (&lt;code&gt;/rest/v1/&lt;/code&gt; and &lt;code&gt;/graphql/v1/&lt;/code&gt;). Direct Postgres connections are unaffected.&lt;/p&gt;

&lt;p&gt;Once the new default is active, a table you create in &lt;code&gt;public&lt;/code&gt; exists, but the Data API cannot see it until you issue an explicit &lt;code&gt;GRANT&lt;/code&gt;. Existing tables keep their current grants and stay reachable.&lt;/p&gt;

&lt;p&gt;Supabase's API docs still describe automatic grants on some existing projects and tell you to inspect your own defaults. As of this draft (November 25, 2026), I have not seen a later official changelog post confirming that every existing project has switched. Treat October 30 as the announced date, then check your project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Grants and RLS are two layers
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Grants&lt;/strong&gt; decide whether a role can reach a table, view, or function through the Data API at all. The roles that matter here are &lt;code&gt;anon&lt;/code&gt; (signed-out requests), &lt;code&gt;authenticated&lt;/code&gt; (signed-in users), and &lt;code&gt;service_role&lt;/code&gt; (server-side).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Row Level Security (RLS) policies&lt;/strong&gt; decide which rows that role can read or change.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A missing grant fails &lt;em&gt;before&lt;/em&gt; any policy runs. That failure is &lt;code&gt;42501&lt;/code&gt;. Adding a policy does not create a grant, and adding a grant does not write a policy.&lt;/p&gt;

&lt;p&gt;The publishable key in your frontend (&lt;code&gt;sb_publishable_...&lt;/code&gt;, or the legacy &lt;code&gt;anon&lt;/code&gt; key) is meant to be public. Anyone can read it from your shipped app. What a signed-out visitor can reach is whatever you granted to &lt;code&gt;anon&lt;/code&gt;, filtered by RLS. The secret key (and the legacy &lt;code&gt;service_role&lt;/code&gt; key) bypasses RLS and must stay on a server you control.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check whether your project still auto-grants new tables
&lt;/h2&gt;

&lt;p&gt;Run this query in the SQL Editor. It is the check from Supabase's Data API guide:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;select&lt;/span&gt;
  &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;defaclobjtype&lt;/span&gt;
    &lt;span class="k"&gt;when&lt;/span&gt; &lt;span class="s1"&gt;'r'&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt; &lt;span class="s1"&gt;'tables'&lt;/span&gt;
    &lt;span class="k"&gt;when&lt;/span&gt; &lt;span class="s1"&gt;'S'&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt; &lt;span class="s1"&gt;'sequences'&lt;/span&gt;
    &lt;span class="k"&gt;when&lt;/span&gt; &lt;span class="s1"&gt;'f'&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt; &lt;span class="s1"&gt;'functions'&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;object_type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;grantee&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;regrole&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;role&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nb"&gt;string_agg&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;privilege_type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;', '&lt;/span&gt; &lt;span class="k"&gt;order&lt;/span&gt; &lt;span class="k"&gt;by&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;privilege_type&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;privileges&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pg_default_acl&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;
&lt;span class="k"&gt;cross&lt;/span&gt; &lt;span class="k"&gt;join&lt;/span&gt; &lt;span class="k"&gt;lateral&lt;/span&gt; &lt;span class="nf"&gt;aclexplode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;defaclacl&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;
&lt;span class="k"&gt;where&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;defaclrole&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'postgres'&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;regrole&lt;/span&gt;
  &lt;span class="k"&gt;and&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;defaclnamespace&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'public'&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;regnamespace&lt;/span&gt;
  &lt;span class="k"&gt;and&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;grantee&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'anon'&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;regrole&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'authenticated'&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;regrole&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'service_role'&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;regrole&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;group&lt;/span&gt; &lt;span class="k"&gt;by&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="k"&gt;order&lt;/span&gt; &lt;span class="k"&gt;by&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;No rows&lt;/strong&gt; means new objects in &lt;code&gt;public&lt;/code&gt; grant nothing to the Data API roles until you grant access yourself (the new default). &lt;strong&gt;Rows with &lt;code&gt;select&lt;/code&gt; / &lt;code&gt;insert&lt;/code&gt; / &lt;code&gt;update&lt;/code&gt; / &lt;code&gt;delete&lt;/code&gt; for &lt;code&gt;anon&lt;/code&gt; or &lt;code&gt;authenticated&lt;/code&gt;&lt;/strong&gt; mean a new &lt;code&gt;public&lt;/code&gt; table is still auto-exposed, unless you change the default.&lt;/p&gt;

&lt;p&gt;The same default is controlled by &lt;strong&gt;Automatically expose new tables&lt;/strong&gt; in Data API settings.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you get 42501 on a new table
&lt;/h2&gt;

&lt;p&gt;PostgREST returns a hint with the missing privilege and the role, for example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"42501"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"permission denied for table your_table"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"hint"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Grant the required privileges to the current role with: GRANT SELECT ON public.your_table TO anon;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The hint is accurate about the missing grant. It is not a suggestion to grant every privilege to every role. Grant only what each role should be able to do. Supabase's example treats three steps as one unit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;grant&lt;/span&gt; &lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="n"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;your_table&lt;/span&gt; &lt;span class="k"&gt;to&lt;/span&gt; &lt;span class="n"&gt;anon&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;grant&lt;/span&gt; &lt;span class="k"&gt;select&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;insert&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;update&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;delete&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="n"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;your_table&lt;/span&gt; &lt;span class="k"&gt;to&lt;/span&gt; &lt;span class="n"&gt;authenticated&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;grant&lt;/span&gt; &lt;span class="k"&gt;select&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;insert&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;update&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;delete&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="n"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;your_table&lt;/span&gt; &lt;span class="k"&gt;to&lt;/span&gt; &lt;span class="n"&gt;service_role&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;alter&lt;/span&gt; &lt;span class="k"&gt;table&lt;/span&gt; &lt;span class="n"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;your_table&lt;/span&gt; &lt;span class="n"&gt;enable&lt;/span&gt; &lt;span class="k"&gt;row&lt;/span&gt; &lt;span class="n"&gt;level&lt;/span&gt; &lt;span class="n"&gt;security&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;create&lt;/span&gt; &lt;span class="n"&gt;policy&lt;/span&gt; &lt;span class="s2"&gt;"users can read their own rows"&lt;/span&gt;
  &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="n"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;your_table&lt;/span&gt;
  &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="k"&gt;select&lt;/span&gt;
  &lt;span class="k"&gt;to&lt;/span&gt; &lt;span class="n"&gt;authenticated&lt;/span&gt;
  &lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;uid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Copy this only if it matches your app. If signed-out visitors should not read the table, do not grant &lt;code&gt;select&lt;/code&gt; to &lt;code&gt;anon&lt;/code&gt;. If signed-in users should only read their own rows, do not add a policy &lt;code&gt;to anon using (true)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;42501&lt;/code&gt; can also come from a custom schema, column-level privileges, or an &lt;code&gt;INSERT&lt;/code&gt;/&lt;code&gt;UPDATE&lt;/code&gt; that RLS does not allow. If a grant is already present, use Supabase's 42501 troubleshooting note before widening privileges.&lt;/p&gt;

&lt;p&gt;If an AI tool creates your tables, have it emit the &lt;code&gt;GRANT&lt;/code&gt;, &lt;code&gt;ENABLE ROW LEVEL SECURITY&lt;/code&gt;, and policy statements in the same migration. Supabase publishes an agent skill that includes the grants step.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part that did not change: your existing tables
&lt;/h2&gt;

&lt;p&gt;Default-privilege changes apply only to &lt;em&gt;new&lt;/em&gt; objects. A project can be on the new default for tables you create tomorrow, and still expose tables you created last month.&lt;/p&gt;

&lt;p&gt;Two official warnings matter here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A table in an exposed schema without RLS is readable and writable by any role that has a grant on it. Tables created in the Dashboard get RLS enabled by default. Tables created in the SQL Editor, a migration, or another tool do not, until you enable it yourself.&lt;/li&gt;
&lt;li&gt;A policy such as &lt;code&gt;to anon using (true)&lt;/code&gt; lets every signed-out visitor read every row that the &lt;code&gt;anon&lt;/code&gt; grant already reaches. Use that shape only for data that is meant to be public.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once RLS is enabled, a publishable key cannot read rows until you create a policy that allows it. Enabling RLS with no policy is a closed default. Enabling RLS and writing &lt;code&gt;using (true)&lt;/code&gt; for &lt;code&gt;anon&lt;/code&gt; is an open default. The difference is the policy, not the fact that RLS is on.&lt;/p&gt;

&lt;h2&gt;
  
  
  A short review of your own app
&lt;/h2&gt;

&lt;p&gt;Stay inside &lt;em&gt;your&lt;/em&gt; project. Do not point these checks at someone else's URL.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. List current grants on &lt;code&gt;public&lt;/code&gt; tables:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="n"&gt;table_schema&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;table_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;grantee&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;privilege_type&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;information_schema&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;role_table_grants&lt;/span&gt;
&lt;span class="k"&gt;where&lt;/span&gt; &lt;span class="n"&gt;table_schema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'public'&lt;/span&gt;
  &lt;span class="k"&gt;and&lt;/span&gt; &lt;span class="n"&gt;grantee&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'anon'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'authenticated'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'service_role'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;order&lt;/span&gt; &lt;span class="k"&gt;by&lt;/span&gt; &lt;span class="n"&gt;table_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;grantee&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;privilege_type&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pay attention to &lt;code&gt;anon&lt;/code&gt; plus &lt;code&gt;SELECT&lt;/code&gt;, and to write privileges that should not be public.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Open Database → Policies.&lt;/strong&gt; For each Data API table, confirm RLS is on, then read the policies. Can a signed-out visitor read or write rows? Can any signed-in user see every row, or only their own?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Optional: call your own table while signed out.&lt;/strong&gt; Use your project URL and publishable key (or legacy &lt;code&gt;anon&lt;/code&gt; key), with no user session. Official docs put publishable keys on the &lt;code&gt;apikey&lt;/code&gt; header:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="s2"&gt;"https://YOUR_PROJECT.supabase.co/rest/v1/YOUR_TABLE?select=*&amp;amp;limit=1"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"apikey: YOUR_PUBLISHABLE_OR_ANON_KEY"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If rows come back that should not be public, tighten the &lt;code&gt;anon&lt;/code&gt; grant, the RLS policy, or both. &lt;code&gt;42501&lt;/code&gt; means a missing grant. An empty array can mean no policy allows those rows, or the table is empty. Do not put a secret or &lt;code&gt;service_role&lt;/code&gt; key in this request, or in frontend code. That role bypasses RLS.&lt;/p&gt;

&lt;p&gt;If a table should not be on the Data API at all, revoke the client grants. Existing access does not disappear on its own:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;revoke&lt;/span&gt; &lt;span class="k"&gt;all&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="k"&gt;table&lt;/span&gt; &lt;span class="n"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;your_table&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;anon&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;authenticated&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Leave &lt;code&gt;service_role&lt;/code&gt; if your server still needs it.&lt;/p&gt;

&lt;p&gt;If you want a second look at a public app URL, Cheqvo offers a free scan at &lt;a href="https://cheqvo.com/?ref=devto" rel="noopener noreferrer"&gt;cheqvo.com/?ref=devto&lt;/a&gt;. It is a starting point for your own review, not a substitute for the checks above.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Supabase changelog, "Breaking Change: Tables not exposed to Data and GraphQL API automatically" (published April 28, 2026; announced existing-project date October 30, 2026): &lt;a href="https://supabase.com/changelog/45329-breaking-change-tables-not-exposed-to-data-and-graphql-api-automatically" rel="noopener noreferrer"&gt;https://supabase.com/changelog/45329-breaking-change-tables-not-exposed-to-data-and-graphql-api-automatically&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Supabase docs, "Securing your API" (grants vs RLS, default privileges, official &lt;code&gt;pg_default_acl&lt;/code&gt; check, explicit &lt;code&gt;GRANT&lt;/code&gt; examples, &lt;code&gt;42501&lt;/code&gt; hint): &lt;a href="https://supabase.com/docs/guides/api/securing-your-api" rel="noopener noreferrer"&gt;https://supabase.com/docs/guides/api/securing-your-api&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Supabase docs, "Row Level Security" (grants vs policies, danger if RLS is off, &lt;code&gt;to anon using (true)&lt;/code&gt;, Dashboard vs SQL Editor defaults, publishable-key behavior once RLS is on, &lt;code&gt;service_role&lt;/code&gt; bypass): &lt;a href="https://supabase.com/docs/guides/database/postgres/row-level-security" rel="noopener noreferrer"&gt;https://supabase.com/docs/guides/database/postgres/row-level-security&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Supabase troubleshooting, "Database API 42501 errors": &lt;a href="https://supabase.com/kb/troubleshooting/database-api-42501-errors" rel="noopener noreferrer"&gt;https://supabase.com/kb/troubleshooting/database-api-42501-errors&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Supabase docs, "API keys" (publishable vs secret keys, legacy &lt;code&gt;anon&lt;/code&gt; / &lt;code&gt;service_role&lt;/code&gt;, &lt;code&gt;apikey&lt;/code&gt; header): &lt;a href="https://supabase.com/docs/guides/getting-started/api-keys" rel="noopener noreferrer"&gt;https://supabase.com/docs/guides/getting-started/api-keys&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>supabase</category>
      <category>postgres</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
