I'm going through the templates and I came across ...
# prisma-whats-new
I'm going through the templates and I came across this notation in the simple email/pass auth:
Copy code
export default async (event: FunctionEvent<EventData>) => {
  try {
    const graphcool = fromEvent(event)
Is this event object an onlick event? I can't seem to find a way to initiate the graphcool object without
I'm using VueX so I'd rather not have to pass the event object to my actions
event is the function event for Lambda
👍 1
so is that used to create the functions in graphcool.yml? I was hoping I could construct an event object myself or init the graphcool object some other way...
Not create, no. It’s the event that get’s fired off when some “event” occurs, which goes to Lambda and says, “Hey, something happened. I need you to do X for me please”
For example, say you have a form and a user clicks “submit”. That would invoke an “event” that tells Lambda something’s going down and to handle that correctly, which you would direct Lambda to do in your
Functions/events/invocations… Those are all closely knitted together
But, if it makes it easier for you, just rename it 🙂
Thanks for the clarification! so if I get this right I need to pass the event object to my store and call the api by passing this object to it... (I don't know if you're familiar with vuex)
Just wanted to also mention, every time I ref AWS or Lambda, I am removing GC’s abstraction layer. Technically speaking, the events go to GC and then AWS
Yes, I believe so. I worked with Vue once so I don’t really remember it but you can always play around with it
👍 thanks a lot for the help!
Anytime 🙂