This falls into a feature request but could also be a workflows thing.
Imagine having the ability to repurpose workflows in the following way:
create folder which will have a specific path / act as GW
individual workflows act as sub-paths
you offload and manage your logic outside of apps but heavily leverage this feature
This could be a proving ground for large Enterprise orgs but could be a backbone of smaller / medium orgs to unify efforts and promote code reusability.
Super interesting idea, by GW do you mean gateway?
My first reaction to this would be that this could be done with workflow connecting to other workflows along with branching logic at both the top level workflow that decides what data came in and where it should go for what purpose.
With the sub level workflows branching out from the source and handling specific use cases based on the payload given from the top level workflow.
Let me know how this idea in my head lines up with yours. The more specifics the better in terms of flushing out an actionable feature request for workflow architecture!
I can definitely think of a ton of useful possibilities for this type of architecture.
Currently the only exposed API routes are workflow triggers, and we always caution users to have the highest level of security with those endpoints to prevent these routes from being spammed/Ddossed as the Retool cloud could be at risk from a workflow overload
Now that I think about it, this idea is kind of similar to turning a Retool app into a backend server which I had another user ask about. I think it could be very promising for a lot for use cases but also bears risks.
Maybe this would be a self-hosted only option for users to set up firewalls/greater controls for incoming web traffic
I was actually talking with @lizzie about this recently. Very promising indeed.
Currently we’re using the Wundergraph SDK on Railway as an out-of-box way to set up this gateway, then calling Retool Workflow endpoints from there.
Nice benefit of the sdk is that it also generates an OpenAPI schema (and inputs + responses are typesafe/etc).
There’s obviously lag introduced because of the multiple hops (instead of directly calling workflows), but I find the tradeoff to be worth the discoverability and other downstream benefits of using the SDK, especially as our platform grows larger. (We can use the generated client SDK for our API in Retool’s custom react components, for example)
Of course, Workflows as a native gateway and API would be a way smoother solution. WG has some additional benefits, but I’m looking forward to seeing how this develops within Retool!
Was going to put together a post on the Retool-WG setup (and share the Railway template) in a few weeks. Happy to share if you’re interested.
Confirming that this is something we are actively thinking about on the workflows side! In brainstorm and prototype mode for now, but will loop you in for feedback in the coming months! Thanks for the tag @matei !