-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ErrorExchange doesnt seem to be called #193
Comments
This could be a bug but I think I've witnessed something similar myself and found the error handling atm is complicated to do right because to the usage of Combine and how things are setup. I have a whole new foundation coming soon that replaces Combine entirely with async/await and throwing methods which solves this entirely. It also brings a lot of other benefits ofc. You can read more about that here if you like: I will check into this though and get back to you. |
My use case is pretty simple right now so I'd be happy to try a pre-beta when its ready :) (would also benefit me because then it's probably less of a migration for me later?) |
I think this project will become the most popular way to consume graphql on ios. This very much models https://github.com/dillonkearns/elm-graphql which I've used heavily and really really love. It's a much much better approach than writing string queries and running a generator that looks for them and writes types specific to those queries like virtually all js libs. Keep up the great work! |
@atomkirk well I might upset you then haha. I feel strongly its a better direction for a Swift version of this library, but given Mat clearly had different ideas it may not be appropriate. Its possible that Mat and I decide its the wrong direction for this library in which case I'll be open sourcing as a separate effort (if the approach pays off). But I'm hopeful that Mat and I can align on this because I agree, he's done an amazing job and having a defacto GraphQL library for Swift would be amazing. If you review my Discussions or the Roadmap you can see that I really want to focus more on the developer experience and lowering barrier to entry to almost nothing. In fact the approach I have in mind, has an almost flat line learning 'curve'. I struggle to call it a curve at all hahaha. Anyway, let me know if this sounds backwards or scary to you – genuinely appreciate all input. And once I've gotten some thoughts/input from Mat, I actually do plan on detailing the whole thing in a dedicated Discussion #194 that will cover everything and give everyone early overview of the intended design. But again, this is first-and-foremost Mat's library so I need to get his input before I can say what direction we're going to take. My approach is radically different tbh. One thing I can say almost for certain however, is that I've already rewritten the low level APIs (GraphQL package) to include a custom global actor/executor as well as full async/await and throwing methods support. It brings modern features to the foundation, improves the developer experience ten fold and makes it way easier to maintain and understand what's going on. The actor in particular provides end-to-end thread safety without the consumer doing anything and therefore brings a lot more predictability and reliability to the library as a whole. The high level APIs need updating to make use of this, but I'm fairly certain this will happen over the next few months. Thanks again! |
Describe the bug
ErrorExchange doesnt seem to be called
To Reproduce
When I print the error in this code:
it prints:
However, here is my network client code:
it appears
ErrorExchange
never gets calledExpected behavior
I'd like to clear my token when I get back an error that the token is no longer valid. Is there another way you'd recommend doing this?
The text was updated successfully, but these errors were encountered: