Replies: 1 comment 2 replies
-
For the input I'd prefer dynamic input of translations from the beginning: input ProductMultilingualInput {
images: [ProductImageUploadable!]!
price: ProductPriceInput!
translations: [ProductMultilingualInputTranslations!]!
}
input ProductMultilingualInputTranslations {
locale: String! # maybe enum
name: String!
description: String!
} |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to design multilingual input and output types and I am looking for some interesting design ideas.
My initial input kickoff:
Pros:
+ I can submit EN only, ES only, or both together (that's what I want)
Cons:
- The languages are not dynamic for now but strictly EN and ES. In the future, I can change it to an array of translations if I want to.
It can be done similarly for the output type (pseudo-code):
Note: there is
name
on the product directly andname
inside translations. This allows me to return the product already translated from DB for FE and also to return all the translations if needed (for editation purposes for example).Question: how would you do it differently and why?
Beta Was this translation helpful? Give feedback.
All reactions