3 ms·
The comparison would be; REST: Any time there is a new "view"; you need to go to your server and write a new endpoint. GraphQL: You can stitch data together h
by htkibar 6y ago
The comparison would be;
REST: Any time there is a new "view"; you need to go to your server and write a new endpoint.
GraphQL: You can stitch data together however you want; as long as that data is defined.
So for example if I need name of someone and the url of their children; querying it alone is enough with GraphQL whereas with REST either I need to fetch multiple times or write a new endpoint that serves both together.