4 ms·
As someone who spent handreds of hours writing (and cursing) SQL queries -it definitely sounds compelling.
by yanovskishai 6y ago
As someone who spent handreds of hours writing (and cursing) SQL queries -it definitely sounds compelling.
- erezsh 6y agoJust a tiny teaser, you could write something like Person { country => name } And it will output the following SQL: -- target: postgres SELECT country, array_agg(name) AS name FROM Person GROUP BY country
- derision 6y agoIs this not the same as graphql?
- gavinray 6y agoSort of, GraphQL is just an interface that describes your data models, but you need to implement "resolvers" for each operation that tells the server how to fetch/mutate the queried data. So you might have a GQL type like: type User { name: String age: Int } But you need to implement a query with business logic for fetching this data, and that can be anything (but generally, a DB call). Projects like Hasura kind of blur this line, as it's essentially one big GQL -> SQL JIT compiler in Haskell though.