|
|
|
|
|
by dmitriid
2007 days ago
|
|
> Where is the difference to GraphQL then? GraphQL allows ad-hoc queries of unlimited complexity and recursion > If you know in advance what will be queried then you can create an optimized query for it. No. In general you don't know what will be queried. And that's the reason why most GraphQL implementations end up using just a small predefined set of "persisted queries" (that is, REST with extra steps). |
|
Persisted queries enter the game when you define a query that potentially can become very complex and deep and then want to restrict the complexity in specific ways. But that is not required if you just want to mirror a RESTful API.