Why is the %Virta.Node module field a string?
Qqwy opened this issue · 1 comments
Qqwy commented
Since you are directly referring to modules here, wouldn't it make sense to use the module name as atoms? Is there a deliberate choice to use strings instead? https://github.com/sarat1669/virta/blob/ac68e6d670a16784adbf7a91b5b935c2888e77ee/lib/instance.ex#L30 uses a roundabout way to get the module-atom from the string, which would not be necessary if the module name would just be used immediately.
sarat1669 commented
The end goal of this project is to have a UI to build the workflow. The graph will be represented in a JSON, so this was a choice I made. But as you mentioned, it should be an atom. The JSON transformer should ideally do the conversion.