diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2022-05-17 23:43:30 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2022-05-17 23:43:30 +0200 |
| commit | d2cd7f1b4c318ac8587ab3dc1dec4a44b6d592fe (patch) | |
| tree | 0b8c84560f661da92137d4f4fa59ed493ce2feab /src/lib/stores | |
| parent | 0472e8073b9df492596e550fc79c42ca93ba14c0 (diff) | |
Start migration to supabase
Diffstat (limited to 'src/lib/stores')
| -rw-r--r-- | src/lib/stores/apollo.ts | 2 | ||||
| -rw-r--r-- | src/lib/stores/forums.ts | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/stores/apollo.ts b/src/lib/stores/apollo.ts index 4ef1986..c75dd87 100644 --- a/src/lib/stores/apollo.ts +++ b/src/lib/stores/apollo.ts @@ -52,7 +52,7 @@ export const store = function store<Type>({ set({ loading: false, - data: result.data[key], + data: result.data[key].edges.map((item) => item.node), error: undefined }); }, diff --git a/src/lib/stores/forums.ts b/src/lib/stores/forums.ts index 8a395b3..0ff09f7 100644 --- a/src/lib/stores/forums.ts +++ b/src/lib/stores/forums.ts @@ -6,4 +6,4 @@ 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: 'forums', query: GET_FORUMS, initialValue: [] }); + store<Forum[]>({ key: 'forumsCollection', query: GET_FORUMS, initialValue: [] }); |