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 authored and GitHub committed 2023-03-15 11:29:21 +00:00
1 parent 6748877c69
commit 826d4bedfe
7 files changed
+59 -20

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
---
"@medusajs/openapi-typescript-codegen": minor
"@medusajs/client-types": minor
---
feat(codegen,types): SetRelation on expanded types