I think there are two main reasons:
Still, I would prefer lua as a script language.
You can check out my take on the lambda solution: GitHub - miko/dgraph-luambda: Dgraph Luambda is a serverless platform for running Lua on Slash GraphQL (or Dgraph). Inspired by original Dgraph Lambda
There are examples of custom resolvers both in golang and lua.
Note: it is not production ready, just proof of concept.
Can someone of the team maybe step in and explain the reasoning behind this?
Dgraph is shipped cross-plattform but dgraph-lambda is currently not. Can we expect to have a cross-plattform lambda server at some time?
Hi @maaft, thanks for the question.
Any http server can be used as a lambda server, as long as it honors a very simple http endpoint interface.
The dgraph-lambda project just takes a function, wraps it in all this security context, and serves it as an http endpoint. Its a fairly thin wrapper. Dgraph-lambda can be launched via docker, so that may provide the cross platform nature you are looking for.
Okay, thank you for the explanation.
I think I’ll have to read a bit more into the lambda code to understand it and write my own server then.
If anyone is interested: I have a working example lambda server in pure golang. The code is not very clean yet so I won’t publish it for now. Also some features are still missing. If you still want to use it - shoot me a message.