mutation InsertConfiguredModel($name: String!, $version: String!, $filename: String, $image_path: String, $visibility: String!, $sha: bpchar!, $workspace_id: bigint, $status: String, $task_id: String, $conversion: jsonb, $input_schema: String, $output_schema: String, $runtime: String!) {
  insert_models(objects: {models: {data: {model_configs: {data: {output_schema: $output_schema, input_schema: $input_schema, runtime: $runtime}}, model_version: $version, file_name: $filename, image_path: $image_path, sha: $sha, status: $status, task_id: $task_id, conversion: $conversion, visibility: $visibility, model_id: $name}}, name: $name, workspace_id: $workspace_id}, on_conflict: {constraint: models_name_workspace_id_key, update_columns: updated_at}) {
    returning {
      models(order_by: {id: desc}, limit: 1) {
        id
      }
    }
  }
}
