learn-anything.xyz
learn-anything.xyz copied to clipboard
Setup great GraphQL client for Solid
- use https://github.com/learn-anything/urql-solid package + https://gql-tada.0no.co
- replace all existing use of mobius with above
- should have flawless experience with doing queries/mutations + great global error tracking similar to what we have in
root.tsx
const onError = (error: string) => {
if (location.pathname !== "/auth" && error.includes("Token expired")) {
navigate("/auth")
} else if (error.includes("cannot-update-topic-learning-status")) {
global.set("mode", "cannot-update-topic-learning-status")
} else if (error.includes("cannot-update-global-link-status")) {
global.set("mode", "cannot-update-global-link-status")
} else {
toast.error(JSON.parse(error).message)
}
}
Why
- mobius client is giving type issues
Consider