webui/src/CurrentIdentity.graphql 🔗
@@ -1,5 +1,5 @@
query CurrentIdentity {
- defaultRepository {
+ repository {
userIdentity {
displayName
avatarUrl
Quentin Gliech created
webui/src/CurrentIdentity.graphql | 2 +-
webui/src/CurrentIdentity.tsx | 4 ++--
webui/src/bug/BugQuery.graphql | 2 +-
webui/src/bug/BugQuery.tsx | 4 ++--
webui/src/bug/TimelineQuery.graphql | 2 +-
webui/src/bug/TimelineQuery.js | 5 +----
webui/src/list/FilterToolbar.graphql | 2 +-
webui/src/list/FilterToolbar.tsx | 4 ++--
webui/src/list/ListQuery.graphql | 2 +-
webui/src/list/ListQuery.tsx | 8 ++++----
10 files changed, 16 insertions(+), 19 deletions(-)
@@ -1,5 +1,5 @@
query CurrentIdentity {
- defaultRepository {
+ repository {
userIdentity {
displayName
avatarUrl
@@ -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}>
@@ -1,7 +1,7 @@
#import "./Bug.graphql"
query GetBug($id: String!) {
- defaultRepository {
+ repository {
bug(prefix: $id) {
...Bug
}
@@ -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;
@@ -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 {
@@ -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} />
);
};
@@ -1,5 +1,5 @@
query BugCount($query: String) {
- defaultRepository {
+ repository {
bugs: allBugs(query: $query) {
totalCount
}
@@ -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}>
@@ -7,7 +7,7 @@ query ListBugs(
$before: String
$query: String
) {
- defaultRepository {
+ repository {
bugs: allBugs(
first: $first
last: $last
@@ -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 />;