diff options
-rw-r--r-- | webui/src/CurrentIdentity.graphql | 2 | ||||
-rw-r--r-- | webui/src/CurrentIdentity.tsx | 4 | ||||
-rw-r--r-- | webui/src/bug/BugQuery.graphql | 2 | ||||
-rw-r--r-- | webui/src/bug/BugQuery.tsx | 4 | ||||
-rw-r--r-- | webui/src/bug/TimelineQuery.graphql | 2 | ||||
-rw-r--r-- | webui/src/bug/TimelineQuery.js | 5 | ||||
-rw-r--r-- | webui/src/list/FilterToolbar.graphql | 2 | ||||
-rw-r--r-- | webui/src/list/FilterToolbar.tsx | 4 | ||||
-rw-r--r-- | webui/src/list/ListQuery.graphql | 2 | ||||
-rw-r--r-- | webui/src/list/ListQuery.tsx | 8 |
10 files changed, 16 insertions, 19 deletions
diff --git a/webui/src/CurrentIdentity.graphql b/webui/src/CurrentIdentity.graphql index 6c000a2e..2794a40f 100644 --- a/webui/src/CurrentIdentity.graphql +++ b/webui/src/CurrentIdentity.graphql @@ -1,5 +1,5 @@ query CurrentIdentity { - defaultRepository { + repository { userIdentity { displayName avatarUrl diff --git a/webui/src/CurrentIdentity.tsx b/webui/src/CurrentIdentity.tsx index 5b8fcbb9..256f44c4 100644 --- a/webui/src/CurrentIdentity.tsx +++ b/webui/src/CurrentIdentity.tsx @@ -14,9 +14,9 @@ const CurrentIdentity = () => { const classes = useStyles(); const { loading, error, data } = useCurrentIdentityQuery(); - if (error || loading || !data?.defaultRepository?.userIdentity) return null; + if (error || loading || !data?.repository?.userIdentity) return null; - const user = data.defaultRepository.userIdentity; + const user = data.repository.userIdentity; return ( <> <Avatar src={user.avatarUrl ? user.avatarUrl : undefined}> diff --git a/webui/src/bug/BugQuery.graphql b/webui/src/bug/BugQuery.graphql index caa247ed..cdc4723f 100644 --- a/webui/src/bug/BugQuery.graphql +++ b/webui/src/bug/BugQuery.graphql @@ -1,7 +1,7 @@ #import "./Bug.graphql" query GetBug($id: String!) { - defaultRepository { + repository { bug(prefix: $id) { ...Bug } diff --git a/webui/src/bug/BugQuery.tsx b/webui/src/bug/BugQuery.tsx index ea7bb7da..2ecf718c 100644 --- a/webui/src/bug/BugQuery.tsx +++ b/webui/src/bug/BugQuery.tsx @@ -15,8 +15,8 @@ const BugQuery: React.FC<Props> = ({ match }: Props) => { }); if (loading) return <CircularProgress />; if (error) return <p>Error: {error}</p>; - if (!data?.defaultRepository?.bug) return <p>404.</p>; - return <Bug bug={data.defaultRepository.bug} />; + if (!data?.repository?.bug) return <p>404.</p>; + return <Bug bug={data.repository.bug} />; }; export default BugQuery; diff --git a/webui/src/bug/TimelineQuery.graphql b/webui/src/bug/TimelineQuery.graphql index 7a8bc736..493f4416 100644 --- a/webui/src/bug/TimelineQuery.graphql +++ b/webui/src/bug/TimelineQuery.graphql @@ -5,7 +5,7 @@ #import "./SetStatusFragment.graphql" query Timeline($id: String!, $first: Int = 10, $after: String) { - defaultRepository { + repository { bug(prefix: $id) { timeline(first: $first, after: $after) { nodes { diff --git a/webui/src/bug/TimelineQuery.js b/webui/src/bug/TimelineQuery.js index 11f3d08c..886edab2 100644 --- a/webui/src/bug/TimelineQuery.js +++ b/webui/src/bug/TimelineQuery.js @@ -15,10 +15,7 @@ const TimelineQuery = ({ id }) => { if (loading) return <CircularProgress />; if (error) return <p>Error: {error}</p>; return ( - <Timeline - ops={data.defaultRepository.bug.timeline.nodes} - fetchMore={fetchMore} - /> + <Timeline ops={data.repository.bug.timeline.nodes} fetchMore={fetchMore} /> ); }; diff --git a/webui/src/list/FilterToolbar.graphql b/webui/src/list/FilterToolbar.graphql index 644a4eed..cd103f44 100644 --- a/webui/src/list/FilterToolbar.graphql +++ b/webui/src/list/FilterToolbar.graphql @@ -1,5 +1,5 @@ query BugCount($query: String) { - defaultRepository { + repository { bugs: allBugs(query: $query) { totalCount } diff --git a/webui/src/list/FilterToolbar.tsx b/webui/src/list/FilterToolbar.tsx index df295054..b95b10bc 100644 --- a/webui/src/list/FilterToolbar.tsx +++ b/webui/src/list/FilterToolbar.tsx @@ -41,9 +41,9 @@ function CountingFilter({ query, children, ...props }: CountingFilterProps) { var prefix; if (loading) prefix = '...'; - else if (error || !data?.defaultRepository) prefix = '???'; + else if (error || !data?.repository) prefix = '???'; // TODO: better prefixes & error handling - else prefix = data.defaultRepository.bugs.totalCount; + else prefix = data.repository.bugs.totalCount; return ( <Filter {...props}> diff --git a/webui/src/list/ListQuery.graphql b/webui/src/list/ListQuery.graphql index bf9ea80a..ded60c8a 100644 --- a/webui/src/list/ListQuery.graphql +++ b/webui/src/list/ListQuery.graphql @@ -7,7 +7,7 @@ query ListBugs( $before: String $query: String ) { - defaultRepository { + repository { bugs: allBugs( first: $first last: $last diff --git a/webui/src/list/ListQuery.tsx b/webui/src/list/ListQuery.tsx index c91264e1..84b72431 100644 --- a/webui/src/list/ListQuery.tsx +++ b/webui/src/list/ListQuery.tsx @@ -203,8 +203,8 @@ function ListQuery() { let nextPage = null; let previousPage = null; let count = 0; - if (!loading && !error && data?.defaultRepository?.bugs) { - const bugs = data.defaultRepository.bugs; + if (!loading && !error && data?.repository?.bugs) { + const bugs = data.repository.bugs; count = bugs.totalCount; // This computes the URL for the next page if (bugs.pageInfo.hasNextPage) { @@ -250,8 +250,8 @@ function ListQuery() { content = <Placeholder count={10} />; } else if (error) { content = <Error error={error} />; - } else if (data?.defaultRepository) { - const bugs = data.defaultRepository.bugs; + } else if (data?.repository) { + const bugs = data.repository.bugs; if (bugs.totalCount === 0) { content = <NoBug />; |