Poolshark
(Flo Ragossnig)
July 27, 2021, 4:26pm
1
Hi,
i was wondering if there will be a replacement for the slash-graphql
npm package? If not has anyone put something together already to deploy eg. lambdas locally?
I found it also quite weird, that the Cloud API apparently can list and update lambdas but not add them?
Thanks!
There is no add and delete because a lambda script is always there, it just may be empty and contain no functions.
There is just one lambda. Within that lambda you can have many functions. Use updateLambda to update the contents of all lambda functions, or query the lambdaScript to get the actual script.
This is the actual lambda script in your Dgraph Admin console.
J
I have not tested or used this, but something like this should work:
You’ll need to update to use the new cloud admin endpoint .
Here is a working script that we are using via a husky powered git hook.
const fetch = require('node-fetch')
const fs = require('fs')
async function updateSlashLambdas() {
try {
fs.readFile('./DgraphLambdas/_final.js', async function (err, data) {
if (err) return console.error(err)
const lambdaScript = data.toString('base64')
const updateLambdasQuery = `mutation UpdateDeployment($updateDeploymentInput: …
J