Vladimir Razuvaev
Vladimir Razuvaev
Can you elaborate a bit more on what is your use-case? Why do you want to translate validation messages? These messages are not supposed to be shown to end-users. They...
I don't want to complicate things in this library by introducing the translation layer (as this is not intended usage of those errors) but we can allow overriding message templates....
Additionally, we can add `interpolate` method and use it in place of `sprintf` and also allow setting a custom implementation for it.
Sure, a PR is welcome! We can continue this discussion there.
@spawnia Works for me and looks simpler 👍
My intention was to allow fetching all messages and their keys. But prefix will probably allow this too if actually required
We'll add it but it has to become a part of the spec first and implemented in the reference implementation (graphql-js).
Makes sense for me. PR is welcome!
> I don't understand. You say you don't want it in this library, but you are considering merging the other PR, which has the same general goal as my PR....
This topic is a bit controversial. See https://github.com/graphql/graphql-js/issues/2020 for some details. We will adopt the same solution as graphql-js eventually. So I will keep this issue open until it is...