Replies: 1 comment 3 replies
-
This doesn't really work too well for GraphQL as sub-resolvers, ... can error which doesn't mean that there's no data or that it's fatal for the UI. Furthermore we can have partial/stale dat as well. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello 👋 ,
I'd like to have a
status
key returned from useQuery/useMutation so I can easily pattern-match on it to handle every cases (fetching/error/data) exhaustively and explicitly.Ideally the response type should be a union like :
This is how react-query does it. All the other boolean values are just derived from the status as extra helpers.
Beta Was this translation helpful? Give feedback.
All reactions