Learn Apollo Client's useMutation Hook in Less Than 30 Minutes

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • Mutation docs: www.apollograp...
    Playground back end: codesandbox.io...

Комментарии • 17

  • @igorskryl5041
    @igorskryl5041 3 года назад +2

    The highest quality of the videos in every way. And the tutorial is life-saving! Thank you very much, dear sir!

  • @todaysmotivation9692
    @todaysmotivation9692 2 года назад

    gem

  • @nguoinghiendabong
    @nguoinghiendabong 2 года назад

    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

  • @ABUTAHER-wg7gz
    @ABUTAHER-wg7gz Год назад

    eit is throw error what can i do to solve

  • @divyanshsrivastava9571
    @divyanshsrivastava9571 2 года назад

    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.

    • @ChrisDeSilva
      @ChrisDeSilva  2 года назад +1

      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

  • @Ineffable_Wisdom
    @Ineffable_Wisdom 2 года назад

    Fire. Thank you!

  • @tarusek
    @tarusek 3 года назад

    Thank you for the video!

  • @zueybut9292
    @zueybut9292 3 года назад

    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?

    • @ChrisDeSilva
      @ChrisDeSilva  3 года назад +1

      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.

  • @benji9325
    @benji9325 3 года назад

    gold!

  • @eshwarkv1681
    @eshwarkv1681 2 года назад

    how to pass authorizatiion headers?

    • @ChrisDeSilva
      @ChrisDeSilva  2 года назад

      This should help: www.apollographql.com/docs/react/networking/authentication/

  • @tarusek
    @tarusek 3 года назад

    Sub! :)