<@U7VF7DGT1> examples in my angular-appollo projec...
# prisma-whats-new
d
@Vinnie examples in my angular-appollo project:
i
I think I understand now. I think you are confusing serverless functions with regular functions.
You don’t really need to worry about serverless functions in your client.
In your code snippet, you have a
createAirline()
mutation. When using Graphcool (BaaS/Backend-as-a-Service) or a GraphQL-compliant server, that mutation gets sent to it’s relevant function (serverless or not), executes that function (in this case, it would insert a new row in the table for that Airline), and then is finished. Like @Vinnie said, you get complete CRUDabilities out of the box with Graphcool. Client’s are not responsible for database interactions. Servers handle that. Client’s then request for something to be created or fetched, for example, and then the response is sent back to the client (Angular). So, basically, client’s don’t really do CRUD. They only request for those operations to be done
In your case, when a mutation is executed, (let’s use
createAirline()
) the client will send that request to GC, and then GC will create that row in Aurora