Open xperiandri opened 4 years ago
@xperiandri As mentioned on gitter, there is really no good solution for this until the Type Provider mechanism supports more options for extensibility i.e. language suggestion FS-1023.
Related question over on Snowflaqe https://github.com/Zaid-Ajaj/Snowflaqe/issues/24
Description
It would be extremely nice to be able to define a list of mapping between custom scalar types and real domain types. Like when you define coercion functions on server side. Otherwise now it is not convenient to use primitive types and you need to convert your operation response type to a domain type that requires you to either fill existing domain types or create new.
Expected behavior
When you define a provider you can pass a list of mappings with coercion functions the same as you use for custom scalar types on a server-side.
Actual behavior
Primitive types are used
Known workarounds
Write boilerplate code to transform them
Related information