Files
dozzle/assets/modules/urql.ts
T
2026-01-20 03:18:27 +00:00

13 lines
334 B
TypeScript

import { type App } from "vue";
import urql, { cacheExchange, fetchExchange, Client } from "@urql/vue";
import { withBase } from "@/stores/config";
export const client = new Client({
url: withBase("/api/graphql"),
exchanges: [cacheExchange, fetchExchange],
});
export const install = (app: App) => {
app.use(urql, client);
};