]>
Commit | Line | Data |
---|---|---|
c1bc5993 RBR |
1 | import { gql } from '@apollo/client/core'; |
2 | ||
3 | export const GET_FORUMS = gql` | |
4 | query GetForums { | |
5 | forums { | |
6 | id | |
7 | glyph | |
8 | label | |
9 | position | |
10 | } | |
11 | } | |
12 | `; | |
13 | ||
14 | export const GET_FORUM = gql` | |
15 | query GetForum($id: ID!) { | |
16 | forum(id: $id) { | |
17 | id | |
18 | glyph | |
19 | label | |
20 | position | |
21 | topics { | |
22 | id | |
18ced3bf RBR |
23 | title |
24 | updated_at | |
c1bc5993 RBR |
25 | ttl |
26 | } | |
27 | } | |
28 | } | |
29 | `; | |
18ced3bf RBR |
30 | |
31 | export const GET_TAG = gql` | |
32 | query GetTag($id: ID!) { | |
33 | tag(id: $id) { | |
34 | id | |
35 | topics { | |
36 | id | |
37 | title | |
38 | updated_at | |
39 | ttl | |
40 | } | |
41 | } | |
42 | } | |
43 | `; | |
44 | ||
45 | export const GET_TOPIC = gql` | |
46 | query GetTopic($id: ID!) { | |
47 | topic(id: $id) { | |
48 | id | |
49 | title | |
50 | updated_at | |
51 | ttl | |
52 | forum { | |
53 | id | |
54 | glyph | |
55 | label | |
56 | } | |
57 | tags { | |
58 | id | |
59 | weight | |
60 | } | |
61 | posts { | |
62 | id | |
63 | text | |
64 | created_at | |
65 | author { | |
66 | id | |
67 | handle | |
68 | } | |
69 | } | |
70 | } | |
71 | } | |
72 | `; | |
73 | ||
74 | export const GET_POST = gql` | |
75 | query GetPost($id: ID!) { | |
76 | post(id: $id) { | |
77 | id | |
78 | text | |
79 | created_at | |
80 | author { | |
81 | id | |
82 | handle | |
83 | } | |
84 | topic { | |
85 | id | |
86 | title | |
87 | } | |
88 | } | |
89 | } | |
90 | `; |