import { fromEvent, FunctionEvent } from "graphcool-lib"
const graphcool = fromEvent(event)
const api = graphcool.api("simple/v1")
//This one works only if I open up public permissions
const userId = await createGraphcoolUser(api, email, hash, username, image)
//This one returns error
const token = await graphcool.generateNodeToken(userId, "User")
I wrote more details here: https://www.graph.cool/forum/t/temp-root-token-in-function-does-not-have-full-permissions/1785/2