Custom Lambda server support in Dgraph Cloud

Thanks for your response. I have the following missing features or problems with custom approach:

  • The schema becomes cluttered:
    How I understand it, I would have to at least declare the same url, httpMethod and forwardHeaders on each field, query and mutation that uses the lambda server.
  • I would also have to define a body/graphql for each field, query, mutation:
    From the docs I think not specifying the body/graphql will not send any data to the custom server. Using Lambda I’m used to a standard data structure and representation. Having to write a body/graphql everytime becomes cumbersome and also clutters the schema.
  • No lambdaOnMutate alternative

Please correct me if I am wrong at any point, but I think the only issue without alternative is lambdaOnMutate. Yet the other points are valid too imo.

I don’t have any specific use case. When I tested the JavaScript-Lambda server I had issues with building dependencies with webpack (firebase auth) and as suggested in Slash Lambda with Packages - #9 by amaster507 it is not really friendly to use imo. Also I just like to write my backends in other languages than Javascript.

I think the WASM approach suggested by @iluminae would also be interesting as it makes sure to run queries close to the database.

The only alternative for me currently would be to generate a lambda script from the schema and auto-upload it to the cloud that directly forwards requests to the custom lambda server.