From c1bc5993a694f6fd047a3881351827058042483b Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Sat, 13 Mar 2021 15:28:29 +0100 Subject: Use routify and GraphQL server --- src/data/queries.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/data/queries.js (limited to 'src/data') 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 + } + } + } +`; -- cgit