Skip to content
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

feature request: make edgedb-py able to generate input models for insert/update queries #469

Open
iron3oxide opened this issue Dec 1, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@iron3oxide
Copy link

As of now, edgedb-py generates a query function and a response model for a given query, but does not structure the input parameters in any way. This makes sense for most queries, but leaves a little to be desired on inserts and updates. It feels tedious to write a pydantic model containing all the fields that edgedb already knows about each time. Also, having to sync it to the query manually when there is a change in the query parameters adds maintenance cost.

I therefore propose that edgedb-py should be able to generate a pydantic input model for insert and update queries. This would make it perfect to use with FastAPI! This feature could be the new default or activated by a flag, depending on what makes more sense.

@iron3oxide
Copy link
Author

Actually, now that I read #358, maybe it would make sense to be able to generate them for every kind of query? Would probably be less complex to implement too.

@raddevon raddevon added the enhancement New feature or request label Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants