Open billy1624 opened 1 year ago
However, under the current setup. One has to modify existing SeaORM entities. I don't think it's ideal. Because it pollute the entity files and seaography
dependency become part of entity crate. So, it's not an add-on.
Ideally, we want to have a seperate files to implement the async-graphql
types.
Thoughts? @tyt2y3 @karatakis
We can approach the problem in 3 different ways:
1) Make a guide (which derive macros the developer has to add) how turn an Sea ORM entity into GraphQL node 2) Develop a tool that parses Sea ORM entities folder and adds the required macros 3) The solution you are recommending (though we might have some code duplication)
It's probably just for me
use crate::*; //just one line<<<
// something about Model Schema //<<<<
// use for marco
// pub mod data_dict;
pub use async_graphql;
pub use sea_orm;
pub use seaography;
// use for common source files pub use async_graphql::SimpleObject; // pub use data_dict::; pub use sea_orm::entity::prelude::; pub use seaography::macros::{Filter, RelationsCompact};
* crate or lib
```crate
pub use common::*;
pub mod account;
pub use account::*;
// ...
I think we need an "adoption guide" (feel free to rename it) for existing SeaORM users.
For example,
query_root.rs
has to be added as well