Browse Source

docs: Add to note about custom field type generation for translated entities (#3799)

Daniel Biegler 4 months ago
parent
commit
b6d89ea6cb
1 changed files with 11 additions and 1 deletions
  1. 11 1
      docs/docs/guides/developer-guide/has-custom-fields/index.md

+ 11 - 1
docs/docs/guides/developer-guide/has-custom-fields/index.md

@@ -83,7 +83,17 @@ input UpdateProductReviewInput {
 Notice the lack of manually defining `customFields` on the types, this is because Vendure extends the types automatically once your entity implements `HasCustomFields`.
 Notice the lack of manually defining `customFields` on the types, this is because Vendure extends the types automatically once your entity implements `HasCustomFields`.
 
 
 :::important Naming convention
 :::important Naming convention
-In order for Vendure to find the correct input types to extend to, they must conform to the naming convention of `Create<EntityName>Input` and `Update<EntityName>Input`.
+In order for Vendure to find the correct input types to extend to, they must conform to the naming convention of:
+
+- `Create<EntityName>Input`
+- `Update<EntityName>Input`
+
+And if your entity is [supporting translations](/guides/developer-guide/translatable):
+
+- `<EntityName>Translation`
+- `<EntityName>TranslationInput`
+- `Create<EntityName>TranslationInput`
+- `Update<EntityName>TranslationInput`
 :::
 :::
 
 
 Following this caveat, codegen will now produce correct types including `customFields`-fields like so:
 Following this caveat, codegen will now produce correct types including `customFields`-fields like so: