|
|
|
|
|
by valenterry
2007 days ago
|
|
I think you misunderstand. You can write very restricted queries that mirror REST routes 1:1. No need for persisted queries. 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. |
|
I don't
> You can write very restricted queries that mirror REST routes 1:1. No need for persisted queries.
What stops a frontend developer writing an ad-hoc query?
> Persisted queries enter the game when you define a query that potentially can become very complex and deep
That... That is exactly what I wrote.
---
Honestly, I'm baffled at GraphQL defenders. It's like they never even read the documentation to the tools they defend.
- How is GraphQL different from REST?
- Ad-hoc queries of unlimited complexity
- But you write restricted queries
- No. The whole point of GraphQL is ad-hoc queries
- Persisted queries enter the game when you define a query that potentially can become very complex and deep
- That is exactly what I'm saying
And elsewhere, you can see it in other replies, it's the same story with N+1:
- GraphQL is great!
- Except the issues on the server and trying to handle N+1 queries
- What's N+1?
- It's.... It's a prominent part of the documentation for the frigging tool you use. And the reason for the things you advocate like dataloaders and persisted queries