schema-registry: fix lux endpoint and misc fixes

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9388
GitOrigin-RevId: 883d0a59e5202c688e210eb624fd279f24ff1cfd
This commit is contained in:
Rishichandra Wawhal 2023-06-01 20:24:42 +05:30 committed by hasura-bot
parent 44aa0f00e8
commit 800be3c915
4 changed files with 6 additions and 5 deletions

View File

@ -3,9 +3,6 @@ schema:
- 'http://data.lux-dev.hasura.me/v1/graphql':
headers:
'x-hasura-admin-secret': 'randomsecret'
- 'http://schema-registry.lux-dev.hasura.me/v1/graphql':
headers:
'x-hasura-admin-secret': 'randomsecret'
documents: 'libs/console/legacy-ce/src/lib/features/ControlPlane/queries.ts'
generates:
libs/console/legacy-ce/src/lib/features/ControlPlane/generatedGraphQLTypes.ts:

View File

@ -33,7 +33,7 @@ export const getEndpoints = (globals: typeof consoleGlobals) => {
}/v1/graphql`,
prometheusUrl: `${baseUrl}/v1/metrics`,
registerEETrial: `https://licensing.pro.hasura.io/v1/graphql`,
schemaRegistry: 'http://schema-registry.lux-dev.hasura.me/v1/graphql',
schemaRegistry: `${window.location.protocol}//${globals.schemaRegistryHost}/v1/graphql`,
// registerEETrial: `http://licensing.lux-dev.hasura.me/v1/graphql`,
};

View File

@ -79,6 +79,7 @@ type CloudServerEnv = {
herokuOAuthClientId: UUID;
isAdminSecretSet: boolean;
luxDataHost: string; // e.g. "data.pro.hasura.io"
schemaRegistryHost: string;
projectID: UUID;
projectName: string;
serverVersion: string;
@ -150,6 +151,7 @@ export type EnvVars = {
cloudRootDomain?: string;
herokuOAuthClientId?: string;
luxDataHost?: string;
schemaRegistryHost: string;
isAdminSecretSet?: boolean;
enableTelemetry?: boolean;
consoleType?: ConsoleType;
@ -218,6 +220,9 @@ const globals = {
? stripTrailingSlash(window.__env.luxDataHost)
: // stripTrailingSlash is used to ensure correctness in Endpoints because we append /v1/graphql to luxDataHost in endpoints.
undefined,
schemaRegistryHost: window.__env?.schemaRegistryHost
? stripTrailingSlash(window.__env.schemaRegistryHost)
: '',
userRole: window.__env?.userRole || undefined,
userId: window.__env?.userId || undefined,
consoleType: window.__env?.consoleType // FIXME : this check can be removed when the all CLI environments are set with the console type, some CLI environments could have empty consoleType

View File

@ -161,7 +161,6 @@ export const eventsPrefix = 'events';
export const scheduledEventsPrefix = 'cron';
export const adhocEventsPrefix = 'one-off-scheduled-events';
export const dataEventsPrefix = 'data';
export const schemaRegsitryPrefix = 'sh';
export const getSTRoute = (type: string | undefined, relativeRoute: string) => {
if (type === 'relative') {