blob: 0ff09f7b5f6eca3b3e268ef72fabe1b0372733a3 (
plain)
1
2
3
4
5
6
7
8
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<Forum>({ key: 'forum', query: GET_FORUM, variables: { id } });
export const getForums = () =>
store<Forum[]>({ key: 'forumsCollection', query: GET_FORUMS, initialValue: [] });
|