diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2021-03-14 22:41:16 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2021-03-14 22:41:16 +0100 |
| commit | 18ced3bfaff8ca40edb1a96e631ba1553a3a7a6d (patch) | |
| tree | 450ee3c84e7400e99ba30261e705b2db619d9bcf /src/data | |
| parent | c1bc5993a694f6fd047a3881351827058042483b (diff) | |
Add stores for GraphQL data:
Diffstat (limited to 'src/data')
| -rw-r--r-- | src/data/queries.js | 65 |
1 files changed, 63 insertions, 2 deletions
diff --git a/src/data/queries.js b/src/data/queries.js index de223cb..93e4b23 100644 --- a/src/data/queries.js +++ b/src/data/queries.js @@ -20,10 +20,71 @@ export const GET_FORUM = gql` position topics { id - title, - updated_at, + title + updated_at ttl } } } `; + +export const GET_TAG = gql` + query GetTag($id: ID!) { + tag(id: $id) { + id + topics { + id + title + updated_at + ttl + } + } + } +`; + +export const GET_TOPIC = gql` + query GetTopic($id: ID!) { + topic(id: $id) { + id + title + updated_at + ttl + forum { + id + glyph + label + } + tags { + id + weight + } + posts { + id + text + created_at + author { + id + handle + } + } + } + } +`; + +export const GET_POST = gql` + query GetPost($id: ID!) { + post(id: $id) { + id + text + created_at + author { + id + handle + } + topic { + id + title + } + } + } +`; |