Code Monkey home page Code Monkey logo

Comments (4)

Sandros94 avatar Sandros94 commented on June 2, 2024 1

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 fetch do more than just be platform agnostic.
Depending on the implementation, for example, they also let you define different network connection and configuration based on where the event is executed (client or server side). While bigger platforms like Vercel, AWS, Cloudflare tend to be as much compatible as possible, they often use additional configurations for things like worker to worker communication to prevent public network requests.

Now, instead, my personal opinion:
when I build a new module for Nuxt ecosystem I want to make it as easy to debug as possible. Nowdays, it is becoming harder and harder to debug what people are facing when they come by and open up an issue in your repository. So, to help my future-self as much as possible I tend to enable any possible logging during development (taking advantage of onRequest, onResponse, onRequestError and onResponseError functions within a custom fetch), something that most framework are able to. By removing these type of customizations, in a general purpose driver like the JS one, it would make life harder for framework-specific drivers. The result is always a full driver rewrite, duplicated work, project frammentation and pointing fingers when edge cases do inevitably rise.

from surrealdb.js.

kearfy avatar kearfy commented on June 2, 2024 1

Thanks for your thoughts @Sandros94, I'll take it into consideration and discuss it with the team!

from surrealdb.js.

kearfy avatar kearfy commented on June 2, 2024

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

from surrealdb.js.

Sandros94 avatar Sandros94 commented on June 2, 2024

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

from surrealdb.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.