My understanding of the advantage of GraphQL is that it allows you to load a structure like
user {
groups(first: 10) {
posts(first 1) {
content
author {
name
address {
state
}
}
}
}
}
and have all the round-trips take place within a datacentre, instead of needing to query /user
/user/12/groups?limit=10
/groups/34/posts?limit=1
/posts/56
/users/78
/users/78/address
and without having to write a separate /top_posts_view
endpoint.I don't understand from the description "a thoughtfully designed REST API built according to HATEOAS" what your proposal to solve this problem is.