4 ms·
Hey that is great feedback! To address your point about the lower level interface, as part of today's launch we released our Logic features that lets you do exa
by mparis 10y ago
Hey that is great feedback! To address your point about the lower level interface, as part of today's launch we released our Logic features that lets you do exactly this. The new features allow you to add compositions of custom microservices to any mutations in your Scaphold API. For example, assume you were building Slack and you were setting up the createUser onboarding flow. A new user might be invited to Slack and to join a specific team.
In a real app you would want to first validate the email, then make sure the user has permission to join the team, then persist the object to the database, then using the generated ID create an M-M association with the team and maybe even asynchronously send push notifications to all the other users in the team. Flows like this are why we built Logic. You can host your business logic anywhere and Scaphold essentially acts as a runtime for your microservices.
This new feature is particularly powerful so I'd be happy to discuss it more in depth if you'd like.
- baby_wipe 10y agoBut I've found this is where you start to want a full-blown web framework, at least in my experience. Logic sounds very close to what Cloud Code is on Parse Server, is that right?
- mparis 10y agoIt's similar but we think it improves upon cloud code in a couple of ways. We designed logic after techniques that we use internally to create robust, yet maintainable GraphQL resolvers. Mainly that means we structure each resolver as a composition of functions. This means that the functions in the composition associated with the mutation are able to pass information down the chain giving you a lot of flexibility in how you implement features with microservices. Another distinction from cloud code is that you can use virtually any stack. You can host logic using a full fledged web framework like Rails or you can use new serverless services like lambda. This also gives a lot of flexibility and lets you reuse existing infrastructure if you have it. The comparison is a fair one but we still have a few features in store that will keep building on the functionality and hopefully make the distinction more apparent :)