What if we want to get the data from the other query while performing that mutation? e.g. If i placed an order and in return i get the order ID in the response from mutation and the other details regarding the order(items, quantity etc..) How will i show these details after performing the mutation.
You should be able to get the data you need from the response of the mutation without needing an extra query. If you need to fetch a separate query after a mutation you can use something like refetchQueries: www.apollographql.com/docs/react/data/mutations/#refetching-queries
how would you handle the case that there are several fields in the model (book: id, name, publish date, quantity) and you would be updating the name or publish date or quantity or name and publish date or name and publish date and quantity or name and quantity?
The highest quality of the videos in every way. And the tutorial is life-saving! Thank you very much, dear sir!
👊
gem
Tại sao không dùng useffect đang code react mà tôi thấy thật sự rất mệt với cái query này nếu xử lý có popup là heo nhai
eit is throw error what can i do to solve
What if we want to get the data from the other query while performing that mutation?
e.g. If i placed an order and in return i get the order ID in the response from mutation and the other details regarding the order(items, quantity etc..)
How will i show these details after performing the mutation.
You should be able to get the data you need from the response of the mutation without needing an extra query. If you need to fetch a separate query after a mutation you can use something like refetchQueries: www.apollographql.com/docs/react/data/mutations/#refetching-queries
Fire. Thank you!
Thank you for the video!
how would you handle the case that there are several fields in the model (book: id, name, publish date, quantity) and you would be updating the name or publish date or quantity or name and publish date or name and publish date and quantity or name and quantity?
You'd need to create a mutation on the back end that accepts that Book type as an argument rather than only accepting a single field.
gold!
how to pass authorizatiion headers?
This should help: www.apollographql.com/docs/react/networking/authentication/
Sub! :)