aboutsummaryrefslogtreecommitdiff
path: root/src/lib/stores/forums.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/stores/forums.ts')
-rw-r--r--src/lib/stores/forums.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/stores/forums.ts b/src/lib/stores/forums.ts
index ab02066..8a395b3 100644
--- a/src/lib/stores/forums.ts
+++ b/src/lib/stores/forums.ts
@@ -1,6 +1,9 @@
import { store } from './apollo';
import { GET_FORUM, GET_FORUMS } from '$lib/data/queries';
+import type { Forum } from '$lib/data/types';
+
export const getForum = (id: string) =>
- store({ key: 'forum', query: GET_FORUM, variables: { id } });
-export const getForums = () => store({ key: 'forums', query: GET_FORUMS, initialValue: [] });
+ store<Forum>({ key: 'forum', query: GET_FORUM, variables: { id } });
+export const getForums = () =>
+ store<Forum[]>({ key: 'forums', query: GET_FORUMS, initialValue: [] });