``` module.exports = async (event) => { con...
# prisma-whats-new
d
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
m
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
d
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
m
Where is your resolver? On graph.cool or a local instance
I only use graph.cool and all my resolvers work with ADMIN privs
d
its deployed with the graphcool CLI
m
What’s your error?
d
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
m
Okay cool
d
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