Let's implement the delete shop functionality to the buttons that we've added to the shop manage page. Fauna allows you to define custom resolvers to run multiple database operations so you don't have to make multiple trips to the database.
We'll define a new mutation in our GraphQL schema that will take in a shop id and sets the @resolver
directive which will tell Fauna to create a custom resolver that we can define within Fauna.
In our Fauna database, you'll see that we have a new user generated function created. This function accepts Fauna Query Language which is the native api for interacting with Fauna. We'll perform a multi-step operation by deleting the shop and then all of the products associated with that shop.