DEV Community

Discussion on: GraphQL vs REST: Performance

Collapse
 
luisvargastije profile image
Luis Vargas • Edited

Isn't it possible to specify fields in the query parameter for a REST endpoint?

for example:

/api/authors/1?fields={name, {books(id: 5) {title}}

then getting a result similar to next:

{
  "name": "George R.R. Martin",
  "book": [
    {
      "title": "A Dance with Dragons"
    }
  ]
}