3 ms·
I seriously think we need a serious update to REST api urls. There is no rule that says it has to be this hard. I would imagine something like graphql type of
by yomkippur 4y ago
I seriously think we need a serious update to REST api urls. There is no rule that says it has to be this hard.
I would imagine something like graphql type of URL schema:
api.xxx.com/{organizations: organizationId { blogs: blogId { sections: sectionId } } }
- jokethrowaway 4y agoREST is not a strict specification and it's not a single implementation, you can just start doing it. That said, I wouldn't recommend going the allow everything flexible resolver way like GraphQL: it's terrible for performance (eg. most APIs use N+1 queries unless you have something like https://github.com/join-monster/join-monster https://github.com/join-monster/join-monster), the complexity of the codebase skyrockets and having to specify all the fields you want is not exactly ergonomic in most situations.