Handling Errors with Apollo Client (React)

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ม.ค. 2025

ความคิดเห็น • 19

  • @zillionvfx4786
    @zillionvfx4786 3 ปีที่แล้ว +3

    Dmytro...you are breathtaking... wonderful...not skipping any steps... all very clear... please do more apollo graphql stuff and error loggings with sentry also as you mentioned...

  • @hahamichaelrox
    @hahamichaelrox 4 ปีที่แล้ว +1

    Thanks for showing the try catch pattern. Appreciate showing the isApolloError util function as well

  • @yoyo26-34
    @yoyo26-34 4 ปีที่แล้ว +1

    fantastic video, very clear. Congrats

  • @stefc4663
    @stefc4663 2 ปีที่แล้ว

    This is a fantastic tutorial. Thank you soo much!!

  • @luceromojica6180
    @luceromojica6180 2 ปีที่แล้ว

    Thank you very much, your video was really helpful.

  • @АлександрГригорий-е6о
    @АлександрГригорий-е6о 4 ปีที่แล้ว +1

    Спасибо. То, что искал)

  • @GfastGao
    @GfastGao 4 หลายเดือนก่อน

    clean & clear. 👍

  • @lawtrafalgar028
    @lawtrafalgar028 3 ปีที่แล้ว +1

  • @mikhailurban1222
    @mikhailurban1222 3 ปีที่แล้ว

    thanks a lot)) please continue

  • @ДашаЮсипец
    @ДашаЮсипец 2 ปีที่แล้ว

    Hi. I call graphql mutation inside onError, but return forward (operation) doesn't work. What can be the reason? And how to solve this problem?

  • @natali1085
    @natali1085 3 ปีที่แล้ว +1

    Thanks for this video. I'm struggling with Apollo Link Error now. Is there a way to show an error notification in the UI except of alert or console.log? I have tried to use useState and useContext from react but got the infinite loop. (Instead of alert to call function to update local store). But it doesn't work. I can't figure out why..

    • @natali1085
      @natali1085 3 ปีที่แล้ว

      Dmytro, is it possible to show a message in UI (for ex. popup or modal) for all errors using Apollo Link Error? Or I need to make error handling for all the queries and mutations separately?

    • @DmytroDanylov
      @DmytroDanylov  3 ปีที่แล้ว +1

      Hi, Nata! You need to use the global error handler, as shown in the video. Instead of console.log you can show a modal or popup and to achieve this you’ll need to use a global state solution (e.g., redux, mobx, zustand, etc.) Basically, you can show a modal based on the global state. When an error occurs, you can change state instead of calling console.log

    • @natali1085
      @natali1085 3 ปีที่แล้ว +1

      @@DmytroDanylov Thanks. I'm using GraphQl. The solution was Reactive variables from Apollo

  • @chancesmithb
    @chancesmithb ปีที่แล้ว

    Great job!

  • @saeedjalilian4201
    @saeedjalilian4201 3 ปีที่แล้ว

    Hi, thanks for your great tutorial video. I am new to Apollo client and would like to retry for a configurable number of times if any error happened. I tried reading docs but can’t find a proper way to do that. If I can have your advice? Thanks

  • @brbl415
    @brbl415 3 ปีที่แล้ว

    How to prevent graphql/network error from crashing the client/navigator?

  • @MaPhongBa129
    @MaPhongBa129 4 ปีที่แล้ว

    Sir, can i get your repo? please, just to learn

    • @DmytroDanylov
      @DmytroDanylov  4 ปีที่แล้ว

      Hi Vĩnh. This is the link to the tutorial's code repo: github.com/d-dmytro/youtube-handling-errors-with-apollo-client