aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/src/services
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/services')
-rw-r--r--frontend/src/services/api-client.ts6
-rw-r--r--frontend/src/services/graphql-client.ts10
2 files changed, 6 insertions, 10 deletions
diff --git a/frontend/src/services/api-client.ts b/frontend/src/services/api-client.ts
new file mode 100644
index 0000000..c1ee475
--- /dev/null
+++ b/frontend/src/services/api-client.ts
@@ -0,0 +1,6 @@
+import createClient from "openapi-fetch";
+import type { paths } from "../api/generated";
+
+export const api = createClient<paths>({
+ credentials: "include",
+});
diff --git a/frontend/src/services/graphql-client.ts b/frontend/src/services/graphql-client.ts
deleted file mode 100644
index 4b2532a..0000000
--- a/frontend/src/services/graphql-client.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { Client, cacheExchange, fetchExchange } from "urql";
-
-export const client = new Client({
- url: "/graphql",
- exchanges: [cacheExchange, fetchExchange],
- fetchOptions: {
- // Include cookies for session management
- credentials: "include",
- },
-});