feat(codegen,types): SetRelation on expanded types (#3477)

## What

On expanded relations, mutate type using SetRelation, an alias for SetRequired with SetNonNullable.

## Why

Simplifies implementation in client code.

## How

* Export SetRelation type util
* Update codegen template

Extra scope:

* Improve codegen error handling when processing x-expanded-relations
* Add `eager` sub-categorization to x-expanded-relations to highlight relations that are loaded using TypeORM eager.
This commit is contained in:
Patrick
2023-03-15 11:29:21 +00:00
committed by GitHub
parent 6748877c69
commit 826d4bedfe
7 changed files with 59 additions and 20 deletions
+6
View File
@@ -0,0 +1,6 @@
---
"@medusajs/openapi-typescript-codegen": minor
"@medusajs/client-types": minor
---
feat(codegen,types): SetRelation on expanded types