Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

move pg-meta query to our platform api

Inian172ed57beb80
diff --git a/studio/stores/pgmeta/MetaStore.ts b/studio/stores/pgmeta/MetaStore.ts
index 67cc8c7f27b..6b732d4b473 100644
--- a/studio/stores/pgmeta/MetaStore.ts
+++ b/studio/stores/pgmeta/MetaStore.ts
@@ -116,6 +116,7 @@ export default class MetaStore implements IMetaStore {
connectionString?: string
baseUrl: string
+ queryBaseUrl: string
excludedSchemas = [
'auth',
'extensions',
@@ -132,6 +133,7 @@ export default class MetaStore implements IMetaStore {
const { projectRef, connectionString } = options
this.rootStore = rootStore
this.baseUrl = `/api/pg-meta/${projectRef}`
+ this.queryBaseUrl = `${API_URL}/pg-meta/${projectRef}`
const headers: any = {}
if (IS_PLATFORM && connectionString) {
@@ -166,7 +168,7 @@ export default class MetaStore implements IMetaStore {
try {
const headers: any = { 'Content-Type': 'application/json' }
if (this.connectionString) headers['x-connection-encrypted'] = this.connectionString
- const url = `${this.baseUrl}/query`
+ let url = `${this.queryBaseUrl}/query`
const response = await post(url, { query: value }, { headers })
if (response.error) throw response.error