Hey team!
Have you considered the functionality to generate code in other languages (like Python or JS) based on the Go schema?
One use case would be making it possible to interact directly with the graph as stored on the DB, from a service written in another language (think data science/machine learning done in Python). I realise that it might be hard to replicate the entire functionality of entgo (due to the sheer number of features that need to be ported, or the fact that some parts of the schema are expressed as native Go code).
Another use case could be simpler though – just making it possible to keep native representation of the objects in a different language (for type safety, reducing copy paste, etc), and then use the Go service via some web API to the actual reads/writes. As I'm writing this, I'm thinking about the comment you made on Twitter some time ago @a8m: https://twitter.com/arielmashraki/status/1254497139041976322 Could GraphQL be used for that purpose?
Curious what are your thoughts on / experiences with this!
Hey @kkom and thanks for opening this issue.
Have you considered the functionality to generate code in other languages (like Python or JS) based on the Go schema?
No. To be honest, I don’t see it as an option in the foreseeable future. However, the entc package provides an API for interacting with ent schemas, so if someone wants to take this as a different project I’ll be happy to support them.
About GraphQL - I hope to find the time to release our work with gqlgen with a proper documentation soon.
Thanks @a8m! All makes sense!
@a8m I'm hoping to use the Ent framework with gqlgen and came across this thread. I found what I believe to be some related work here and in this framework's documentation, but couldn't find a complete resource on this. Do you have any example code base that can be referenced for this purpose? I can piece together the various parts with some example code and may be able to help with documenting it. I also don't mind using something experimental/subject to change.
Thanks in advance, looking forward to using this library!
Most helpful comment
Hey @kkom and thanks for opening this issue.
No. To be honest, I don’t see it as an option in the foreseeable future. However, the entc package provides an API for interacting with ent schemas, so if someone wants to take this as a different project I’ll be happy to support them.
About GraphQL - I hope to find the time to release our work with gqlgen with a proper documentation soon.