If you would like to add libraries, then use webpack --target=webworker to compile your script. We’ll fill out these instructions later.
I believe “these instructions” refer to compiling the lambda script with webpack. I believe Slash does this compiling for us already.
So… what packages can we import? Anything on npm? A list of approved packages? I would probably be able to answer this myself if I knew more about webpack and didn’t rely on React magic.
I noticed @amaster507 never really got an answer to his question. I have the same question. Is there more information somewhere that I’ve just missed?
Also, the dgraph docs have, instead of “[filling out] these instructions later”, simply removed that line where they say they’ll fill out the instructions later.
You have to compile your scripts into an output that will also include the packages you want to include and then copy and paste all of that output into the lambda script. It is not pretty or friendly. I just found an alternative lambda provider when my scripts need packages to be compiled but that loses a little bit of the power and purpose of Dgraph having the lambda close to the db.
Another reason why the “almighty” lambda is not always the best solution. It would be better if it was to work more closely like Auth0 uses custom scripts.