GithubHelp home page GithubHelp logo

Comments (2)

mute avatar mute commented on May 21, 2024

Totally agreed with those concerns -- here's my hand wavy explanation of how I think this might be possible, but it's hand wavy because I'm not a GraphQL guru:

  1. Parse GraphQL query into an array of Promise chains which resolve to the sequence of actual navalia / chrome API functions. This should result in n Promises where n is the number of leaf nodes in the query.
  2. For each of these Promises, spawn a tab up to whatever the maximum specified number of tabs is.
  3. Resolve each promise chain in its corresponding tab.
  4. Continue until tabs have been spawned / resolved for each leaf node.

So, we shouldn't need to clone tabs, each tab will just execute the same series of steps in parallel up until the query branches.

from navalia.

joelgriffith avatar joelgriffith commented on May 21, 2024

Ah, that definitely removes some of the challenges related to having branching work as expected. I know this is entirely possible (things like join-monster do this), but would definitely take some meaty work to do so. I'll dig into how to do this, as it's a pretty interesting idea!

from navalia.

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.