appwrite/sdk-generator

๐Ÿš€ Feature: Allow user-defined fetch function for web sdk

SilverMira opened this issue ยท 2 comments

๐Ÿ”– Feature description

Currently, the web SDK is importing and using fetch from cross-fetch inside Client.call, is it possible to introduce a Client.setFetch(fetchFn) for users to provide the implementation to use?

I would be happy to create a PR for this feature

๐ŸŽค Pitch

When using appwrite with SvelteKit and SSR, there's a need to use SvelteKit's special fetch function on page load. This special fetch function provides additional functionalities as described here. One of them being ability of reusing what the server has fetched from appwrite instead of refetching them on the client during hydration.

๐Ÿ‘€ Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

๐Ÿข Have you read the Code of Conduct?

Hi
This is a cool feature, you could definitely try making a PR, but it would be to our SDK-generator, which can be a bit hard to do.

Hi, I have created the PR, hope everything goes smoothly ๐Ÿš€