|
|
|
|
|
by dyeje
2014 days ago
|
|
It's not magic, you would design it in advance so you know what you're querying by and what you're returning in the payload. Typically you'd probably separate it into two endpoints `/blogposts` and `/blogposts/:id/comments`, but there are many ways to approach the problem. These days JSON:API is pretty popular for creating standard interfaces. |
|
Where is the difference to GraphQL then? If you know in advance what will be queried then you can create an optimized query for it.