From 1984d4343db770fc2c8e251a81f1ab997a4c4d5e Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Wed, 15 Aug 2018 20:31:53 +0200 Subject: webui: rework of the bug page with a timeline --- webui/src/list/ListQuery.js | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 webui/src/list/ListQuery.js (limited to 'webui/src/list/ListQuery.js') diff --git a/webui/src/list/ListQuery.js b/webui/src/list/ListQuery.js new file mode 100644 index 00000000..3b57fcc2 --- /dev/null +++ b/webui/src/list/ListQuery.js @@ -0,0 +1,44 @@ +// @flow +import CircularProgress from '@material-ui/core/CircularProgress' +import gql from 'graphql-tag' +import React from 'react' +import { Query } from 'react-apollo' +import BugRow from './BugRow' +import List from './List' + +const QUERY = gql` + query($first: Int = 10, $last: Int, $after: String, $before: String) { + defaultRepository { + bugs: allBugs(first: $first, last: $last, after: $after, before: $before) { + totalCount + edges { + cursor + node { + ...BugRow + } + } + pageInfo{ + hasNextPage + hasPreviousPage + startCursor + endCursor + } + } + } + } + + + ${BugRow.fragment} +` + +const ListQuery = () => ( + + {({loading, error, data, fetchMore}) => { + if (loading) return + if (error) return

Error: {error}

+ return + }} +
+) + +export default ListQuery -- cgit