appwrite / sdk-generator

Generating SDKs for multiple programming languages and platforms βš™οΈ

Home Page:https://appwrite.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

SilverMira opened this issue Β· 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 πŸš€