|
|
|
|
|
by davismwfl
2365 days ago
|
|
If you are building a simple web app, do you really need to separate it into a different layer/call? Having a monolith isn't evil for simple apps, just have a library or function you call to get the data and populate it server side. My general rule is unless there are many separate types of clients (e.g. mobile app, web app, backend services etc) needing the same thing, then it can just be part of the primary application and returned server side. Lots of separate client based calls are not necessary for a basic app (but some frameworks kinda push you towards this). In fact, much of the time people would be better putting a caching layer in first and returning the data with the server render, at least initially until they have users and reasons to change. Outside of that, yes, you can also just make it a route in the web app and call it if you really want, nothing says it has to conform to a specific standard. A simple HTTP get or post is good enough many times. GraphQL is also overkill if you simply need to run a basic query. |
|