Blog Posts - typescript

Liam
Oct 30, 2018
Blogpost Cover

Make REST api to partial response, just like GraphQL

The story begins in one day, I want to make NodeJS API endpoints like

GET /api/blogposts?fields=author{name,avatar},title,detail

and it should return me

[{
    "author": {
        "name": "Liam Ng",
        "avatar": "https://someurl",
    },
    "title": "blogpost title",
    "detail": "blogpost detail"
}]
View