aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/BugPage.js
diff options
context:
space:
mode:
authorQuentin Gliech <quentingliech@gmail.com>2018-07-31 00:18:55 +0200
committerQuentin Gliech <quentingliech@gmail.com>2018-07-31 00:18:55 +0200
commit8a4e373e7b1c093abeb967d9a6a43c5ed533edb8 (patch)
tree48d61c44e59a690d73e55b5fca288ef94b1d3569 /webui/src/BugPage.js
parent091ac03f1f758bd681c5f522b88c04ea04d81359 (diff)
downloadgit-bug-8a4e373e7b1c093abeb967d9a6a43c5ed533edb8.tar.gz
webui: Use the new schema
Diffstat (limited to 'webui/src/BugPage.js')
-rw-r--r--webui/src/BugPage.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/webui/src/BugPage.js b/webui/src/BugPage.js
index ec0872eb..0f415841 100644
--- a/webui/src/BugPage.js
+++ b/webui/src/BugPage.js
@@ -7,9 +7,11 @@ import CircularProgress from "@material-ui/core/CircularProgress";
import Bug from "./Bug";
const QUERY = gql`
- query GetBug($id: BugID!) {
- bug(id: $id) {
- ...Bug
+ query GetBug($id: String!) {
+ defaultRepository {
+ bug(prefix: $id) {
+ ...Bug
+ }
}
}
@@ -21,7 +23,7 @@ const BugPage = ({ match }) => (
{({ loading, error, data }) => {
if (loading) return <CircularProgress />;
if (error) return <p>Error.</p>;
- return <Bug bug={data.bug} />;
+ return <Bug bug={data.defaultRepository.bug} />;
}}
</Query>
);