Hi, I really like the way you explain the stuff like Error Handling in GraphQL. You mentioned in the end of the video that this pattern can be extended, so... We are waiting for more videos on this topic
Do you still need the "message" in the fragment "... on UserSuspendedError" when you are already quering it inside of the interface fragment "... on Error"? Shouldn't the second "message" field be removed from the second fragment and only be left in the Error fragment?
I have second questoin regarding error handling in GraphQL. Should this pattern be applied to Query side (I usually see this pattern on Mutations)? If yes, how to deal wth nested fields (field resolvers)? Admin { id user { ... on User { id name page { ... on Page { id phone } } } } } Is it okay?
I’m not sure I fully understand but these can be used with queries and mutations. Nested field maybe, you’re already inside the user scope by that point so not sure how helpful it is to further have unions there
Hey! Thanks for the kind words. You could create the same type/union structures with a code first approach and return it in the same way you would another response.
Hi, I really like the way you explain the stuff like Error Handling in GraphQL. You mentioned in the end of the video that this pattern can be extended, so... We are waiting for more videos on this topic
Hey!
I plan to focus on more error handling topics very soon. I'll reply to this comment when the new video drops 💜
@@notrab Hi Jamie! Any updates on this?
You can find part 2 here:
th-cam.com/video/hnmIHN7O3YQ/w-d-xo.html
Do you still need the "message" in the fragment "... on UserSuspendedError" when you are already quering it inside of the interface fragment "... on Error"? Shouldn't the second "message" field be removed from the second fragment and only be left in the Error fragment?
I have second questoin regarding error handling in GraphQL.
Should this pattern be applied to Query side (I usually see this pattern on Mutations)? If yes, how to deal wth nested fields (field resolvers)?
Admin {
id
user {
... on User {
id
name
page {
... on Page {
id
phone
}
}
}
}
}
Is it okay?
I’m not sure I fully understand but these can be used with queries and mutations. Nested field maybe, you’re already inside the user scope by that point so not sure how helpful it is to further have unions there
Thank thats was verry helpfull
Glad it helped!
Thanks for the tutorial. It's been very helpful. How would you replicate this in a code first approach?
Hey! Thanks for the kind words. You could create the same type/union structures with a code first approach and return it in the same way you would another response.