mobxjs / mst-gql

Bindings for mobx-state-tree and GraphQL
MIT License
680 stars 81 forks source link

Custom scalars support #371

Open dmytro-shpak opened 2 years ago

dmytro-shpak commented 2 years ago

Hi! The mst-gql looks very promising tool for me. But i have not found the Custom Scalars support. That feature could be implemented by --fieldOverrides flag or by manual extending of Model.base.

I am working on --customScalars feature now (https://github.com/mobxjs/mst-gql/pull/370). The root idea is to allow to inject custom scalars implemented with types.custom to generated code by scalar name.

Is it a good idea or custom scalars could be handled in some other common way? Is it a good idea to add that feature to the main mst-gql project?

dmytro-shpak commented 2 years ago

It looks like more correct idea is to extend the --fieldOverrides by one more field to allow import custom scalars from some file

dmytro-shpak commented 2 years ago

The version with extended --fieldOverrides is created #375