-
Notifications
You must be signed in to change notification settings - Fork 28
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
Move loading mutation call to interceptors #40
Comments
No idea if we have something similar for Apollo GraphQL. |
There's always a way of intercepting calls to Vuex store (https://vuedose.tips/tips/8/). But I think it wouldn't fit the current design, as the call starts in the service. |
Humm, it looks like for ApolloClient, we have to work in the Network Layer, using what they call Middleware and Afterweare: https://www.apollographql.com/docs/react/advanced/network-layer.html#linkMiddleware |
Used Vuetify Loader to display the progress. Then set the interceptors for Axios, and instead of searching for a way to intercept requests in GraphQL, replaced their Which means that REST and GraphQL requests share the lower level HTTP client that fetches the data. And we can configure interceptors in a single place 🎉 It deserves a screen cast I've added a 3 seconds timeout to the JupyterHub backend service (because it was too fast to see running locally). It's possible to see that the interface used to display progress is the same too between user profile and suites screens. |
It is much easier to have a single place with the
setLoading(true)
and once compltedsetLoading(false)
, rather than having to implement that in each call.e.g. greyby/vue-spinner#19
The text was updated successfully, but these errors were encountered: