It seems that someone has ran into a similar error...
# prisma-whats-new
p
It seems that someone has ran into a similar error on August 9; it may be a known console bug. I guess I’ll call the mutation from the playground for now.
a
It's an error from
graphcool-lib
when event.context.graphcool is undefined. In a SE, that should be populated automatically. The example event should not contain headers.
p
Oh ok, so if I removed headers it should just work?
a
Put a
console.log(event.context.graphcool)
inside your function. When doing a test run, you should see 'pat' and 'projectId' being logged.
p
That’s correct, I do
Do you mean I should copy these values and manually create the headers?
a
No. If those are defined, then you should not receive that error.
Does it work from the playground?
p
It does.
(except for the JSON.stringify error, but that’s a different story!)
It just does not work using Test Run
a
I can confirm that it doesn't work after reopening the function, because the example event was replaced, and now contains an empty
"context" : { headers: {} }
As soon as I remove that from the example event, it works again
p
Ok
a
This bug is the root cause: https://github.com/graphcool/console/issues/1235. Initially, the correct example event is shown, after reopening, it get's replaced
👍 1