When to use GRAPHQL over REST?

As a sole/indie developer, I use GraphQL over REST. It’s much less work. There are many great clients like Altair. It documents itself. It catches coding errors. It provides a protocol for API errors. It’s opinionated: I can just write my services and data access and then continue on.

NB: I decided not to use absinthe because I found the schema DSL vague and stringly typed. Code like field :user, :user. Instead I’m using a statically-typed inferred-schema framework - Python’s Strawberry. That’s worked well. Rust’s frameworks are also code-first not schema-first. (Although I do prefer schema-first.)

2 Likes