How to setup Lambda Server?

Hello, I found another solution. The Zion (v21.12) has already included lambda server in itself.
You have to do nothing but only update your script via admin piont(localhost:8080/admin). There is not docment yet.

mutation{
	updateLambdaScript(input:{set:{script:"""self.addGraphQLResolvers({  "City.current_weather": getCurrentWeather,	}); async function getWeather(name, state, country) {  let url = `https://api.openweathermap.org/data/2.5/weather?q=${name},${state},${country}&appid=944f9bf37b47e039c6466b185de46269`;  let response = await fetch(url);  let data = await response.json();  return data.weather[0].description;}async function getCurrentWeather({ parent }) {  const { name, state, country } = parent;  var weather = getWeather(name, state, country);  return weather;}"""
	
	}}){
		lambdaScript{script}
	}
}

But I don’t find the way like schema which post the schema file as binary. So wait for the detail doc to come.

I still can’t fix error for my self host lamp server.

1 Like