Best practice for NodeJS client development?

Your approach of using an Express server as a middleware between your Vue.js SPA and the DGraph server is indeed the recommended practice. Since dgraph-js (gRPC client) is not designed to run in the browser, a Node.js backend is necessary to handle database interactions. You can set up an Express server with Apollo Server or another GraphQL middleware to act as a relay for GraphQL± queries. This setup ensures security, allows for authentication/authorization handling, and prevents exposing your DGraph server directly to the frontend. If you’re looking for an example, you might check out DGraph’s official examples on GitHub. Additionally, consider using dgraph-js-http if you want to avoid a Node.js backend, but note that it has limitations compared to the gRPC client.