I’m thinking about using Slash Graphql as a base for a new project. But I’m a bit struggling with the application architecture.
I want to use Next.JS for the frontend and Strapi for the static content, and Slash Graphql or Graphql on a Kubernetes cluster for the active part.
For the backend, I’m in doubt between .NET Core with Hot Chocolate or Node.JS. The last one would make the most sense as Next.JS supports functions, Netlify functions run on Node.JS, so everything would be streamlined using the same language (I would only need one extra developer instead of two).
I’m unsure about the identity provider. I would love one that supports passwordless authentication using the Android/IOS fingerprint reader to prevent account sharing but didn’t found one yet.
Lots of tutorials talk about talking to Dgraph directly from the frontend, but:
I have some additional server-side requirements like creating objects from ZIP-files and XML, in-depth mathematical calculations, and AI functionality.
I want to restrict the queries an authenticated user can execute, so I was thinking about adding persisted queries.
I need to comply with the GDPR. So all queries should be logged to, for example, Seq.
Does this mean I need to decorate each database query with a NodeJS Apolo server layer on top?
So I presume this is the best architecture?
Client-side React code → Apolo Server on Netlify functions (AWS lambda) with persistent queries + logging to Seq → Dgraph
This added middleware proxy will introduce some complexity, especially when using the subscriptions, and code redundancy, but I think it’s currently the only way to restrict queries and add external logging to DGraph?