mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
console: bugfix to resolve error when using connection parameters with postgres/citus
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9465 GitOrigin-RevId: 8ee65b734314e6bfc7bd2806dc0ba77334e30c5c
This commit is contained in:
parent
4613aaf56e
commit
dc7a1f2270
@ -5,20 +5,21 @@ import { cleanEmpty } from './helpers';
|
||||
|
||||
export const generateConnectionInfo = (
|
||||
values: PostgresConnectionSchema['configuration']['connectionInfo']
|
||||
) => {
|
||||
return {
|
||||
) => ({
|
||||
database_url:
|
||||
values.databaseUrl.connectionType === 'databaseUrl'
|
||||
? values.databaseUrl.url
|
||||
: values.databaseUrl.connectionType === 'envVar'
|
||||
? { from_env: values.databaseUrl.envVar }
|
||||
: {
|
||||
connection_parameters: {
|
||||
username: values.databaseUrl.username,
|
||||
password: values.databaseUrl.password,
|
||||
database: values.databaseUrl.database,
|
||||
port: values.databaseUrl.port,
|
||||
host: values.databaseUrl.host,
|
||||
},
|
||||
},
|
||||
pool_settings: {
|
||||
total_max_connections: values.poolSettings?.totalMaxConnections,
|
||||
idle_timeout: values.poolSettings?.idleTimeout,
|
||||
@ -43,8 +44,7 @@ export const generateConnectionInfo = (
|
||||
from_env: values.sslSettings?.sslPassword,
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
export const generatePostgresRequestPayload = ({
|
||||
driver,
|
||||
|
Loading…
Reference in New Issue
Block a user