danielduarte / flowed

A fast and reliable flow engine for orchestration and more uses in Node.js, Deno and the browser
https://danielduarte.github.io/flowed
MIT License
151 stars 21 forks source link

Resolver as a functional component? #33

Closed tarun29061990 closed 3 years ago

tarun29061990 commented 3 years ago

Is your feature request related to a problem? Please describe. I need to cal useQuery apollo hook and with resolvers as class components I am not able to do so.

Describe the solution you'd like Library should accept resolver as simple functions also.

Describe alternatives you've considered I tried to write resolver as a functional component but then it failed with error like "this.taskResolverConstructor is not a constructor".

danielduarte commented 3 years ago

Hi @tarun29061990, I'll be working on supporting raw functions very soon since it seems to be useful for many use cases. BTW I've already tracked that request here before.

Make sure you watch this issue so you get the updates soon.

tarun29061990 commented 3 years ago

Cool ... I will track the request

danielduarte commented 3 years ago

Hello @tarun29061990,

Here announcing that the last Flowed release v1.14.0 includes support for functional resolvers. Class-based ones are also supported as in previous versions. Hope that helps!

Any question or concern please let me know.