-
Notifications
You must be signed in to change notification settings - Fork 49
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
Feature: support custom fetch functions #251
Comments
Hiya @sandros94, we have intentionally chosen to drop support for custom fetch functions as affects the integrity of the code and can cause unexpected issues. From NodeJS v20 onwards, all major runtimes and platforms support fetch natively. As the version 1 of this library is still in beta, this is not yet documented, however once we stabilize the version we will make sure to document this requirement |
Ehy @kearfy, objectively speaking and I hope not to sound like the drama guy: This is the Javascript driver repo and not the NodeJS driver repo. Is the node driver going to be deprecated? Custom Now, instead, my personal opinion: |
Thanks for your thoughts @sandros94, I'll take it into consideration and discuss it with the team! |
I'm happy to share them! Feel free to ping me here or on discord |
Is your feature request related to a problem?
Ability to override what
fetch
to use when using this SDK.Also noticed that this was possible in
0.11
.Describe the solution
Most frameworks do have a custom
fetch
built-in.This make sure that the fetch function works in all the production environment supported by the framework itself, with the added ability to customize other logics (eg.: logging framework side).
When defining a
new Surreal
to be able to override the http fetch function, with something like ofetch:Alternative methods
Dropping the use of the SDK and reimplement its functionality using framework's native functions. But its just duplicate work.
SurrealDB version
1.4.2 for windows on x86_64
SurrealDB.js version
1.0.0-beta.5
Contact Details
[email protected]
Is there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: