aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/list/ListQuery.js
diff options
context:
space:
mode:
Diffstat (limited to 'webui/src/list/ListQuery.js')
-rw-r--r--webui/src/list/ListQuery.js36
1 files changed, 20 insertions, 16 deletions
diff --git a/webui/src/list/ListQuery.js b/webui/src/list/ListQuery.js
index 3b57fcc2..9dbe4e53 100644
--- a/webui/src/list/ListQuery.js
+++ b/webui/src/list/ListQuery.js
@@ -1,15 +1,20 @@
// @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'
+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) {
+ bugs: allBugs(
+ first: $first
+ last: $last
+ after: $after
+ before: $before
+ ) {
totalCount
edges {
cursor
@@ -17,7 +22,7 @@ const QUERY = gql`
...BugRow
}
}
- pageInfo{
+ pageInfo {
hasNextPage
hasPreviousPage
startCursor
@@ -27,18 +32,17 @@ const QUERY = gql`
}
}
-
${BugRow.fragment}
-`
+`;
const ListQuery = () => (
<Query query={QUERY}>
- {({loading, error, data, fetchMore}) => {
- if (loading) return <CircularProgress/>
- if (error) return <p>Error: {error}</p>
- return <List bugs={data.defaultRepository.bugs} fetchMore={fetchMore}/>
+ {({ loading, error, data, fetchMore }) => {
+ if (loading) return <CircularProgress />;
+ if (error) return <p>Error: {error}</p>;
+ return <List bugs={data.defaultRepository.bugs} fetchMore={fetchMore} />;
}}
</Query>
-)
+);
-export default ListQuery
+export default ListQuery;