Best practice for NodeJS client development?

@erlendoverby

I am building a app with DGraph, (micro / express & apollo), and Angular on AWS with Lambda all in typescript. So if you have any specific questions I can try to help out, or if you find any best practices elsewhere online I would be keen to hear about them.

I came to the same conclusion as @MichelDiz that you really want some GraphQL layer in front of your DGraph db.

Reasons

  • You can connect GraphQL to multiple database
  • Some actions may require other services - I email uses on some actions.
  • Validating inputs
  • Protecting your db from malicious actors - Maybe the most important one

That said often I find myself writing the same query and just piping it through to DGraph, I feel like the eventual solution here is to use something like this:

So you can get a list of the graphql query fields and pipe them trough to a specific DGraph query.