Course lesson

Create New Shop with Apollo Client useMutation

We are ready to create new shops for our vendors. To do this we'll define a CreateShop mutation that will take in all the data that our form provides. Then useMutation will accept that mutation and give us a function to pass our data into as well as give us...

Duration
4 min
Access
Free
Transcript
Retained from source evidence

We are ready to create new shops for our vendors. To do this we'll define a CreateShop mutation that will take in all the data that our form provides. Then useMutation will accept that mutation and give us a function to pass our data into as well as give us the new created shop data. We'll pass in user information that we get from Auth0.

This lesson finishes up with an error because Fauna doesn't know if the request came from an authenticated user or not. We'll solve this with dynamic headers in the next lesson.