Deprecate Client#fetch
See original GitHub issue@ChristopherDavenport has been arguing for this, and I like @SystemFw’s argument about not burying use
.
Steps:
- Add
@deprecated
annotation to both overloads ofClient.fetch
. - Replace
client.fetch(req)(f)
withclient.run(req).use(f)
in tests and docs.
Bonus step 1.5, but more difficult: Implement a scalafix rule. Would make step 2 easier, and will help a lot of people upgrading.
Issue Analytics
- State:
- Created 3 years ago
- Comments:22 (22 by maintainers)
Top Results From Across the Web
Advanced topics on caching in Apollo Client
This article describes special cases and considerations when using the Apollo Client cache. Bypassing the cache. Sometimes you shouldn't use the cache for...
Read more >Used property "fetch" on versionless client - this is deprecated.
The fix is trivial, but I'm not sure what version to use. Otherwise happy to make a PR. The text was updated successfully,...
Read more >Browser content redirection | Citrix Virtual Apps and Desktops ...
Client fetch and client render: Because the Citrix Workspace app contacts the web server directly, it requires internet access. This scenario ...
Read more >@sanity/client - npm
Client for retrieving, creating and patching data from Sanity.io. Latest version: 3.4.1, last published: 3 months ago.
Read more >Microsoft Graph Client - Fetch root site of Office 365 group - Error
Can't recall exactly which one was in my case - I think it was Group.Selected. As soon you remove the problematic permission the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@satorg It’s yours!
@kevinmeredith The problem with your
IO
version is leaking the response resource outsidefetch
. It’s equivalent to the.fetch(F.pure)
or.fetch(F.delay)
anti-patterns. But theResource
version is also unsafe: you’re reading the response body twice. It works when the body is created in memory, but it would fail when the response body is backed by a network socket.@satorg I’d like to remove them, but it’s been pointed out that the client DSL still returns requests in
F[Request[F]]
. There was a conversation about evolving away from that as well. I think maybe those two should go together in their own PR.