For extra points if there's gRPC with protos so there can be clientside typechecking :)
reply
We have a graphql API which I find superior to either.
reply
Sweet, yeah, i never worked with graphql, so that's great to hear that it works!
reply
It's a 10-100x improvement over REST. You hit one API endpoint with a query that's more or less "I want this data and for it to be shaped like this."
This is how I query for top users.
query TopUsers($cursor: String, $within: String!) { topUsers(cursor: $cursor, within: $within) { users { name amount } cursor } }
This is how I query for posts where ItemFields is a reusable query fragment.
query items($sub: String, $sort: String, $cursor: String) { items(sub: $sub, sort: $sort, cursor: $cursor) { cursor items { ...ItemFields } } }
reply
Oh, interesting. I have to read up about this
reply