aboutsummaryrefslogtreecommitdiff
path: root/src/data
diff options
context:
space:
mode:
authorRuben Beltran del Rio <ruben@unlimited.pizza>2021-03-13 15:28:29 +0100
committerRuben Beltran del Rio <ruben@unlimited.pizza>2021-03-13 15:28:29 +0100
commitc1bc5993a694f6fd047a3881351827058042483b (patch)
tree3d64130e1e6a2f86f70981df28cf22cd535bf2b2 /src/data
parentbd8e98d7e24c4dbaee7db6ec7955f7c2f6d396a6 (diff)
Use routify and GraphQL server
Diffstat (limited to 'src/data')
-rw-r--r--src/data/queries.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/data/queries.js b/src/data/queries.js
new file mode 100644
index 0000000..de223cb
--- /dev/null
+++ b/src/data/queries.js
@@ -0,0 +1,29 @@
+import { gql } from '@apollo/client/core';
+
+export const GET_FORUMS = gql`
+ query GetForums {
+ forums {
+ id
+ glyph
+ label
+ position
+ }
+ }
+`;
+
+export const GET_FORUM = gql`
+ query GetForum($id: ID!) {
+ forum(id: $id) {
+ id
+ glyph
+ label
+ position
+ topics {
+ id
+ title,
+ updated_at,
+ ttl
+ }
+ }
+ }
+`;