]> git.r.bdr.sh - rbdr/forum/blobdiff - src/data/queries.js
Add tag component:
[rbdr/forum] / src / data / queries.js
index de223cb110412e3999c18b3b3ae50d9fb6662384..93e4b233575e440b2d1ed40cb10f1449d00d2e46 100644 (file)
@@ -20,10 +20,71 @@ export const GET_FORUM = gql`
       position
       topics {
         id
       position
       topics {
         id
-        title,
-        updated_at,
+        title
+        updated_at
         ttl
       }
     }
   }
 `;
         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
+      }
+    }
+  }
+`;