diff --git a/src/shared/backend/search.tsx b/src/shared/backend/search.tsx index 343c28aa..fb62c63f 100644 --- a/src/shared/backend/search.tsx +++ b/src/shared/backend/search.tsx @@ -79,7 +79,7 @@ export function createSuggestion(item: GQL.SearchSuggestion): Suggestion | null case 'Repository': { return { type: 'repo', - title: item.uri, + title: item.name, url: `/${item.name}`, urlLabel: 'go to repository', } @@ -90,7 +90,7 @@ export function createSuggestion(item: GQL.SearchSuggestion): Suggestion | null if (dir !== undefined && dir !== '.') { descriptionParts.push(`${dir}/`) } - descriptionParts.push(basename(item.repository.uri)) + descriptionParts.push(basename(item.repository.name)) if (item.isDirectory) { return { type: 'dir', @@ -114,7 +114,7 @@ export function createSuggestion(item: GQL.SearchSuggestion): Suggestion | null kind: item.kind, title: item.name, description: `${item.containerName || item.location.resource.path} — ${basename( - item.location.resource.repository.uri + item.location.resource.repository.name )}`, url: item.url, urlLabel: 'go to definition', @@ -136,7 +136,7 @@ const symbolsFragment = ` resource { path repository { - uri + name } } url @@ -158,7 +158,7 @@ export const fetchSuggestions = (options: SearchOptions, first: number) => suggestions(first: $first) { ... on Repository { __typename - uri + name } ... on File { __typename @@ -167,7 +167,7 @@ export const fetchSuggestions = (options: SearchOptions, first: number) => isDirectory url repository { - uri + name } } ... on Symbol { diff --git a/src/shared/repo/backend.tsx b/src/shared/repo/backend.tsx index 2bec9e87..3ebe6f74 100644 --- a/src/shared/repo/backend.tsx +++ b/src/shared/repo/backend.tsx @@ -15,7 +15,7 @@ export const resolveParentRev = memoizeObservable( queryGraphQL({ ctx: getContext({ repoKey: ctx.repoPath }), request: `query ResolveParentRev($repoPath: String!, $rev: String!) { - repository(uri: $repoPath) { + repository(name: $repoPath) { mirrorInfo { cloneInProgress } @@ -59,7 +59,7 @@ export const resolveRepo = memoizeObservable( queryGraphQL({ ctx: getContext({ repoKey: ctx.repoPath }), request: `query ResolveRepo($repoPath: String!) { - repository(uri: $repoPath) { + repository(name: $repoPath) { url } }`, @@ -85,7 +85,7 @@ export const resolveRev = memoizeObservable( queryGraphQL({ ctx: getContext({ repoKey: ctx.repoPath }), request: `query ResolveRev($repoPath: String!, $rev: String!) { - repository(uri: $repoPath) { + repository(name: $repoPath) { mirrorInfo { cloneInProgress } @@ -180,7 +180,7 @@ export const fetchBlobContentLines = memoizeObservable( queryGraphQL({ ctx: getContext({ repoKey: ctx.repoPath }), request: `query BlobContent($repoPath: String!, $commitID: String!, $filePath: String!) { - repository(uri: $repoPath) { + repository(name: $repoPath) { commit(rev: $commitID) { file(path: $filePath) { content