You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to use urql, but due to the lack of useLazyQuery, wanted to reach for Apollo. Not sure if I will end up using it, but I needed to write some links for it to work, so here you go.
There's two versions:
ApolloLink
This one uses ApolloLink, which as far as I can tell, is the lowest level of these things.
This one uses HttpLink, but replaces fetch with something that just calls invoke from tauri.
I'm sure it's "slower", because we need to call JSON.parse to get an object to pass to tauri-plugin-graphql along with the JSON.parse that surely happens later on in HttpLink.
But, @apollo/client does seem to set the abort signal, and this uses it. So it might have some UX considerations that tauriGraphqlApolloLink doesn't.
I wanted to use urql, but due to the lack of
useLazyQuery
, wanted to reach for Apollo. Not sure if I will end up using it, but I needed to write some links for it to work, so here you go.There's two versions:
ApolloLink
This one uses
ApolloLink
, which as far as I can tell, is the lowest level of these things.HttpLink
This one uses
HttpLink
, but replacesfetch
with something that just callsinvoke
from tauri.I'm sure it's "slower", because we need to call
JSON.parse
to get an object to pass to tauri-plugin-graphql along with theJSON.parse
that surely happens later on inHttpLink
.But,
@apollo/client
does seem to set the abort signal, and this uses it. So it might have some UX considerations thattauriGraphqlApolloLink
doesn't.The text was updated successfully, but these errors were encountered: