-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: enable query caching by using GET instead of POST #386
Conversation
Thanks for opening this pull request!
|
Codecov Report
@@ Coverage Diff @@
## main #386 +/- ##
==========================================
- Coverage 89.66% 89.13% -0.53%
==========================================
Files 155 156 +1
Lines 14125 14528 +403
==========================================
+ Hits 12665 12950 +285
- Misses 1460 1578 +118
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@aliasad106 you can try out this branch for query cache. It should work without any changes needed on your end as long as you didn't change the default cache policy of the SDK. I've tested it with some of the query code in Playgrounds and it seems to work. I still need to add test cases to ensure this doesn't break in the future and to fix the code coverage. |
New Pull Request Checklist
Issue Description
All queries currently use
POST
requests, preventing the ability to leverage the cache policies available in the SDK.Related issue: #382
Approach
Enable all queries to use
GET
requests by default so queries are cached. Developers can change the default request behavior for all queries by settingusingPostForQuery = true
to not cache any of the queries. SettingusingPostForQuery = true
can be useful when using the Swift SDK on the server-side as many developers will not want the server caching queries.TODOs before merging