-
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What's the suggested way for a existing SeaORM user to adopt seaography? #27
Comments
That's a great question. A proposed way is to allow cli to accept a parameter that points to sea orm entities folder, and when it is used we skip generating sea orm and do the following:
What's your thougs on that approach ? |
I think that's what we have talked about before comes to place. We have to break down the code generator into different stages, where stage 1 is schema discovery and stage 2 is code generation. Actually, what does the stage 2 takes as input? If that's a SeaQuery schema representation, then it should be possible for sea-orm-cli to produce that and invoke the seaography library. That say, most of the integration should be done inside sea-orm-cli |
Stage 2 takes SeaQuery table create statement. Are you suggesting we simply skip generating SeaORM entities and generate graphql entities only? For example, assumed we have a
|
Sounds like a workable plan |
Thoughts? @karatakis |
@billy1624 with #114 we have completely isolated seaography from sea-orm entity generation. If you provide the seaography CLI with the folder of SeaORM entities it generates the GraphQL API without the need of modifications. |
Currently, I see the seaography assume there exists a schema reside in one of the supported database engine. Then, SeaORM entities and async-graphql types will be generated by seaography.
But what if a existing SeaORM user wish to introduce async-graphql support into their existing codebase? What's the suggested way of doing it? Should we provide a way to generate async-graphql types only? Instead of only provide a CLI that generate both at the same time?
The text was updated successfully, but these errors were encountered: