]> git.r.bdr.sh - rbdr/forum/blob - src/lib/stores/forums.ts
ab0206610a5e4d3b5ca2d887c207624d07ee8449
[rbdr/forum] / src / lib / stores / forums.ts
1 import { store } from './apollo';
2 import { GET_FORUM, GET_FORUMS } from '$lib/data/queries';
3
4 export const getForum = (id: string) =>
5 store({ key: 'forum', query: GET_FORUM, variables: { id } });
6 export const getForums = () => store({ key: 'forums', query: GET_FORUMS, initialValue: [] });