]>
Commit | Line | Data |
---|---|---|
a7cf03c1 RBR |
1 | import { store } from './apollo'; |
2 | import { GET_FORUM, GET_FORUMS } from '$lib/data/queries'; | |
3 | ||
be1ce532 RBR |
4 | import type { Forum } from '$lib/data/types'; |
5 | ||
cac85db0 | 6 | export const getForum = (id: string) => |
be1ce532 RBR |
7 | store<Forum>({ key: 'forum', query: GET_FORUM, variables: { id } }); |
8 | export const getForums = () => | |
9 | store<Forum[]>({ key: 'forums', query: GET_FORUMS, initialValue: [] }); |