Persisted query examples appear to be incorrect
Opened this issue · 2 comments
b-jsshapiro commented
Both examples work fine if the query has previously been persisted, but neither appears to handle the case where we are seeing a query for the first time that needs to be persisted for future use....
StarpTech commented
Hi, I also want to mention that the phrase is wrong
Persisted queries are also a performance optimization since they allow us to skip parsing the query when executing a request.
Wen can't skip the parsing mechanism. The query string is just looked up from the cache rather than from the request.
StarpTech commented
@b-jsshapiro This is just an example and is no complete implementation. For reference you could check out https://github.com/StarpTech/GraphCDN/blob/main/src/routes/apq.ts#L29-L104