DEV Community

Discussion on: Why do Webdevs keep trying to kill REST?

Collapse
 
fkrasnowski profile image
Franciszek Krasnowski

you have to pay the complexity cost somewhere

I’m not sure if gql results in bigger complexity on the backend. If you consider schema first approach. When designing an API it forces consistent schema on the backend and it's something not only fronted dev will appreciate. An even more interesting approach would be not to write your resolvers at all and use gql schema to construct a graph DB - take a look at Dgraph. Doesn't it cut the complexity of managing separate DB, rest API, and keeping documentation up to date?

Collapse
 
gklijs profile image
Gerard Klijs

I'm afraid with Dgraph I might run things that need to be changed later. Not sure that's a valid fear. There are similar solutions, like how with Hasura you can generate the schema based on your PostgreSQL schemas.