``` module.exports = async (event) => { con...
# prisma-whats-new
Copy code
module.exports = async (event) => {
    const graphcool = fromEvent(event)
    const api = graphcool.api('simple/v1') // => here I would like to attach a authenticated token, important is that the initial call of the resolver does not need to be authenticated, only a small piece of code needs to be
Oh right - normally when you make an API call inside a resolver on the server as a serverless function, you do so as ADMIN
the business logic / permissions are set out in the code in the function
see my earlier reply on your first post to check if the user has been authenticated
one sec I’ll check
@max I don’t think that all API calls inside of resolver are called as ADMIN. thats why I want to attach a user token inside of the resolver function for this specific usecase
Where is your resolver? On graph.cool or a local instance
I only use graph.cool and all my resolvers work with ADMIN privs
its deployed with the graphcool CLI
What’s your error?
I am building one sec
hah.. weird
works now
i always received an error.. I thought its due to missing privileges but now it seems to work
Okay cool
I changed some other code maybe I had a typo somewhere.. thanks anyway for your help
I am starting to destruct all graphcool templates because like how they are written its impossible to write unit tests..
maybe there was something missing.. now all green again