Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

refactor: temp remove urql cache

liyasthomascad75e92aa31
diff --git a/packages/hoppscotch-app/components/teams/Add.vue b/packages/hoppscotch-app/components/teams/Add.vue
index 79802495f..505d528a0 100644
--- a/packages/hoppscotch-app/components/teams/Add.vue
+++ b/packages/hoppscotch-app/components/teams/Add.vue
@@ -67,7 +67,7 @@ const addNewTeam = () =>
}
},
() => {
- // Success logic ?
+ toast.success(`${t("team.new_created")}`)
hideModal()
}
)
diff --git a/packages/hoppscotch-app/helpers/backend/GQLClient.ts b/packages/hoppscotch-app/helpers/backend/GQLClient.ts
index 5ea2d2beb..134ff2b02 100644
--- a/packages/hoppscotch-app/helpers/backend/GQLClient.ts
+++ b/packages/hoppscotch-app/helpers/backend/GQLClient.ts
@@ -1,3 +1,4 @@
+// TODO: fix cache
import {
ref,
reactive,
@@ -22,8 +23,8 @@ import {
subscriptionExchange,
} from "@urql/core"
import { authExchange } from "@urql/exchange-auth"
-import { offlineExchange } from "@urql/exchange-graphcache"
-import { makeDefaultStorage } from "@urql/exchange-graphcache/default-storage"
+// import { offlineExchange } from "@urql/exchange-graphcache"
+// import { makeDefaultStorage } from "@urql/exchange-graphcache/default-storage"
import { devtoolsExchange } from "@urql/devtools"
import { SubscriptionClient } from "subscriptions-transport-ws"
import * as E from "fp-ts/Either"
@@ -31,11 +32,11 @@ import * as TE from "fp-ts/TaskEither"
import { pipe, constVoid } from "fp-ts/function"
import { Source, subscribe, pipe as wonkaPipe, onEnd } from "wonka"
import { Subject } from "rxjs"
-import { keyDefs } from "./caching/keys"
-import { optimisticDefs } from "./caching/optimistic"
-import { updatesDef } from "./caching/updates"
-import { resolversDef } from "./caching/resolvers"
-import schema from "./backend-schema.json"
+// import { keyDefs } from "./caching/keys"
+// import { optimisticDefs } from "./caching/optimistic"
+// import { updatesDef } from "./caching/updates"
+// import { resolversDef } from "./caching/resolvers"
+// import schema from "./backend-schema.json"
import {
authIdToken$,
getAuthIDToken,
@@ -48,10 +49,10 @@ const BACKEND_GQL_URL =
? "https://api.hoppscotch.io/graphql"
: "https://api.hoppscotch.io/graphql"
-const storage = makeDefaultStorage({
- idbName: "hoppcache-v1",
- maxAge: 7,
-})
+// const storage = makeDefaultStorage({
+// idbName: "hoppcache-v1",
+// maxAge: 7,
+// })
const subscriptionClient = new SubscriptionClient(
process.env.context === "production"
@@ -77,14 +78,14 @@ const createHoppClient = () =>
exchanges: [
devtoolsExchange,
dedupExchange,
- offlineExchange({
- schema: schema as any,
- keys: keyDefs,
- optimistic: optimisticDefs,
- updates: updatesDef,
- resolvers: resolversDef,
- storage,
- }),
+ // offlineExchange({
+ // schema: schema as any,
+ // keys: keyDefs,
+ // optimistic: optimisticDefs,
+ // updates: updatesDef,
+ // resolvers: resolversDef,
+ // storage,
+ // }),
authExchange({
addAuthToOperation({ authState, operation }) {
if (!authState || !authState.authToken) {