Repository navigation
About GraphQL dynamic queries (questions for software selection) #580
|
Sorry if I open this issue, @kyleconroy, it is mostly a question but certain words that I will use can be "searched" and anyone can benefit from your answer and the discussion that could follow. PREAMBLEI discovered this project a few hours ago. After trying everything in Go (go-pg, sqlx, sqlboiler, gorm, kallax and others) I believe your project is simply WONDERFUL! But before jumping into it headlong I would like to understand if I can really achieve what I have in mind. My project has many tables (around 100 today). 90% of the operations are simple CRUD. For all tables I have the same (or very similar) .sql file, like this: And so far so good. Everything works very well (again, congratulations!). MY REAL FEARFor this project I also need to create GraphQL APIs. Almost every table must be able to be filtered on all or some specific columns. And the goal is to have a dynamic and flexible query like: or Using also these logical operators: https://supergraph.dev/docs/graphql#logical-operators. (SuperGraph is an amazing project!) QUESTIONIs there any way to create such a dynamic query? I read this issue and got a little scared. Thanks for your effort and your patience. If |
Replies: 4 comments 2 replies
|
how about auto generate basic build-in CRUD queries and functions? I know that's easy but really don't want to copy and paste CRUD sql. @kyleconroy |
|
@landbed sounds like an interesting idea, but is it related to this issue? |
Sadly, sqlc can't currently solve your problem. As outlined in #364, dynamic query support is at odds with compiling individual queries. You can write queries that filter on different parameters but those queries may perform poorly in production. I hope to have a better answer in the future, but for now there isn't one. |
|
Just gonna say this is kind of a backwards way to go about sponsorship. You should be willing to pay to get the features added that you need. |
Sadly, sqlc can't currently solve your problem. As outlined in #364, dynamic query support is at odds with compiling individual queries. You can write queries that filter on different parameters but those queries may perform poorly in production. I hope to have a better answer in the future, but for now there isn't one.