Function prisma_fmt::get_config

source ·
pub fn get_config(get_config_params: String) -> Result<String, String>
Expand description

This is the same command as get_config()

Params is a JSON string with the following shape:

interface GetConfigParams {
  prismaSchema: string
  ignoreEnvVarErrors?: bool
  env?: { [key: string]: string }
  datasourceOverrides?: { [key: string]: string }
}

Params example:

{
  "prismaSchema": <the prisma schema>,
  "env": {
    "DBURL": "postgresql://example.com/mydb"
  }
}

The response is a JSON string with the following shape:

type GetConfigSuccessResponse = any // same as QE getConfig

interface GetConfigErrorResponse {
  error: {
    error_code?: string
    message: string
  }
}

type GetConfigResponse = GetConfigErrorResponse | GetConfigSuccessResponse